Menu to display custom actor pictures? [Resolved]

First let me clarify, I'm not asking how to change actor pictures.

I'm looking for a simple script that shows custom actor pictures instead of the ones set in the Actor Database, only in the menu window.
Script is not intended to be used in a commercial game.

Other scripts used: modern algebra Integrated Reserve Party 1.0
  1. #==============================================================================
  2. #  Integrated Reserve Party
  3. #  Version 1.0d
  4. #  Author: modern algebra (rmrk.net)
  5. #  Date: June 11, 2009
  6. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  7. #  Description:
  8. #
  9. #    This script allows you to have a reserve party. Basically, this means that
  10. #   it allows you to have a larger number of actors in the party than are
  11. #   active at any given time, and it allows the player to choose which actors
  12. #   are active. This is a system implemented in a number of games in the
  13. #   Final Fantasy series, as well as the Tales series and numerous other RPGs.
  14. #   Characters in reserve can be swapped into the active party by the player at
  15. #   any time and vice versa.
  16. #
  17. #    As the game maker, you have a number of options to limit this. You can set
  18. #   a minimum size for the active party, so if you wish the player cannot have
  19. #   fewer than whatever number you set, and as well you can set a maximum size
  20. #   for the reserve party. Further, you can set the percentage of exp received
  21. #   by characters in the reserve party, thus allowing you to limit how much exp
  22. #   is received by characters not in the active party. You can also lock
  23. #   individual actors to either the active party or the reserve.
  24. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  25. #  Instructions:
  26. #    
  27. #    Place above Main and below all other custom scripts in the Script editor.
  28. #
  29. #    To change the default configuration, go to line x and read the descriptions
  30. #   to see what they do.
  31. #
  32. #    There are a number of codes you can use in a call script. They are:
  33. #
  34. #        lock_to_active_party (actor_id)
  35. #          actor_id : The ID of the actor who can only be in Active Party
  36. #        lock_to_reserve_party (actor_id)
  37. #          actor_id : The ID of the actor who can only be in Reserve Party
  38. #        unlock_actor_party (actor_id)
  39. #          actor_id : The ID of the actor you no longer want locked to a Party
  40. #        change_active_minimum (new_minimum)
  41. #          new_minimum : the new minimum number of actors in the active party
  42. #        change_reserve_maximum (new_maximum)
  43. #          new_maximum : the new maximum number of actors allowed in reserve
  44. #        toggle_party_access (boolean)
  45. #          boolean : true => enable, false => disable; if left blank, will toggle
  46. #==============================================================================
  47.  
  48. #==============================================================================
  49. #  CONSTANTS
  50. #==============================================================================
  51.  
  52. PARTY_CHANGE_RESERVE_EXP_PERCENT = 80 # Percentage of EXP received by reserve actors
  53. PARTY_CHANGE_MENU_INDEX = 5           # The position of the Party option in Menu
  54. PARTY_CHANGE_LABEL = "Party"          # The label of the Party option in Menu
  55. PARTY_CHANGE_MIN_ACTIVE_SIZE = 1      # The minimum number of actors in active
  56. PARTY_CHANGE_MAX_RESERVE_SIZE = 4     # The maximum size of reserve party
  57. PARTY_CHANGE_LOCK_ICON_INDEX = 80     # The icon to draw for locked actors
  58.  
  59. #==============================================================================
  60. # ** Game Actor
  61. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  62. #  Summary of Changes:
  63. #    new accessor instance variable - reserve_exp_percent
  64. #    aliased method - index, setup
  65. #==============================================================================
  66.  
  67. class Game_Actor
  68.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  69.   # * Public Instance Variables
  70.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  71.   attr_accessor :reserve_exp_percent
  72.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  73.   # * Setup
  74.   #     actor_id : actor ID
  75.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  76.   alias modernalgebra_resrv_party_stup_resrvexp_52b4 setup
  77.   def setup(actor_id)
  78.     # Run Original Method
  79.     modernalgebra_resrv_party_stup_resrvexp_52b4 (actor_id)
  80.     @reserve_exp_percent = PARTY_CHANGE_RESERVE_EXP_PERCENT
  81.   end
  82.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  83.   # * Index
  84.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  85.   alias molge_rsrv_prty_indx_actr_7b53 index
  86.   def index
  87.     if $game_party.ma_reserve_actors.include? (@actor_id)
  88.       size = $game_party.ma_draw_party_space ? $game_party.ma_max_active_size : $game_party.actors.size
  89.       return size + $game_party.ma_reserve_actors.index (@actor_id)
  90.     else
  91.       return molge_rsrv_prty_indx_actr_7b53
  92.     end
  93.   end
  94. end
  95.  
  96. #==============================================================================
  97. # ** Game Party
  98. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  99. #  Summary of Changes:
  100. #    new public instance variables : ma_reserve_actors, ma_min_active_size,
  101. #      ma_max_reserve_size, ma_locked_actors, actors, ma_party_access,
  102. #      ma_locked_actors
  103. #    aliased methods - initialize, add_actor, remove_actor, members
  104. #    new methods - lock_party, unlock_party, add_to_active, remove_from_active,
  105. #               switch_actors_by_index, ma_reserve_members
  106. #==============================================================================
  107.  
  108. class Game_Party
  109.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  110.   # * Public Instance Variables
  111.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  112.   attr_reader   :actors
  113.   attr_reader   :ma_reserve_actors
  114.   attr_reader   :ma_locked_actors
  115.   attr_accessor :ma_max_active_size
  116.   attr_accessor :ma_min_active_size
  117.   attr_accessor :ma_max_reserve_size
  118.   attr_accessor :ma_return_reserve_members
  119.   attr_accessor :ma_draw_party_space
  120.   attr_accessor :ma_party_access
  121.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  122.   # * Object Initialization
  123.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  124.   alias mdagr_init_resrv_prt_trvst1 initialize
  125.   def initialize
  126.     # Run Original Method
  127.     mdagr_init_resrv_prt_trvst1
  128.     # Initialize Variables
  129.     @ma_reserve_actors = []
  130.     @ma_max_active_size = MAX_MEMBERS
  131.     @ma_min_active_size = PARTY_CHANGE_MIN_ACTIVE_SIZE
  132.     @ma_max_reserve_size = PARTY_CHANGE_MAX_RESERVE_SIZE
  133.     @ma_locked_actors = []
  134.     @ma_party_access = true
  135.     @ma_return_reserve_members = false
  136.     @ma_draw_party_space = false
  137.   end
  138.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  139.   # * Add an Actor
  140.   #     actor_id : actor ID
  141.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  142.   alias malg_plus_actr_resrv_pty add_actor
  143.   def add_actor(actor_id)
  144.     # Do nothing if actor in reserve
  145.     if !@ma_reserve_actors.include? (actor_id)
  146.       # Run Original Method
  147.       malg_plus_actr_resrv_pty (actor_id)
  148.       if [email protected]?(actor_id) && @ma_reserve_actors.size < @ma_max_reserve_size
  149.         @ma_reserve_actors.push (actor_id)
  150.       end
  151.     end
  152.   end
  153.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  154.   # * Remove Actor
  155.   #     actor_id : actor ID
  156.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  157.   alias modalg_rmv_actr_pary_reseve_orn54 remove_actor
  158.   def remove_actor(actor_id)
  159.     @ma_reserve_actors.delete (actor_id)
  160.     @ma_locked_actors.delete (actor_id)
  161.     # Run Original Method
  162.     modalg_rmv_actr_pary_reseve_orn54 (actor_id)
  163.   end
  164.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  165.   # * Members
  166.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  167.   alias mdrnlg_membrs_reserve_party_scrpt_8un5 members
  168.   def members (return_reserve = nil)
  169.     @ma_return_reserve_members = return_reserve if return_reserve != nil
  170.     mmbrs = mdrnlg_membrs_reserve_party_scrpt_8un5
  171.     return mmbrs + ma_reserve_members if @ma_return_reserve_members
  172.     return mmbrs
  173.   end
  174.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  175.   # * Reserve Members
  176.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  177.   def ma_reserve_members
  178.     result = []
  179.     @ma_reserve_actors.each { |i| result.push($game_actors[i]) }
  180.     return result
  181.   end
  182.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  183.   # * Lock Party
  184.   #    *args - indices to lock
  185.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  186.   def ma_lock_party (*args)
  187.     args.each { |i| @ma_locked_actors.push (i) if !@ma_locked_actors.include? (i) }
  188.   end
  189.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  190.   # * Unlock Party
  191.   #    *args - indices to unlock
  192.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  193.   def ma_unlock_party (*args)
  194.     args.each { |i| @ma_locked_actors.delete (i) }
  195.   end
  196.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  197.   # * Add To Active Party
  198.   #    actor_id : The ID of Actor being moved
  199.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  200.   def ma_add_to_active (actor_id, insert_index = nil)
  201.     return true if actor_id == nil
  202.     return false if @ma_locked_actors.include? (actor_id)
  203.     return false unless @ma_reserve_actors.include? (actor_id)
  204.     return false if @actors.size >= @ma_max_active_size
  205.     insert_index = @actors.size if insert_index == nil ||
  206.                                 insert_index > @actors.size
  207.     @ma_reserve_actors.delete (actor_id)
  208.     @actors.insert (insert_index, actor_id)
  209.     return true
  210.   end
  211.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  212.   # * Remove From Active Party
  213.   #    actor_id : The ID of Actor being moved
  214.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  215.   def ma_remove_from_active (actor_id, insert_index = nil)
  216.     # If Character not in Party, do nothing
  217.     return true if actor_id == nil
  218.     return false if @ma_locked_actors.include? (actor_id)
  219.     return false unless @actors.include? (actor_id)
  220.     return false if @ma_reserve_actors.size >= @ma_max_reserve_size
  221.     insert_index = @ma_reserve_actors.size if insert_index == nil ||
  222.                                            insert_index > @ma_reserve_actors.size
  223.     # Remove Actor from actors
  224.     @actors.delete (actor_id)
  225.     @ma_reserve_actors.insert (insert_index, actor_id)
  226.     return true
  227.   end
  228.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  229.   # * Switch Actors By Index
  230.   #    active_index  : the index in the active party
  231.   #    reserve_index : the index in the reserve party
  232.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  233.   def ma_switch_actors_by_index (active_index, reserve_index)
  234.     return false if @ma_locked_actors.include? (@actors[active_index]) ||
  235.         @ma_locked_actors.include? (@ma_reserve_actors[reserve_index]) ||
  236.         (reserve_index > @ma_reserve_actors.size &&
  237.            active_index < @actors.size && @actors.size <= @ma_min_active_size)
  238.     @ma_max_reserve_size += 1
  239.     reserve_actor_id = @ma_reserve_actors[reserve_index]
  240.     removable = ma_remove_from_active (@actors[active_index], reserve_index)
  241.     ma_add_to_active (reserve_actor_id, active_index ) if removable
  242.     @ma_max_reserve_size -= 1
  243.     $game_player.refresh if active_index == 0
  244.     return removable
  245.   end
  246.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  247.   # * Switch Actor Order
  248.   #    array_boolean  : true => @actors; false => @ma_reserve_actors
  249.   #    index1         : the first actor to change
  250.   #    index2         : the second actor to change
  251.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  252.   def ma_switch_actor_order (array_boolean, index1, index2)
  253.     # Get array
  254.     array = array_boolean ? @actors : @ma_reserve_actors
  255.     # Set indices in order
  256.     if index1 < index2
  257.       i1, i2 = index1, index2
  258.     else
  259.       i1, i2 = index2, index1
  260.     end
  261.     # Check if both slots are empty
  262.     return false if i1 >= array.size
  263.     val = array[i1]
  264.     # If one slot is empty, place other at end of array
  265.     if i2 >= array.size
  266.       # Remove index2 from order and place at
  267.       array.delete_at (i1)
  268.       array.push (val)
  269.     else # Both slots chosen are actors
  270.       val2 = array[i2]
  271.       # Delete i2 and insert i1
  272.       array.delete_at (i2)
  273.       array.insert (i2, val)
  274.       # Delete i1 and insert i2
  275.       array.delete_at (i1)
  276.       array.insert (i1, val2)
  277.     end
  278.     $game_player.refresh if i1 == 0 && array == @actors
  279.   end
  280. end
  281.  
  282. #==============================================================================
  283. # ** Game_Interpreter
  284. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  285. #  Summary of Changes:
  286. #    new methods - lock_to_active_party, lock_to_reserve_party,
  287. #                unlock_actor_party, change_active_minimum, change_reserve_maximum
  288. #==============================================================================
  289.  
  290. class Game_Interpreter
  291.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  292.   # * Lock To Active Party
  293.   #    actor_id : ID of actor to lock to active party
  294.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  295.   def lock_to_active_party (actor_id)
  296.     # If actor not in party, do nothing
  297.     return if actor_id == nil || (!$game_party.actors.include? (actor_id) &&
  298.                             !$game_party.ma_reserve_actors.include? (actor_id))
  299.     if $game_party.ma_reserve_actors.include? (actor_id)
  300.       # Delete from locked actors in case previously locked to reserve
  301.       $game_party.ma_locked_actors.delete (actor_id)
  302.       # If no room in active party
  303.       unless $game_party.ma_add_to_active (actor_id)
  304.         # Get index in whichever array actor resides
  305.         r_index = $game_actors[actor_id].index - $game_party.actors.size
  306.         a_index = nil
  307.         # Switch first actor not locked out of party
  308.         for id in $game_party.actors.reverse
  309.           next if $game_party.ma_locked_actors.include? (id)
  310.           a_index = $game_actors[id].index
  311.           break
  312.         end
  313.         return if a_index == nil
  314.         $game_party.ma_switch_actors_by_index (a_index, r_index)
  315.       end
  316.     else
  317.       return if $game_party.ma_locked_actors.include? (actor_id)
  318.     end
  319.     # Lock actor
  320.     $game_party.ma_lock_party (actor_id)
  321.   end
  322.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  323.   # * Lock To Reserve Party
  324.   #    actor_id : ID of actor to lock to reserve party
  325.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  326.   def lock_to_reserve_party (actor_id)
  327.     # If actor not in party, do nothing
  328.     return if actor_id == nil || (!$game_party.actors.include? (actor_id) &&
  329.                             !$game_party.ma_reserve_actors.include? (actor_id))
  330.     if $game_party.actors.include? (actor_id)
  331.       # Delete from locked actors in case previously locked to active
  332.       $game_party.ma_locked_actors.delete (actor_id)
  333.       # If no room in reserve party
  334.       unless $game_party.ma_remove_from_active (actor_id)
  335.         # Get index in whichever array actor resides
  336.         a_index = $game_actors[actor_id].index
  337.         r_index = nil
  338.         # Switch first actor not locked out of party
  339.         for id in $game_party.ma_reserve_actors.reverse
  340.           next if $game_party.ma_locked_actors.include? (id)
  341.           r_index = $game_actors[id].index - $game_party.actors.size
  342.           break
  343.         end
  344.         return if r_index == nil
  345.         $game_party.ma_switch_actors_by_index (a_index, r_index)
  346.       end
  347.     else
  348.       return if $game_party.ma_locked_actors.include? (actor_id)
  349.     end
  350.     # Lock actor
  351.     $game_party.ma_lock_party (actor_id)
  352.   end
  353.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  354.   # * Unlock Actor Party
  355.   #    actor_id : ID of actor to unlock
  356.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  357.   def unlock_actor_party (actor_id)
  358.     $game_party.ma_unlock_party (actor_id)
  359.   end
  360.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  361.   # * Change Active Minimum
  362.   #    val : new minimum value for party size
  363.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  364.   def change_active_minimum (val)
  365.     $game_party.ma_min_active_size = val
  366.     # Restore Active Party to minimum size if necessary
  367.     while $game_party.actors.size < val && !$game_party.ma_reserve_actors.empty?
  368.       $game_party.ma_add_to_active ($game_party.ma_reserve_actors[0])
  369.     end
  370.   end
  371.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  372.   # * Change Reserve Maximum
  373.   #    val : new maximum value for reserve party size
  374.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  375.   def change_reserve_maximum (val)
  376.     $game_party.ma_max_reserve_size = val
  377.     while $game_party.ma_reserve_actors.size > val && $game_party.actors.size < $game_party.ma_max_active_size
  378.       $game_party.ma_add_to_active ($game_party.ma_reserve_actors[0])
  379.     end
  380.     # If still actors, remove them
  381.     if $game_party.ma_reserve_actors.size > val
  382.       lost_actors = $game_party.ma_reserve_actors[val, $game_party.ma_reserve_actors.size - val]
  383.       lost_actors.each { |id| $game_party.remove_actor (id) }
  384.     end
  385.   end
  386.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  387.   # * Disable/enable Party Switching
  388.   #    boolean : true => enable, false => disable, nil => toggle
  389.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  390.   def toggle_party_access (boolean = nil)
  391.     $game_party.ma_party_access = boolean == nil ? !$game_party.ma_party_access : boolean
  392.   end
  393.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  394.   # * Actor iterator (ID)
  395.   #     param : If 1 or more, ID. If 0, all
  396.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  397.   alias mdnagr_itrt_actrid_party_resrv_52g4 iterate_actor_id
  398.   def iterate_actor_id (*args)
  399.     $game_party.ma_return_reserve_members = true
  400.     mdnagr_itrt_actrid_party_resrv_52g4 (*args) do |actor|
  401.       yield actor
  402.     end
  403.     $game_party.ma_return_reserve_members = false
  404.   end
  405. end
  406.  
  407. #==============================================================================
  408. # ** Sprite MenuActorsDisabled
  409. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  410. #  This class draws a sprite over disabled actors for the reserve party.
  411. #==============================================================================
  412.  
  413. class Sprite_MenuActorsDisabled < Sprite
  414.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  415.   # * Initialize
  416.   #    coordinates
  417.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  418.   def initialize (y)
  419.     viewport = Viewport.new (0, 0, 544, 400)
  420.     viewport.z = 120
  421.     super (viewport)
  422.     create_bitmap (false, y)
  423.   end
  424.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  425.   # * Create Bitmap
  426.   #    reserve_input : whether or not it is changing party
  427.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  428.   def create_bitmap (reserve_input = false, y = self.y)
  429.     return if $game_party.ma_reserve_actors.size == 0 && !reserve_input
  430.     self.bitmap.dispose if (self.bitmap != nil && !self.bitmap.disposed?)
  431.     size = reserve_input ? $game_party.ma_max_reserve_size : $game_party.ma_reserve_actors.size
  432.     self.bitmap = Bitmap.new (352, size*96)
  433.     disabled_colour = Color.new (127, 127, 127, 105)
  434.     self.bitmap.fill_rect (0, 0, 352, size*96, disabled_colour)
  435.     self.x = 176
  436.     self.y = y
  437.     self.blend_type = 2
  438.   end
  439. end
  440.  
  441. #==============================================================================
  442. # ** Window_Command
  443. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  444. #  Summary of Changes:
  445. #    new instance variable - ma_disabled_commands
  446. #    aliased method - initialize, draw_item
  447. #==============================================================================
  448.  
  449. class Window_Command
  450.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  451.   # * Public Instance Variable
  452.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  453.   attr_reader :ma_disabled_commands
  454.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  455.   # * Initialize
  456.   #     width      : window width
  457.   #     commands   : command string array
  458.   #     column_max : digit count (if 2 or more, horizontal selection)
  459.   #     row_max    : row count (0: match command count)
  460.   #     spacing    : blank space when items are arrange horizontally
  461.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  462.   alias mdrbra_intgrte_prtychng_menu_init_74b2 initialize
  463.   def initialize(*args)
  464.     # Initialize new instance variable
  465.     @ma_disabled_commands = []
  466.     # Run Original Method
  467.     mdrbra_intgrte_prtychng_menu_init_74b2 (*args)
  468.   end
  469.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  470.   # * Draw Item
  471.   #     index   : item number
  472.   #     enabled : enabled flag. When false, draw semi-transparently
  473.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  474.   alias mrnalr_prtchng_intgrtin_menu_drw_itm_6gb3 draw_item
  475.   def draw_item (index, enabled = true)
  476.     # Run Original Method
  477.     mrnalr_prtchng_intgrtin_menu_drw_itm_6gb3 (index, enabled)
  478.     enabled ? @ma_disabled_commands.delete (index) : @ma_disabled_commands.push (index)
  479.   end
  480. end
  481.  
  482. #==============================================================================
  483. # ** Window_MenuStatus
  484. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  485. #  Summary of Changes:
  486. #    overwritten super method - create_contents, top_row, top_row=
  487. #    aliased method - refresh, update_cursor
  488. #==============================================================================
  489.  
  490. class Window_MenuStatus < Window_Selectable
  491.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  492.   # * Create Window Contents
  493.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  494.   def create_contents (reserve_input = false)
  495.     self.contents.dispose
  496.     if reserve_input
  497.       @scrn_item_max = $game_party.ma_max_reserve_size + Game_Party::MAX_MEMBERS
  498.     else
  499.       $game_party.ma_return_reserve_members = true
  500.       @scrn_item_max = $game_party.members.size
  501.       $game_party.ma_return_reserve_members = false
  502.     end
  503.     self.contents = Bitmap.new(width - 32, @scrn_item_max * 96)
  504.     refresh (reserve_input)
  505.   end
  506.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  507.   # * Refresh
  508.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  509.   alias modalg_reserve_prty_rfrsh_menu refresh
  510.   def refresh (reserve_input = false)
  511.     $game_party.ma_draw_party_space = reserve_input
  512.     $game_party.ma_return_reserve_members = true
  513.     # Run Original Method with Reserve Members
  514.     modalg_reserve_prty_rfrsh_menu ()
  515.     # For all locked actors, draw an icon
  516.     $game_party.ma_locked_actors.each { |actor_id|
  517.       index = $game_actors[actor_id].index
  518.       draw_icon (PARTY_CHANGE_LOCK_ICON_INDEX, self.contents.width - 32, index*96 + 8)
  519.     }
  520.     $game_party.ma_return_reserve_members = false
  521.     $game_party.ma_draw_party_space = false
  522.     @item_max = @scrn_item_max
  523.   end
  524.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  525.   # * Update Cursor
  526.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  527.   alias modlg_upd_csor_reserve_prty_9rn3 update_cursor
  528.   def update_cursor
  529.     @index -= top_row
  530.     # Run Original Method
  531.     modlg_upd_csor_reserve_prty_9rn3
  532.     @index += top_row
  533.     # Scroll
  534.     row = (@index > 100 ? (@index - 100) : @index) / @column_max # Get current row
  535.     if row < top_row              # If before the currently displayed
  536.       self.top_row = row          # Scroll up
  537.     end
  538.     if row > top_row + 3          # If after the currently displayed
  539.       self.top_row = row - 3      # Scroll down
  540.     end
  541.   end
  542.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  543.   # * Get Top Row
  544.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  545.   def top_row
  546.     return self.oy / 96
  547.   end
  548.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  549.   # * Set Top Row
  550.   #     row : row shown on top
  551.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  552.   def top_row=(row)
  553.     old_oy = self.oy
  554.     row = 0 if row < 0
  555.     row = row_max - 1 if row > row_max - 1
  556.     self.oy = row * 96
  557.   end
  558. end
  559.  
  560. #==============================================================================
  561. # ** Window Blank Cursor
  562. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  563. #  This window draws a cursor over a selected actor.
  564. #==============================================================================
  565.  
  566. class Window_BlankCursor < Window_Base
  567.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  568.   # * Object Initialization
  569.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  570.   def initialize
  571.     super(160, 0, 384, 128)
  572.     self.visible = false
  573.     self.opacity = 0
  574.     self.cursor_rect.set(0, 0, contents.width, 96)
  575.   end
  576. end
  577.  
  578. #==============================================================================
  579. # ** Scene Battle
  580. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  581. #  Summary of Changes:
  582. #    aliased method - display_level_up
  583. #==============================================================================
  584.  
  585. class Scene_Battle
  586.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  587.   # * Display Level Up
  588.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  589.   alias malgbr_rsrvprty_expgn_dsply_lvlup_9gg2 display_level_up
  590.   def display_level_up
  591.     for actor in $game_party.ma_reserve_members
  592.       last_level = actor.level
  593.       last_skills = actor.skills
  594.       actor.gain_exp(($game_troop.exp_total*actor.reserve_exp_percent) / 100, true)
  595.     end
  596.     # Run Original Method
  597.     malgbr_rsrvprty_expgn_dsply_lvlup_9gg2
  598.   end
  599. end
  600.  
  601. #==============================================================================
  602. # ** Scene_Skill
  603. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  604. #  Summary of Changes:
  605. #    aliased methods - start, determine_target, next_actor, prev_actor
  606. #==============================================================================
  607.  
  608. class Scene_Skill
  609.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  610.   # * Start Processing
  611.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  612.   alias modnalbr_resepar_strt_7vs2 start
  613.   def start (*args)
  614.     $game_party.ma_return_reserve_members = true
  615.     modnalbr_resepar_strt_7vs2 (*args)
  616.     $game_party.ma_return_reserve_members = false
  617.   end
  618.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  619.   # * Determine Target
  620.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  621.   alias mdrnalbr_rsrvprty_trgtdtrmnt_8b53 determine_target
  622.   def determine_target (*args)
  623.     $game_party.ma_return_reserve_members = true
  624.     mdrnalbr_rsrvprty_trgtdtrmnt_8b53 (*args)
  625.     $game_party.ma_return_reserve_members = false
  626.   end
  627.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  628.   # * Switch to Next Actor Screen
  629.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  630.   alias algebramdrn_partvr_nxtactor_9k32 next_actor
  631.   def next_actor (*args)
  632.     $game_party.ma_return_reserve_members = true
  633.     algebramdrn_partvr_nxtactor_9k32 (*args)
  634.     $game_party.ma_return_reserve_members = false
  635.   end
  636.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  637.   # * Switch to Previous Actor Screen
  638.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  639.   alias modalg_reserveparty_prevactor_4nm2 prev_actor
  640.   def prev_actor (*args)
  641.     $game_party.ma_return_reserve_members = true
  642.      modalg_reserveparty_prevactor_4nm2 (*args)
  643.     $game_party.ma_return_reserve_members = false
  644.   end
  645. end
  646.  
  647. #==============================================================================
  648. # ** Scene_Item
  649. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  650. #  Summary of Changes:
  651. #    aliased methods - determine_target
  652. #==============================================================================
  653.  
  654. class Scene_Item
  655.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  656.   # * Determine Target
  657.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  658.   alias modalga_dtrmtrgt_reserveparty_74b3 determine_target
  659.   def determine_target (*args)
  660.     $game_party.ma_return_reserve_members = true
  661.     modalga_dtrmtrgt_reserveparty_74b3 (*args)
  662.     $game_party.ma_return_reserve_members = false
  663.   end
  664. end
  665.  
  666. #==============================================================================
  667. # ** Scene Menu
  668. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  669. #  Summary of Changes:
  670. #    aliased method - initialize, start, terminate, update_actor_selection,
  671. #                 update
  672. #    new methods - ma_start_party_switch
  673. #==============================================================================
  674.  
  675. class Scene_Menu < Scene_Base
  676.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  677.   # * Object Initialization
  678.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  679.   alias ma_rrve_party_init_scene_h43 initialize
  680.   def initialize (*args)
  681.     @selected_index = -1
  682.     $game_party.ma_return_reserve_members = false
  683.     @switching_party = false
  684.     # Run Original Method
  685.     ma_rrve_party_init_scene_h43 (*args)
  686.     if @menu_index >= PARTY_CHANGE_MENU_INDEX
  687.       @menu_index += 1
  688.     end
  689.   end
  690.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  691.   # * Start Processing
  692.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  693.   alias moag_5nd_rsrv_prty_strt start
  694.   def start
  695.     # Run Original Method
  696.     moag_5nd_rsrv_prty_strt
  697.     y = $game_party.members.size*96 + 16
  698.     @disabledactors_sprite = Sprite_MenuActorsDisabled.new (y)
  699.     @selected_actorcursor = Window_BlankCursor.new
  700.   end
  701.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  702.   # * Termination Processing
  703.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  704.   alias modalg_prty_reserve_term_sdpdprites terminate
  705.   def terminate
  706.     # Run Original Method
  707.     modalg_prty_reserve_term_sdpdprites
  708.     # Dispose disable sprite
  709.     @disabledactors_sprite.dispose
  710.     @selected_actorcursor.dispose
  711.     $game_party.ma_return_reserve_members = false if $scene.is_a? (Scene_Map)
  712.   end
  713.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  714.   # * Frame Update
  715.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  716.   alias modalg_frm_upd_resrv_prty_94n5 update
  717.   def update
  718.     top_row = @status_window.top_row
  719.     # Run Original Method
  720.     modalg_frm_upd_resrv_prty_94n5
  721.     if top_row != @status_window.top_row
  722.       s = @switching_party ? $game_party.ma_max_active_size : $game_party.members.size
  723.       @disabledactors_sprite.y = (s - @status_window.top_row)*96 + 16
  724.       @selected_actorcursor.y = @selected_index*96 - @status_window.oy
  725.     end
  726.   end
  727.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  728.   # * Update Actor Selection
  729.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  730.   alias modalg_resev_prty_upd_actr_selct update_actor_selection
  731.   def update_actor_selection
  732.     # If in Party switching mode
  733.     if @switching_party
  734.       # If exiting the scene
  735.       if Input.trigger? (Input::B)
  736.         Sound.play_cancel
  737.         # If no other position selected already, exit party arrangement
  738.         if @selected_index == -1
  739.           @status_window.create_contents (false)
  740.           y = ($game_party.members.size - @status_window.top_row)*96 + 16
  741.           @disabledactors_sprite.create_bitmap (false, y)
  742.           @switching_party = false
  743.           end_actor_selection
  744.         else
  745.           # Remove previously selected index
  746.           @selected_index = -1
  747.           @selected_actorcursor.visible = false
  748.         end
  749.       # If an actor is selected
  750.       elsif Input.trigger? (Input::C)
  751.         index = @status_window.index
  752.         # If selecting previously selected slot
  753.         if index == @selected_index
  754.           Sound.play_cancel
  755.           @selected_index = -1
  756.           @selected_actorcursor.visible = false
  757.           return
  758.         end
  759.         # If selecting from a reserve slot
  760.         if index >= $game_party.ma_max_active_size
  761.           ma_select_reserve (index)
  762.         else # If selecting from active party
  763.           ma_select_active (index)
  764.         end
  765.       end
  766.     else
  767.       changed = false
  768.       if @command_window.index > PARTY_CHANGE_MENU_INDEX
  769.         @command_window.index = (@command_window.index - 1) % @command_window.commands.size
  770.         changed = true
  771.       end
  772.       # Run Original Method
  773.       modalg_resev_prty_upd_actr_selct
  774.       @command_window.index = (@command_window.index + 1) % @command_window.commands.size if changed
  775.       $game_party.ma_return_reserve_members = true unless $scene.is_a? (Scene_Menu)
  776.     end
  777.   end
  778.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  779.   # * Create Command Window
  780.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  781.   alias mdrnaba_prtychn_intgr_menu_crt_cmnd_window_8hb3 create_command_window
  782.   def create_command_window
  783.     mdrnaba_prtychn_intgr_menu_crt_cmnd_window_8hb3
  784.     # Get commands from the command window
  785.     c = @command_window.commands
  786.     # Add Party Change Command
  787.     c.insert (PARTY_CHANGE_MENU_INDEX, PARTY_CHANGE_LABEL)
  788.     width = @command_window.width
  789.     disabled = @command_window.ma_disabled_commands
  790.     @command_window.dispose
  791.     @command_window = @command_window.class.new(width, c)
  792.     @command_window.index = @menu_index
  793.     # Disable all of the old commands as well
  794.     disabled.each { |i|
  795.       i += 1 if i >= PARTY_CHANGE_MENU_INDEX
  796.       @command_window.draw_item (i, false)
  797.     }
  798.     # Draw Disabled if Party Changer disabled
  799.     if ($game_party.ma_reserve_actors.empty? && $game_party.actors.size <= 1) ||
  800.           !$game_party.ma_party_access
  801.       @command_window.draw_item (PARTY_CHANGE_MENU_INDEX, false)
  802.     end
  803.   end
  804.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  805.   # * Update Command Selection
  806.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  807.   alias modrnalg_prtychng_updcmndslect_62n4 update_command_selection
  808.   def update_command_selection
  809.     changed = false
  810.     if Input.trigger? (Input::C) && @command_window.index == PARTY_CHANGE_MENU_INDEX
  811.       # If Party Change is disabled
  812.       if ($game_party.ma_reserve_actors.empty?  && $game_party.actors.size <= 1) ||
  813.             !$game_party.ma_party_access
  814.         Sound.play_buzzer
  815.       else
  816.         # Open Quest Window
  817.         Sound.play_decision
  818.         ma_start_party_switch
  819.       end
  820.       return
  821.     end
  822.     # If the command index is greater than it ought to be, make sure
  823.     if @command_window.index > PARTY_CHANGE_MENU_INDEX
  824.       @command_window.index = (@command_window.index - 1) % @command_window.commands.size
  825.       changed = true
  826.     end
  827.     modrnalg_prtychng_updcmndslect_62n4
  828.     @command_window.index = (@command_window.index + 1) % @command_window.commands.size if changed
  829.   end
  830.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  831.   # * Select Reserve
  832.   #    index : the index selected
  833.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  834.   def ma_select_reserve (index)
  835.     # If another slot from reserve already picked.
  836.     if @selected_index >= $game_party.ma_max_active_size
  837.       Sound.play_decision
  838.       # Switch actor order
  839.       $game_party.ma_switch_actor_order (false, @selected_index - $game_party.ma_max_active_size, index - $game_party.ma_max_active_size)
  840.       ma_start_party_switch
  841.       return
  842.     end
  843.     # If selecting an empty slot:
  844.     if index - $game_party.ma_max_active_size >= $game_party.ma_reserve_actors.size
  845.       # If no other option already selected.
  846.       if @selected_index == -1
  847.         Sound.play_decision
  848.         @selected_index = index
  849.         @selected_actorcursor.y = index*96 - @status_window.oy
  850.         @selected_actorcursor.visible = true
  851.       else # If selecting a reserve member
  852.         # If other selected slot also empty
  853.         if @selected_index >= $game_party.actors.size
  854.           Sound.play_decision
  855.           @selected_index = -1
  856.           @selected_actorcursor.visible = false    
  857.         else
  858.           # If successful switch
  859.           if $game_party.ma_switch_actors_by_index (@selected_index, index - $game_party.ma_max_active_size)
  860.             Sound.play_decision
  861.             ma_start_party_switch
  862.           else
  863.             Sound.play_buzzer
  864.           end
  865.         end
  866.       end
  867.     else # If actor slot selected
  868.       # If active slot not already selected
  869.       if @selected_index == -1
  870.         Sound.play_decision
  871.         # Set as selected and choose next
  872.         @selected_index = index
  873.         @selected_actorcursor.y = index*96 - @status_window.oy
  874.         @selected_actorcursor.visible = true
  875.       else # If an active slot already picked
  876.         # If successful switch
  877.         if $game_party.ma_switch_actors_by_index (@selected_index, index - $game_party.ma_max_active_size)
  878.           Sound.play_decision
  879.           ma_start_party_switch
  880.         else
  881.           Sound.play_buzzer
  882.         end
  883.       end
  884.     end
  885.   end
  886.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  887.   # * Select Active
  888.   #    index : the index selected
  889.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  890.   def ma_select_active (index)
  891.     # If another slot from active already picked.
  892.     if @selected_index != -1 && @selected_index < $game_party.ma_max_active_size
  893.       Sound.play_decision
  894.       # Switch actor order
  895.       $game_party.ma_switch_actor_order (true, @selected_index, index)
  896.       ma_start_party_switch
  897.       return
  898.     end
  899.     # If selecting an empty slot:
  900.     if index >= $game_party.actors.size
  901.       # If no other option already selected.
  902.       if @selected_index == -1
  903.         Sound.play_decision
  904.         @selected_index = index
  905.         @selected_actorcursor.y = index*96 - @status_window.oy
  906.         @selected_actorcursor.visible = true
  907.       else
  908.         # If other selected slot also empty
  909.         if @selected_index >= $game_party.ma_max_active_size + $game_party.ma_reserve_actors.size
  910.           Sound.play_decision
  911.           @selected_index = -1
  912.           @selected_actorcursor.visible = false
  913.         else
  914.           # If successful switch
  915.           if $game_party.ma_switch_actors_by_index (index, @selected_index - $game_party.ma_max_active_size)
  916.             Sound.play_decision
  917.             ma_start_party_switch
  918.           else
  919.             Sound.play_buzzer
  920.           end
  921.         end
  922.       end
  923.     else # If actor slot selected
  924.       # If reserve slot not already selected
  925.       if @selected_index == -1
  926.         Sound.play_decision
  927.         # Set autocursor and choose next actor
  928.         @selected_index = index
  929.         @selected_actorcursor.y = index*96 - @status_window.oy
  930.         @selected_actorcursor.visible = true
  931.       else # If a reserve slot already picked
  932.         # If successful switch
  933.         if $game_party.ma_switch_actors_by_index (index, @selected_index - $game_party.ma_max_active_size)
  934.           Sound.play_decision
  935.           ma_start_party_switch
  936.         else
  937.           Sound.play_buzzer
  938.         end
  939.       end
  940.     end
  941.   end
  942.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  943.   # * Start Party Switch
  944.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  945.   def ma_start_party_switch
  946.     @selected_index = -1
  947.     status_index = @status_window.index
  948.     @selected_actorcursor.visible = false
  949.     @status_window.create_contents (true)
  950.     y = ($game_party.ma_max_active_size - @status_window.top_row)*96 + 16
  951.     @disabledactors_sprite.create_bitmap (true, y)
  952.     @switching_party = true
  953.     @status_window.active = true
  954.     @status_window.index = status_index < 0 ? 0 : status_index
  955.     @command_window.active = false
  956.   end
  957. end
Expand to see the code.
Ba-bump.
  1. class Window_MenuStatus < Window_Selectable
  2.  
  3.   def draw_actor_face(actor, x, y, size)
  4.     bitmap = Cache.picture(actor.name + "_menu") rescue bitmap = nil
  5.     if bitmap == nil
  6.       super(actor, x, y, size)
  7.     else
  8.       self.contents.blt(x, y, bitmap, Rect.new(0, 0, bitmap.width, bitmap.height))
  9.     end
  10.   end
  11.  
  12. end
Expand to see the code.

It'll load from the pictures folder. The pictures need to be named 'ActorName_menu', i.e. 'Arshes_menu'.
If it can't find a picture, it'll use the face graphic instead.
Just perfect.

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=71066