The RPG Maker Resource Kit

RMRK RPG Maker Creation => VX Ace => Topic started by: AbsoluteIce on November 28, 2012, 05:44:41 AM

Title: [RPGVXA] Character in party, but will not join battle.
Post by: AbsoluteIce on November 28, 2012, 05:44:41 AM
Is there any way to put the first actor in the party, but he's the only that will not join the random battles/any battles at all?
Title: Re: [RPGVXA] Character in party, but will not join battle.
Post by: D&P3 on November 28, 2012, 07:06:05 AM
Like pokemon? Yes but not via eventing unless you want all of your battles to be completely evented/scripted.
Title: Re: [RPGVXA] Character in party, but will not join battle.
Post by: AbsoluteIce on November 28, 2012, 07:15:56 AM
Like pokemon? Yes but not via eventing unless you want all of your battles to be completely evented/scripted.
Yeah. Problem is I can't seem to find a script, nor how to event something like this.   :V
Title: Re: [RPGVXA] Character in party, but will not join battle.
Post by: Mangomight on November 28, 2012, 04:43:51 PM
Aint much you can't do with scripting :-)

This code would do what you said, for VX atleast, probably for Ace too, if they haven't changed things around too much, I doubt it though.
Code: [Select]
#==============================================================================
# ** Game_Party
#------------------------------------------------------------------------------
#  This class handles the party. It includes information on amount of gold
# and items. The instance of this class is referenced by $game_party.
#==============================================================================

class Game_Party
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_reader :actors # Define read attribute for Actors
end 

#==============================================================================
# ** Scene_Battle
#------------------------------------------------------------------------------
#  This class performs battle screen processing.
#==============================================================================

class Scene_Battle
  #--------------------------------------------------------------------------
  # * Start processing
  #--------------------------------------------------------------------------
  alias remove_actor_temp_start start
  def start
    $game_party.remove_actor(1)
    # Run original method
    remove_actor_temp_start
  end 
  #--------------------------------------------------------------------------
  # * End Battle
  #--------------------------------------------------------------------------
  alias mango_btle_end battle_end
  def battle_end(result)
    # Run original method
    mango_btle_end (result)
    # Insert the removed actor in the first position/index
    $game_party.actors.unshift(1)
    $game_player.refresh
  end
end