Relationship System

Discussion in 'RGSS3 Scripts (RMVX Ace)' started by Jeneeus Guruman, Jul 18, 2012.

    Tags:
  1. Jeneeus Guruman

    Jeneeus Guruman The Returnee Veteran

    Messages:
    1,078
    Likes Received:
    191
    Location:
    Philippines
    First Language:
    Filipino
    Relationship System
    Version: 1.1.0
    By Jeneeus Guruman

     ​
     ​
    Introduction

    This script allows to give bonuses to certain partners like parameters and exclusive skills.

    Features

    • Parameter bonus for each partner.
    • Additional skills depending on the partner and their relationship.

    Screenshots

    This will be the basis for the following screenshots below (Isabelle is below).
    [​IMG]

    If Natalie is Eric's partner...
    [​IMG]

    If Isabelle is Eric's partner...
    [​IMG]

    If Eric and Isabelle's relationship increased:
    [​IMG]

    If Isabelle has no partner:
    [​IMG]

    If Isabelle is Eric's Partner:
    [​IMG]
    Now also compatible with Yanfly Ace Menu Engine and Status Menu
    [​IMG]
    How to Use

    Just insert (not the one below) above main and below other scripts (including other non-defaults). When using Yanfly's scripts, place this below those scripts also.

    #   Script Calls:#     #     change_partner_level(level, actor_id1, actor_id2)#       * Changes the level of the relationship between specified actor IDs.#       Placement of IDs is not necessarily in order. If actor_id2 is not#       specified, gets the value of the current partner instead. This script#       call is good for setting a partner to have a high level from the start#       of the game or if you want to reset the relationship level mid-game.#     #     gain_partner_level(actor_id1, actor_id2)#       * Increases the level of the relationship between specified actor IDs.#       Placement of IDs is not necessarily in order. If actor_id2 is not#       specified, gets the value of the current partner instead.#     #     lose_partner_level(actor_id1, actor_id2)#       * Decreases the level of the relationship between specified actor IDs.#       Placement of IDs is not necessarily in order. If actor_id2 is not#       specified, gets the value of the current partner instead.##     read_partner_level(actor_id1, actor_id2)#       * Gets the level of the relationship between specified actor IDs.#       Placement of IDs is not necessarily in order. If actor_id2 is not#       specified, gets the value of the current partner instead. This can be#       used for having different cutscenes by depending on the relationship level.##     To add parameter bonus in notetags:#       * Place this notetag to increase the parameter of the partner of the#       one who has the notetag per relationship level.#       <partner_param: param_id, param_bonus[%]>#       param_id: The ID of the parameter to be added.#       0 = MHP;          1 = MMP;#       2 = ATK;          3 = DEF;#       4 = MAG;          5 = MDF;#       6 = AGI;          7 = LUK;#       param_bonus: The amount of bonus to be added#       %: Place a percent sign if the bonus will be by percentage.#       Remove the percent sign if using a fixed amount.#       Notetag examples:#         <partner_param: 0, 5%>    => Adds 5% of MaxHP of partner.#         <partner_param: 1, 10>    => Adds exactly 10 of MaxMP of partner.##     To add skill bonus in notetags:#       * Place this notetag to learn the skill of the actor who has the#       notetag depending on the partner.#       <partner_skill: partner_id, partner_level, skill_id, type>#       partner_id: The ID of the partner to learn a skill.#       partner_level: The partner level required to learn the skill.#       skill_id: The ID of the skill to learn.#       type: type of conditions for learning#       0 = skill only appears if the specified partner is the current partner#       1 = skill only appears if the specified partner is in the battle party#       2 = skill only appears if the specified partner is in the party#     (both battle members and reserved members)#       3 = skill appears permanently as long as the partner level speficied#     is reached#       Notetag examples:#         <partner_skill: 9, 2, 73, 0>   => Actor 9's partner learns Skill 73#         at partner level 2 only if they're currently partners.#         <partner_skill: 2, 2, 75, 1>   => Actor 2's partner learns Skill 75#         at partner level 2 only if actor 2 is in the battle party.#         <partner_skill: 1, 3, 74, 2>   => Actor 1's partner learns Skill 74#         at partner level 3 only if actor 1 is in the party, in battle or reserved.#         <partner_skill: 6, 3, 76, 3>   => Actor 6's partner learns Skill 76#         at partner level 3 only as long as their relationship level reaches#         level 3. It will be removed once the level is below 3.#       WARNING: If an actor don't have the skill type of the skill to be#       learned, it's still be unavailable, unless there are other scripts#       that will add a skill type.
    Demo

    Relationship System Ace

    Known Bugs
    None so far.

    Author's Notes

    • This script is free to use commercially or not. If commercially, you must credit me. If not, just don't claim this as your own but not crediting me is okay if you don't want to.
     
    Last edited by a moderator: Jan 31, 2015
    #1
  2. DarkWaker

    DarkWaker Villager Member

    Messages:
    9
    Likes Received:
    1
    Location:
    Earth
    First Language:
    English
    This... Seems very interesting! Nice idea :D
     
    #2
  3. Maus Merryjest

    Maus Merryjest Veteran Veteran

    Messages:
    240
    Likes Received:
    40
    Location:
    Colorado
    First Language:
    English
    Jeneeus, would it be possible to add this extra bit of functionality:

    -Characters who are partnered will 'cover' their partners if their health drops down past a specific percentage defined in the script?
     
    #3
  4. Jeneeus Guruman

    Jeneeus Guruman The Returnee Veteran

    Messages:
    1,078
    Likes Received:
    191
    Location:
    Philippines
    First Language:
    Filipino
    Mmm...

    I'll try to add that feature.
     
    #4
  5. Camupins

    Camupins Villager Member

    Messages:
    17
    Likes Received:
    0
    First Language:
    English
    I love this! Just what I was looking for! Why not place a new menu item where you can track your relationship status between actors? Just an idea~
     
    #5
  6. Jeneeus Guruman

    Jeneeus Guruman The Returnee Veteran

    Messages:
    1,078
    Likes Received:
    191
    Location:
    Philippines
    First Language:
    Filipino
    @Camupins: This is not yet in the demo but is this okay?

    [​IMG]

    @Maus Merryjest: This one is only a manual cover state that always protects your partner no matter what until the state is removed. I hope this helps.

    Code:
    #==============================================================================
    # ** Partner Substitute/Cover
    # by: Jeneeus Guruman
    #------------------------------------------------------------------------------
    #  This script allows to cover your partner.
    #
    #   How to use:
    #
    #	 * Plug-n-play
    #	 * Place this below default and non-aliased scripts.
    #	 * Relationship System required.
    #	 * Place below Relationship System.
    #
    #	   * The state must have a "Subtitute" Special Flag and place
    #	   this notetag.
    #	   <cover partner only/also>
    #	   only: only covers the partner
    #	   also: covers both the partner and the default cover
    #==============================================================================
    #----------------------------------------------------------------------------
    # * Do not edit anything below here. But don't worry, it won't cost computer
    # damage, incontinence, explosion of user's head, coma, death, and/or halitosis.
    # - Second sentence got from Yanfly.
    #----------------------------------------------------------------------------
    module Jene
      COVER_PARTNER = /<cover\spartner?\s(only|also)?\s*>/i
    end
    class RPG::State
      #--------------------------------------------------------------------------
      # * Cover Partner
      #	 Returns:
      #	   0: Default substitute
      #	   1: Include substitute partner
      #	   2: Substitute partner only
      #--------------------------------------------------------------------------
      def substitute_partner
        self.note.each_line { |line|
    	  if line =~ Jene::COVER_PARTNER
    	    case $1.to_s.downcase
    	    when "only"
    		  return 2
    	    when "also"
    		  return 1
    	    end
    	  end
        }
        return 0
      end
    end
    #==============================================================================
    # ** Scene_Battle
    #------------------------------------------------------------------------------
    #  This class performs battle screen processing.
    #==============================================================================
    class Scene_Battle < Scene_Base
      #--------------------------------------------------------------------------
      # * Apply Substitute
      #--------------------------------------------------------------------------
      alias jene_apply_substitute apply_substitute
      def apply_substitute(target, item)
        substitute = target.friends_unit.substitute_battler
        sub_partner = 0
        if substitute != nil
    	  for state in substitute.states
    	    if sub_partner != state.substitute_partner
    		  sub_partner = state.substitute_partner
    		  break
    	    end
    	  end
        end
        if check_substitute_partner(target, substitute) && sub_partner != 0
    	  @log_window.display_substitute(substitute, target)
    	  return substitute
        end
        if sub_partner != 2
    	  return jene_apply_substitute(target, item)
        end
        target
      end
      #--------------------------------------------------------------------------
      # * Check Partner Substitute Condition
      #--------------------------------------------------------------------------
      def check_substitute_partner(target, substitute)
        substitute != nil && substitute.partner == target.id
      end
    end
    
     
    #6
  7. Camupins

    Camupins Villager Member

    Messages:
    17
    Likes Received:
    0
    First Language:
    English
    Well, I meant a menu option, like you can select it seperatly and be able to view how well one actors relationship is with another actor.
     
    #7
  8. Jaymonius

    Jaymonius Veteran Veteran

    Messages:
    232
    Likes Received:
    74
    Location:
    Calgary Alberta
    First Language:
    English
    A very nice script indeed, so do the heroes have to be beside each other for this, right? :D
     
    #8
  9. Jeneeus Guruman

    Jeneeus Guruman The Returnee Veteran

    Messages:
    1,078
    Likes Received:
    191
    Location:
    Philippines
    First Language:
    Filipino
    There's a relationship level beside actor's level in the status menu (See my screenies).

    Exactly. The first two party members will be the partners and also the 3rd and 4th and so on (only if you want more than 1 pair of partners).
     
    #9
  10. Camupins

    Camupins Villager Member

    Messages:
    17
    Likes Received:
    0
    First Language:
    English
    Ah! Did not even see that. :)
     
    #10
  11. Jeneeus Guruman

    Jeneeus Guruman The Returnee Veteran

    Messages:
    1,078
    Likes Received:
    191
    Location:
    Philippines
    First Language:
    Filipino
    Okay. Maybe, I'll remove the partner name in the menu (main) since it's more confusing if I place it.
     
    #11
  12. MooshraKun

    MooshraKun Making Dreams Stand Up Veteran

    Messages:
    238
    Likes Received:
    11
    Location:
    cloud9
    First Language:
    Lokota
    So can this script be simular to the D-link of KHBBS where you can connect to members that aren't in the party but in the database? I would try this my self, but my ACE is screwy right now.
     
    #12
  13. Jeneeus Guruman

    Jeneeus Guruman The Returnee Veteran

    Messages:
    1,078
    Likes Received:
    191
    Location:
    Philippines
    First Language:
    Filipino
    Actually, it's the exact opposite -- you can only connect those in the party.
     
    #13
  14. MooshraKun

    MooshraKun Making Dreams Stand Up Veteran

    Messages:
    238
    Likes Received:
    11
    Location:
    cloud9
    First Language:
    Lokota
    Aw that kind of sucks but still a nice script not what I was looking for but this scriipt can be very useful.
     
    #14
  15. AeonSpark

    AeonSpark Veteran Veteran

    Messages:
    102
    Likes Received:
    5
    First Language:
    English
    I had wondered about affinity points using a Switch based system.

    For someone who doesn't understand much Script would this work just as well?
     
    #15
  16. RocketShark

    RocketShark Icy Consort Member

    Messages:
    6
    Likes Received:
    0
    Location:
    Helio City
    First Language:
    English
    Oi, Is there anyway you think you could make compatibility with Yanfly's Party manager?

    It doesn't register any relationship status when making party changes through it. Which kind of puts a damper on my idea..
     
    #16
  17. Linally

    Linally Edible Knight Member

    Messages:
    21
    Likes Received:
    0
    First Language:
    English
    This is pretty amazing! I'm very impressed! I know a lot of new games that have this, so it's cool to have it for RPGMaker now.

    Is there a chance it does, or you can, make it so that when the relationship reaches a certain level it can actually trigger an event/cutscene to happen? Or you have to be a certain relationship level to do something with the character?
     
    #17
  18. nathkyo

    nathkyo Villager Member

    Messages:
    27
    Likes Received:
    1
    First Language:
    English
    I had two ideas could it be possible to have an actual relationship status depending on the level like friend , relationship,engaged or married.

    the second idea if it would be possible for its distinguished between family members  one of the characters in my game has a daughter

    so what makes sense that he couldn't marry or be in a relationship his own daughter.

    However it does make sense that he could get gets stat and bonus skills for be in the same party together from their relationship as child and parent.
     
    Last edited by a moderator: Jan 14, 2013
    #18
  19. StarkinGyra

    StarkinGyra Adventurer Member

    Messages:
    219
    Likes Received:
    9
    Location:
    Portland, OR
    First Language:
    English
    I like this. I will have to give it a try and see if it will work for me.
     
    #19
  20. sagamagus

    sagamagus Warper Member

    Messages:
    1
    Likes Received:
    0
    First Language:
    Español
    Hi, i was wondering some things, there is a way that you can make copatibility with yanfly scripts, i was using a status menu and dont show parteners, and the second one, there is a way to change the partner, idk, change to the first and the third or he furth,

    thank you for your attention.
     
    #20

Share This Page