One thing that has been common in RPGs recently, and very popular, is the ability to develop relationships with your companions.
In real life, developing relationships is complicated. How much do they trust you, how much do they like being around you, do they think you’re hot?
In video games, this is usually made much simpler. A linear scale of one variable. You do things they like, relationship bar go up. You do things they hate, relationship bar go down.
To be fair, I think it would be fun to make something more complex than that, but in this tutorial, we are going to create the standard relationship system with one minor change: How long you spend with someone in your party, affects their max relationship score. The way I see it, spending two minutes with someone and spamming them with gifts is more creepy than endearing. (Though if you wish to just hang out with me for two minutes and give me massive amounts of things, I’m not going to COMPLAIN, I just won’t necessarily like you more.)
We are going to simplify this to one character for the tutorial, but it is just about repeating the process for multiple.
So, Step 1: Let’s create two variables:
The first variable, ThereseRel is going to store her relationship value with the character. The second, ThereseRelMax is going to store the maximum she can gain, based on time spent in the party (maxing out at 100).
Now, to handle the max amount. The easiest way to do any persistent background handling is with a common event. So go into your database and pop down to the common event tab. As this will constantly be going on in the background, you should set it to Parallel. You’ll need to assign it to a switch to turn off and on, so be sure to switch it on at the beginning of your game, or when the relationship system turns on in your game.
This common event is honestly fairly simple. The waits add up to a total of 3600 frames (60 seconds, 1 minute), and each minute it checks if Therese is in the party with a conditional branch. If she is, it does another conditional branch to see if ThereseRelMax is still less than 100. If it is, it raises the variable by 1. So, after a total of 1 hour, 40 minutes with Therese in your party, you will be able to max out her relationship score.
Now let’s make an event that the player can interact with that will change Therese’s relationship score. I made a puppy. When you talk to the puppy, you have four options Hug (Therese loves), Pet (Therese likes), Ignore (Therese dislikes), Kick (YOU MONSTER, I mean, Therese Hates). So all we do is use Show Choices, Conditional Branches and Variable Controls to implement all of this.
This is all fairly simple. In every choice, the first thing it does is tell us how Therese feels about this with a Show Text command. Then, on the ones where it is going up, it uses a conditional branch to check if it is below the max. If it is, it raises it by 1 or 3 depending on like or love (also, if it is going up more than 1, it makes sure it didn’t go above the max, if it did, it sets it to max). If it equal to max, it tells the player that they need to spend more time with her before it goes up.
The negative ones are much more simple. As there is no minimum, it just subtracts. You could easily place a minimum (such as -100) in much the same way you did the max.
The only thing left to do is implement these relationship scores into conditional branches when talking to the character! But there are many other ways you can use the score other than just to change dialogue options and giving you some romance scenes. Maybe the person in your party who has the highest score is the one who comes to rescue you in a key point. Maybe the person who has the lowest score will betray you at a certain point (or maybe if you keep them all high enough, you have no traitor!). How else could you use these relationship scores?