Create Relationship System with Variables

Skyfrid

Veteran
Veteran
Joined
Feb 6, 2014
Messages
230
Reaction score
47
First Language
English
Primarily Uses
Hey my name is Skyfrid, that's Sky- as in blue and -Frid as in fridge. :D  Have you ever had a crush on a game character, only to have her repeat the same thing, every time you speak to her/him. That would be a major set off for anyone. Well look
no further, because I'm here to teach you how to set of a relationship system using variables!


Relationship/Friendship System:

​What the character said, and certain events can be triggered if the required amount of Friendship is high enough. This is set up by variables and will look like this:

  • Acquaintance: 0-99
  • Friendship: 100-199
  • Best Friends: 200-299
  • Love: 300-400


Step 1: Defining Variables
In order to fully understand this guide, you must understand the basic of Variable Click Here!
Once you understand that, all there is to set it up. Create a Variable name Relationship : [Name of Character]. This will set the relationship for the character.



Step 2: Defining Relationships

This step has several stages listed above, but you can skip around if you need.Every time you talk, to that person will increase the variable . The amount may vary, if you decide to change the value.

Acquaintance:

This stage is set up when the Relationship Variable you set up, is between 0-99.

  • This stage includes when the character introduces, him/her to you. Plus their normal conversion. This stage will not require the need of setting up a variable. The Relationship Variable will increase by 5 each time you speak to them.
The first thing you should do is to set up the text, when the character meets the player. Then create a switch, leading to the normal text.




Friendship:

This is the next stage of the relationship. It is defined when the Relationship Variable is 100-199. This requires the use of a variable condition.



Best Friends:

After the Friends Stage, is the Best Friends Stage. It is defined when the Relationship Variable is 200-299.


Love:

The last stage is the most important of them all! It is defined when  the Relationship Variable is 300-400.



With that your done! You can customize it how ever you like, and this system can also be used to trigger "certain" events!
 
Last edited by a moderator:

Benja

Lead Developer
Veteran
Joined
Mar 5, 2014
Messages
131
Reaction score
28
First Language
English
Primarily Uses
RMVXA
I love this tutorial! I'm making a village sim-esque game and this will be perfect!
 

Kaiser Knight

Kaiser Knight
Member
Joined
Mar 15, 2014
Messages
12
Reaction score
0
First Language
Arabic
Primarily Uses
I really love it, I give you like   +1  :thumbsup-right:
 

Mrwolf2

Villager
Member
Joined
Mar 20, 2014
Messages
11
Reaction score
1
First Language
Dutch
Primarily Uses
A very clear tutorial, which is always a very good thing. I do have one question. Do you know if it also possible to somehow see how many variable points you got in total at any time?     
 

Mrwolf2

Villager
Member
Joined
Mar 20, 2014
Messages
11
Reaction score
1
First Language
Dutch
Primarily Uses
Awesome, thank you very much.  
 

EHEBrandon

Villager
Member
Joined
Sep 18, 2014
Messages
10
Reaction score
3
First Language
English
Primarily Uses
I'm having issues... It goes smoothly when I have one event like just going positive or going negative... But when I try to combine the two by choices.. Like select one option it goes positive select the other it goes negative.. But when I add it to self switch to A for positive and to B for negative it works fine but once I add the second event for the negative part it always plays that line first..
 

Skyfrid

Veteran
Veteran
Joined
Feb 6, 2014
Messages
230
Reaction score
47
First Language
English
Primarily Uses
I'm having issues... It goes smoothly when I have one event like just going positive or going negative... But when I try to combine the two by choices.. Like select one option it goes positive select the other it goes negative.. But when I add it to self switch to A for positive and to B for negative it works fine but once I add the second event for the negative part it always plays that line first..
Have you tried using the switches other then the self-switches? It could be that you enabled the self switch in another dialogue.
 

Patryk

Best in the World
Member
Joined
Jan 15, 2015
Messages
21
Reaction score
3
First Language
Polish
Primarily Uses
When I was thinking about how to do system like this in theory, I thought it would be hard, but it turns out it's very easy, thank you, sir! 
 

xonox

