Integrated Reserve Party Version: 1.0d Author: modern algebra Date: June 11, 2009 Version History
<Version 1.0d> 06.11.2009 - Fixed issue with self-targetting skills <Version 1.0c> 06.10.2009 - Fixed major bug with targetting actors not in active party with skills and items <Version 1.0b> 06.08.2009 - Fixed major bug with event commands that iterated actors. <Version 1.0> 05.07.2009 - Original Release Description
This script allows you to have a reserve party. Basically, this means that it allows you to have a larger number of actors in the party than are active at any given time, and it allows the player to choose which actors are active. This is a system implemented in a number of games in the Final Fantasy series, as well as the Tales series and numerous other RPGs. What makes this different from other reserve party scripts is that it is integrated in the DMS, thus allowing you to access menus such as the status menu on party members in reserve, rather than only in the active party. Characters in reserve can be swapped into the active party by the player at any time and vice versa.
As the game maker, you have a number of options to limit this. You can set a minimum size for the active party, so if you wish the player cannot have fewer than whatever number you set, and as well you can set a maximum size for the reserve party. Further, you can set the percentage of exp received by characters in the reserve party, thus allowing you to limit how much exp is received by characters not in the active party. You can also lock individual actors to either the active party or the reserve.
Features
Integrated in the DMS, so this gives access to the other options for the reserve members. Thus, you can check the Status or the Equipment of characters in the Reserve Party easily. You can control where the option to alter party composition appears in the command menu and what it is called. You can lock actors in either the active or reserve parties, thus not allowing the player to rotate that character out You can control what percentage of exp is received by actors in reserve. You can enable and disable access to altering party composition option at any time. Easy configuration and a number of options to change settings in game. Screenshots Choosing status for a reserve party member:
Switching Party composition
Instructions Place above Main and below other custom scripts in the Script Editor
Please see inside the header for detailed instructions on configuration and in-game options
Script
Script is too large. Please see the demo, or the
attached txt document .
Credit
Thanks
Aranarther and skulper34, for reporting the iteration bug Abimopectore, for reporting the targetting bug chronofreak, for reporting target all bug Support
Please post in this topic at rmrk.net with any bug reports or suggestions.
Bug Fixes
Spoiler for Target All Bug :
There is a problem with the target all use of an item or skill, where it scrolls down to the last party member. To fix it, place the following code in its own slot in the editor, somewhere below the Reserve Party script, but still above Main.
#============================================================================== # ** Window MenuStatus #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # Summary of Changes: # aliased method - update_cursor #============================================================================== class Window_MenuStatus #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # * Update Cursor #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ alias mdrnalgbr_fixallcursor_irp_cfrk_4nv2 update_cursor def update_cursor (*args) mdrnalgbr_fixallcursor_irp_cfrk_4nv2 (*args) self.top_row = 0 if @index >= @item_max && @index < 100 end end
Addons
Spoiler for Lock Position :
This addon will allow you to lock an actor to their position, thus barring the player from rearranging him or her. It is useful, for instance, if you always want the main character to be the lead actor.
#============================================================================== # Lock Position # Addon to Integrated Reserve Party 1.0d # Version: 1.0 # Author: modern algebra (rmrk.net) # Date: December 23, 2010 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # Description: # # This addon allows you to lock an actor to the position they are in. This # is useful if you always need a particular actor to be in the lead. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # Instructions: # # Place this script in its own slot above Main but below the Integrated # Reserve Party script in the Script Editor. # # To lock an actor in position, place the following code in a Script command: # # lock_position (actor_id) # actor_id : the ID of the actor you want to lock. # # To unlock, use the following code: # # unlock_position (actor_id) # actor_id : the ID of the actor you want to unlock. # # To set what icon will be shown for actors who are locked in position, go # to line xx and choose the icon index. #============================================================================== IRP_LOCK_POSITION_ICON_INDEX = 81 #============================================================================== # ** Game Actor #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # Summary of Changes: # new accessor instance variable - position_locked # aliased method - setup #============================================================================== class Game_Actor #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # * Public Instance Variables #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ attr_accessor :irp_position_locked #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # * Setup # actor_id : actor ID #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ alias ma_resrvlock_stup_8hg3 setup def setup (*args) @irp_position_locked = false # Run Original Method ma_resrvlock_stup_8hg3 (*args) end end #============================================================================== # ** Game_Interpreter #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # Summary of Changes: # new method - lock_position, unlock_position #============================================================================== class Game_Interpreter #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # * Lock Position #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ def lock_position (actor_id) $game_actors[actor_id].irp_position_locked = true $game_party.ma_lock_party (actor_id) end #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # * Unlock Position #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ def unlock_position (actor_id) $game_actors[actor_id].irp_position_locked = false $game_party.ma_unlock_party (actor_id) end end #============================================================================== # ** Window_MenuStatus #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # Summary of Changes: # aliased method - refresh #============================================================================== class Window_MenuStatus #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # * Refresh #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ alias malbra_lckposton_refrsh_7yv4 refresh def refresh (*args) malbra_lckposton_refrsh_7yv4 (*args) # Run Original Method ($game_party.members + $game_party.ma_reserve_members).each { |actor| next unless actor.irp_position_locked rect = Rect.new (self.contents.width - 32, actor.index*96 + 8, 24, 24) self.contents.clear_rect (rect) draw_icon (IRP_LOCK_POSITION_ICON_INDEX, rect.x, rect.y) } end end #============================================================================== # ** Scene_Menu #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # Summary of Changes: # aliased methods - ma_select_active; ma_select_reserve #============================================================================== class Scene_Menu #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # * Select Active #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ alias mara_slctact_lockpos_6uc1 ma_select_active def ma_select_active (index, *args) if $game_party.members[index] && $game_party.members[index].irp_position_locked Sound.play_buzzer return end mara_slctact_lockpos_6uc1 (index, *args) # Run Original Method end #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # * Select Reserve #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ alias mara_slctres_lockpos_2ef3 ma_select_reserve def ma_select_reserve (index, *args) if $game_party.members[index] && $game_party.members[index].irp_position_locked Sound.play_buzzer return end mara_slctres_lockpos_2ef3 (index, *args) # Run Original Method end end
The actor will need to be in the position that you want him or her to be in before you lock it. I probably should have added the function to specify a position to lock him or her to, but I kind of grew tired of looking at how terrible I used to be at scripting
In any case, you want to do it at the start of the game so it shouldn't be a problem. Even if you want to do it midgame or something, it isn't too hard to rearrange the party manually first using the Change Party Member event command.
Known Compatibility Issues
By default, it does not work with Yanfly's Scene Menu Redux, but this compatibility patch should fix it:
Spoiler for Scene Menu Redux + IRP Compatibility Patch :
First, make sure that the Integrated Reserve Party is lower in the editor than Scene Menu Redux is.
So the order in the Script editor ought to be:
Scene Menu Redux
...
Integrated Reserve Party
IRP SMR Compatibility Patch
Then add this code in its own slot below both scripts in the editor.
#============================================================================== # ** Window_ReDuxMenuStatus #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # Summary of Changes: # aliased method - refresh # modified super method - create_contents #============================================================================== class Window_ReDuxMenuStatus #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # * Create Window Contents #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ def create_contents (*args) if @calling_from_refresh self.contents.clear else super (*args) end end #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # * Refresh #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ alias adrbr_yanfly_irpsmrcomp_rfrsh_7ou9 refresh def refresh (reserve_input = false) $game_party.ma_draw_party_space = reserve_input $game_party.ma_return_reserve_members = true @calling_from_refresh = true # Run Original Method with Reserve Members adrbr_yanfly_irpsmrcomp_rfrsh_7ou9 () @calling_from_refresh = false @calling_from_refresh # For all locked actors, draw an icon $game_party.ma_locked_actors.each { |actor_id| index = $game_actors[actor_id].index draw_icon (PARTY_CHANGE_LOCK_ICON_INDEX, self.contents.width - 32, index*96 + 8) } $game_party.ma_return_reserve_members = false $game_party.ma_draw_party_space = false @item_max = @scrn_item_max end end #============================================================================== # ** Scene_Menu #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # Summary of Changes: # aliased method - create_command_window #============================================================================== class Scene_Menu #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # * Create Command Window #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ alias mairp_yerdsmrcomp_crtcmmndwin_4jn2 create_command_window def create_command_window(*args) mairp_yerdsmrcomp_crtcmmndwin_4jn2(*args) @command_window.height = [@command_window.height, YE::REDUX::MENU::MAX_ROWS * 24 + 32].min @command_window.index = [@menu_index, @command_window.commands.size - 1].min end end
Also, you don't need to do any of the setup for Yanfly's script in order for it to be added to the menu. It should be added automatically.
By default, it does not work with Scene_Status ReDux, but this compatibility patch should fix it:
Spoiler for Scene Status Redux + IRP Compatibility Patch :
Place this in its own slot beneath both Scene Status ReDux and the IRP in the editor.
class Scene_Status alias mdrnalg_irp_scsttrdux_comp_init_k23a initialize def initialize (*args) $game_party.ma_return_reserve_members = true mdrnalg_irp_scsttrdux_comp_init_k23a (*args) end end
When using Atoa's Materia script, it will not allow access to the Materia Menu for Reserve Actors, but this patch will fix it:
It will not show Reserve Member's level ups through BigEd's Level Up Display script, but this patch should fix it:
Spoiler for IRP + BigEd's Level Up Display Compatibility Patch :
Place this in its own slot beneath the Reserve Party Script and BigEd's Level Up Display script. The order in the editor should be the IRP, then BigEd's Level Up Display script, then the patch, so:
Integrated Reserve Party
...
BigEd's Level UP Display
...
IRP + LUD Patch
#============================================================================== # ** Game_Actor #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # Summary of Changes: # aliased method - gain_exp #============================================================================== class Game_Actor #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # * Gain EXP #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ alias modnabr_bed_displvlup_gnep_irpptch_2nc2 gain_exp def gain_exp (exp, *args) if $game_party.ma_reserve_actors.include? (self.id) exp = (exp * @reserve_exp_percent) / 100 end # Run Original Method modnabr_bed_displvlup_gnep_irpptch_2nc2 (exp, *args) end end #============================================================================== # ** Scene Battle #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # Summary of Changes: # aliased method - display_level_up #============================================================================== class Scene_Battle #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # * Display Level Up #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ alias mdrnalg_irp_bgedlupwin_beth_7hg2 display_level_up def display_level_up (*args) # Retrieve all actors through members $game_party.ma_return_reserve_members = true # Run Original Method mdrnalg_irp_bgedlupwin_beth_7hg2 (*args) $game_party.ma_return_reserve_members = false end end
Obviously, it will not work well with other party changing scripts. It does not support an active party larger than 4 characters, but it can support smaller active parties. Just change the constant MAX_MEMBERS in Game_Party to allow for that.
Further, since it is integrated into the DMS, it will likely not work with exotic CMSes. I have, however, taken some effort to make it compatible with scripts that change the DMS in less drastic ways. It ought to work with KGC CustomMenuCommand scripts as long as it is placed below all KGC scripts that utilize CustomMenuCommand. Further, graphical changes that alter how the actor is displayed in the Menu window should also be OK. If it does not work, there are a number of Party Changing Scripts not dependent on the DMS. For instance:
KGC Large Party ,
Prexus' Party Selector , or
Dargor's Party Changer It should also work with my Quest System. It likely will not work well with my Multiple Parties script, though I will work on a compatibility patch.
If you encounter any problems, please post here and I will do my best to fix it.
Demo
See attached
demo .
This script by
modern algebra is licensed under a
Creative Commons Attribution-Non-Commercial-Share Alike 2.5 Canada License .