How we solve conflicts… within our Linking Logic
Worlds are built on relations. They let us know who to keep close and who to keep even closer. They connect obscure laws with historic events, so we can understand where they came from. Some relations are causal, some are just correlations. Sometimes it’s easy to miss relations because often they are not obvious on first sight – like the ocean tide being impacted by the moon rather than by anything on this planet. But learning about relations like this is key to being able to understand a world.
This goes double for the worlds in roleplaying games. They often introduce new concepts to us like the theory of magic or complex social, religious and political networks. Understanding them can be tough enough as it is. But as soon as things get set into motion, it’s almost impossible to keep up without understanding the relations of the world. That’s why our YARPS concept heavily relies on Entry Linking – but you already know about it (or can read about it here).
Sneak Peek into the work of a product manager
Today I’m mentioning the topic of Entry Linking for another reason. It will provide a sneak peek into the work of a product manager, as it was one of my tasks over the last time. Think of it as a kind of Dev Diary, but since I’m not a developer at all I added a lot of examples that helped myself to understand the topic. Maybe the sheer amount of things that need consideration when connecting two Entries could be interesting as such. So if you are brave (or really into link conflict solving), join me on a side quest I call: Entry Linking Conflict Management based on Link Relation.
Like every quest it all started with a mission, a call-to-action: we needed a new YARPS concept for the influence of users visibility and editing rights on Entry Linking.
Now you may say: „That’s not difficult. A user should be able to link any entry, …“ Right? But I would argue: User can’t link entries that they don’t see. So you might add: „… as long as they have the right to see and edit both of the entries.“ And it’s not wrong, it does work – for one or two cases. But for sixteen other cases it’s not so simple. Where do the sixteen cases come from? To understand that, I had to do a bit of research regarding Link relations.
Research
I know, I know… boring. Nobody likes to do research, but it is the first way to understanding things. So let me share what I found out:
- An Entry link connects two Entries, let’s call them Entry A and Entry B.
- The user always has full visibility and editing rights for Entry A – otherwise they wouldn’t be able to try linking them.
- We need to distinguish between:
- Entry Links that can have exactly one (1) Entry linked
- and those who can have any number (n) of Entries linked to them.
- This goes for both ends of the Entry Link, so there are four types of link relations we need to consider:
- 1 : 1
- 1 : n
- n : 1
- n : n
Why is this important? Because I can have a lot of friends, but I can only have one father. So it’s not a problem to get a new friend, but it is if there’s a stranger telling me he’s my father.
For each Link Relation we might have to consider more variables. Because if there is a limit to how many Entries can be linked, we also have to take a look at existing links. But let’s start with the easiest variant:
n : n
Entry Links that allow any number of Entries to be linked don’t make a lot of work. A good example are faction-character-relations – because a faction can have any number (n) of members and a character can join any number (n) of factions. Kariana wants to join the Art Worker‘ Guild. The only question we need to answer is: Will the guild accept the character?
In technical terms this means we only need to check for one thing: is the user allowed to edit Entry B (The Art Worker’s Guild). If they are, the linking action is accepted. If they are not allowed, the linking action will be declined. Sounds simple right?
n : 1
Let’s make things a bit more challenging. What if one end of our link relation only accepts up to one (1) link? We can reuse our example for this one by tweeking it a bit. Kariana wants to join the Art Worker‘ Guild. Let’s say the Art Worker’s Guild can have any number (n) of members, but they expect their members to be the only Guild they are affiliated with – so the character can’t have more than one (1) faction linked.
Now we need to check if Kariana is already part of any other faction (Entry C). And in case there is an Entry C we’ll need to know if the user has the editing rights for Entry B and C, because in order to link Entry A to B we also need to erase the Link between Entry B and C (the other Guild will have to let Kariana go). This creates a couple of new cases YARPS will automatically consider, when the user tries to connect Kariana to the Art Worker’s Guild.
It’s pretty much the same for 1 : n – so I won’t bore you with it. Instead we will dive right into the next stage of linking conflicts.
1 : 1
This is where it gets complicated. To illustrate why not look at a real-world example that can be complicated as well? Marriage. Selene wants to marry Godric. A quiet complex character-character-relation. Because every character can always be married to one other character. Meaning: if both are willing and single there would be no problem. But as always we need to look at the other cases, we need to find the conflicts.
For every Entry Link (like marriage) that allows only one (1) Entry to be linked on both ends, we need to look at other Entries that potentially are already linked to them – introducing Entry C and Entry D. Selene can’t marry Godric if she already has a husband (or wife for that matter) and she can’t marry him if Godric has a spouse already. And if both are already married, we’d better hope they all are unhappy – cause they all need to agree to split up (the user needs editing rights for all four Entries). Instead of the one question in our first example we now need to check five facts. Remember the eighteen cases we mentioned in the beginning? Here they are!
In the end we made it. This way every possible scenario is checked. For example:
- Godric says he doesn’t want to be married | User misses editing rights for Entry B.
- Godric is already married to Illyos. Illyos wont agree to separate. | User missing editing rights for Entry C.
- …
- Selene and Godric are both already married, but agree together with their spouses to separate and remarry each other. | User has all required editing rights.
Links to invisible Entries
Feeling a bit dizzy? No worries… here’s a breather to relaxe. How to manage Invisible Entries in the Linking Logic? Here’s what I delivered to our developers:
Lucky for us all, I only have to write the concept, not the actual code for all this!
Thanks for joining me on this little side quest! You gain 5exp to level your Product Manager class. To me the best thing about this is that I will never have to think about all this, as soon as YARPS does it for me – so I can just concentrate on planning the next adventure.