Create Relationship System with Variables

Discussion in 'RMVX Ace Tutorials' started by Skyfrid, Mar 11, 2014.

  1. Skyfrid

    Skyfrid Veteran Veteran

    Messages:
    230
    Likes Received:
    47
    Location:
    Houston, Texas
    First Language:
    English
    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.

    [​IMG]

    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.

    [​IMG][​IMG]

    [​IMG][​IMG]

    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.[​IMG]

    [​IMG]

    Best Friends:

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

    [​IMG]
    Love:

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

    [​IMG]

    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: Mar 11, 2014
    #1
    Alanood, Plainview, Kaitos and 17 others like this.
  2. Benja

    Benja Lead Developer Veteran

    Messages:
    131
    Likes Received:
    28
    First Language:
    English
    Primarily Uses:
    RMVXA
    I love this tutorial! I'm making a village sim-esque game and this will be perfect!
     
    #2
    Candacis likes this.
  3. Kaiser Knight

    Kaiser Knight Kaiser Knight Member

    Messages:
    12
    Likes Received:
    0
    Location:
    RPG Maker
    First Language:
    Arabic
    I really love it, I give you like   +1  :thumbsup-right:
     
    #3
  4. Mrwolf2

    Mrwolf2 Villager Member

    Messages:
    11
    Likes Received:
    1
    First Language:
    Dutch
    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?     
     
    #4
  5. Skyfrid

    Skyfrid Veteran Veteran

    Messages:
    230
    Likes Received:
    47
    Location:
    Houston, Texas
    First Language:
    English
    Well this scripts should allow you to:

    Ceodore: http://forums.rpgmakerweb.com/index.php?/topic/14605-cdr-show-variables/

    (I hadn't tested it yet)
     
    #5
  6. Mrwolf2

    Mrwolf2 Villager Member

    Messages:
    11
    Likes Received:
    1
    First Language:
    Dutch
    Awesome, thank you very much.  
     
    #6
  7. EHEBrandon

    EHEBrandon Villager Member

    Messages:
    10
    Likes Received:
    3
    First Language:
    English
    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..
     
    #7
  8. Skyfrid

    Skyfrid Veteran Veteran

    Messages:
    230
    Likes Received:
    47
    Location:
    Houston, Texas
    First Language:
    English
    Have you tried using the switches other then the self-switches? It could be that you enabled the self switch in another dialogue.
     
    #8
  9. Patryk

    Patryk Best in the World Member

    Messages:
    21
    Likes Received:
    3
    Location:
    Płock, Poland
    First Language:
    Polish
    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! 
     
    #9
  10. xonox

    xonox Villager Member

    Messages:
    13
    Likes Received:
    3
    Location:
    Canada
    First Language:
    French
    I had some animal crossing inspired ideas and didn't think it would be possible.  Thanks for sharing this tip, very clear.
     
    #10
  11. Patryk

    Patryk Best in the World Member

    Messages:
    21
    Likes Received:
    3
    Location:
    Płock, Poland
    First Language:
    Polish
    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?
     
    #11
  12. xonox

    xonox Villager Member

    Messages:
    13
    Likes Received:
    3
    Location:
    Canada
    First Language:
    French
    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.
     
    #12
    Patryk likes this.
  13. Patryk

    Patryk Best in the World Member

    Messages:
    21
    Likes Received:
    3
    Location:
    Płock, Poland
    First Language:
    Polish
    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: Jan 18, 2015
    #13
    xonox likes this.
  14. xonox

    xonox Villager Member

    Messages:
    13
    Likes Received:
    3
    Location:
    Canada
    First Language:
    French
    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: Jan 18, 2015
    #14
    Patryk likes this.
  15. queenchrom

    queenchrom Villager Member

    Messages:
    9
    Likes Received:
    3
    Location:
    Oregon
    First Language:
    English
    Patryk, How do you get it to reset? I've looked around and played with the engine but can't figure it out.
     
    #15
  16. Crispy-Ghee

    Crispy-Ghee The Crispy One Veteran

    Messages:
    30
    Likes Received:
    52
    Location:
    oakland
    First Language:
    English
    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. 
     
    #16

Share This Page