Villager
Member
Joined
Dec 31, 2013
Messages
13
Reaction score
3
First Language
French
Primarily Uses
I had some animal crossing inspired ideas and didn't think it would be possible.  Thanks for sharing this tip, very clear.
 

Patryk

Best in the World
Member
Joined
Jan 15, 2015
Messages
21
Reaction score
3
First Language
Polish
Primarily Uses
By the way, does anyone knows how to make it so relationship increases only once when we talked to the npc, and then we have to wait a certain amount of time for it to reset?
 

xonox

Villager
Member
Joined
Dec 31, 2013
Messages
13
Reaction score
3
First Language
French
Primarily Uses
By the way, does anyone knows how to make it so relationship increases only once when we talked to the npc, and then we have to wait a certain amount of time for it to reset?
I have not tried it but you could probably work something out with control variables.  In an event command, you can store the play time or timer in a control variable.  Then when the player talks to the npc, you could check if a certain time has passed.  I'm a beginner in rpg maker, so maybe this wouldn't work.
 

Patryk

Best in the World
Member
Joined
Jan 15, 2015
Messages
21
Reaction score
3
First Language
Polish
Primarily Uses
I have not tried it but you could probably work something out with control variables.  In an event command, you can store the play time or timer in a control variable.  Then when the player talks to the npc, you could check if a certain time has passed.  I'm a beginner in rpg maker, so maybe this wouldn't work.
Actually, I'm 99% sure now that it will work! Most of the time I have to use switches for my games, and I forget how powerful the variables are. Thank you so much!

Again by the way, if anyone's looking for more ideas to the relationship system I've got few, I thought I'd share. I have it so that when you active the event (npc) you have multiple choices.

First, npc have a greeting, that changes with relationship level. And then there are the choices.

Talk - Various random dialogue based on the relationship level, increases relationship by 5. And now it resets after certain amount of time to not be overpowered.

Quest - I'm still considering if it will be series of linear, more in depth quests, or randomly generated ones, kinda like random dialogue. Quests will increase the relationship between around 20-50.

Leave - if you don't want to choose anything right now.

I'm also considering gifts, but I'm sill thinking how to balance their price to not be too cheap, so we won't abuse the system, and won't be to expensive so we can still buy other items and equipment like weapons, armor, and potions.

And finally, I recommend considering Day and Night cycle, with full npc schedules. It makes the game by default so much more fun to play, and with combination of the relationship system it's even more fun. Currently I have 4 phases: day, sunset, night, and morning, with each phase the npcs are in different places, having different dialogue, doing different things, and sleeping (most of them) at night.
 
Last edited by a moderator:

xonox

Villager
Member
Joined
Dec 31, 2013
Messages
13
Reaction score
3
First Language
French
Primarily Uses
Patryk, the day and night idea is great and i just messed today with the event command that lets you change the tileset.  Someone could build multiple tilesets that change during the day.  RPG Maker does it really quickly on my computer, i can do it many times per second even if it's not useful for now.

This would be a lot of work but i'm amazed at the possibilities RPG Maker provides.  Also, i just started messing around in Ruby.  If i could spent a year or two on a desert island, i could create nice things!
 
Last edited by a moderator:

queenchrom

Villager
Member
Joined
Mar 30, 2016
Messages
9
Reaction score
3
First Language
English
Primarily Uses
Patryk, How do you get it to reset? I've looked around and played with the engine but can't figure it out.
 

Crispy-Ghee

The Crispy One
Veteran
Joined
Apr 14, 2016
Messages
30
Reaction score
52
First Language
English
Primarily Uses
This is so relevant to what I'm doing right now! Thanks so much for posting this, it really cuts down on some time I would've spent trying to concept some thoughts out. I'll definitely try this out today. 
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

In today's seminar:
Presenter: In the past, there was a saying, "One who has tuberculosis is doomed for life." But now-
Everyone: *starts coughing in unision*
Gosh... Today seems too much like a good day to do nothing....

I need to keep myself focused...! :kaoback:
javascript'ing essentials.

So, what can I do solve this problem, guys? The plugin is MOG_Weather and I have several Yanfly plugins too.

Forum statistics

Threads
93,696
Messages
914,699
Members
123,292
Latest member
VinzBandicoot
Top