Looking for Aid/Advice

Aquin25

Villager
Member
Joined
Aug 9, 2014
Messages
19
Reaction score
3
First Language
English
Primarily Uses
So... I was hoping to implement a relationship system into my game, similar to the SL system in the persona games.

Most of it has been handled just fine via the event system and variables, but I was hoping for a way to display the current level in the relationship between the MC and the party members in question.
The easy way to do this would be to have a menu showcasing the current amount of the variable. But how exactly would I implement that? (And also have said menu add in the characters as they're brought into the party, instead of spoiling things at the beginning.
 

Sparky89

Is proberly eating one of evmaster's Brownie's.
Veteran
Joined
Dec 18, 2019
Messages
151
Reaction score
53
First Language
English
Primarily Uses
RMMV
Not sure on the script you can use but i know a first step ! that would be http://sumrndm.site/hud-maker/
Here you can make a HUD display you can make anything even picture's for your characters in HUD's
he also does menu stuff - but i wouldn't know the Java formula for getting the info extracted to be showing the say HUD bar relationship levels although possible through this Sumrndm plugin! i'm sure some on on here may know that formular.
 

zeroscares

Veteran
Veteran
Joined
Oct 17, 2020
Messages
54
Reaction score
10
First Language
português
Primarily Uses
RMVXA
Not sure on the script you can use but i know a first step ! that would be http://sumrndm.site/hud-maker/
Here you can make a HUD display you can make anything even picture's for your characters in HUD's
he also does menu stuff - but i wouldn't know the Java formula for getting the info extracted to be showing the say HUD bar relationship levels although possible through this Sumrndm plugin! i'm sure some on on here may know that formular.
sparky89: this is for ace, not MV

aquin25, how are you determining what variables are associated with each party member? can you show how you're event-programming this, and can you show how you want this menu to look like?
 

Aquin25

Villager
Member
Joined
Aug 9, 2014
Messages
19
Reaction score
3
First Language
English
Primarily Uses
Well... here's a base example of how the system is built.

(At the end of each branch will be a command to turn the trigger ON, as well as a command to increase the variable by 1, forcing the player to wait until after the next dungeon to continue with the relationship)

What I'm looking for is a way to display to the player what level their relationships are at for each party member. (And have said display show up when said party member joins the party, not before)
Easiest way I can think to do that would be to just have a way to display this variable to the player.
 
Last edited:

Binder28

Veteran
Veteran
Joined
Sep 15, 2020
Messages
43
Reaction score
12
First Language
Portuguese
Primarily Uses
RMVXA
If you are using "face pictures" on the dialogue just draw a heart/bar on the picture...(harvest moon style)...and put the picutre with the corresponding "heart" level in the corresponding dialogue of that lvl...it will be a lot of work to put the "heart level" on every picture you need to use...but it's just a matter of ctr+c and ctr+v...and there you go....
 

zeroscares

Veteran
Veteran
Joined
Oct 17, 2020
Messages
54
Reaction score
10
First Language
português
Primarily Uses
RMVXA
that face message system doesn't make for a good system menu if you want to see them all at once

Aquin25, I can code this for you if you show me an image of how you want your menu to look like
 

Aquin25

Villager
Member
Joined
Aug 9, 2014
Messages
19
Reaction score
3
First Language
English
Primarily Uses
Thanks.

The menu should be classic if I'm being honest. (Using a few Yanfly scripts in the game)
All i need is one menu in the ESC menu that is marked as (Relationship Level)
Within should be a pic of the party member, next to their name, right above a 0-5 scale. (0 being no relationship, 5 being max)
The meter goes up every time the party member variable goes up. (Also... just to avoid who will be joining the party, the screen should only display the party member after they join the party)
 

zeroscares

Veteran
Veteran
Joined
Oct 17, 2020
Messages
54
Reaction score
10
First Language
português
Primarily Uses
RMVXA
ok well, because u don't wanna give me an image of how it should look like, i'll just improvise with how it looks. (last chance to show me how it should look)

i'll reply again if i come up with a script
 
Last edited:

Aquin25

Villager
Member
Joined
Aug 9, 2014
Messages
19
Reaction score
3
First Language
English
Primarily Uses
Thanks... but I really don't have an image. I just want it to be more consistent with the VX ace base menu design, As that's what I've been using.
Thanks for your help. It's really appreciated.
 

zeroscares

Veteran
Veteran
Joined
Oct 17, 2020
Messages
54
Reaction score
10
First Language
português
Primarily Uses
RMVXA
foto1.png
foto2.png
Code:
#==============================================================================
# Script: Player Relationship window
# Author: zeroscares
# Version: 1.0
# Extra credits: Hime Works [himeworks.com] (notetag guide)
# Date: October 2020
#==============================================================================
# Description:
#------------------------------------------------------------------------------
# Forum request. Adds a command to Scene_Menu to view a relationship meter.
# Has a new scene (Scene_SocialLink) and a new window (Window_SocialSkills).
# This will adjust the relationship up to a max of 5.
#==============================================================================
# TOS:
#------------------------------------------------------------------------------
# - You can use this in any project, no credit needed
# - Don't remove the header text
# - I won't write extra fixes, changes or add-ons. Customize all you want
#==============================================================================
# Instructions:
#------------------------------------------------------------------------------
# Paste this script into its own slot in the Script Editor, above Main but
# below Materials. In the actor's notetag, insert the following:
#                    
#                           <socialvariable: X>
#
# Replace X with the game variable number you are tracking the relationship with.
# You can read through other actor relationship windows like done in the
# default Status scene, with the pagedown and pageup buttons.
#==============================================================================
# Details:
#------------------------------------------------------------------------------
# - You could do icon alternatives the more an actor variable grows, by
#   editing the code near def draw_description(x, y).
# - The Socials command will be at the top of Window_MenuCommand by default
# - 0 value for an actor socialvariable will appear as "..."
#==============================================================================
# ** Configuration
#==============================================================================

module SCARESOCIAL
  # Icon that will show next to the relationship bar. Default is 122
  RELATIONSHIP_ICON = 122
  # Text that will show when the actor's variable increases.
  RELATIONSHIP_DESCRIPTORS = ["Stranger", "Indifferent", "Acquaintances", "Friends", "Partners"]
  # Text that will show before the text in RELATIONSHIP_DESCRIPTORS
  RELATIONSHIP_PREFIX = "Status: "
  COMMAND_NAME = "Socials"
  # Text below not customizable
  Regex = /<socialvariable:\s*(.*?)\s*>/i
end

#==============================================================================
# ** RPG::Actor
#==============================================================================

module RPG
  class Actor
  #--------------------------------------------------------------------------
  # * socialvar(actor)
  #--------------------------------------------------------------------------
    def socialvar(actor)
      load_social_variable unless @socialvar
      return eval_social_variable(actor)
    end
  #--------------------------------------------------------------------------
  # * load_social_variable
  #--------------------------------------------------------------------------
    def load_social_variable
      @socialvar = "0"
      res = self.note.match(SCARESOCIAL::Regex)
      @socialvar = res[1] if res
    end
  #--------------------------------------------------------------------------
  # * eval_social_variable
  #--------------------------------------------------------------------------
    def eval_social_variable(actor)
      eval(@socialvar)
    end
  end
end

#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
#  This class handles actors. It is used within the Game_Actors class
# ($game_actors) and is also referenced from the Game_Party class ($game_party).
#==============================================================================

class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  # *
  #--------------------------------------------------------------------------
  alias socialvariable_initialize initialize
  def initialize(actor_id)
    socialvariable_initialize(actor_id)
  end
  #--------------------------------------------------------------------------
  # *
  #--------------------------------------------------------------------------
  def socialvar
    actor.socialvar(self)
  end
end

#==============================================================================
# ** Window_MenuCommand
#------------------------------------------------------------------------------
#
#==============================================================================

class Window_MenuCommand < Window_Command
  #--------------------------------------------------------------------------
  # * Create Command List
  #--------------------------------------------------------------------------
  alias zero_make_command_list make_command_list
  def make_command_list
    add_social_command
    zero_make_command_list
  end
  #--------------------------------------------------------------------------
  # * For Adding Original Commands
  #--------------------------------------------------------------------------
  def add_social_command
    add_command(SCARESOCIAL::COMMAND_NAME, :socials, main_commands_enabled)
  end
end

#==============================================================================
# ** Window_SocialSkills
#------------------------------------------------------------------------------
#  This window displays the party member's relationship to the player.
#==============================================================================

class Window_SocialSkills < Window_Selectable
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(actor)
    super(0, 0, Graphics.width - 252, Graphics.height - 246)
    self.x = (Graphics.width - self.width) / 2
    self.y = (Graphics.height - self.height) / 2
    self.padding_bottom = 0
    @actor = actor
    refresh
    activate
  end
  #--------------------------------------------------------------------------
  # * Set Actor
  #--------------------------------------------------------------------------
  def actor=(actor)
    return if @actor == actor
    @actor = actor
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    contents.clear
    draw_block1    (line_height * 0)
    draw_horz_line (line_height * 4)
    draw_block2    (line_height * 5)
  end
  #--------------------------------------------------------------------------
  # * Draw Block 1
  #--------------------------------------------------------------------------
  def draw_block1(y)
    draw_actor_name(@actor, 136, y)
    draw_actor_face(@actor, 8, y)
    draw_basic_info(136, y)
  end
  #--------------------------------------------------------------------------
  # * Draw Horizontal Line
  #--------------------------------------------------------------------------
  def draw_horz_line(y)
    line_y = y + line_height / 2 - 1
    contents.fill_rect(0, line_y, contents_width, 2, line_color)
  end
  #--------------------------------------------------------------------------
  # * Draw Block 4
  #--------------------------------------------------------------------------
  def draw_block2(y)
    draw_description(4, y)
  end
  #--------------------------------------------------------------------------
  # * Draw Description
  #--------------------------------------------------------------------------
  def draw_description(x, y)
    @value = $game_variables[@actor.socialvar]
    @relationpref = SCARESOCIAL::RELATIONSHIP_PREFIX
    case @value
      when 0
        @relationtext = "..."
      when 1
        @relationtext = SCARESOCIAL::RELATIONSHIP_DESCRIPTORS[0]
      when 2
        @relationtext = SCARESOCIAL::RELATIONSHIP_DESCRIPTORS[1]
      when 3
        @relationtext = SCARESOCIAL::RELATIONSHIP_DESCRIPTORS[2]
      when 4
        @relationtext = SCARESOCIAL::RELATIONSHIP_DESCRIPTORS[3]
      when 5
        @relationtext = SCARESOCIAL::RELATIONSHIP_DESCRIPTORS[4]
    end
    draw_text_ex(x, y, @relationpref + @relationtext)
  end
  #--------------------------------------------------------------------------
  # * Get Color of Horizontal Line
  #--------------------------------------------------------------------------
  def line_color
    color = normal_color
    color.alpha = 48
    color
  end
  #--------------------------------------------------------------------------
  # * Draw Basic Information
  #--------------------------------------------------------------------------
  def draw_basic_info(x, y)
    draw_actor_icons(@actor, x, y + line_height * 1)
    draw_actor_hp(@actor, x, y + line_height * 2)
    draw_actor_mp(@actor, x, y + line_height * 3)
    #--- new info ---#
    draw_gauge(x + 34,  y + line_height * 1, 90, 1, gauge_back_color,  gauge_back_color)
    draw_gauge(x + 34,  y + line_height * 1, 18, $game_variables[@actor.socialvar], mp_gauge_color1, mp_gauge_color2)
    draw_icon(SCARESOCIAL::RELATIONSHIP_ICON, x, y + line_height * 1, true)
  end
end

#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
#  This class performs the menu screen processing.
#==============================================================================

class Scene_Menu < Scene_MenuBase
  #--------------------------------------------------------------------------
  # * Create Command Window - Alias
  #--------------------------------------------------------------------------
  alias zs_create_command_window create_command_window
  def create_command_window
    zs_create_command_window
    @command_window.set_handler(:socials,   method(:command_socials))
  end
  #--------------------------------------------------------------------------
  # * [Socials] Command - New
  #--------------------------------------------------------------------------
  def command_socials
    @status_window.select_last
    @status_window.activate
    @status_window.set_handler(:ok,     method(:on_socials_ok))
    @status_window.set_handler(:cancel, method(:on_socials_cancel))
  end
  #--------------------------------------------------------------------------
  # * [OK] Socials Command - New
  #--------------------------------------------------------------------------
  def on_socials_ok
    SceneManager.call(Scene_Socials)
  end
  #--------------------------------------------------------------------------
  # * [Cancel] Socials Command - New
  #--------------------------------------------------------------------------
  def on_socials_cancel
    @status_window.unselect
    @command_window.activate
  end
end

#==============================================================================
# ** Scene_Socials
#------------------------------------------------------------------------------
#  This class performs the relationship screen processing.
#==============================================================================

class Scene_Socials < Scene_MenuBase
  #--------------------------------------------------------------------------
  # * Start Processing
  #--------------------------------------------------------------------------
  def start
    super
    @socials_window = Window_SocialSkills.new(@actor)
    @socials_window.set_handler(:cancel,   method(:return_scene))
    @socials_window.set_handler(:pagedown, method(:next_actor))
    @socials_window.set_handler(:pageup,   method(:prev_actor))
  end
  #--------------------------------------------------------------------------
  # * Change Actors
  #--------------------------------------------------------------------------
  def on_actor_change
    @socials_window.actor = @actor
    @socials_window.activate
  end
end
 
Last edited:

Aquin25

Villager
Member
Joined
Aug 9, 2014
Messages
19
Reaction score
3
First Language
English
Primarily Uses
Thanks for the help.

Forgive my ignorance though... but how do I attach the proper variables?

Based on the instructions, I placed the following on Iblis's Note Page (<socialvariable:Iblis S Link>) And it gave me the following Error

Script 'Social Link Script' line 78: NameError occured

Uninitialized constant RPG::Actor::Link

How would I go about fixing this? Sorry to be a bother.

I also tried adding a space between the variable name and the : and the result was the same.

Upon further testing... replaceing the spaces in the variable name with - changed the error code slightly to


Script 'Social Link Script' line 78: NameError occured

Uninitialized constant RPG::Actor::Iblis

(Iblis is the party member's name for the record)

Just informing you in case this is relevant.
 

zeroscares

Veteran
Veteran
Joined
Oct 17, 2020
Messages
54
Reaction score
10
First Language
português
Primarily Uses
RMVXA
the NUMBER of the variable, not the name hahahaha
Write: <socialvariable:4> if Iblis S Link = Game variable #4

Edited the script to add this clarification
 
Last edited:

Aquin25

Villager
Member
Joined
Aug 9, 2014
Messages
19
Reaction score
3
First Language
English
Primarily Uses
Awesome! That fixed it right up

Thank you SO much. You've been a really big help.
 

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

Latest Threads

Latest Profile Posts

When a youtuber plays your project or game made by you using MAKERs, you will just be awe struck
Ok... so working on the official game guide for my game and its more than 150 pages...... wow. Well, I hope it will help a few players out.
RPG Maker Games Critique with Studio Blue, Episode 12: Amneron's Legacy starts now! Watch on Youtube and join the chat as we explore the world of Ellis!
Lost track of a huge brazilian wandering spider inside my house. In other news, I'm moving again.

Currently working on the second protagonist's story and her companion, making good progress. But I am looking forward to return to my other protagonist and continue his story and have him joined by a new companion. :)

Forum statistics

Threads
105,475
Messages
1,013,955
Members
137,114
Latest member
brenadjnendad
Top