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.

Large Party Script

I'm trying to use the Large Party script by Fomar0153 but edited by DerVVulfman to make it compatible to RTAB. (I'm still having a hard time with scripting.) When I battle, the battlers and the menu are in the wrong place. They are spreading everywhere. So how do I change it back to the normal RTAB?

Like this:
http://www.maj.com/gallery/Tezante/Rolas-Menus/off.png[/img]

Scripts that I used were:
Code:
#==============================================================================
# ** Scene_Battle
#------------------------------------------------------------------------------
#  This class performs battle screen processing.
#==============================================================================

class Scene_Battle
  #--------------------------------------------------------------------------
  # * Actor Command Window Setup
  #--------------------------------------------------------------------------
  alias fomar_p3_scw phase3_setup_command_window
  def phase3_setup_command_window
    fomar_p3_scw
    unless $game_party.actors.size > 4
      @actor_command_window.x = @actor_index * 160
    else
      @actor_command_window.x = @actor_index * (640/$game_party.actors.size)
      if @actor_command_window.x > 480
        @actor_command_window.x = 480
      end
    end
  end
end
Code:
#===============================================================================
# ** Large Party System                                                 
#    by Fomar0158  
#-------------------------------------------------------------------------------
#  This system allows you to break the 4 team barrier setup by RPGMaker XP.  By
#  using this code, you can have 5, 6 or even 10 member parties.
#
#  NOTE:  You may experience difficulties w/ 'draw_actor_hp' and 'draw_actor_sp'
#  in combat due to the 'if... elsif...' block that controls the width of the
#  HP and SP blocks.  This problem will typically start with parties over five
#  in size.  Editing these defs is the only way to cancel this error.
#
#-------------------------------------------------------------------------------
#  Part 2:  Battlesystem Code
#-------------------------------------------------------------------------------
#
#  (This script must be placed 'below' any Custom Battle System you're using.)
#  (Only the 1st half for the RTAB system. Not for use with ParaDog's system.)
#
#  This page of the code is designed for use with the battlesystem you are using
#  at the time.  By default, it was originally set up for the default battlesys-
#  tem alone.  It has since been edited for use with the RTAB battle systems.
#
#  To use with RTAB,  remove or comment out the Window_BattleStatus code  at the
#  bottom of this script.   It has been clearly marked.   The ParaDog script has
#  already been designed for large party scripts,  so the use  of this system is
#  not required.   RTAB on the  other hand  has a unique  scrolling battlestatus
#  window and would require another script to replace its own.
#===============================================================================


#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
#  This class handles the actor. It's used within the Game_Actors class
#  ($game_actors) and refers to the Game_Party class ($game_party).
#==============================================================================

class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------  
  attr_accessor :bstat_pos                # To adjust the battlestatus window
  #--------------------------------------------------------------------------
  # * Get Battle Screen X-Coordinate
  #--------------------------------------------------------------------------
  def screen_x
    # Return after calculating x-coordinate by order of members in party
    if self.index != nil
      unless $game_party.actors.size > 4
        return self.index * 160 + 80
      else
        return self.index * (640/ $game_party.actors.size) +
          (80/($game_party.actors.size/2))
      end
    else
      return 0
    end
  end
end


#==============================================================================
# ** Spriteset_Battle
#------------------------------------------------------------------------------
#  This class brings together battle screen sprites. It's used within
#  the Scene_Battle class.
#==============================================================================

class Spriteset_Battle
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  alias fomar_update update
  def update
    # Added routine to load battlers during combat
    unless @battlers_loaded
      @actor_sprites = []
      for i in 0...$game_party.party_size
        @actor_sprites.push(Sprite_Battler.new(@viewport2))
      end
      @battlers_loaded = true
    end      
    # Perform the original call
    fomar_update  
    # 'Re-'Update actor sprite contents (corresponds with actor switching)
    for i in 0...$game_party.party_size
      @actor_sprites[i].battler = $game_party.actors[i]
    end
  end
end


#==============================================================================
#==============================================================================
#
#   ****      REMOVE FROM HERE DOWN TO WORK WITH THE RTAB SYSTEM      ****
#
#==============================================================================
#==============================================================================


#==============================================================================
# ** Window_BattleStatus
#------------------------------------------------------------------------------
#  This window displays the status of all party members on the battle screen.
#==============================================================================

class Window_BattleStatus < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  alias fomar_init initialize
  def initialize
    fomar_init
    unless $game_party.actors.size > 4
      @level_up_flags = [false, false, false, false]
    else
      @level_up_flags = []
      for i in 0...$game_party.actors.size
        @level_up_flags.push(false)
      end
    end
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  alias fomar_refresh refresh
  def refresh
    @bstat_width = (640 / $game_party.actors.size ) - 32
    # Determine if the 1st position, 2nd position, 3rd...
    for i in 0...$game_party.actors.size
      actor = $game_party.actors[i]
      actor.bstat_pos = (i * @bstat_width) + (32 * i) 
    end
    # Call original
    fomar_refresh
    Graphics.frame_reset
  end
  #--------------------------------------------------------------------------
  # * Draw Name
  #     actor : actor
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #--------------------------------------------------------------------------
  alias fomar_da_name draw_actor_name
  def draw_actor_name(actor, x, y)
    x2 = actor.bstat_pos
    fomar_da_name(actor, x2, y)
  end
  #--------------------------------------------------------------------------
  # * Draw State
  #     actor : actor
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #     width : draw spot width
  #--------------------------------------------------------------------------
  alias fomar_da_state draw_actor_state
  def draw_actor_state(actor, x, y, width = 120)
    # Reset the width
    if width > @bstat_width
      width = @bstat_width
    end
    x2 = actor.bstat_pos
    fomar_da_state(actor, x2, y, width)
  end
  #--------------------------------------------------------------------------
  # * Draw HP
  #     actor : actor
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #     width : draw spot width
  #--------------------------------------------------------------------------
  alias fomar_da_hp draw_actor_hp
  def draw_actor_hp(actor, x, y, width = 120)
    # Reset the width
    if width > @bstat_width
      width = @bstat_width
    end
    x2 = actor.bstat_pos
    if $game_party.actors.size < 6
      fomar_da_hp(actor, x2, y, width)
    else
      fomar_da_hp(actor, x2, y, 48)
    end
  end
  #--------------------------------------------------------------------------
  # * Draw SP
  #     actor : actor
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #     width : draw spot width
  #--------------------------------------------------------------------------
  alias fomar_da_sp draw_actor_sp
  def draw_actor_sp(actor, x, y, width = 120)
    # Reset the width
    if width > @bstat_width
      width = @bstat_width
    end
    x2 = actor.bstat_pos
    if $game_party.actors.size < 6    
      fomar_da_sp(actor, x2, y, width)
    else
      fomar_da_sp(actor, x2, y, 48)
    end
  end
end

Also, how do I make it so that the player has to pick only 4 characters to battle with (picked before battle starts) when there are like 10 characters in a party?
 
You're using the large party script but you only want to have 4 people in battle? Well, the crazy spread out is probably because you still have however many people in battle and it's trying to fit them in weird. Does it make it look weird when you just use 4 people?
 

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