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.

Combined PartyChanger, Leader Select, and Menu Edit.

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...
Code:
class Game_Actor < Game_Battler
# ---------------------
attr_accessor :required
[...]
@required = false
[...]
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).

Code:
class Game_Party
# ---------------------
attr_accessor :reserve_actors
[...]
@reserve_actors = []
[...]
ok, in game_party, add in the attr_accessor with the others, and then add the @reserve_actors in def initialize, under @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
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.

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)
ok, highlight everyline between def main and @status_window, and replace it with this piece of code.

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)
Same as above, but in scene_equip. highlight the lines from def main to @left_window, and replace with this method.

Code:
class Window_Base < Window
#---------------------------------------
# *Gets Required Text Color
#---------------------------------------
def required_color
  return Color.new(216, 150, 20, 255)
end
ok, in window_base, find the method def knockout color and add this in underneath it.


Code:
class Scene_Battle
# ---------------------
class Scene_Battle
  RESERVE_EXP_PERCENT = 100 #the percentage of exp reserve actors get
[...]
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.
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
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.

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
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.

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... 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.

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
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.
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.
 
Would this be compatible with other than the Default Battle Systems? I'm using R-TAB, and as many changes as there are in this script for the Battle Scenes, I would assume that it wouldn't work. However, if I am wrong, I apologize. I may have a difficult time finding a Party Changing script that will be compatible with all the other scripts I've accumulated.
 
@kalier: As far as i know, this should be compatible with RTAB, as the only edits to scene battle involve EXP for reserve actors...

to make it work... do this.
find line 248 of RTAB v1.16. under that, put
Code:
RESERVE_EXP_PERCENT = 100
and change 100 to what ever percent you want your reserve actos to get. 100 percent is default.

on line 852 of RTAB v1.16, there is a comment about gold... insert
Code:
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
above that line

and that should do it...
enjoy.

also, having recently learned of the power of Alias, i am working on making a more compatible version of this script.
 
Could someone fix this so in menu all there is is:
Items
Skills
Equipment
Status
Leader
Exit

I dont want "Save"or "Party" in there, I just want the leader thing only. OH, And I use cybersam battle if that means anything.

Edit: Damn, I need someone to do this, I removed Save and Party then the game got some error saying "Arrgument" or something like that. Cuz I'm a Scridiot.
 
Here Ya Go, Brimstone. i made it so it's all like you said. Hope it helps!

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 = "Leader"
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5])
    @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)
      @command_window.disable_item(4)
    end
    if $game_party.actors.size == 1
      @command_window.disable_item(4)
    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
        $game_system.se_play($data_system.decision_se)
        @checker = 0
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      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  # skill
        # If this actor's action limit is 2 or more
        if $game_party.actors[@status_window.index].restriction >= 2
          # Play buzzer SE
          $game_system.se_play($data_system.buzzer_se)
          return
        end
      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 4
        $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

Just paste this over Scene_menu in your game and go for it!

****On a note, i have a SDK compatable version in the works... i didn't forget!****
 
Getting an error I can't figure out in Game_Party

if not @reserve_actors.include?(actor)
@reserve_actors.push(actor)

Not sure what this is about. However, if it helps, in certain scenes, I don't have an active Party Member. They switch back and forth throughout the game as new things happen. Such as different view points during Scenes. If you can help with this, I would be grateful.

Nevermind. I figured it out.
 
Is there any way someone could just put the leader change script up and make it callable from the menu? I already have a party change script used for outside the main menu through a call script, so I just need the leader change from the menu.
 
@leknaat
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 = "End game"
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
    @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)
    end
    @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
    @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 command other than save or end game, and party members = 0
      if $game_party.actors.size == 0 and @command_window.index < 4
        # Play buzzer SE
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # Branch by command window cursor position
      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_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 $game_party.actors[@status_window.index].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
        end
      end
      return
    end
  end
end

That should do it...
 
Alistor. I can't seem to get it to work. It strangely comes up with ?????'Scene_Skill'?236???sytaxerror????????. I checked out Line 236 in the script for Scene_Skill and it just says end
 
@Noob2 = OK... there are two ways to fix it... either add an End after the one that brings the error, or delete the one causing the error... try them both and tell me what one works for you.
 
When i try to run it, before anything happens i get an error "scene_battle 2" line 220 syntax error. on line 220 I simply have "end"
 
Hey. I used your fix for the end things at that works now it comes up with. ?????'Scene_Debug'?271???NameError ???????? undefined method 'draw_actor_exp' for class Window_Base' and on that line it says
alias draw_actor_exp_original draw_actor_exp. Is it Wrong because i'm using the Cog Wheel Menu Bars Script and thats part of the script is that the problem???
 
Is there anyway to use the script with my cms? Ill give you the script and you can tell me if you canget it to work or not.. I only want to use the party changer :)
 

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