Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Replacing Party Members

I have changed $game_party.add_actor(actor_id) to add an unlimited number of actors to the party:

Code:
  def add_actor(actor_id)
    # Get actor
    actor = $game_actors[actor_id]
    # If the actor is not in the party
    if not @actors.include?(actor)
      # Add actor
      @actors.push(actor)
      @party_size += 1
      # Refresh player
      $game_player.refresh
    end
  end

I have also created a method to replace party actors (those with an index less than 4 [i1]) with reserve party actors (those with an index 4 or greater [i2]):

Code:
  def replace(i1,i2)
    temp = $game_party.actors[i1]
    $game_party.actors[i1] = $game_party.actors[i2 + 4]
    $game_party.actors[i2 + 4] = temp
    $game_player.refresh
  end

Now...I have created an event that increases all of the actors in the party levels (just an NPC to talk to). The first time you talk to him, everyones level increases, but the second time, only the original party members levels increase. Also if I remove equipment from the extra party members, and trigger the event, they get their equipment back.

Any ideas as to what might cause this?
 

Mac

Member

I'm guessing its only because it stores the variables for the 4 main party members rather than all of them, you would need to make it so that it would read and overwrite the variables for all the party members, as the system works on a default of 4...there will be a little bit of editting required ^_^
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top