ok, first of all, i didn't write these scripts... The party changer is by RPG Advocate, and the Leader Selection is by Yargovish. what's my role... I edited the menu to allow players to access the party change screen from there, instead of from a call script event.
OK, now for a few notes.
1) Not SDK compatible, that i know of. I don't write scripts, so i don't know how to make it SDK... ask someone else to help you there.
2) The party changer has an option that allows you to manage your reserve characters from the status screen. Leave this to false for now, as it draws an error. I'll ask my buddy to look at it later.
ok, now that that's over with, here it is...
OK, add the attr_accessor under the attr_readers in the first section of Game_actor. Then add in the @required somewhere in def setup(actor_id).
ok, in game_party, add in the attr_accessor with the others, and then add the @reserve_actors in def initialize, under @actors.
ok, there are two blocks here that say replace this method... that means you find the original method, still in Game_Party, and replace them with the ones shown above. Then at the very bottom, above the last end, add in the three new methods.
ok, highlight everyline between def main and @status_window, and replace it with this piece of code.
Same as above, but in scene_equip. highlight the lines from def main to @left_window, and replace with this method.
ok, in window_base, find the method def knockout color and add this in underneath it.
ok, in scene_battle 1 right under the class signifier, put RESERVE_EXP_PERCENT = 100 #the persentage of exp reserve actors get
that pretty much explains itself... i hope.
ok, in Scene_battle 2, find the method def start_phase5. if Scene_battle 2 is relatively unedited, you should see around line 168 the first line of the code block above. replace lines 168-196 with the lines of code above.
OK, replace your entire Window_MenuStatus with the code block above.
For now, leave MANAGE_RESERVE_CHARACTERS at false. i'll have that fixed once my buddy gets a look at it.
ok... add in the four code blocks in their own scripts above main.
ok, this next half of the script add in the menu edits that allow the use of the party changer script from said menu, as well as adding in the leader selection by yargovish.
Replace scene menu wih this... and that's it.
Remember, Credit does not go to me... I didn't do anything but the menu edit for party... the Party Change script is credit of RPGAdvocate, and the Leader Selection is credit of Yargovish.
Enjoy!
THIS IS THE FIX!!! Add this and you will be able to use the party management tools.
in scene skill, highlight from def main, to @status_window, and replace it with this code.
on a note, do not try to make any actor other than the four on status screen leader while RESERVE_PARTY_TOOLS is active... you will crash.
enjoy the fix.
OK, now for a few notes.
1) Not SDK compatible, that i know of. I don't write scripts, so i don't know how to make it SDK... ask someone else to help you there.
2) The party changer has an option that allows you to manage your reserve characters from the status screen. Leave this to false for now, as it draws an error. I'll ask my buddy to look at it later.
ok, now that that's over with, here it is...
Code:
class Game_Actor < Game_Battler
# ---------------------
attr_accessor :required
[...]
@required = false
[...]
Code:
class Game_Party
# ---------------------
attr_accessor :reserve_actors
[...]
@reserve_actors = []
[...]
Code:
def add_actor(actor_id) # replace this method
actor = $game_actors[actor_id]
if @actors.size < 4 and not @actors.include?(actor)
@actors.push(actor)
$game_player.refresh
else
if not @reserve_actors.include?(actor)
@reserve_actors.push(actor)
end
end
end
# ---------------------
def remove_actor(actor_id) # replace this method
@actors.delete($game_actors[actor_id])
@reserve_actors.delete($game_actors[actor_id])
$game_player.refresh
end
# ---------------------
def swap(actor1, actor2) # new method
error = false
if not @actors.include?(actor1)
error = true
end
if not @reserve_actors.include?(actor2)
error = true
end
if error
print("Cannot swap members. One or both are not in the porper position.")
end
temp = actor1
@actors.delete(actor1)
@reserve_actors.push(temp)
add_actor(actor2.id)
@reserve_actors.delete(actor2)
end
# ---------------------
def transfer_to_party(reserve_actor) # new method
if not @reserve_actors.include?(reserve_actor)
print("Warning: Requested character is not in the reserve party.")
return
end
if @actors.size == 4
print("Warning: Main party is full.")
return
end
add_actor(reserve_actor.id)
@reserve_actors.delete(reserve_actor)
end
# ---------------------
def transfer_to_reserve(main_party_actor) # new method
if not @actors.include?(main_party_actor)
print("Warning: Requested character is not in the main party.")
return
end
remove_actor(main_party_actor.id)
@reserve_actors.push(main_party_actor)
end
Code:
class Scene_Skill
# ---------------------
def main
if @actor_index < $game_party.actors.size
@actor = $game_party.actors[@actor_index]
else
@actor = $game_party.reserve_actors[@actor_index - $game_party.actors.size]
end
@help_window = Window_Help.new
@status_window = Window_SkillStatus.new(@actor)
Code:
class Scene_Equip
# ---------------------
def main
if @actor_index < $game_party.actors.size
@actor = $game_party.actors[@actor_index]
else
@actor = $game_party.reserve_actors[@actor_index - $game_party.actors.size]
end
@help_window = Window_Help.new
@left_window = Window_EquipLeft.new(@actor)
Code:
class Window_Base < Window
#---------------------------------------
# *Gets Required Text Color
#---------------------------------------
def required_color
return Color.new(216, 150, 20, 255)
end
Code:
class Scene_Battle
# ---------------------
class Scene_Battle
RESERVE_EXP_PERCENT = 100 #the percentage of exp reserve actors get
[...]
that pretty much explains itself... i hope.
Code:
# ---------------------
def start_phase5
[...]
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
if actor.cant_get_exp? == false
last_level = actor.level
actor.exp += exp
if actor.level > last_level
@status_window.level_up(i)
end
end
end
for i in 0...$game_party.reserve_actors.size
actor = $game_party.reserve_actors[i]
if actor.cant_get_exp? == false
actor.exp += exp * RESERVE_EXP_PERCENT / 100
end
end
$game_party.gain_gold(gold)
for item in treasures
case item
when RPG::Item
$game_party.gain_item(item.id, 1)
when RPG::Weapon
$game_party.gain_weapon(item.id, 1)
when RPG::Armor
$game_party.gain_armor(item.id, 1)
end
end
Code:
class Window_MenuStatus < Window_Selectable # replace this class
MANAGE_RESERVE_CHARACTERS = false
# ---------------------------
def initialize
super(0, 0, 480, 480)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
self.active = false
self.index = -1
end
# ---------------------------
def refresh
self.contents.dispose
if MANAGE_RESERVE_CHARACTERS
@item_max = $game_party.actors.size + $game_party.reserve_actors.size
slots = $game_party.actors.size + $game_party.reserve_actors.size
else
@item_max = $game_party.actors.size
slots = $game_party.actors.size
end
self.contents = Bitmap.new(width - 32, @item_max * 120 - 32)
self.contents.clear
actor_array = []
for actor in $game_party.actors
actor_array.push(actor)
end
if MANAGE_RESERVE_CHARACTERS
for actor in $game_party.reserve_actors
actor_array.push(actor)
end
end
for i in 0...slots
x = 64
y = i * 116
actor = actor_array[i]
draw_actor_graphic(actor, x - 40, y + 80)
draw_actor_name(actor, x, y)
draw_actor_class(actor, x + 144, y)
draw_actor_level(actor, x, y + 32)
draw_actor_state(actor, x + 90, y + 32)
draw_actor_exp(actor, x, y + 64)
draw_actor_hp(actor, x + 236, y + 32)
draw_actor_sp(actor, x + 236, y + 64)
end
end
# ---------------------------
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set(0, @index * 116 - self.oy, self.width - 32, 96)
end
if self.cursor_rect.y < 0
self.oy -= 116
refresh
update_cursor_rect
end
if self.cursor_rect.y > 348
self.oy += 116
refresh
update_cursor_rect
end
end
# ---------------------------
end
For now, leave MANAGE_RESERVE_CHARACTERS at false. i'll have that fixed once my buddy gets a look at it.
Code:
class Window_ChangeMain < Window_Selectable
# ---------------------
def initialize
super(0, 0, 320, 480)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
self.active = false
self.index = -1
end
# ---------------------
def refresh
self.contents.clear
self.contents.font.name = "Arial"
self.contents.font.size = 24
@item_max = 4
for i in 0..3
x = 64
y = i * 116
if $game_party.actors[i] != nil
actor = $game_party.actors[i]
else
self.contents.draw_text(0, y + 32, 288, 32, "-Empty-", 1)
next
end
draw_actor_graphic(actor, x - 40, y + 80)
draw_actor_name(actor, x, y)
draw_actor_level(actor, x + 160, y)
draw_actor_hp(actor, x, y + 32)
draw_actor_sp(actor, x, y + 64)
end
end
# ---------------------
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set(0, @index * 116, self.width - 32, 96)
end
end
# ---------------------
end
Code:
class Window_ChangeReserve < Window_Selectable
# ---------------------
def initialize
super(320, 0, 320, 360)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
self.active = false
self.index = -1
end
# ---------------------
def refresh
@item_max = $game_party.reserve_actors.size + 1
size = 96 + @item_max * 96 - 32
if size < 328
size = 328
end
self.contents.dispose
self.contents = Bitmap.new(width - 32, size)
self.contents.clear
self.contents.font.name = "Arial"
self.contents.font.size = 24
for i in 0...$game_party.reserve_actors.size
x = 64
y = i * 116
actor = $game_party.reserve_actors[i]
draw_actor_graphic(actor, x - 40, y + 80)
draw_actor_name(actor, x, y)
draw_actor_level(actor, x + 160, y)
draw_actor_hp(actor, x, y + 32)
draw_actor_sp(actor, x, y + 64)
end
end
# ---------------------
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set(0, @index * 116 - self.oy, self.width - 32, 96)
end
if self.cursor_rect.y < 0
self.oy -= 116
refresh
update_cursor_rect
end
if self.cursor_rect.y > 232
self.oy += 116
refresh
update_cursor_rect
end
end
# ---------------------
end
Code:
class Window_PartyChangeInfo < Window_Base
# ------------------
attr_reader :max_size
# ------------------
def initialize(max_size)
super(320, 360, 320, 120)
self.contents = Bitmap.new(width - 32, height - 32)
@max_size = max_size
refresh
end
# ------------------
def refresh
self.contents.clear
self.contents.font.name = "Arial"
self.contents.font.size = 24
text1 = "Please form a party."
text2 = "Please form a party"
text3 = "of up to " + @max_size.to_s + " members."
if @max_size < 0
print("Warning: Invalid max size for party.")
exit
end
if @max_size == 0
self.contents.draw_text(4, 0, 240, 32, text1)
end
if @max_size > 0
self.contents.draw_text(4, 0, 240, 32, text2)
self.contents.draw_text(4, 32, 240, 32, text3)
end
end
# ------------------
end
Code:
class Scene_ChangeParty
# ------------------
def initialize(max_size)
@max_size = max_size
end
# ------------------
def main
@left_window = Window_ChangeMain.new
@right_window = Window_ChangeReserve.new
@info_window = Window_PartyChangeInfo.new(@max_size)
@left_window.index = 0
@right_window.index = -1
@left_window.active = true
@right_window.active = false
@actor1 = nil
@actor2 = nil
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
$game_map.refresh
Graphics.freeze
@left_window.dispose
@right_window.dispose
@info_window.dispose
end
# ------------------
def update
@left_window.update
@right_window.update
@info_window.update
if @left_window.active
update_left
return
end
if @right_window.active
update_right
return
end
end
# ------------------
def update_left
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
return
end
if Input.trigger?(Input::C)
place = @left_window.index
if @max_size > 0
if place >= @max_size
$game_system.se_play($data_system.buzzer_se)
return
end
end
if $game_party.actors[place] != nil
if $game_party.actors[place].required
$game_system.se_play($data_system.buzzer_se)
return
end
end
if $game_party.reserve_actors.size == 0
$game_system.se_play($data_system.decision_se)
$game_party.transfer_to_reserve($game_party.actors[place])
@left_window.refresh
@right_window.refresh
return
end
if $game_party.reserve_actors.size > 0
$game_system.se_play($data_system.decision_se)
@left_window.active = false
@right_window.index = 0
@right_window.active = true
@actor1 = $game_party.actors[place]
return
end
end
end
# ------------------
def update_right
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@right_window.index = -1
@right_window.active = false
@left_window.active = true
return
end
if Input.trigger?(Input::C)
place = @right_window.index
if place == $game_party.reserve_actors.size
if @actor1 == nil
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
$game_party.transfer_to_reserve(@actor1)
@right_window.index = -1
@right_window.active = false
@left_window.active = true
@left_window.refresh
@right_window.refresh
return
end
if @actor1 == nil
$game_system.se_play($data_system.decision_se)
@actor2 = $game_party.reserve_actors[place]
$game_party.transfer_to_party(@actor2)
@right_window.index = -1
@right_window.active = false
@left_window.active = true
@left_window.refresh
@right_window.refresh
return
else
@actor2 = $game_party.reserve_actors[place]
$game_system.se_play($data_system.decision_se)
$game_party.swap(@actor1, @actor2)
@right_window.index = -1
@right_window.active = false
@left_window.active = true
@left_window.refresh
@right_window.refresh
end
end
end
# ------------------
end
ok, this next half of the script add in the menu edits that allow the use of the party changer script from said menu, as well as adding in the leader selection by yargovish.
Code:
class Scene_Menu
# --------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
@changer = 0
@where = 0
@checker = 0
end
# --------------------------------
def main
s1 = $data_system.words.item
s2 = $data_system.words.skill
s3 = $data_system.words.equip
s4 = "Status"
s5 = "Save"
s6 = "Leader"
s7 = "Party"
s8 = "End game"
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7, s8])
@command_window.index = @menu_index
if $game_party.actors.size == 0
@command_window.disable_item(0)
@command_window.disable_item(1)
@command_window.disable_item(2)
@command_window.disable_item(3)
end
if $game_system.save_disabled
@command_window.disable_item(4)
end
if $game_party.actors.size == 1
@command_window.disable_item(5, 6)
end
@playtime_window = Window_PlayTime.new
@playtime_window.x = 0
@playtime_window.y = 300
@gold_window = Window_Gold.new
@gold_window.x = 0
@gold_window.y = 416
@status_window = Window_MenuStatus.new
@status_window.x = 160
@status_window.y = 0
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@command_window.dispose
@playtime_window.dispose
@gold_window.dispose
@status_window.dispose
end
# --------------------------------
def update
@command_window.update
@playtime_window.update
@gold_window.update
@status_window.update
if @command_window.active
update_command
return
end
if @status_window.active
update_status
return
end
end
# --------------------------------
def update_command
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
return
end
if Input.trigger?(Input::C)
if $game_party.actors.size == 0 and @command_window.index < 4
$game_system.se_play($data_system.buzzer_se)
return
end
if $game_party.actors.size == 1 and @command_window.index ==5
$game_system.se_play($data_system.buzzer_se)
return
end
case @command_window.index
when 0
$game_system.se_play($data_system.decision_se)
$scene = Scene_Item.new
when 1
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 2
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 3
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 4
if $game_system.save_disabled
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
$scene = Scene_Save.new
when 5
$game_system.se_play($data_system.decision_se)
@checker = 0
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 6
$game_system.se_play($data_system.decision_se)
$scene = Scene_ChangeParty.new(0)
when 7
$game_system.se_play($data_system.decision_se)
$scene = Scene_End.new
end
return
end
end
# --------------------------------
def update_status
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@command_window.active = true
@status_window.active = false
@status_window.index = -1
return
end
if Input.trigger?(Input::C)
case @command_window.index
when 1
if @status_window.index < $game_party.actors.size
check_actor = $game_party.actors[@status_window.index]
else
size = $game_party.actors.size
check_actor = $game_party.reserve_actors[@status_window.index - size]
end
if check_actor.restriction >= 2
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
$scene = Scene_Skill.new(@status_window.index)
when 2
$game_system.se_play($data_system.decision_se)
$scene = Scene_Equip.new(@status_window.index)
when 3
$game_system.se_play($data_system.decision_se)
$scene = Scene_Status.new(@status_window.index)
when 5
$game_system.se_play($data_system.decision_se)
if @checker == 0
@changer = $game_party.actors[@status_window.index]
@where = @status_window.index
@checker = 1
else
$game_party.actors[@where] = $game_party.actors[@status_window.index]
$game_party.actors[@status_window.index] = @changer
@checker = 0
@status_window.refresh
$game_player.refresh
end
end
return
end
end
end
Remember, Credit does not go to me... I didn't do anything but the menu edit for party... the Party Change script is credit of RPGAdvocate, and the Leader Selection is credit of Yargovish.
Enjoy!
THIS IS THE FIX!!! Add this and you will be able to use the party management tools.
Code:
def main
# Get actor
if @actor_index < $game_party.actors.size
@actor = $game_party.actors[@actor_index]
else
@actor = $game_party.reserve_actors[@actor_index - $game_party.actors.size]
end
# Make status window
@status_window = Window_Status.new(@actor)
in scene skill, highlight from def main, to @status_window, and replace it with this code.
on a note, do not try to make any actor other than the four on status screen leader while RESERVE_PARTY_TOOLS is active... you will crash.
enjoy the fix.