Hello,
I have a problem with my scripts KGC Large Party
and the Ring Menu script
If I open up my menu and open Party Switch in the Ring Menu, I first have to exit the menu to let the Party Switcher scene open... I don't know how to prevent this. Could someone help me, please?
Thank you very much,
Joeri
I have a problem with my scripts KGC Large Party
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_
#_/   ◆   Party Expansion & Formation - KGC_LargeParty    ◆ VX ◆
#_/ Â Â â—‡ Â Â Â Â Â Â Â Â Last Update: 2008/04/27 Â Â Â Â Â Â Â Â Â Â â—‡
#_/   ◆        Translation by Mr. Anonymous         ◆
#_/-----------------------------------------------------------------------------
#_/ Â This script allows you more control over the default "party" system by
#_/ Â removing the limitation of only having four actors to a party. These
#_/ Â extra actors may behave just as any other actor during battle. In addition
#_/ Â you may also have "standby" actors, who can be swapped out with the
#_/ Â current party via a "Party Formation" screen, which may optionally be
#_/ Â added into the main menu panel, and/or even called from pressing
#_/ Â a specified button while on the main menu.
#_/-----------------------------------------------------------------------------
#_/ Â Â Â Â Â Â Â Â Â Â Â â—† 2008/04/27 UPDATE [KGC] â—† Â Â Â Â Â
#_/ Â Â Â Â Â Â Updated for KGC_CursorAnimation compatibility.
#_/=============================================================================
#_/ Â Â Â Â Â Â Â Â Â Â â—† Instructions For Usage â—†
#_/ Â Â Â Â Â Â Â Â Â Â Â â—† Script Commands â—†
#_/ Â These commands are used in "Script" function in the third page of event
#_/ Â commands under "Advanced".
#_/
#_/ Â * call_partyform
#_/ Â Â Calls the Party Formation screen.
#_/
#_/ Â * set_max_battle_member_count(Value)
#_/ Â Â Allows you to manually set the maximum amount of actors in the active
#_/ Â Â Â party, i.e. the amount of party members who may participate in battle.
#_/
#_/ Â * party_full?
#_/ Â Â Used for Conditional Branches. This allows you to determine wether the
#_/ Â Â Â active party is full in accordance to MAX_BATTLE_MEMBERS or the above
#_/ Â Â Â manual statement of set_max_battle_member_count(Value).
#_/
#_/ Â * permit_partyform(true/false)
#_/ Â Â Allows you to enable or disable the Party Formation screen on the main
#_/ Â Â Â command menu. This also actives or deactivates PARTYFORM_SWITCH.
#_/
#_/ Â * fix_actor(ActorID, true/false)
#_/ Â Â Allows you to fix or force an actor into remaining in the active party
#_/ Â Â Â and not be switched out with a standby actor. If the true/false
#_/ Â Â Â argument is omitted, the statement is automatically considered true.
#_/ Â
#_/ Â * change_party_shift(index1, index2)
#_/ Â Â This allows you to switch an actor in the position of index1 with the
#_/ Â Â Â actor in the position of index2. This ignores the fix_actor function.
#_/ Â Â Â Also of note is that the first actor in the party actually has an
#_/ Â Â Â index of 0, second actor has an index of 1, and so on.
#_/
#_/ Â * sort_party_member(sort_type, true/false)
#_/ Â Â This allows you to manually sort the actors by replacing sort_type with
#_/ Â Â Â SORT_BY_ID, SORT_BY_NAME, or SORT_BY_LEVEL. If you set the second
#_/ Â Â Â argument to true, the sorting order is reversed. If true, it is not.
#_/ Â Â Â Also, if the second argument is omitted, it is automatically false.
#_/
#_/ Â * get_stand_by_member_ids
#_/ Â Â This aquires the arrangement of the ActorIDs of the standby actors.
#_/
#_/ Â * stand_by_member?(ActorID)
#_/ Â Â Used for Conditional Branches. This allows you to determine if the actor
#_/ Â Â Â specified is a standby party member.
#_/
#_/ Â * add_battle_member(ActorID, index)
#_/ Â Â Allows you to add an actor to the active party and place it in the
#_/ Â Â Â desired position(index). If the second argument is omitted, the actor
#_/ Â Â Â will automatically be placed at the end of the party. Also, if the
#_/ Â Â Â active party is full, the actor will not be added.
#_/
#_/ Â * remove_battle_member(ActorID)
#_/ Â Â Removes an actor from the active party. This cannot removed an actor
#_/ Â Â Â who is fixed into place using fix_actor.
#_/
#_/ Â * remove_all_battle_member
#_/ Â Â All actors other than fixed actors are removed from the active party.
#_/ Â Â Â Note that this seems to unfix fixed characters, but not remove them.
#_/ Â Â Â Also note that if there are no fixed actors, you must add a member
#_/ Â Â Â back into the active party using add_battle_member BEFORE the player
#_/ Â Â Â is allowed to open the menu or enter battle.
#_/
#_/ Â * random_launch
#_/ Â Â Randomly sorts and replaces the active party with those from the standby
#_/ Â Â Â party. Once again this does not effect fixed actors.
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_
#_/ A special note from the translator: I'll be revising this translation for
#_/ Â a more user-friendly approach and expanded functionality explainations
#_/ Â when I have the time. If you don't understand something here now, fear not,
#_/ Â as this is only a beta translation. As such, some things may be incorrect.
#_/ Â however, it should work without a hitch, with the possible exception of
#_/ Â SHOW_STAND_BY_MEMBER_NOT_IN_BATTLE, which I still cannot figure out.
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_
Â
#==============================================================================#
#               ★ Customization ★                 #
#==============================================================================#
Â
module KGC
module LargeParty
 #          ◆ Party Formation In-Game Switch ◆
 #  This allows you to assign an in-game Switch that allows you to enable or
 #  disable the Party Formation screen on the main command menu.
 PARTYFORM_SWITCH      = 3
 #        ◆ Party Formation In-Game Switch (In Combat) ◆
 #  This allows you to assign an in-game Switch that allows you to enable or
 #  disable the Party Formation screen during combat.
 BATTLE_PARTYFORM_SWITCH  = 4
 #       ◆ Default Party Formation Switch Activation Toggle ◆
 #  When "New Game" is selected, both party formation permission switches
 #  automatically become active (ON) when this is set as true.
 DEFAULT_PARTYFORM_ENABLED = false
Â
 #          ◆ Maximum Party Members (In Combat) ◆
 #  Allows you to choose how many actors may participate in a battle.
 MAX_BATTLE_MEMBERS = 4
 #             ◆ The Party Members ◆
 #  Allows you to choose how many actors may be added to the party.
 #  *Note: Game_Party::MAX_MEMBERS Is overwritten
 #  When making this 100 or more, you'll receive an error.
 MAX_MEMBERS = 99
Â
 #           ◆ Fixed Party Member Sorting ◆
 #  This toggle allows you to enable/disable automatic sorting of fixed(active)
 #  party members.
 #  true = Disable automatic sorting.
 #  false = Enable automatic sorting.
 FORBID_CHANGE_SHIFT_FIXED = false
Â
 #  Standby Members Background Color
 #  Default: Color.new(0, 0, 0, 0)
 STAND_BY_COLOR = Color.new(0, 0, 0, 128)
 # ◆ Fixed Current Party Background Color
 FIXED_COLOR   = Color.new(255, 128, 64, 96)
 #  Background Color that shows when Members are selected.
 SELECTED_COLOR = Color.new(64, 255, 128, 128)
Â
 #         ◆ Party Formation Command Menu Selection ◆
 #  This allows you to change the key/button pressed in the menu screen to
 #  pull up the Party Formation screen without actually highlighting and
 #  selecting the Party Formation option.
 #  If this is set as nil, this function is disabled.
 MENU_PARTYFORM_BUTTON    = Input::A
 #  This toggle allows you to enable/disable the Party Formation option on the
 #  main command window.
 # true = The option is enabled.
 # false = The option is removed.
 USE_MENU_PARTYFORM_COMMAND = false
 #  This allows you to change the text displayed for the Party Formation option
 #  in the main command window.
 VOCAB_MENU_PARTYFORM    = "Party"
Â
 #  This toggle allows you to enable/disable the Party Formation option while
 #  in combat.
 #  This option is added under the "Run" or "Escape" command.
 USE_BATTLE_PARTYFORM  = false
 #  This allows you to change the text displayed for the Party Formation option
 #  while in combat under the "Run" or "Escape" command.
 VOCAB_BATTLE_PARTYFORM = "Party"
Â
 #      ◆ Party Formation Screen Character Dimensions ◆
 #  This allows you to change the width and height of the actors' placemarkers
 #  on the Party Formation Screen.
 #  You can rewrite this [x, y] in accordance to the size of your actor's
 #  walking graphic.
 PARTY_FORM_CHARACTER_SIZE  = [40, 48]
 #  This allows you to change the text of the empty slots in the Party
 #  Formation Screen.
 BATTLE_MEMBER_BLANK_TEXT   = "EMPTY"
 # ◆ Party Formation Screen Member Rows ◆
 #  This allows you to change the amount of rows that in the "Standby"
 #  box.
 #  Adjust this value to 1 if the status window protrudes beyond the screen.
 PARTY_MEMBER_WINDOW_ROW_MAX = 2
 #           ◆ Current Party Member Display ◆
 #  This toggle allows you to show/hide the current party members in the
 #  "Standby" box.
 #  true = Show them! These will be greyed out.
 #  false = Hide them.
 SHOW_BATTLE_MEMBER_IN_PARTY = false
 #  This allows you to change the text displayed for empty slots on in the
 #  "Current Party" box.
 PARTY_MEMBER_BLANK_TEXT   = "-"
Â
 # ◆ Width of caption window on organization screen
 CAPTION_WINDOW_WIDTH  = 192
 # ◆ Caption of combat member window on organization screen
 BATTLE_MEMBER_CAPTION = "Current Party"
Â
 if SHOW_BATTLE_MEMBER_IN_PARTY
  #  This allows you to change the text that appears on top of the Party
  #  Formation box.
  #  (When SHOW_BATTLE_MEMBER_IN_PARTY = true)
  PARTY_MEMBER_CAPTION = "Party Formation"
 else
  #  This allows you to change the text that appears on top of the Standby
  #   box.
  #  (When SHOW_BATTLE_MEMBER_IN_PARTY = false)
  PARTY_MEMBER_CAPTION = "Standby"
 end
Â
 #         ◆ Width of Formation Confirmation Window ◆
 CONFIRM_WINDOW_WIDTH   = 160
 #       ◆ Vocab Strings for Formation Confirmation Window ◆
 #  If the order of these commands are changed or something is removed, expect
 #  an error.
 CONFIRM_WINDOW_COMMANDS = ["Done", "Cancel"]
Â
 #          ◆ Equip Item Status Shop Scroll ◆
 #  This allows you to change the key/button HELD DOWN while using the Up and
 #  Down keys to scroll the attribute bonuses window (to the right) to view
 #  the each individual unit's attribute bonuses. KCG_HelpExtension is
 #  required for this function to work properly.
 #  If you set this to nil, this function is disabled.
 SHOP_STATUS_SCROLL_BUTTON = Input::A
Â
 #        ◆ Standby Members Experience Gain Percentage ◆
 #  If you enter 500 in this, the actual EXP gained is 50.0%
 #  You may also prevent standby units from gaining EXP by setting this is 0.
 STAND_BY_EXP_RATE = 500
 #           ◆ Standby Members Level-Up Message ◆
 #  This toggle allows you to enable/disable the level-up messages displayed
 #  for units on standby.
 #  true = Show level-up messages for standby units.
 #  false = Hide level-up messages for standby units.
 SHOW_STAND_BY_LEVEL_UP = true
 #           ◆ Standby Members Combat Display ◆
 #  *Note: I cannot figure out what this actually does. It doesn't -seem- to
 #   work as advertised, but I could be wrong. If anyone figures out what this
 #   actually does, please let me know.
 #  true  : All members are displayed during combat.
 #  false : Exchanged standby members are not shown.
 SHOW_STAND_BY_MEMBER_NOT_IN_BATTLE = false
 end
end
Â
$imported = {} if $imported == nil
$imported["LargeParty"] = true
Â
#==============================================================================
# â–¡ KGC::Commands
#==============================================================================
Â
module KGC::Commands
 # メンãƒãƒ¼ã®ã‚½ãƒ¼ãƒˆå½¢å¼
 SORT_BY_ID   = 0  # IDé †
 SORT_BY_NAME  = 1  # åå‰é †
 SORT_BY_LEVEL = 2  # ãƒ¬ãƒ™ãƒ«é †
Â
 module_function
 #--------------------------------------------------------------------------
 # â—‹ パーティ編æˆç”»é¢ã®å‘¼ã³å‡ºã—
 #--------------------------------------------------------------------------
 def call_partyform
  return if $game_temp.in_battle
  $game_temp.next_scene = :partyform
 end
 #--------------------------------------------------------------------------
 # â—‹ 戦闘メンãƒãƒ¼æœ€å¤§æ•°ã‚’è¨å®š
 #   value : 人数 (çœç•¥ã—ãŸå ´åˆã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’使用)
 #--------------------------------------------------------------------------
 def set_max_battle_member_count(value = nil)
  $game_party.max_battle_member_count = value
 end
 #--------------------------------------------------------------------------
 # â—‹ パーティ人数ãŒä¸€æ¯ã‹
 #--------------------------------------------------------------------------
 def party_full?
  return $game_party.full?
 end
 #--------------------------------------------------------------------------
 # â—‹ パーティ編æˆå¯å¦ã‚’è¨å®š
 #   enabled : 有効フラグ (çœç•¥æ™‚ : true)
 #--------------------------------------------------------------------------
 def permit_partyform(enabled = true)
  $game_switches[KGC::LargeParty::PARTYFORM_SWITCH] = enabled
 end
 #--------------------------------------------------------------------------
 # â—‹ 戦闘ä¸ã®ãƒ‘ーティ編æˆå¯å¦ã‚’è¨å®š
 #   enabled : 有効フラグ (çœç•¥æ™‚ : true)
 #--------------------------------------------------------------------------
 def permit_battle_partyform(enabled = true)
  $game_switches[KGC::LargeParty::BATTLE_PARTYFORM_SWITCH] = enabled
 end
 #--------------------------------------------------------------------------
 # â—‹ アクターã®å›ºå®šçŠ¶æ…‹ã‚’è¨å®š
 #   actor_id : アクター ID
 #   fixed   : 固定フラグ (çœç•¥æ™‚ : true)
 #--------------------------------------------------------------------------
 def fix_actor(actor_id, fixed = true)
  $game_party.fix_actor(actor_id, fixed)
 end
 #--------------------------------------------------------------------------
 # â—‹ 並ã³æ›¿ãˆ
 #   メンãƒãƒ¼ã® index1 番目㨠index2 番目を入れ替ãˆã‚‹
 #--------------------------------------------------------------------------
 def change_party_shift(index1, index2)
  $game_party.change_shift(index1, index2)
 end
 #--------------------------------------------------------------------------
 # â—‹ メンãƒãƒ¼æ•´åˆ— (æ˜‡é †)
 #   sort_type : ã‚½ãƒ¼ãƒˆå½¢å¼ (SORT_BY_xxx)
 #   reverse  : true ã ã¨é™é †
 #--------------------------------------------------------------------------
 def sort_party_member(sort_type = SORT_BY_ID, reverse = false)
  $game_party.sort_member(sort_type, reverse)
 end
 #--------------------------------------------------------------------------
 # â—‹ 待機メンãƒãƒ¼ã® ID ã‚’å–å¾—
 #--------------------------------------------------------------------------
 def get_stand_by_member_ids
  result = []
  $game_party.stand_by_members.each { |actor| result << actor.id }
  return result
 end
 #--------------------------------------------------------------------------
 # â—‹ アクターãŒå¾…機メンãƒãƒ¼ã‹
 #   actor_id : アクター ID
 #--------------------------------------------------------------------------
 def stand_by_member?(actor_id)
  return get_stand_by_member_ids.include?(actor_id)
 end
 #--------------------------------------------------------------------------
 # â—‹ アクターを戦闘メンãƒãƒ¼ã«åŠ ãˆã‚‹
 #   actor_id : アクター ID
 #   index   : è¿½åŠ ä½ç½® (çœç•¥æ™‚ã¯æœ€å¾Œå°¾)
 #--------------------------------------------------------------------------
 def add_battle_member(actor_id, index = nil)
  $game_party.add_battle_member(actor_id, index)
 end
 #--------------------------------------------------------------------------
 # â—‹ アクターを戦闘メンãƒãƒ¼ã‹ã‚‰å¤–ã™
 #   actor_id : アクター ID
 #--------------------------------------------------------------------------
 def remove_battle_member(actor_id)
  $game_party.remove_battle_member(actor_id)
 end
 #--------------------------------------------------------------------------
 # â—‹ 固定アクター以外を戦闘メンãƒãƒ¼ã‹ã‚‰å¤–ã™
 #--------------------------------------------------------------------------
 def remove_all_battle_member
  $game_party.all_members.each { |actor|
   $game_party.remove_battle_member(actor.id)
  }
 end
 #--------------------------------------------------------------------------
 # ○ ランダム出撃
 #--------------------------------------------------------------------------
 def random_launch
  new_battle_members = $game_party.fixed_members
  candidates = $game_party.all_members - new_battle_members
  num = [$game_party.max_battle_member_count - new_battle_members.size,
   candidates.size].min
  return if num <= 0
Â
  # ランダムã«é¸ã¶
  ary = (0...candidates.size).to_a.sort_by { rand }
  ary[0...num].each { |i| new_battle_members << candidates }
  $game_party.set_battle_member(new_battle_members)
 end
end
Â
class Game_Interpreter
 include KGC::Commands
end
Â
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
Â
#==============================================================================
# â– Vocab
#==============================================================================
Â
module Vocab
 # 「パーティ編æˆã€ã‚³ãƒžãƒ³ãƒ‰å (メニュー)
 def self.partyform
  return KGC::LargeParty::VOCAB_MENU_PARTYFORM
 end
Â
 # 「パーティ編æˆã€ã‚³ãƒžãƒ³ãƒ‰å (戦闘)
 def self.partyform_battle
  return KGC::LargeParty::VOCAB_BATTLE_PARTYFORM
 end
end
Â
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
Â
#==============================================================================
# â– Game_Actor
#==============================================================================
Â
class Game_Actor < Game_Battler
 #--------------------------------------------------------------------------
 # â—‹ パーティ内インデックスå–å¾—
 #--------------------------------------------------------------------------
 def party_index
  return $game_party.all_members.index(self)
 end
 #--------------------------------------------------------------------------
 # â—‹ 戦闘メンãƒãƒ¼ã‹åˆ¤å®š
 #--------------------------------------------------------------------------
 def battle_member?
  return $game_party.battle_members.include?(self)
 end
 #--------------------------------------------------------------------------
 # â—‹ 固定メンãƒãƒ¼ã‹åˆ¤å®š
 #--------------------------------------------------------------------------
 def fixed_member?
  return $game_party.fixed_members.include?(self)
 end
end
Â
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
Â
#==============================================================================
# â– Game_Party
#==============================================================================
Â
class Game_Party
 #--------------------------------------------------------------------------
 # ◠定数
 #--------------------------------------------------------------------------
 MAX_MEMBERS = KGC::LargeParty::MAX_MEMBERS  # 最大パーティ人数
 #--------------------------------------------------------------------------
 # ◠オブジェクトåˆæœŸåŒ–
 #--------------------------------------------------------------------------
 alias initialize_KGC_LargeParty initialize
 def initialize
  initialize_KGC_LargeParty
Â
  @max_battle_member_count = nil
  @battle_member_count = 0
  @fixed_actors = []
 end
 #--------------------------------------------------------------------------
 # â—‹ 戦闘メンãƒãƒ¼æœ€å¤§æ•°å–å¾—
 #--------------------------------------------------------------------------
 def max_battle_member_count
  if @max_battle_member_count == nil
   return KGC::LargeParty::MAX_BATTLE_MEMBERS
  else
   return @max_battle_member_count
  end
 end
 #--------------------------------------------------------------------------
 # â—‹ 戦闘メンãƒãƒ¼æœ€å¤§æ•°å¤‰æ›´
 #--------------------------------------------------------------------------
 def max_battle_member_count=(value)
  if value.is_a?(Integer)
   value = [value, 1].max
  end
  @max_battle_member_count = value
 end
 #--------------------------------------------------------------------------
 # â—‹ 戦闘メンãƒãƒ¼æ•°å–å¾—
 #--------------------------------------------------------------------------
 def battle_member_count
  if @battle_member_count == nil
   @battle_member_count = @actors.size
  end
  @battle_member_count =
   [@battle_member_count, @actors.size, max_battle_member_count].min
  return @battle_member_count
 end
 #--------------------------------------------------------------------------
 # â—‹ 戦闘メンãƒãƒ¼æ•°è¨å®š
 #--------------------------------------------------------------------------
 def battle_member_count=(value)
  @battle_member_count = [[value, 0].max,
   @actors.size, max_battle_member_count].min
 end
 #--------------------------------------------------------------------------
 # ◠メンãƒãƒ¼ã®å–å¾—
 #--------------------------------------------------------------------------
 alias members_KGC_LargeParty members
 def members
  if $game_temp.in_battle ||
    !KGC::LargeParty::SHOW_STAND_BY_MEMBER_NOT_IN_BATTLE
   return battle_members
  else
   return members_KGC_LargeParty
  end
 end
 #--------------------------------------------------------------------------
 # â—‹ 全メンãƒãƒ¼ã®å–å¾—
 #--------------------------------------------------------------------------
 def all_members
  return members_KGC_LargeParty
 end
 #--------------------------------------------------------------------------
 # â—‹ 戦闘メンãƒãƒ¼ã®å–å¾—
 #--------------------------------------------------------------------------
 def battle_members
  result = []
  battle_member_count.times { |i| result << $game_actors[@actors] }
  return result
 end
 #--------------------------------------------------------------------------
 # â—‹ 待機メンãƒãƒ¼ã®å–å¾—
 #--------------------------------------------------------------------------
 def stand_by_members
  return (all_members - battle_members)
 end
 #--------------------------------------------------------------------------
 # â—‹ 固定メンãƒãƒ¼ã®å–å¾—
 #--------------------------------------------------------------------------
 def fixed_members
  result = []
  @fixed_actors.each { |i| result << $game_actors }
  return result
 end
 #--------------------------------------------------------------------------
 # â— åˆæœŸãƒ‘ーティã®ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—
 #--------------------------------------------------------------------------
 alias setup_starting_members_KGC_LargeParty setup_starting_members
 def setup_starting_members
  setup_starting_members_KGC_LargeParty
Â
  self.battle_member_count = @actors.size
 end
 #--------------------------------------------------------------------------
 # ◠戦闘テスト用パーティã®ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—
 #--------------------------------------------------------------------------
 alias setup_battle_test_members_KGC_LargeParty setup_battle_test_members
 def setup_battle_test_members
  setup_battle_test_members_KGC_LargeParty
Â
  self.battle_member_count = @actors.size
 end
 #--------------------------------------------------------------------------
 # â—‹ メンãƒãƒ¼ã®æ–°è¦è¨å®š
 #   new_member : æ–°ã—ã„メンãƒãƒ¼
 #--------------------------------------------------------------------------
 def set_member(new_member)
  @actors = []
  new_member.each { |actor| @actors << actor.id }
 end
 #--------------------------------------------------------------------------
 # â—‹ 戦闘メンãƒãƒ¼ã®æ–°è¦è¨å®š
 #   new_member : æ–°ã—ã„戦闘メンãƒãƒ¼
 #--------------------------------------------------------------------------
 def set_battle_member(new_member)
  new_battle_member = []
  new_member.each { |actor|
   @actors.delete(actor.id)
   new_battle_member << actor.id
  }
  @actors = new_battle_member + @actors
  self.battle_member_count = new_member.size
 end
 #--------------------------------------------------------------------------
 # â—‹ パーティ編æˆã‚’許å¯ã—ã¦ã„ã‚‹ã‹åˆ¤å®š
 #--------------------------------------------------------------------------
 def partyform_enable?
  return $game_switches[KGC::LargeParty::PARTYFORM_SWITCH]
 end
 #--------------------------------------------------------------------------
 # â—‹ 戦闘ä¸ã®ãƒ‘ーティ編æˆã‚’許å¯ã—ã¦ã„ã‚‹ã‹åˆ¤å®š
 #--------------------------------------------------------------------------
 def battle_partyform_enable?
  return false unless partyform_enable?
  return $game_switches[KGC::LargeParty::BATTLE_PARTYFORM_SWITCH]
 end
 #--------------------------------------------------------------------------
 # â—‹ メンãƒãƒ¼ãŒä¸€æ¯ã‹åˆ¤å®š
 #--------------------------------------------------------------------------
 def full?
  return (@actors.size >= MAX_MEMBERS)
 end
 #--------------------------------------------------------------------------
 # â—‹ 固定アクターã‹åˆ¤å®š
 #   actor_id : 判定ã™ã‚‹ã‚¢ã‚¯ã‚¿ãƒ¼ã® ID
 #--------------------------------------------------------------------------
 def actor_fixed?(actor_id)
  return @fixed_actors.include?(actor_id)
 end
 #--------------------------------------------------------------------------
 # â— ã‚¢ã‚¯ã‚¿ãƒ¼ã‚’åŠ ãˆã‚‹
 #   actor_id : アクター ID
 #--------------------------------------------------------------------------
 alias add_actor_KGC_LargeParty add_actor
 def add_actor(actor_id)
  last_size = @actors.size
Â
  add_actor_KGC_LargeParty(actor_id)
Â
  if last_size < @actors.size
   self.battle_member_count += 1
  end
 end
 #--------------------------------------------------------------------------
 # â—‹ アクターを戦闘メンãƒãƒ¼ã«åŠ ãˆã‚‹
 #   actor_id : アクター ID
 #   index   : è¿½åŠ ä½ç½® (çœç•¥æ™‚ã¯æœ€å¾Œå°¾)
 #--------------------------------------------------------------------------
 def add_battle_member(actor_id, index = nil)
  return unless @actors.include?(actor_id)  # パーティã«ã„ãªã„
  if index == nil
   return if battle_members.include?($game_actors[actor_id])  # 出撃済ã¿
   return if battle_member_count == max_battle_member_count  # 人数ãŒæœ€å¤§
   index = battle_member_count
  end
Â
  @actors.delete(actor_id)
  @actors.insert(index, actor_id)
  self.battle_member_count += 1
 end
 #--------------------------------------------------------------------------
 # â—‹ アクターを戦闘メンãƒãƒ¼ã‹ã‚‰å¤–ã™
 #   actor_id : アクター ID
 #--------------------------------------------------------------------------
 def remove_battle_member(actor_id)
  return unless @actors.include?(actor_id)  # パーティã«ã„ãªã„
  return if actor_fixed?(actor_id)      # 固定済ã¿
  return if stand_by_members.include?($game_actors[actor_id])  # å¾…æ©Ÿä¸
Â
  @actors.delete(actor_id)
  @actors.push(actor_id)
  self.battle_member_count -= 1
 end
 #--------------------------------------------------------------------------
 # â—‹ アクターã®å›ºå®šçŠ¶æ…‹ã‚’è¨å®š
 #   actor_id : アクター ID
 #   fixed   : 固定フラグ (çœç•¥æ™‚ : false)
 #--------------------------------------------------------------------------
 def fix_actor(actor_id, fixed = false)
  return unless @actors.include?(actor_id)  # パーティã«ã„ãªã„
Â
  if fixed
   # 固定
   unless @fixed_actors.include?(actor_id)
    @fixed_actors << actor_id
    unless battle_members.include?($game_actors[actor_id])
     self.battle_member_count += 1
    end
   end
   # 強制出撃
   apply_force_launch
  else
   # 固定解除
   @fixed_actors.delete(actor_id)
  end
  $game_player.refresh
 end
 #--------------------------------------------------------------------------
 # â—‹ 強制出撃é©ç”¨
 #--------------------------------------------------------------------------
 def apply_force_launch
  while (fixed_members - battle_members).size > 0
   # 固定状態ã§ãªã„メンãƒãƒ¼ã‚’é©å½“ã«æŒã£ã¦ãã¦å…¥ã‚Œæ›¿ãˆ
   actor1 = stand_by_members.find { |a| @fixed_actors.include?(a.id) }
   actor2 = battle_members.reverse.find { |a| !@fixed_actors.include?(a.id) }
   index1 = @actors.index(actor1.id)
   index2 = @actors.index(actor2.id)
   @actors[index1], @actors[index2] = @actors[index2], @actors[index1]
Â
   # 戦闘メンãƒãƒ¼ãŒå…¨å“¡å›ºå®šã•ã‚ŒãŸã‚‰æˆ»ã‚‹ (ç„¡é™ãƒ«ãƒ¼ãƒ—防æ¢)
   all_fixed = true
   battle_members.each { |actor|
    unless actor.fixed_member?
     all_fixed = false
     break
    end
   }
   break if all_fixed
  end
 end
 #--------------------------------------------------------------------------
 # â—‹ メンãƒãƒ¼æ•´åˆ— (æ˜‡é †)
 #   sort_type : ã‚½ãƒ¼ãƒˆå½¢å¼ (SORT_BY_xxx)
 #   reverse  : true ã ã¨é™é †
 #--------------------------------------------------------------------------
 def sort_member(sort_type = KGC::Commands::SORT_BY_ID,
         reverse = false)
  # ãƒãƒƒãƒ•ã‚¡ã‚’準備
  b_actors = battle_members
  actors = all_members - b_actors
  f_actors = fixed_members
  # 固定ã‚ャラã¯ã‚½ãƒ¼ãƒˆã—ãªã„
  if KGC::LargeParty::FORBID_CHANGE_SHIFT_FIXED
   actors -= f_actors
   b_actors -= f_actors
  end
Â
  # ソート
  case sort_type
  when KGC::Commands::SORT_BY_ID   # IDé †
   actors.sort!  { |a, b| a.id <=> b.id }
   b_actors.sort! { |a, b| a.id <=> b.id }
  when KGC::Commands::SORT_BY_NAME  # åå‰é †
   actors.sort!  { |a, b| a.name <=> b.name }
   b_actors.sort! { |a, b| a.name <=> b.name }
  when KGC::Commands::SORT_BY_LEVEL  # ãƒ¬ãƒ™ãƒ«é †
   actors.sort!  { |a, b| a.level <=> b.level }
   b_actors.sort! { |a, b| a.level <=> b.level }
  end
  # å転
  if reverse
   actors.reverse!
   b_actors.reverse!
  end
Â
  # 固定ã‚ャラを先é ã«æŒã£ã¦ãã‚‹
  if KGC::LargeParty::FORBID_CHANGE_SHIFT_FIXED
   actors = f_actors + actors
   b_actors = f_actors + b_actors
  end
Â
  # 復帰
  set_member(actors)
  set_battle_member(b_actors)
Â
  apply_force_launch
  $game_player.refresh
 end
 #--------------------------------------------------------------------------
 # â—‹ 並ã³æ›¿ãˆ
 #   戦闘メンãƒãƒ¼ã® index1 番目㨠index2 番目を入れ替ãˆã‚‹
 #--------------------------------------------------------------------------
 def change_shift(index1, index2)
  size = @actors.size
  if index1 >= size || index2 >= size
   return
  end
  buf = @actors[index1]
  @actors[index1] = @actors[index2]
  @actors[index2] = buf
  $game_player.refresh
 end
 #--------------------------------------------------------------------------
 # ◠戦闘用ステートã®è§£é™¤ (戦闘終了時ã«å‘¼ã³å‡ºã—)
 #--------------------------------------------------------------------------
 def remove_states_battle
  for actor in all_members
   actor.remove_states_battle
  end
 end
end
Â
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
Â
#==============================================================================
# â– Window_Command
#==============================================================================
Â
class Window_Command < Window_Selectable
 unless method_defined?add_command)
 #--------------------------------------------------------------------------
 # â—‹ コマンドを追åŠ
 # Â Â è¿½åŠ ã—ãŸä½ç½®ã‚’è¿”ã™
 #--------------------------------------------------------------------------
 def add_command(command)
  @commands << command
  @item_max = @commands.size
  item_index = @item_max - 1
  refresh_command
  draw_item(item_index)
  return item_index
 end
 #--------------------------------------------------------------------------
 # ○ コマンドをリフレッシュ
 #--------------------------------------------------------------------------
 def refresh_command
  buf = self.contents.clone
  self.height = [self.height, row_max * WLH + 32].max
  create_contents
  self.contents.blt(0, 0, buf, buf.rect)
  buf.dispose
 end
 #--------------------------------------------------------------------------
 # ○ コマンドを挿入
 #--------------------------------------------------------------------------
 def insert_command(index, command)
  @commands.insert(index, command)
  @item_max = @commands.size
  refresh_command
  refresh
 end
 #--------------------------------------------------------------------------
 # ○ コマンドを削除
 #--------------------------------------------------------------------------
 def remove_command(command)
  @commands.delete(command)
  @item_max = @commands.size
  refresh
 end
 end
end
Â
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
Â
#==============================================================================
# â– Window_MenuStatus
#==============================================================================
Â
class Window_MenuStatus < Window_Selectable
 #--------------------------------------------------------------------------
 # ◠定数
 #--------------------------------------------------------------------------
 STATUS_HEIGHT = 96  # ステータス一人分ã®é«˜ã•
 #--------------------------------------------------------------------------
 # ◠ウィンドウ内容ã®ä½œæˆ
 #--------------------------------------------------------------------------
 def create_contents
  self.contents.dispose
  self.contents = Bitmap.new(width - 32,
   [height - 32, row_max * STATUS_HEIGHT].max)
 end
 #--------------------------------------------------------------------------
 # â— å…ˆé ã®è¡Œã®å–å¾—
 #--------------------------------------------------------------------------
 def top_row
  return self.oy / STATUS_HEIGHT
 end
 #--------------------------------------------------------------------------
 # â— å…ˆé ã®è¡Œã®è¨å®š
 #   row : å…ˆé ã«è¡¨ç¤ºã™ã‚‹è¡Œ
 #--------------------------------------------------------------------------
 def top_row=(row)
  super(row)
  self.oy = self.oy / WLH * STATUS_HEIGHT
 end
 #--------------------------------------------------------------------------
 # â— 1 ページã«è¡¨ç¤ºã§ãる行数ã®å–å¾—
 #--------------------------------------------------------------------------
 def page_row_max
  return (self.height - 32) / STATUS_HEIGHT
 end
 #--------------------------------------------------------------------------
 # â— é …ç›®ã‚’æç”»ã™ã‚‹çŸ©å½¢ã®å–å¾—
 #   index : é …ç›®ç•ªå·
 #--------------------------------------------------------------------------
 def item_rect(index)
  rect = super(index)
  rect.height = STATUS_HEIGHT
  rect.y = index / @column_max * STATUS_HEIGHT
  return rect
 end
 #--------------------------------------------------------------------------
 # ◠リフレッシュ
 #--------------------------------------------------------------------------
 def refresh
  @item_max = $game_party.members.size
  create_contents
  fill_stand_by_background
  draw_member
 end
 #--------------------------------------------------------------------------
 # â—‹ パーティメンãƒãƒ¼æç”»
 #--------------------------------------------------------------------------
 def draw_member
  for actor in $game_party.members
   draw_actor_face(actor, 2, actor.party_index * 96 + 2, 92)
   x = 104
   y = actor.party_index * 96 + WLH / 2
   draw_actor_name(actor, x, y)
   draw_actor_class(actor, x + 120, y)
   draw_actor_level(actor, x, y + WLH * 1)
   draw_actor_state(actor, x, y + WLH * 2)
   draw_actor_hp(actor, x + 120, y + WLH * 1)
   draw_actor_mp(actor, x + 120, y + WLH * 2)
  end
 end
 #--------------------------------------------------------------------------
 # â—‹ 待機メンãƒãƒ¼ã®èƒŒæ™¯è‰²ã‚’å¡—ã‚‹
 #--------------------------------------------------------------------------
 def fill_stand_by_background
  color = KGC::LargeParty::STAND_BY_COLOR
  dy = STATUS_HEIGHT * $game_party.battle_members.size
  dh = STATUS_HEIGHT * $game_party.stand_by_members.size
  if dh > 0
   self.contents.fill_rect(0, dy, self.width - 32, dh, color)
  end
 end
 #--------------------------------------------------------------------------
 # ◠カーソルã®æ›´æ–°
 #--------------------------------------------------------------------------
 def update_cursor
  if @index < 0        # カーソルãªã—
   self.cursor_rect.empty
  elsif @index < @item_max   # 通常
   super
  elsif @index >= 100     # 自分
   self.cursor_rect.set(0, (@index - 100) * STATUS_HEIGHT,
    contents.width, STATUS_HEIGHT)
  else             # 全体
   self.cursor_rect.set(0, 0, contents.width, @item_max * STATUS_HEIGHT)
  end
 end
end
Â
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
Â
#==============================================================================
# â– Window_ShopStatus
#==============================================================================
Â
class Window_ShopStatus < Window_Base
 #--------------------------------------------------------------------------
 # ◠ウィンドウ内容ã®ä½œæˆ
 #--------------------------------------------------------------------------
 def create_contents
  self.contents.dispose
  self.contents = Bitmap.new(width - 32,
   WLH * ($game_party.members.size + 1) * 2)
 end
end
Â
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
Â
#==============================================================================
# â– Window_BattleStatus
#==============================================================================
Â
class Window_BattleStatus < Window_Selectable
 #--------------------------------------------------------------------------
 # ◠ウィンドウ内容ã®ä½œæˆ
 #--------------------------------------------------------------------------
 def create_contents
  self.contents.dispose
  self.contents = Bitmap.new(width - 32,
   [WLH * $game_party.members.size, height - 32].max)
 end
 #--------------------------------------------------------------------------
 # ◠リフレッシュ
 #--------------------------------------------------------------------------
 alias refresh_KGC_LargeParty refresh
 def refresh
  create_contents
Â
  refresh_KGC_LargeParty
 end
end
Â
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
Â
#==============================================================================
# â–¡ Window_PartyFormCaption
#------------------------------------------------------------------------------
#  パーティ編æˆç”»é¢ã§ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®ã‚ャプションを表示ã™ã‚‹ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã§ã™ã€‚
#==============================================================================
Â
class Window_PartyFormCaption < Window_Base
 #--------------------------------------------------------------------------
 # ◠オブジェクトåˆæœŸåŒ–
 #   caption : 表示ã™ã‚‹ã‚ャプション
 #--------------------------------------------------------------------------
 def initialize(caption = "")
  super(0, 0, KGC::LargeParty::CAPTION_WINDOW_WIDTH, WLH + 32)
  self.z = 1500
  @caption = caption
  refresh
 end
 #--------------------------------------------------------------------------
 # ◠リフレッシュ
 #--------------------------------------------------------------------------
 def refresh
  self.contents.clear
  self.contents.draw_text(0, 0, width - 32, WLH, @caption)
 end
end
Â
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
Â
#==============================================================================
# â–¡ Window_PartyFormMember
#------------------------------------------------------------------------------
#  パーティ編æˆç”»é¢ã§ãƒ¡ãƒ³ãƒãƒ¼ã‚’表示ã™ã‚‹ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã§ã™ã€‚
#==============================================================================
Â
class Window_PartyFormMember < Window_Selectable
 #--------------------------------------------------------------------------
 # ○ 定数
 #--------------------------------------------------------------------------
 DRAW_SIZE = KGC::LargeParty::PARTY_FORM_CHARACTER_SIZE
 #--------------------------------------------------------------------------
 # ◠公開インスタンス変数
 #--------------------------------------------------------------------------
 attr_accessor :selected_index      # é¸æŠžæ¸ˆã¿ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹
 #--------------------------------------------------------------------------
 # ◠オブジェクトåˆæœŸåŒ–
 #   x    : ウィンドウ㮠X 座標
 #   y    : ウィンドウ㮠Y 座標
 #   width  : ウィンドウã®å¹…
 #   height  : ウィンドウã®é«˜ã•
 #   spacing : 横ã«é …ç›®ãŒä¸¦ã¶ã¨ãã®ç©ºç™½ã®å¹…
 #--------------------------------------------------------------------------
 def initialize(x, y, width, height, spacing = 8)
  super(x, y, width, height, spacing)
  self.z = 1000
 end
 #--------------------------------------------------------------------------
 # ◠ウィンドウ内容ã®ä½œæˆ
 #--------------------------------------------------------------------------
 def create_contents
  self.contents.dispose
  self.contents = Bitmap.new(width - 32,
   [height - 32, row_max * DRAW_SIZE[1]].max)
 end
 #--------------------------------------------------------------------------
 # â— å…ˆé ã®è¡Œã®å–å¾—
 #--------------------------------------------------------------------------
 def top_row
  return self.oy / DRAW_SIZE[1]
 end
 #--------------------------------------------------------------------------
 # â— å…ˆé ã®è¡Œã®è¨å®š
 #   row : å…ˆé ã«è¡¨ç¤ºã™ã‚‹è¡Œ
 #--------------------------------------------------------------------------
 def top_row=(row)
  super(row)
  self.oy = self.oy / WLH * DRAW_SIZE[1]
 end
 #--------------------------------------------------------------------------
 # â— 1 ページã«è¡¨ç¤ºã§ãる行数ã®å–å¾—
 #--------------------------------------------------------------------------
 def page_row_max
  return (self.height - 32) / DRAW_SIZE[1]
 end
 #--------------------------------------------------------------------------
 # â— é …ç›®ã‚’æç”»ã™ã‚‹çŸ©å½¢ã®å–å¾—
 #   index : é …ç›®ç•ªå·
 #--------------------------------------------------------------------------
 def item_rect(index)
  rect = super(index)
  rect.width = DRAW_SIZE[0]
  rect.height = DRAW_SIZE[1]
  rect.y = index / @column_max * DRAW_SIZE[1]
  return rect
 end
 #--------------------------------------------------------------------------
 # â—‹ é¸æŠžã‚¢ã‚¯ã‚¿ãƒ¼å–å¾—
 #--------------------------------------------------------------------------
 def actor
  return @actors[self.index]
 end
 #--------------------------------------------------------------------------
 # ◠リフレッシュ
 #--------------------------------------------------------------------------
 def refresh
  self.contents.clear
  restore_member_list
  draw_member
 end
 #--------------------------------------------------------------------------
 # â—‹ メンãƒãƒ¼ãƒªã‚¹ãƒˆä¿®å¾©
 #--------------------------------------------------------------------------
 def restore_member_list
  # 継承先ã§å®šç¾©
 end
 #--------------------------------------------------------------------------
 # â—‹ メンãƒãƒ¼æç”»
 #--------------------------------------------------------------------------
 def draw_member
  # 継承先ã§å®šç¾©
 end
 #--------------------------------------------------------------------------
 # â—‹ 空欄アクターæç”»
 #   index : é …ç›®ç•ªå·
 #--------------------------------------------------------------------------
 def draw_empty_actor(index)
  # 継承先ã§å®šç¾©
 end
 #--------------------------------------------------------------------------
 # â—‹ 固定ã‚ャラ背景æç”»
 #   index : é …ç›®ç•ªå·
 #--------------------------------------------------------------------------
 def draw_fixed_back(index)
  rect = item_rect(index)
  self.contents.fill_rect(rect, KGC::LargeParty::FIXED_COLOR)
 end
 #--------------------------------------------------------------------------
 # â—‹ é¸æŠžä¸ã‚ャラ背景æç”»
 #   index : é …ç›®ç•ªå·
 #--------------------------------------------------------------------------
 def draw_selected_back(index)
  rect = item_rect(index)
  self.contents.fill_rect(rect, KGC::LargeParty::SELECTED_COLOR)
 end
end
Â
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
Â
#==============================================================================
# â–¡ Window_PartyFormBattleMember
#------------------------------------------------------------------------------
#  パーティ編æˆç”»é¢ã§æˆ¦é—˜ãƒ¡ãƒ³ãƒãƒ¼ã‚’表示ã™ã‚‹ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã§ã™ã€‚
#==============================================================================
Â
class Window_PartyFormBattleMember < Window_PartyFormMember
 #--------------------------------------------------------------------------
 # ◠公開インスタンス変数
 #--------------------------------------------------------------------------
 attr_accessor :selected_index      # é¸æŠžæ¸ˆã¿ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹
 #--------------------------------------------------------------------------
 # ◠オブジェクトåˆæœŸåŒ–
 #--------------------------------------------------------------------------
 def initialize
  super(0, 0, 64, DRAW_SIZE[1] + 32)
  column_width = DRAW_SIZE[0] + @spacing
  nw = [column_width * $game_party.max_battle_member_count + 32,
   Graphics.width].min
  self.width = nw
Â
  @item_max = $game_party.max_battle_member_count
  @column_max = width / column_width
  @selected_index = nil
  create_contents
  refresh
  self.active = true
  self.index = 0
 end
 #--------------------------------------------------------------------------
 # â—‹ メンãƒãƒ¼ãƒªã‚¹ãƒˆä¿®å¾©
 #--------------------------------------------------------------------------
 def restore_member_list
  @actors = $game_party.battle_members
 end
 #--------------------------------------------------------------------------
 # â—‹ メンãƒãƒ¼æç”»
 #--------------------------------------------------------------------------
 def draw_member
  @item_max.times { |i|
   actor = @actors
   if actor == nil
    draw_empty_actor(i)
   else
    if i == @selected_index
     draw_selected_back(i)
    elsif $game_party.actor_fixed?(actor.id)
     draw_fixed_back(i)
    end
    rect = item_rect(i)
    draw_actor_graphic(actor,
     rect.x + DRAW_SIZE[0] / 2,
     rect.y + DRAW_SIZE[1] - 4)
   end
  }
 end
 #--------------------------------------------------------------------------
 # â—‹ 空欄アクターæç”»
 #   index : é …ç›®ç•ªå·
 #--------------------------------------------------------------------------
 def draw_empty_actor(index)
  rect = item_rect(index)
  self.contents.font.color = system_color
  self.contents.draw_text(rect, KGC::LargeParty::BATTLE_MEMBER_BLANK_TEXT, 1)
  self.contents.font.color = normal_color
 end
end
Â
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
Â
#==============================================================================
# â–¡ Window_PartyFormAllMember
#------------------------------------------------------------------------------
#  パーティ編æˆç”»é¢ã§å…¨ãƒ¡ãƒ³ãƒãƒ¼ã‚’表示ã™ã‚‹ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã§ã™ã€‚
#==============================================================================
Â
class Window_PartyFormAllMember < Window_PartyFormMember
 #--------------------------------------------------------------------------
 # ◠オブジェクトåˆæœŸåŒ–
 #--------------------------------------------------------------------------
 def initialize
  super(0, 0, 64, 64)
  restore_member_list
  @item_max = $game_party.all_members.size
Â
  # å„種サイズ計算
  column_width = DRAW_SIZE[0] + @spacing
  sw = [@item_max * column_width + 32, Graphics.width].min
  @column_max = (sw - 32) / column_width
  sh = ([@item_max - 1, 0].max / @column_max + 1) * DRAW_SIZE[1] + 32
  sh = [sh, DRAW_SIZE[1] * KGC::LargeParty::PARTY_MEMBER_WINDOW_ROW_MAX + 32].min
Â
  # 座標・サイズ調整
  self.y += DRAW_SIZE[1] + 32
  self.width = sw
  self.height = sh
Â
  create_contents
  refresh
  self.active = false
  self.index = 0
 end
 #--------------------------------------------------------------------------
 # â—‹ é¸æŠžã—ã¦ã„るアクターã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹å–å¾—
 #--------------------------------------------------------------------------
 def actor_index
  return @index_offset + self.index
 end
 #--------------------------------------------------------------------------
 # â—‹ メンãƒãƒ¼ãƒªã‚¹ãƒˆä¿®å¾©
 #--------------------------------------------------------------------------
 def restore_member_list
  if KGC::LargeParty::SHOW_BATTLE_MEMBER_IN_PARTY
   @actors = $game_party.all_members
   @index_offset = 0
  else
   @actors = $game_party.stand_by_members
   @index_offset = $game_party.battle_members.size
  end
 end
 #--------------------------------------------------------------------------
 # â—‹ メンãƒãƒ¼æç”»
 #--------------------------------------------------------------------------
 def draw_member
  @item_max.times { |i|
   actor = @actors
   if actor == nil
    draw_empty_actor(i)
    next
   end
Â
   if $game_party.actor_fixed?(actor.id)
    draw_fixed_back(i)
   end
   rect = item_rect(i)
   opacity = ($game_party.battle_members.include?(actor) ? 96 : 255)
   draw_actor_graphic(actor,
    rect.x + DRAW_SIZE[0] / 2,
    rect.y + DRAW_SIZE[1] - 4,
    opacity)
  }
 end
 #--------------------------------------------------------------------------
 # ◠アクターã®æ©è¡Œã‚°ãƒ©ãƒ•ã‚£ãƒƒã‚¯æç”»
 #   actor  : アクター
 #   x    : æ画先 X 座標
 #   y    : æ画先 Y 座標
 #   opacity : ä¸é€æ˜Žåº¦
 #--------------------------------------------------------------------------
 def draw_actor_graphic(actor, x, y, opacity = 255)
  draw_character(actor.character_name, actor.character_index, x, y, opacity)
 end
 #--------------------------------------------------------------------------
 # â— æ©è¡Œã‚°ãƒ©ãƒ•ã‚£ãƒƒã‚¯ã®æç”»
 #   character_name  : æ©è¡Œã‚°ãƒ©ãƒ•ã‚£ãƒƒã‚¯ ファイルå
 #   character_index : æ©è¡Œã‚°ãƒ©ãƒ•ã‚£ãƒƒã‚¯ インデックス
 #   x        : æ画先 X 座標
 #   y        : æ画先 Y 座標
 #   opacity     : ä¸é€æ˜Žåº¦
 #--------------------------------------------------------------------------
 def draw_character(character_name, character_index, x, y, opacity = 255)
  return if character_name == nil
  bitmap = Cache.character(character_name)
  sign = character_name[/^[\!\$]./]
  if sign != nil and sign.include?('$')
   cw = bitmap.width / 3
   ch = bitmap.height / 4
  else
   cw = bitmap.width / 12
   ch = bitmap.height / 8
  end
  n = character_index
  src_rect = Rect.new((n%4*3+1)*cw, (n/4*4)*ch, cw, ch)
  self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect, opacity)
 end
 #--------------------------------------------------------------------------
 # â—‹ 空欄アクターæç”»
 #   index : é …ç›®ç•ªå·
 #--------------------------------------------------------------------------
 def draw_empty_actor(index)
  rect = item_rect(index)
  self.contents.font.color = system_color
  self.contents.draw_text(rect, KGC::LargeParty::PARTY_MEMBER_BLANK_TEXT, 1)
  self.contents.font.color = normal_color
 end
end
Â
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
Â
#==============================================================================
# â–¡ Window_PartyFormStatus
#------------------------------------------------------------------------------
#  パーティ編æˆç”»é¢ã§ã‚¢ã‚¯ã‚¿ãƒ¼ã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã‚’表示ã™ã‚‹ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã§ã™ã€‚
#==============================================================================
Â
class Window_PartyFormStatus < Window_Base
 #--------------------------------------------------------------------------
 # ◠オブジェクトåˆæœŸåŒ–
 #--------------------------------------------------------------------------
 def initialize
  super(0, 0, 384, 128)
  self.z = 1000
  @actor = nil
  refresh
 end
 #--------------------------------------------------------------------------
 # â—‹ アクターè¨å®š
 #--------------------------------------------------------------------------
 def set_actor(actor)
  if @actor != actor
   @actor = actor
   refresh
  end
 end
 #--------------------------------------------------------------------------
 # ◠リフレッシュ
 #--------------------------------------------------------------------------
 def refresh
  self.contents.clear
  if @actor == nil
   return
  end
Â
  draw_actor_face(@actor, 0, 0)
  dx = 104
  draw_actor_name(@actor, dx, 0)
  draw_actor_level(@actor, dx, WLH * 1)
  draw_actor_hp(@actor, dx, WLH * 2)
  draw_actor_mp(@actor, dx, WLH * 3)
  4.times { |i|
   draw_actor_parameter(@actor, dx + 128, WLH * i, i, 120)
  }
 end
 #--------------------------------------------------------------------------
 # ◠能力値ã®æç”»
 #   actor : アクター
 #   x   : æ画先 X 座標
 #   y   : æ画先 Y 座標
 #   type  : 能力値ã®ç¨®é¡ž (0~3)
 #   width : æ画幅
 #--------------------------------------------------------------------------
 def draw_actor_parameter(actor, x, y, type, width = 156)
  case type
  when 0
   parameter_name = Vocab::atk
   parameter_value = actor.atk
  when 1
   parameter_name = Vocab::def
   parameter_value = actor.def
  when 2
   parameter_name = Vocab::spi
   parameter_value = actor.spi
  when 3
   parameter_name = Vocab::agi
   parameter_value = actor.agi
  end
  nw = width - 36
  self.contents.font.color = system_color
  self.contents.draw_text(x, y, nw, WLH, parameter_name)
  self.contents.font.color = normal_color
  self.contents.draw_text(x + nw, y, 36, WLH, parameter_value, 2)
 end
end
Â
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
Â
#==============================================================================
# â–¡ Window_PartyFormControl
#------------------------------------------------------------------------------
#  パーティ編æˆç”»é¢ã§æ“作方法を表示ã™ã‚‹ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã§ã™ã€‚
#==============================================================================
Â
class Window_PartyFormControl < Window_Base
 #--------------------------------------------------------------------------
 # ○ 定数
 #--------------------------------------------------------------------------
 MODE_BATTLE_MEMBER = 0
 MODE_SHIFT_CHANGE  = 1
 MODE_PARTY_MEMBER  = 2
 #--------------------------------------------------------------------------
 # ◠オブジェクトåˆæœŸåŒ–
 #--------------------------------------------------------------------------
 def initialize
  super(0, 0, Graphics.width - 384, 128)
  self.z = 1000
  @mode = MODE_BATTLE_MEMBER
  refresh
 end
 #--------------------------------------------------------------------------
 # ○ モード変更
 #--------------------------------------------------------------------------
 def mode=(value)
  @mode = value
  refresh
 end
 #--------------------------------------------------------------------------
 # ◠リフレッシュ
 #--------------------------------------------------------------------------
 def refresh
  self.contents.clear
  case @mode
  when MODE_BATTLE_MEMBER  # 戦闘メンãƒãƒ¼
   buttons = [
    "A: Switch",
    "C: Standby",
    "X: Return"
   ]
  when MODE_SHIFT_CHANGE  # 並ã³æ›¿ãˆ
   buttons = [
    "C: Select",
    "X: Return"
   ]
  when MODE_PARTY_MEMBER  # パーティメンãƒãƒ¼
   buttons = [
    "X: Return",
    "C: Select"
   ]
  else
   return
  end
Â
  buttons.each_with_index { |c, i|
   self.contents.draw_text(0, WLH * i, width - 32, WLH, c)
  }
 end
end
Â
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
Â
#==============================================================================
# â– Scene_Title
#==============================================================================
Â
class Scene_Title < Scene_Base
 #--------------------------------------------------------------------------
 # â— å„種ゲームオブジェクトã®ä½œæˆ
 #--------------------------------------------------------------------------
 alias create_game_objects_KGC_LargeParty create_game_objects
 def create_game_objects
  create_game_objects_KGC_LargeParty
Â
  if KGC::LargeParty::DEFAULT_PARTYFORM_ENABLED
   $game_switches[KGC::LargeParty::PARTYFORM_SWITCH] = true
   $game_switches[KGC::LargeParty::BATTLE_PARTYFORM_SWITCH] = true
  end
 end
end
Â
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
Â
#==============================================================================
# â– Scene_Map
#==============================================================================
Â
class Scene_Map < Scene_Base
 #--------------------------------------------------------------------------
 # â— ç”»é¢åˆ‡ã‚Šæ›¿ãˆã®å®Ÿè¡Œ
 #--------------------------------------------------------------------------
 alias update_scene_change_KGC_LargeParty update_scene_change
 def update_scene_change
  return if $game_player.moving?   # プレイヤーã®ç§»å‹•ä¸ï¼Ÿ
Â
  if $game_temp.next_scene == :partyform
   call_partyform
   return
  end
Â
  update_scene_change_KGC_LargeParty
 end
 #--------------------------------------------------------------------------
 # â—‹ パーティ編æˆç”»é¢ã¸ã®åˆ‡ã‚Šæ›¿ãˆ
 #--------------------------------------------------------------------------
 def call_partyform
  $game_temp.next_scene = nil
  $scene = Scene_PartyForm.new(0, Scene_PartyForm::HOST_MAP)
 end
end
Â
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
=begin
#==============================================================================
# â– Scene_Menu
#==============================================================================
Â
class Scene_Menu < Scene_Base
 if KGC::LargeParty::USE_MENU_PARTYFORM_COMMAND
 #--------------------------------------------------------------------------
 # ◠コマンドウィンドウã®ä½œæˆ
 #--------------------------------------------------------------------------
 alias create_command_window_KGC_LargeParty create_command_window
 def create_command_window
  create_command_window_KGC_LargeParty
Â
  return if $imported["CustomMenuCommand"]
Â
  @__command_partyform_index =
   @command_window.add_command(Vocab.partyform)
  @command_window.draw_item(@__command_partyform_index,
   $game_party.partyform_enable?)
  if @command_window.oy > 0
   @command_window.oy -= Window_Base::WLH
  end
  @command_window.index = @menu_index
 end
 end
 #--------------------------------------------------------------------------
 # ◠コマンドé¸æŠžã®æ›´æ–°
 #--------------------------------------------------------------------------
 alias update_command_selection_KGC_LargeParty update_command_selection
 def update_command_selection
  current_menu_index = @__command_partyform_index
  call_partyform_flag = false
Â
  if Input.trigger?(Input::C)
   case @command_window.index
   when @__command_partyform_index  # パーティ編æˆ
    call_partyform_flag = true
   end
  # パーティ編æˆãƒœã‚¿ãƒ³æŠ¼ä¸‹
  elsif KGC::LargeParty::MENU_PARTYFORM_BUTTON != nil &&
    Input.trigger?(KGC::LargeParty::MENU_PARTYFORM_BUTTON)
   call_partyform_flag = true
   current_menu_index = @command_window.index if current_menu_index == nil
  end
Â
  # パーティ編æˆç”»é¢ã«ç§»è¡Œ
  if call_partyform_flag
   if $game_party.members.size == 0 || !$game_party.partyform_enable?
    Sound.play_buzzer
    return
   end
   Sound.play_decision
   $scene = Scene_PartyForm.new(current_menu_index)
   return
  end
Â
  update_command_selection_KGC_LargeParty
 end
end
Â
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
=end
#==============================================================================
# â– Scene_Shop
#==============================================================================
Â
unless $imported["HelpExtension"]
class Scene_Shop < Scene_Base
 #--------------------------------------------------------------------------
 # ◠フレーム更新
 #--------------------------------------------------------------------------
 alias udpate_KGC_LargeParty update
 def update
  # スクãƒãƒ¼ãƒ«åˆ¤å®š
  if !@command_window.active &&
    KGC::LargeParty::SHOP_STATUS_SCROLL_BUTTON != nil &&
    Input.press?(KGC::LargeParty::SHOP_STATUS_SCROLL_BUTTON)
   super
   update_menu_background
   update_scroll_status
   return
  else
   @status_window.cursor_rect.empty
  end
Â
  udpate_KGC_LargeParty
 end
 #--------------------------------------------------------------------------
 # â—‹ ステータスウィンドウã®ã‚¹ã‚¯ãƒãƒ¼ãƒ«å‡¦ç†
 #--------------------------------------------------------------------------
 def update_scroll_status
  # ステータスウィンドウã«ã‚«ãƒ¼ã‚½ãƒ«ã‚’表示
  @status_window.cursor_rect.width = @status_window.contents.width
  @status_window.cursor_rect.height = @status_window.height - 32
  @status_window.update
Â
  if Input.press?(Input::UP)
   @status_window.oy = [@status_window.oy - 4, 0].max
  elsif Input.press?(Input::DOWN)
   max_pos = [@status_window.contents.height -
    (@status_window.height - 32), 0].max
   @status_window.oy = [@status_window.oy + 4, max_pos].min
  end
 end
end
end
Â
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
Â
#==============================================================================
# â–¡ Scene_PartyForm
#------------------------------------------------------------------------------
#  パーティ編æˆç”»é¢ã®å‡¦ç†ã‚’è¡Œã†ã‚¯ãƒ©ã‚¹ã§ã™ã€‚
#==============================================================================
Â
class Scene_PartyForm < Scene_Base
 #--------------------------------------------------------------------------
 # ○ 定数
 #--------------------------------------------------------------------------
 CAPTION_OFFSET = 40  # ã‚ャプションウィンドウã®ä½ç½®è£œæ£
 HOST_MENU  = 0    # 呼ã³å‡ºã—å…ƒ : メニュー
 HOST_MAP   = 1    # 呼ã³å‡ºã—å…ƒ : マップ
 HOST_BATTLE = 2    # 呼ã³å‡ºã—å…ƒ : 戦闘
 #--------------------------------------------------------------------------
 # ◠オブジェクトåˆæœŸåŒ–
 #   menu_index : コマンドã®ã‚«ãƒ¼ã‚½ãƒ«åˆæœŸä½ç½®
 #   host_scene : 呼ã³å‡ºã—å…ƒ (0..メニュー  1..マップ  2..戦闘)
 #--------------------------------------------------------------------------
 def initialize(menu_index = 0, host_scene = HOST_MENU)
  @menu_index = menu_index
  @host_scene = host_scene
 end
 #--------------------------------------------------------------------------
 # ◠開始処ç†
 #--------------------------------------------------------------------------
 def start
  super
  create_menu_background
Â
  create_windows
  create_confirm_window
  adjust_window_location
Â
  # ç·¨æˆå‰ã®ãƒ‘ーティをä¿å˜
  @battle_actors = $game_party.battle_members.dup
  @party_actors = $game_party.all_members.dup
 end
 #--------------------------------------------------------------------------
 # â—‹ ウィンドウã®ä½œæˆ
 #--------------------------------------------------------------------------
 def create_windows
  # ç·¨æˆç”¨ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’作æˆ
  @battle_member_window = Window_PartyFormBattleMember.new
  @party_member_window = Window_PartyFormAllMember.new
  @status_window = Window_PartyFormStatus.new
  @status_window.set_actor(@battle_member_window.actor)
Â
  # ãã®ä»–ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’作æˆ
  @battle_member_caption_window =
   Window_PartyFormCaption.new(KGC::LargeParty::BATTLE_MEMBER_CAPTION)
  @party_member_caption_window =
   Window_PartyFormCaption.new(KGC::LargeParty::PARTY_MEMBER_CAPTION)
  @control_window = Window_PartyFormControl.new
 end
 #--------------------------------------------------------------------------
 # â—‹ 確èªã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®ä½œæˆ
 #--------------------------------------------------------------------------
 def create_confirm_window
  commands = KGC::LargeParty::CONFIRM_WINDOW_COMMANDS
  @confirm_window =
   Window_Command.new(KGC::LargeParty::CONFIRM_WINDOW_WIDTH, commands)
  @confirm_window.index = 0
  @confirm_window.x = (Graphics.width - @confirm_window.width) / 2
  @confirm_window.y = (Graphics.height - @confirm_window.height) / 2
  @confirm_window.z = 2000
  @confirm_window.openness = 0
  @confirm_window.active = false
 end
 #--------------------------------------------------------------------------
 # â—‹ ウィンドウã®åº§æ¨™èª¿æ•´
 #--------------------------------------------------------------------------
 def adjust_window_location
  # 基準座標を計算
  base_x = [@battle_member_window.width, @party_member_window.width].max
  base_x = [(Graphics.width - base_x) / 2, 0].max
  base_y = @battle_member_window.height + @party_member_window.height +
   @status_window.height + CAPTION_OFFSET * 2
  base_y = [(Graphics.height - base_y) / 2, 0].max
Â
  # ç·¨æˆç”¨ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®åº§æ¨™ã‚’セット
  @battle_member_window.x = base_x
  @battle_member_window.y = base_y + CAPTION_OFFSET
  @party_member_window.x = base_x
  @party_member_window.y = @battle_member_window.y +
   @battle_member_window.height + CAPTION_OFFSET
  @status_window.x = 0
  @status_window.y = @party_member_window.y + @party_member_window.height
Â
  # ãã®ä»–ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®åº§æ¨™ã‚’セット
  @battle_member_caption_window.x = [base_x - 16, 0].max
  @battle_member_caption_window.y = @battle_member_window.y - CAPTION_OFFSET
  @party_member_caption_window.x = [base_x - 16, 0].max
  @party_member_caption_window.y = @party_member_window.y - CAPTION_OFFSET
  @control_window.x = @status_window.width
  @control_window.y = @status_window.y
 end
 #--------------------------------------------------------------------------
 # ◠終了処ç†
 #--------------------------------------------------------------------------
 def terminate
  super
  dispose_menu_background
  @battle_member_window.dispose
  @party_member_window.dispose
  @status_window.dispose
  @battle_member_caption_window.dispose
  @party_member_caption_window.dispose
  @control_window.dispose
  @confirm_window.dispose
 end
 #--------------------------------------------------------------------------
 # ◠メニュー画é¢ç³»ã®èƒŒæ™¯ä½œæˆ
 #--------------------------------------------------------------------------
 def create_menu_background
  super
  @menuback_sprite.z = 500
 end
 #--------------------------------------------------------------------------
 # â— å…ƒã®ç”»é¢ã¸æˆ»ã‚‹
 #--------------------------------------------------------------------------
 def return_scene
  case @host_scene
  when HOST_MENU
   $scene = Scene_Menu.new(@menu_index)
  when HOST_MAP
   $scene = Scene_Map.new
  when HOST_BATTLE
   $scene = Scene_Battle.new
  end
  $game_player.refresh
 end
 #--------------------------------------------------------------------------
 # ◠フレーム更新
 #--------------------------------------------------------------------------
 def update
  super
  update_menu_background
  update_window
  if @battle_member_window.active
   update_battle_member
  elsif @party_member_window.active
   update_party_member
  elsif @confirm_window.active
   update_confirm
  end
 end
 #--------------------------------------------------------------------------
 # ○ ウィンドウ更新
 #--------------------------------------------------------------------------
 def update_window
  @battle_member_window.update
  @party_member_window.update
  @status_window.update
  @battle_member_caption_window.update
  @party_member_caption_window.update
  @control_window.update
  @confirm_window.update
 end
 #--------------------------------------------------------------------------
 # â—‹ ウィンドウå†æç”»
 #--------------------------------------------------------------------------
 def refresh_window
  @battle_member_window.refresh
  @party_member_window.refresh
 end
 #--------------------------------------------------------------------------
 # â—‹ フレーム更新 (戦闘メンãƒãƒ¼ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãŒã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã®å ´åˆ)
 #--------------------------------------------------------------------------
 def update_battle_member
  @status_window.set_actor(@battle_member_window.actor)
  if Input.trigger?(Input::A)
   if @battle_member_window.selected_index == nil  # 並ã³æ›¿ãˆä¸ã§ãªã„
    actor = @battle_member_window.actor
    # アクターを外ã›ãªã„å ´åˆ
    if actor == nil || $game_party.actor_fixed?(actor.id)
     Sound.play_buzzer
     return
    end
    # アクターを外ã™
    Sound.play_decision
    actors = $game_party.battle_members
    actors.delete_at(@battle_member_window.index)
    $game_party.set_battle_member(actors)
    refresh_window
   end
  elsif Input.trigger?(Input::B)
   if @battle_member_window.selected_index == nil  # 並ã³æ›¿ãˆä¸ã§ãªã„
    # 確èªã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã«åˆ‡ã‚Šæ›¿ãˆ
    Sound.play_cancel
    show_confirm_window
   else                       # 並ã³æ›¿ãˆä¸
    # 並ã³æ›¿ãˆè§£é™¤
    Sound.play_cancel
    @battle_member_window.selected_index = nil
    @battle_member_window.refresh
    @control_window.mode = Window_PartyFormControl::MODE_BATTLE_MEMBER
   end
  elsif Input.trigger?(Input::C)
   if @battle_member_window.selected_index == nil  # 並ã³æ›¿ãˆä¸ã§ãªã„
    actor = @battle_member_window.actor
    # アクターを外ã›ãªã„å ´åˆ
    if actor != nil && $game_party.actor_fixed?(actor.id)
     Sound.play_buzzer
     return
    end
    # パーティメンãƒãƒ¼ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã«åˆ‡ã‚Šæ›¿ãˆ
    Sound.play_decision
    @battle_member_window.active = false
    @party_member_window.active = true
    @control_window.mode = Window_PartyFormControl::MODE_PARTY_MEMBER
   else                       # 並ã³æ›¿ãˆä¸
    unless can_change_shift?(@battle_member_window.actor)
     Sound.play_buzzer
     return
    end
    # 並ã³æ›¿ãˆå®Ÿè¡Œ
    Sound.play_decision
    index1 = @battle_member_window.selected_index
    index2 = @battle_member_window.index
    change_shift(index1, index2)
    @control_window.mode = Window_PartyFormControl::MODE_BATTLE_MEMBER
   end
  elsif Input.trigger?(Input::X)
   # 並ã³æ›¿ãˆä¸å¯èƒ½ãªå ´åˆ
   unless can_change_shift?(@battle_member_window.actor)
    Sound.play_buzzer
    return
   end
   if @battle_member_window.selected_index == nil  # 並ã³æ›¿ãˆä¸ã§ãªã„
    # 並ã³æ›¿ãˆé–‹å§‹
    Sound.play_decision
    @battle_member_window.selected_index = @battle_member_window.index
    @battle_member_window.refresh
    @control_window.mode = Window_PartyFormControl::MODE_SHIFT_CHANGE
   else                       # 並ã³æ›¿ãˆä¸
    # 並ã³æ›¿ãˆå®Ÿè¡Œ
    Sound.play_decision
    index1 = @battle_member_window.selected_index
    index2 = @battle_member_window.index
    change_shift(index1, index2)
    @control_window.mode = Window_PartyFormControl::MODE_BATTLE_MEMBER
   end
  end
 end
 #--------------------------------------------------------------------------
 # â—‹ 並ã³æ›¿ãˆå¯å¦åˆ¤å®š
 #--------------------------------------------------------------------------
 def can_change_shift?(actor)
  # é¸æŠžã—ãŸã‚¢ã‚¯ã‚¿ãƒ¼ãŒå˜åœ¨ã—ãªã„ã€ã¾ãŸã¯ä¸¦ã³æ›¿ãˆä¸èƒ½ãªå ´åˆ
  if actor == nil ||
    (KGC::LargeParty::FORBID_CHANGE_SHIFT_FIXED &&
     $game_party.actor_fixed?(actor.id))
   return false
  end
  return true
 end
 #--------------------------------------------------------------------------
 # â—‹ 並ã³æ›¿ãˆ
 #--------------------------------------------------------------------------
 def change_shift(index1, index2)
  # ä½ç½®ã‚’入れ替ãˆ
  $game_party.change_shift(index1, index2)
  # é¸æŠžæ¸ˆã¿ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’クリア
  @battle_member_window.selected_index = nil
  refresh_window
 end
 #--------------------------------------------------------------------------
 # â—‹ フレーム更新 (パーティウィンドウãŒã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã®å ´åˆ)
 #--------------------------------------------------------------------------
 def update_party_member
  @status_window.set_actor(@party_member_window.actor)
  if Input.trigger?(Input::B)
   Sound.play_cancel
   # 戦闘メンãƒãƒ¼ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã«åˆ‡ã‚Šæ›¿ãˆ
   @battle_member_window.active = true
   @party_member_window.active = false
    @control_window.mode = Window_PartyFormControl::MODE_BATTLE_MEMBER
  elsif Input.trigger?(Input::C)
   actor = @party_member_window.actor
   # アクターãŒæˆ¦é—˜ãƒ¡ãƒ³ãƒãƒ¼ã«å«ã¾ã‚Œã‚‹å ´åˆ
   if $game_party.battle_members.include?(actor)
    Sound.play_buzzer
    return
   end
   # アクターを入れ替ãˆ
   Sound.play_decision
   actors = $game_party.all_members
   battle_actors = $game_party.battle_members
   if @battle_member_window.actor != nil
    actors[@party_member_window.actor_index] = @battle_member_window.actor
    actors[@battle_member_window.index] = actor
    $game_party.set_member(actors.compact)
   end
   battle_actors[@battle_member_window.index] = actor
   $game_party.set_battle_member(battle_actors.compact)
   refresh_window
   # 戦闘メンãƒãƒ¼ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã«åˆ‡ã‚Šæ›¿ãˆ
   @battle_member_window.active = true
   @party_member_window.active = false
   @control_window.mode = Window_PartyFormControl::MODE_BATTLE_MEMBER
  end
 end
 #--------------------------------------------------------------------------
 # â—‹ フレーム更新 (確èªã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãŒã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã®å ´åˆ)
 #--------------------------------------------------------------------------
 def update_confirm
  if Input.trigger?(Input::B)
   Sound.play_cancel
   hide_confirm_window
  elsif Input.trigger?(Input::C)
   case @confirm_window.index
   when 0  # ç·¨æˆå®Œäº†
    # パーティãŒç„¡åŠ¹ã®å ´åˆ
    unless battle_member_valid?
     Sound.play_buzzer
     return
    end
    Sound.play_decision
    return_scene
   when 1  # ç·¨æˆä¸æ–
    Sound.play_decision
    # パーティを編æˆå‰ã®çŠ¶æ…‹ã«æˆ»ã™
    $game_party.set_member(@party_actors)
    $game_party.set_battle_member(@battle_actors)
    return_scene
   when 2  # ã‚ャンセル
    Sound.play_cancel
    hide_confirm_window
   end
  end
 end
 #--------------------------------------------------------------------------
 # â—‹ 戦闘メンãƒãƒ¼æœ‰åŠ¹åˆ¤å®š
 #--------------------------------------------------------------------------
 def battle_member_valid?
  return false if $game_party.battle_members.size == 0  # 戦闘メンãƒãƒ¼ãŒç©º
  $game_party.battle_members.each { |actor|
   return true if actor.exist?  # 生å˜è€…ãŒã„ã‚Œã°OK
  }
  return false
 end
 #--------------------------------------------------------------------------
 # â—‹ 確èªã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®è¡¨ç¤º
 #--------------------------------------------------------------------------
 def show_confirm_window
  if @battle_member_window.active
   @last_active_window = @battle_member_window
  else
   @last_active_window = @party_member_window
  end
  @battle_member_window.active = false
  @party_member_window.active = false
Â
  @confirm_window.draw_item(0, battle_member_valid?)
  @confirm_window.open
  @confirm_window.active = true
 end
 #--------------------------------------------------------------------------
 # â—‹ 確èªã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®éžè¡¨ç¤º
 #--------------------------------------------------------------------------
 def hide_confirm_window
  @confirm_window.active = false
  @confirm_window.close
  @last_active_window.active = true
 end
end
Â
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
Â
#==============================================================================
# â– Scene_Battle
#==============================================================================
Â
class Scene_Battle < Scene_Base
 #--------------------------------------------------------------------------
 # ◠メッセージ表示ãŒçµ‚ã‚ã‚‹ã¾ã§ã‚¦ã‚§ã‚¤ãƒˆ
 #--------------------------------------------------------------------------
 alias wait_for_message_KGC_LargeParty wait_for_message
 def wait_for_message
  return if @ignore_wait_for_message  # メッセージ終了ã¾ã§ã®ã‚¦ã‚§ã‚¤ãƒˆã‚’無視
Â
  wait_for_message_KGC_LargeParty
 end
 #--------------------------------------------------------------------------
 # ◠レベルアップã®è¡¨ç¤º
 #--------------------------------------------------------------------------
 alias display_level_up_KGC_LargeParty display_level_up
 def display_level_up
  @ignore_wait_for_message = true
Â
  display_level_up_KGC_LargeParty
Â
  exp = $game_troop.exp_total * KGC::LargeParty::STAND_BY_EXP_RATE / 1000
  $game_party.stand_by_members.each { |actor|
   if actor.exist?
    actor.gain_exp(exp, KGC::LargeParty::SHOW_STAND_BY_LEVEL_UP)
   end
  }
  @ignore_wait_for_message = false
  wait_for_message
 end
 #--------------------------------------------------------------------------
 # ◠パーティコマンドé¸æŠžã®é–‹å§‹
 #--------------------------------------------------------------------------
 alias start_party_command_selection_KGC_LargeParty start_party_command_selection
 def start_party_command_selection
  if $game_temp.in_battle
   @status_window.index = 0
  end
Â
  start_party_command_selection_KGC_LargeParty
 end
Â
 if KGC::LargeParty::USE_BATTLE_PARTYFORM
 #--------------------------------------------------------------------------
 # â— æƒ…å ±è¡¨ç¤ºãƒ“ãƒ¥ãƒ¼ãƒãƒ¼ãƒˆã®ä½œæˆ
 #--------------------------------------------------------------------------
 alias create_info_viewport_KGC_LargeParty create_info_viewport
 def create_info_viewport
  create_info_viewport_KGC_LargeParty
Â
  @__command_partyform_index =
   @party_command_window.add_command(Vocab.partyform_battle)
  @party_command_window.draw_item(@__command_partyform_index,
   $game_party.battle_partyform_enable?)
 end
 #--------------------------------------------------------------------------
 # ◠パーティコマンドé¸æŠžã®æ›´æ–°
 #--------------------------------------------------------------------------
 alias update_party_command_selection_KGC_LargeParty update_party_command_selection
 def update_party_command_selection
  if Input.trigger?(Input::C)
   case @party_command_window.index
   when @__command_partyform_index  # パーティ編æˆ
    unless $game_party.battle_partyform_enable?
     Sound.play_buzzer
     return
    end
    Sound.play_decision
    process_partyform
    return
   end
  end
Â
  update_party_command_selection_KGC_LargeParty
 end
 #--------------------------------------------------------------------------
 # â—‹ パーティ編æˆã®å‡¦ç†
 #--------------------------------------------------------------------------
 def process_partyform
  Graphics.freeze
  snapshot_for_background
  $scene = Scene_PartyForm.new(0, Scene_PartyForm::HOST_BATTLE)
  $scene.main
  $scene = self
  @status_window.refresh
  perform_transition
 end
 end
end
Â
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_
#_/ Â The original untranslated version of this script can be found here:
# http://f44.aaa.livedoor.jp/~ytomy/tkool ... arge_party
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_
#_/   ◆   Party Expansion & Formation - KGC_LargeParty    ◆ VX ◆
#_/ Â Â â—‡ Â Â Â Â Â Â Â Â Last Update: 2008/04/27 Â Â Â Â Â Â Â Â Â Â â—‡
#_/   ◆        Translation by Mr. Anonymous         ◆
#_/-----------------------------------------------------------------------------
#_/ Â This script allows you more control over the default "party" system by
#_/ Â removing the limitation of only having four actors to a party. These
#_/ Â extra actors may behave just as any other actor during battle. In addition
#_/ Â you may also have "standby" actors, who can be swapped out with the
#_/ Â current party via a "Party Formation" screen, which may optionally be
#_/ Â added into the main menu panel, and/or even called from pressing
#_/ Â a specified button while on the main menu.
#_/-----------------------------------------------------------------------------
#_/ Â Â Â Â Â Â Â Â Â Â Â â—† 2008/04/27 UPDATE [KGC] â—† Â Â Â Â Â
#_/ Â Â Â Â Â Â Updated for KGC_CursorAnimation compatibility.
#_/=============================================================================
#_/ Â Â Â Â Â Â Â Â Â Â â—† Instructions For Usage â—†
#_/ Â Â Â Â Â Â Â Â Â Â Â â—† Script Commands â—†
#_/ Â These commands are used in "Script" function in the third page of event
#_/ Â commands under "Advanced".
#_/
#_/ Â * call_partyform
#_/ Â Â Calls the Party Formation screen.
#_/
#_/ Â * set_max_battle_member_count(Value)
#_/ Â Â Allows you to manually set the maximum amount of actors in the active
#_/ Â Â Â party, i.e. the amount of party members who may participate in battle.
#_/
#_/ Â * party_full?
#_/ Â Â Used for Conditional Branches. This allows you to determine wether the
#_/ Â Â Â active party is full in accordance to MAX_BATTLE_MEMBERS or the above
#_/ Â Â Â manual statement of set_max_battle_member_count(Value).
#_/
#_/ Â * permit_partyform(true/false)
#_/ Â Â Allows you to enable or disable the Party Formation screen on the main
#_/ Â Â Â command menu. This also actives or deactivates PARTYFORM_SWITCH.
#_/
#_/ Â * fix_actor(ActorID, true/false)
#_/ Â Â Allows you to fix or force an actor into remaining in the active party
#_/ Â Â Â and not be switched out with a standby actor. If the true/false
#_/ Â Â Â argument is omitted, the statement is automatically considered true.
#_/ Â
#_/ Â * change_party_shift(index1, index2)
#_/ Â Â This allows you to switch an actor in the position of index1 with the
#_/ Â Â Â actor in the position of index2. This ignores the fix_actor function.
#_/ Â Â Â Also of note is that the first actor in the party actually has an
#_/ Â Â Â index of 0, second actor has an index of 1, and so on.
#_/
#_/ Â * sort_party_member(sort_type, true/false)
#_/ Â Â This allows you to manually sort the actors by replacing sort_type with
#_/ Â Â Â SORT_BY_ID, SORT_BY_NAME, or SORT_BY_LEVEL. If you set the second
#_/ Â Â Â argument to true, the sorting order is reversed. If true, it is not.
#_/ Â Â Â Also, if the second argument is omitted, it is automatically false.
#_/
#_/ Â * get_stand_by_member_ids
#_/ Â Â This aquires the arrangement of the ActorIDs of the standby actors.
#_/
#_/ Â * stand_by_member?(ActorID)
#_/ Â Â Used for Conditional Branches. This allows you to determine if the actor
#_/ Â Â Â specified is a standby party member.
#_/
#_/ Â * add_battle_member(ActorID, index)
#_/ Â Â Allows you to add an actor to the active party and place it in the
#_/ Â Â Â desired position(index). If the second argument is omitted, the actor
#_/ Â Â Â will automatically be placed at the end of the party. Also, if the
#_/ Â Â Â active party is full, the actor will not be added.
#_/
#_/ Â * remove_battle_member(ActorID)
#_/ Â Â Removes an actor from the active party. This cannot removed an actor
#_/ Â Â Â who is fixed into place using fix_actor.
#_/
#_/ Â * remove_all_battle_member
#_/ Â Â All actors other than fixed actors are removed from the active party.
#_/ Â Â Â Note that this seems to unfix fixed characters, but not remove them.
#_/ Â Â Â Also note that if there are no fixed actors, you must add a member
#_/ Â Â Â back into the active party using add_battle_member BEFORE the player
#_/ Â Â Â is allowed to open the menu or enter battle.
#_/
#_/ Â * random_launch
#_/ Â Â Randomly sorts and replaces the active party with those from the standby
#_/ Â Â Â party. Once again this does not effect fixed actors.
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_
#_/ A special note from the translator: I'll be revising this translation for
#_/ Â a more user-friendly approach and expanded functionality explainations
#_/ Â when I have the time. If you don't understand something here now, fear not,
#_/ Â as this is only a beta translation. As such, some things may be incorrect.
#_/ Â however, it should work without a hitch, with the possible exception of
#_/ Â SHOW_STAND_BY_MEMBER_NOT_IN_BATTLE, which I still cannot figure out.
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_
Â
#==============================================================================#
#               ★ Customization ★                 #
#==============================================================================#
Â
module KGC
module LargeParty
 #          ◆ Party Formation In-Game Switch ◆
 #  This allows you to assign an in-game Switch that allows you to enable or
 #  disable the Party Formation screen on the main command menu.
 PARTYFORM_SWITCH      = 3
 #        ◆ Party Formation In-Game Switch (In Combat) ◆
 #  This allows you to assign an in-game Switch that allows you to enable or
 #  disable the Party Formation screen during combat.
 BATTLE_PARTYFORM_SWITCH  = 4
 #       ◆ Default Party Formation Switch Activation Toggle ◆
 #  When "New Game" is selected, both party formation permission switches
 #  automatically become active (ON) when this is set as true.
 DEFAULT_PARTYFORM_ENABLED = false
Â
 #          ◆ Maximum Party Members (In Combat) ◆
 #  Allows you to choose how many actors may participate in a battle.
 MAX_BATTLE_MEMBERS = 4
 #             ◆ The Party Members ◆
 #  Allows you to choose how many actors may be added to the party.
 #  *Note: Game_Party::MAX_MEMBERS Is overwritten
 #  When making this 100 or more, you'll receive an error.
 MAX_MEMBERS = 99
Â
 #           ◆ Fixed Party Member Sorting ◆
 #  This toggle allows you to enable/disable automatic sorting of fixed(active)
 #  party members.
 #  true = Disable automatic sorting.
 #  false = Enable automatic sorting.
 FORBID_CHANGE_SHIFT_FIXED = false
Â
 #  Standby Members Background Color
 #  Default: Color.new(0, 0, 0, 0)
 STAND_BY_COLOR = Color.new(0, 0, 0, 128)
 # ◆ Fixed Current Party Background Color
 FIXED_COLOR   = Color.new(255, 128, 64, 96)
 #  Background Color that shows when Members are selected.
 SELECTED_COLOR = Color.new(64, 255, 128, 128)
Â
 #         ◆ Party Formation Command Menu Selection ◆
 #  This allows you to change the key/button pressed in the menu screen to
 #  pull up the Party Formation screen without actually highlighting and
 #  selecting the Party Formation option.
 #  If this is set as nil, this function is disabled.
 MENU_PARTYFORM_BUTTON    = Input::A
 #  This toggle allows you to enable/disable the Party Formation option on the
 #  main command window.
 # true = The option is enabled.
 # false = The option is removed.
 USE_MENU_PARTYFORM_COMMAND = false
 #  This allows you to change the text displayed for the Party Formation option
 #  in the main command window.
 VOCAB_MENU_PARTYFORM    = "Party"
Â
 #  This toggle allows you to enable/disable the Party Formation option while
 #  in combat.
 #  This option is added under the "Run" or "Escape" command.
 USE_BATTLE_PARTYFORM  = false
 #  This allows you to change the text displayed for the Party Formation option
 #  while in combat under the "Run" or "Escape" command.
 VOCAB_BATTLE_PARTYFORM = "Party"
Â
 #      ◆ Party Formation Screen Character Dimensions ◆
 #  This allows you to change the width and height of the actors' placemarkers
 #  on the Party Formation Screen.
 #  You can rewrite this [x, y] in accordance to the size of your actor's
 #  walking graphic.
 PARTY_FORM_CHARACTER_SIZE  = [40, 48]
 #  This allows you to change the text of the empty slots in the Party
 #  Formation Screen.
 BATTLE_MEMBER_BLANK_TEXT   = "EMPTY"
 # ◆ Party Formation Screen Member Rows ◆
 #  This allows you to change the amount of rows that in the "Standby"
 #  box.
 #  Adjust this value to 1 if the status window protrudes beyond the screen.
 PARTY_MEMBER_WINDOW_ROW_MAX = 2
 #           ◆ Current Party Member Display ◆
 #  This toggle allows you to show/hide the current party members in the
 #  "Standby" box.
 #  true = Show them! These will be greyed out.
 #  false = Hide them.
 SHOW_BATTLE_MEMBER_IN_PARTY = false
 #  This allows you to change the text displayed for empty slots on in the
 #  "Current Party" box.
 PARTY_MEMBER_BLANK_TEXT   = "-"
Â
 # ◆ Width of caption window on organization screen
 CAPTION_WINDOW_WIDTH  = 192
 # ◆ Caption of combat member window on organization screen
 BATTLE_MEMBER_CAPTION = "Current Party"
Â
 if SHOW_BATTLE_MEMBER_IN_PARTY
  #  This allows you to change the text that appears on top of the Party
  #  Formation box.
  #  (When SHOW_BATTLE_MEMBER_IN_PARTY = true)
  PARTY_MEMBER_CAPTION = "Party Formation"
 else
  #  This allows you to change the text that appears on top of the Standby
  #   box.
  #  (When SHOW_BATTLE_MEMBER_IN_PARTY = false)
  PARTY_MEMBER_CAPTION = "Standby"
 end
Â
 #         ◆ Width of Formation Confirmation Window ◆
 CONFIRM_WINDOW_WIDTH   = 160
 #       ◆ Vocab Strings for Formation Confirmation Window ◆
 #  If the order of these commands are changed or something is removed, expect
 #  an error.
 CONFIRM_WINDOW_COMMANDS = ["Done", "Cancel"]
Â
 #          ◆ Equip Item Status Shop Scroll ◆
 #  This allows you to change the key/button HELD DOWN while using the Up and
 #  Down keys to scroll the attribute bonuses window (to the right) to view
 #  the each individual unit's attribute bonuses. KCG_HelpExtension is
 #  required for this function to work properly.
 #  If you set this to nil, this function is disabled.
 SHOP_STATUS_SCROLL_BUTTON = Input::A
Â
 #        ◆ Standby Members Experience Gain Percentage ◆
 #  If you enter 500 in this, the actual EXP gained is 50.0%
 #  You may also prevent standby units from gaining EXP by setting this is 0.
 STAND_BY_EXP_RATE = 500
 #           ◆ Standby Members Level-Up Message ◆
 #  This toggle allows you to enable/disable the level-up messages displayed
 #  for units on standby.
 #  true = Show level-up messages for standby units.
 #  false = Hide level-up messages for standby units.
 SHOW_STAND_BY_LEVEL_UP = true
 #           ◆ Standby Members Combat Display ◆
 #  *Note: I cannot figure out what this actually does. It doesn't -seem- to
 #   work as advertised, but I could be wrong. If anyone figures out what this
 #   actually does, please let me know.
 #  true  : All members are displayed during combat.
 #  false : Exchanged standby members are not shown.
 SHOW_STAND_BY_MEMBER_NOT_IN_BATTLE = false
 end
end
Â
$imported = {} if $imported == nil
$imported["LargeParty"] = true
Â
#==============================================================================
# â–¡ KGC::Commands
#==============================================================================
Â
module KGC::Commands
 # メンãƒãƒ¼ã®ã‚½ãƒ¼ãƒˆå½¢å¼
 SORT_BY_ID   = 0  # IDé †
 SORT_BY_NAME  = 1  # åå‰é †
 SORT_BY_LEVEL = 2  # ãƒ¬ãƒ™ãƒ«é †
Â
 module_function
 #--------------------------------------------------------------------------
 # â—‹ パーティ編æˆç”»é¢ã®å‘¼ã³å‡ºã—
 #--------------------------------------------------------------------------
 def call_partyform
  return if $game_temp.in_battle
  $game_temp.next_scene = :partyform
 end
 #--------------------------------------------------------------------------
 # â—‹ 戦闘メンãƒãƒ¼æœ€å¤§æ•°ã‚’è¨å®š
 #   value : 人数 (çœç•¥ã—ãŸå ´åˆã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’使用)
 #--------------------------------------------------------------------------
 def set_max_battle_member_count(value = nil)
  $game_party.max_battle_member_count = value
 end
 #--------------------------------------------------------------------------
 # â—‹ パーティ人数ãŒä¸€æ¯ã‹
 #--------------------------------------------------------------------------
 def party_full?
  return $game_party.full?
 end
 #--------------------------------------------------------------------------
 # â—‹ パーティ編æˆå¯å¦ã‚’è¨å®š
 #   enabled : 有効フラグ (çœç•¥æ™‚ : true)
 #--------------------------------------------------------------------------
 def permit_partyform(enabled = true)
  $game_switches[KGC::LargeParty::PARTYFORM_SWITCH] = enabled
 end
 #--------------------------------------------------------------------------
 # â—‹ 戦闘ä¸ã®ãƒ‘ーティ編æˆå¯å¦ã‚’è¨å®š
 #   enabled : 有効フラグ (çœç•¥æ™‚ : true)
 #--------------------------------------------------------------------------
 def permit_battle_partyform(enabled = true)
  $game_switches[KGC::LargeParty::BATTLE_PARTYFORM_SWITCH] = enabled
 end
 #--------------------------------------------------------------------------
 # â—‹ アクターã®å›ºå®šçŠ¶æ…‹ã‚’è¨å®š
 #   actor_id : アクター ID
 #   fixed   : 固定フラグ (çœç•¥æ™‚ : true)
 #--------------------------------------------------------------------------
 def fix_actor(actor_id, fixed = true)
  $game_party.fix_actor(actor_id, fixed)
 end
 #--------------------------------------------------------------------------
 # â—‹ 並ã³æ›¿ãˆ
 #   メンãƒãƒ¼ã® index1 番目㨠index2 番目を入れ替ãˆã‚‹
 #--------------------------------------------------------------------------
 def change_party_shift(index1, index2)
  $game_party.change_shift(index1, index2)
 end
 #--------------------------------------------------------------------------
 # â—‹ メンãƒãƒ¼æ•´åˆ— (æ˜‡é †)
 #   sort_type : ã‚½ãƒ¼ãƒˆå½¢å¼ (SORT_BY_xxx)
 #   reverse  : true ã ã¨é™é †
 #--------------------------------------------------------------------------
 def sort_party_member(sort_type = SORT_BY_ID, reverse = false)
  $game_party.sort_member(sort_type, reverse)
 end
 #--------------------------------------------------------------------------
 # â—‹ 待機メンãƒãƒ¼ã® ID ã‚’å–å¾—
 #--------------------------------------------------------------------------
 def get_stand_by_member_ids
  result = []
  $game_party.stand_by_members.each { |actor| result << actor.id }
  return result
 end
 #--------------------------------------------------------------------------
 # â—‹ アクターãŒå¾…機メンãƒãƒ¼ã‹
 #   actor_id : アクター ID
 #--------------------------------------------------------------------------
 def stand_by_member?(actor_id)
  return get_stand_by_member_ids.include?(actor_id)
 end
 #--------------------------------------------------------------------------
 # â—‹ アクターを戦闘メンãƒãƒ¼ã«åŠ ãˆã‚‹
 #   actor_id : アクター ID
 #   index   : è¿½åŠ ä½ç½® (çœç•¥æ™‚ã¯æœ€å¾Œå°¾)
 #--------------------------------------------------------------------------
 def add_battle_member(actor_id, index = nil)
  $game_party.add_battle_member(actor_id, index)
 end
 #--------------------------------------------------------------------------
 # â—‹ アクターを戦闘メンãƒãƒ¼ã‹ã‚‰å¤–ã™
 #   actor_id : アクター ID
 #--------------------------------------------------------------------------
 def remove_battle_member(actor_id)
  $game_party.remove_battle_member(actor_id)
 end
 #--------------------------------------------------------------------------
 # â—‹ 固定アクター以外を戦闘メンãƒãƒ¼ã‹ã‚‰å¤–ã™
 #--------------------------------------------------------------------------
 def remove_all_battle_member
  $game_party.all_members.each { |actor|
   $game_party.remove_battle_member(actor.id)
  }
 end
 #--------------------------------------------------------------------------
 # ○ ランダム出撃
 #--------------------------------------------------------------------------
 def random_launch
  new_battle_members = $game_party.fixed_members
  candidates = $game_party.all_members - new_battle_members
  num = [$game_party.max_battle_member_count - new_battle_members.size,
   candidates.size].min
  return if num <= 0
Â
  # ランダムã«é¸ã¶
  ary = (0...candidates.size).to_a.sort_by { rand }
  ary[0...num].each { |i| new_battle_members << candidates }
  $game_party.set_battle_member(new_battle_members)
 end
end
Â
class Game_Interpreter
 include KGC::Commands
end
Â
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
Â
#==============================================================================
# â– Vocab
#==============================================================================
Â
module Vocab
 # 「パーティ編æˆã€ã‚³ãƒžãƒ³ãƒ‰å (メニュー)
 def self.partyform
  return KGC::LargeParty::VOCAB_MENU_PARTYFORM
 end
Â
 # 「パーティ編æˆã€ã‚³ãƒžãƒ³ãƒ‰å (戦闘)
 def self.partyform_battle
  return KGC::LargeParty::VOCAB_BATTLE_PARTYFORM
 end
end
Â
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
Â
#==============================================================================
# â– Game_Actor
#==============================================================================
Â
class Game_Actor < Game_Battler
 #--------------------------------------------------------------------------
 # â—‹ パーティ内インデックスå–å¾—
 #--------------------------------------------------------------------------
 def party_index
  return $game_party.all_members.index(self)
 end
 #--------------------------------------------------------------------------
 # â—‹ 戦闘メンãƒãƒ¼ã‹åˆ¤å®š
 #--------------------------------------------------------------------------
 def battle_member?
  return $game_party.battle_members.include?(self)
 end
 #--------------------------------------------------------------------------
 # â—‹ 固定メンãƒãƒ¼ã‹åˆ¤å®š
 #--------------------------------------------------------------------------
 def fixed_member?
  return $game_party.fixed_members.include?(self)
 end
end
Â
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
Â
#==============================================================================
# â– Game_Party
#==============================================================================
Â
class Game_Party
 #--------------------------------------------------------------------------
 # ◠定数
 #--------------------------------------------------------------------------
 MAX_MEMBERS = KGC::LargeParty::MAX_MEMBERS  # 最大パーティ人数
 #--------------------------------------------------------------------------
 # ◠オブジェクトåˆæœŸåŒ–
 #--------------------------------------------------------------------------
 alias initialize_KGC_LargeParty initialize
 def initialize
  initialize_KGC_LargeParty
Â
  @max_battle_member_count = nil
  @battle_member_count = 0
  @fixed_actors = []
 end
 #--------------------------------------------------------------------------
 # â—‹ 戦闘メンãƒãƒ¼æœ€å¤§æ•°å–å¾—
 #--------------------------------------------------------------------------
 def max_battle_member_count
  if @max_battle_member_count == nil
   return KGC::LargeParty::MAX_BATTLE_MEMBERS
  else
   return @max_battle_member_count
  end
 end
 #--------------------------------------------------------------------------
 # â—‹ 戦闘メンãƒãƒ¼æœ€å¤§æ•°å¤‰æ›´
 #--------------------------------------------------------------------------
 def max_battle_member_count=(value)
  if value.is_a?(Integer)
   value = [value, 1].max
  end
  @max_battle_member_count = value
 end
 #--------------------------------------------------------------------------
 # â—‹ 戦闘メンãƒãƒ¼æ•°å–å¾—
 #--------------------------------------------------------------------------
 def battle_member_count
  if @battle_member_count == nil
   @battle_member_count = @actors.size
  end
  @battle_member_count =
   [@battle_member_count, @actors.size, max_battle_member_count].min
  return @battle_member_count
 end
 #--------------------------------------------------------------------------
 # â—‹ 戦闘メンãƒãƒ¼æ•°è¨å®š
 #--------------------------------------------------------------------------
 def battle_member_count=(value)
  @battle_member_count = [[value, 0].max,
   @actors.size, max_battle_member_count].min
 end
 #--------------------------------------------------------------------------
 # ◠メンãƒãƒ¼ã®å–å¾—
 #--------------------------------------------------------------------------
 alias members_KGC_LargeParty members
 def members
  if $game_temp.in_battle ||
    !KGC::LargeParty::SHOW_STAND_BY_MEMBER_NOT_IN_BATTLE
   return battle_members
  else
   return members_KGC_LargeParty
  end
 end
 #--------------------------------------------------------------------------
 # â—‹ 全メンãƒãƒ¼ã®å–å¾—
 #--------------------------------------------------------------------------
 def all_members
  return members_KGC_LargeParty
 end
 #--------------------------------------------------------------------------
 # â—‹ 戦闘メンãƒãƒ¼ã®å–å¾—
 #--------------------------------------------------------------------------
 def battle_members
  result = []
  battle_member_count.times { |i| result << $game_actors[@actors] }
  return result
 end
 #--------------------------------------------------------------------------
 # â—‹ 待機メンãƒãƒ¼ã®å–å¾—
 #--------------------------------------------------------------------------
 def stand_by_members
  return (all_members - battle_members)
 end
 #--------------------------------------------------------------------------
 # â—‹ 固定メンãƒãƒ¼ã®å–å¾—
 #--------------------------------------------------------------------------
 def fixed_members
  result = []
  @fixed_actors.each { |i| result << $game_actors }
  return result
 end
 #--------------------------------------------------------------------------
 # â— åˆæœŸãƒ‘ーティã®ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—
 #--------------------------------------------------------------------------
 alias setup_starting_members_KGC_LargeParty setup_starting_members
 def setup_starting_members
  setup_starting_members_KGC_LargeParty
Â
  self.battle_member_count = @actors.size
 end
 #--------------------------------------------------------------------------
 # ◠戦闘テスト用パーティã®ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—
 #--------------------------------------------------------------------------
 alias setup_battle_test_members_KGC_LargeParty setup_battle_test_members
 def setup_battle_test_members
  setup_battle_test_members_KGC_LargeParty
Â
  self.battle_member_count = @actors.size
 end
 #--------------------------------------------------------------------------
 # â—‹ メンãƒãƒ¼ã®æ–°è¦è¨å®š
 #   new_member : æ–°ã—ã„メンãƒãƒ¼
 #--------------------------------------------------------------------------
 def set_member(new_member)
  @actors = []
  new_member.each { |actor| @actors << actor.id }
 end
 #--------------------------------------------------------------------------
 # â—‹ 戦闘メンãƒãƒ¼ã®æ–°è¦è¨å®š
 #   new_member : æ–°ã—ã„戦闘メンãƒãƒ¼
 #--------------------------------------------------------------------------
 def set_battle_member(new_member)
  new_battle_member = []
  new_member.each { |actor|
   @actors.delete(actor.id)
   new_battle_member << actor.id
  }
  @actors = new_battle_member + @actors
  self.battle_member_count = new_member.size
 end
 #--------------------------------------------------------------------------
 # â—‹ パーティ編æˆã‚’許å¯ã—ã¦ã„ã‚‹ã‹åˆ¤å®š
 #--------------------------------------------------------------------------
 def partyform_enable?
  return $game_switches[KGC::LargeParty::PARTYFORM_SWITCH]
 end
 #--------------------------------------------------------------------------
 # â—‹ 戦闘ä¸ã®ãƒ‘ーティ編æˆã‚’許å¯ã—ã¦ã„ã‚‹ã‹åˆ¤å®š
 #--------------------------------------------------------------------------
 def battle_partyform_enable?
  return false unless partyform_enable?
  return $game_switches[KGC::LargeParty::BATTLE_PARTYFORM_SWITCH]
 end
 #--------------------------------------------------------------------------
 # â—‹ メンãƒãƒ¼ãŒä¸€æ¯ã‹åˆ¤å®š
 #--------------------------------------------------------------------------
 def full?
  return (@actors.size >= MAX_MEMBERS)
 end
 #--------------------------------------------------------------------------
 # â—‹ 固定アクターã‹åˆ¤å®š
 #   actor_id : 判定ã™ã‚‹ã‚¢ã‚¯ã‚¿ãƒ¼ã® ID
 #--------------------------------------------------------------------------
 def actor_fixed?(actor_id)
  return @fixed_actors.include?(actor_id)
 end
 #--------------------------------------------------------------------------
 # â— ã‚¢ã‚¯ã‚¿ãƒ¼ã‚’åŠ ãˆã‚‹
 #   actor_id : アクター ID
 #--------------------------------------------------------------------------
 alias add_actor_KGC_LargeParty add_actor
 def add_actor(actor_id)
  last_size = @actors.size
Â
  add_actor_KGC_LargeParty(actor_id)
Â
  if last_size < @actors.size
   self.battle_member_count += 1
  end
 end
 #--------------------------------------------------------------------------
 # â—‹ アクターを戦闘メンãƒãƒ¼ã«åŠ ãˆã‚‹
 #   actor_id : アクター ID
 #   index   : è¿½åŠ ä½ç½® (çœç•¥æ™‚ã¯æœ€å¾Œå°¾)
 #--------------------------------------------------------------------------
 def add_battle_member(actor_id, index = nil)
  return unless @actors.include?(actor_id)  # パーティã«ã„ãªã„
  if index == nil
   return if battle_members.include?($game_actors[actor_id])  # 出撃済ã¿
   return if battle_member_count == max_battle_member_count  # 人数ãŒæœ€å¤§
   index = battle_member_count
  end
Â
  @actors.delete(actor_id)
  @actors.insert(index, actor_id)
  self.battle_member_count += 1
 end
 #--------------------------------------------------------------------------
 # â—‹ アクターを戦闘メンãƒãƒ¼ã‹ã‚‰å¤–ã™
 #   actor_id : アクター ID
 #--------------------------------------------------------------------------
 def remove_battle_member(actor_id)
  return unless @actors.include?(actor_id)  # パーティã«ã„ãªã„
  return if actor_fixed?(actor_id)      # 固定済ã¿
  return if stand_by_members.include?($game_actors[actor_id])  # å¾…æ©Ÿä¸
Â
  @actors.delete(actor_id)
  @actors.push(actor_id)
  self.battle_member_count -= 1
 end
 #--------------------------------------------------------------------------
 # â—‹ アクターã®å›ºå®šçŠ¶æ…‹ã‚’è¨å®š
 #   actor_id : アクター ID
 #   fixed   : 固定フラグ (çœç•¥æ™‚ : false)
 #--------------------------------------------------------------------------
 def fix_actor(actor_id, fixed = false)
  return unless @actors.include?(actor_id)  # パーティã«ã„ãªã„
Â
  if fixed
   # 固定
   unless @fixed_actors.include?(actor_id)
    @fixed_actors << actor_id
    unless battle_members.include?($game_actors[actor_id])
     self.battle_member_count += 1
    end
   end
   # 強制出撃
   apply_force_launch
  else
   # 固定解除
   @fixed_actors.delete(actor_id)
  end
  $game_player.refresh
 end
 #--------------------------------------------------------------------------
 # â—‹ 強制出撃é©ç”¨
 #--------------------------------------------------------------------------
 def apply_force_launch
  while (fixed_members - battle_members).size > 0
   # 固定状態ã§ãªã„メンãƒãƒ¼ã‚’é©å½“ã«æŒã£ã¦ãã¦å…¥ã‚Œæ›¿ãˆ
   actor1 = stand_by_members.find { |a| @fixed_actors.include?(a.id) }
   actor2 = battle_members.reverse.find { |a| !@fixed_actors.include?(a.id) }
   index1 = @actors.index(actor1.id)
   index2 = @actors.index(actor2.id)
   @actors[index1], @actors[index2] = @actors[index2], @actors[index1]
Â
   # 戦闘メンãƒãƒ¼ãŒå…¨å“¡å›ºå®šã•ã‚ŒãŸã‚‰æˆ»ã‚‹ (ç„¡é™ãƒ«ãƒ¼ãƒ—防æ¢)
   all_fixed = true
   battle_members.each { |actor|
    unless actor.fixed_member?
     all_fixed = false
     break
    end
   }
   break if all_fixed
  end
 end
 #--------------------------------------------------------------------------
 # â—‹ メンãƒãƒ¼æ•´åˆ— (æ˜‡é †)
 #   sort_type : ã‚½ãƒ¼ãƒˆå½¢å¼ (SORT_BY_xxx)
 #   reverse  : true ã ã¨é™é †
 #--------------------------------------------------------------------------
 def sort_member(sort_type = KGC::Commands::SORT_BY_ID,
         reverse = false)
  # ãƒãƒƒãƒ•ã‚¡ã‚’準備
  b_actors = battle_members
  actors = all_members - b_actors
  f_actors = fixed_members
  # 固定ã‚ャラã¯ã‚½ãƒ¼ãƒˆã—ãªã„
  if KGC::LargeParty::FORBID_CHANGE_SHIFT_FIXED
   actors -= f_actors
   b_actors -= f_actors
  end
Â
  # ソート
  case sort_type
  when KGC::Commands::SORT_BY_ID   # IDé †
   actors.sort!  { |a, b| a.id <=> b.id }
   b_actors.sort! { |a, b| a.id <=> b.id }
  when KGC::Commands::SORT_BY_NAME  # åå‰é †
   actors.sort!  { |a, b| a.name <=> b.name }
   b_actors.sort! { |a, b| a.name <=> b.name }
  when KGC::Commands::SORT_BY_LEVEL  # ãƒ¬ãƒ™ãƒ«é †
   actors.sort!  { |a, b| a.level <=> b.level }
   b_actors.sort! { |a, b| a.level <=> b.level }
  end
  # å転
  if reverse
   actors.reverse!
   b_actors.reverse!
  end
Â
  # 固定ã‚ャラを先é ã«æŒã£ã¦ãã‚‹
  if KGC::LargeParty::FORBID_CHANGE_SHIFT_FIXED
   actors = f_actors + actors
   b_actors = f_actors + b_actors
  end
Â
  # 復帰
  set_member(actors)
  set_battle_member(b_actors)
Â
  apply_force_launch
  $game_player.refresh
 end
 #--------------------------------------------------------------------------
 # â—‹ 並ã³æ›¿ãˆ
 #   戦闘メンãƒãƒ¼ã® index1 番目㨠index2 番目を入れ替ãˆã‚‹
 #--------------------------------------------------------------------------
 def change_shift(index1, index2)
  size = @actors.size
  if index1 >= size || index2 >= size
   return
  end
  buf = @actors[index1]
  @actors[index1] = @actors[index2]
  @actors[index2] = buf
  $game_player.refresh
 end
 #--------------------------------------------------------------------------
 # ◠戦闘用ステートã®è§£é™¤ (戦闘終了時ã«å‘¼ã³å‡ºã—)
 #--------------------------------------------------------------------------
 def remove_states_battle
  for actor in all_members
   actor.remove_states_battle
  end
 end
end
Â
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
Â
#==============================================================================
# â– Window_Command
#==============================================================================
Â
class Window_Command < Window_Selectable
 unless method_defined?add_command)
 #--------------------------------------------------------------------------
 # â—‹ コマンドを追åŠ
 # Â Â è¿½åŠ ã—ãŸä½ç½®ã‚’è¿”ã™
 #--------------------------------------------------------------------------
 def add_command(command)
  @commands << command
  @item_max = @commands.size
  item_index = @item_max - 1
  refresh_command
  draw_item(item_index)
  return item_index
 end
 #--------------------------------------------------------------------------
 # ○ コマンドをリフレッシュ
 #--------------------------------------------------------------------------
 def refresh_command
  buf = self.contents.clone
  self.height = [self.height, row_max * WLH + 32].max
  create_contents
  self.contents.blt(0, 0, buf, buf.rect)
  buf.dispose
 end
 #--------------------------------------------------------------------------
 # ○ コマンドを挿入
 #--------------------------------------------------------------------------
 def insert_command(index, command)
  @commands.insert(index, command)
  @item_max = @commands.size
  refresh_command
  refresh
 end
 #--------------------------------------------------------------------------
 # ○ コマンドを削除
 #--------------------------------------------------------------------------
 def remove_command(command)
  @commands.delete(command)
  @item_max = @commands.size
  refresh
 end
 end
end
Â
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
Â
#==============================================================================
# â– Window_MenuStatus
#==============================================================================
Â
class Window_MenuStatus < Window_Selectable
 #--------------------------------------------------------------------------
 # ◠定数
 #--------------------------------------------------------------------------
 STATUS_HEIGHT = 96  # ステータス一人分ã®é«˜ã•
 #--------------------------------------------------------------------------
 # ◠ウィンドウ内容ã®ä½œæˆ
 #--------------------------------------------------------------------------
 def create_contents
  self.contents.dispose
  self.contents = Bitmap.new(width - 32,
   [height - 32, row_max * STATUS_HEIGHT].max)
 end
 #--------------------------------------------------------------------------
 # â— å…ˆé ã®è¡Œã®å–å¾—
 #--------------------------------------------------------------------------
 def top_row
  return self.oy / STATUS_HEIGHT
 end
 #--------------------------------------------------------------------------
 # â— å…ˆé ã®è¡Œã®è¨å®š
 #   row : å…ˆé ã«è¡¨ç¤ºã™ã‚‹è¡Œ
 #--------------------------------------------------------------------------
 def top_row=(row)
  super(row)
  self.oy = self.oy / WLH * STATUS_HEIGHT
 end
 #--------------------------------------------------------------------------
 # â— 1 ページã«è¡¨ç¤ºã§ãる行数ã®å–å¾—
 #--------------------------------------------------------------------------
 def page_row_max
  return (self.height - 32) / STATUS_HEIGHT
 end
 #--------------------------------------------------------------------------
 # â— é …ç›®ã‚’æç”»ã™ã‚‹çŸ©å½¢ã®å–å¾—
 #   index : é …ç›®ç•ªå·
 #--------------------------------------------------------------------------
 def item_rect(index)
  rect = super(index)
  rect.height = STATUS_HEIGHT
  rect.y = index / @column_max * STATUS_HEIGHT
  return rect
 end
 #--------------------------------------------------------------------------
 # ◠リフレッシュ
 #--------------------------------------------------------------------------
 def refresh
  @item_max = $game_party.members.size
  create_contents
  fill_stand_by_background
  draw_member
 end
 #--------------------------------------------------------------------------
 # â—‹ パーティメンãƒãƒ¼æç”»
 #--------------------------------------------------------------------------
 def draw_member
  for actor in $game_party.members
   draw_actor_face(actor, 2, actor.party_index * 96 + 2, 92)
   x = 104
   y = actor.party_index * 96 + WLH / 2
   draw_actor_name(actor, x, y)
   draw_actor_class(actor, x + 120, y)
   draw_actor_level(actor, x, y + WLH * 1)
   draw_actor_state(actor, x, y + WLH * 2)
   draw_actor_hp(actor, x + 120, y + WLH * 1)
   draw_actor_mp(actor, x + 120, y + WLH * 2)
  end
 end
 #--------------------------------------------------------------------------
 # â—‹ 待機メンãƒãƒ¼ã®èƒŒæ™¯è‰²ã‚’å¡—ã‚‹
 #--------------------------------------------------------------------------
 def fill_stand_by_background
  color = KGC::LargeParty::STAND_BY_COLOR
  dy = STATUS_HEIGHT * $game_party.battle_members.size
  dh = STATUS_HEIGHT * $game_party.stand_by_members.size
  if dh > 0
   self.contents.fill_rect(0, dy, self.width - 32, dh, color)
  end
 end
 #--------------------------------------------------------------------------
 # ◠カーソルã®æ›´æ–°
 #--------------------------------------------------------------------------
 def update_cursor
  if @index < 0        # カーソルãªã—
   self.cursor_rect.empty
  elsif @index < @item_max   # 通常
   super
  elsif @index >= 100     # 自分
   self.cursor_rect.set(0, (@index - 100) * STATUS_HEIGHT,
    contents.width, STATUS_HEIGHT)
  else             # 全体
   self.cursor_rect.set(0, 0, contents.width, @item_max * STATUS_HEIGHT)
  end
 end
end
Â
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
Â
#==============================================================================
# â– Window_ShopStatus
#==============================================================================
Â
class Window_ShopStatus < Window_Base
 #--------------------------------------------------------------------------
 # ◠ウィンドウ内容ã®ä½œæˆ
 #--------------------------------------------------------------------------
 def create_contents
  self.contents.dispose
  self.contents = Bitmap.new(width - 32,
   WLH * ($game_party.members.size + 1) * 2)
 end
end
Â
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
Â
#==============================================================================
# â– Window_BattleStatus
#==============================================================================
Â
class Window_BattleStatus < Window_Selectable
 #--------------------------------------------------------------------------
 # ◠ウィンドウ内容ã®ä½œæˆ
 #--------------------------------------------------------------------------
 def create_contents
  self.contents.dispose
  self.contents = Bitmap.new(width - 32,
   [WLH * $game_party.members.size, height - 32].max)
 end
 #--------------------------------------------------------------------------
 # ◠リフレッシュ
 #--------------------------------------------------------------------------
 alias refresh_KGC_LargeParty refresh
 def refresh
  create_contents
Â
  refresh_KGC_LargeParty
 end
end
Â
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
Â
#==============================================================================
# â–¡ Window_PartyFormCaption
#------------------------------------------------------------------------------
#  パーティ編æˆç”»é¢ã§ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®ã‚ャプションを表示ã™ã‚‹ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã§ã™ã€‚
#==============================================================================
Â
class Window_PartyFormCaption < Window_Base
 #--------------------------------------------------------------------------
 # ◠オブジェクトåˆæœŸåŒ–
 #   caption : 表示ã™ã‚‹ã‚ャプション
 #--------------------------------------------------------------------------
 def initialize(caption = "")
  super(0, 0, KGC::LargeParty::CAPTION_WINDOW_WIDTH, WLH + 32)
  self.z = 1500
  @caption = caption
  refresh
 end
 #--------------------------------------------------------------------------
 # ◠リフレッシュ
 #--------------------------------------------------------------------------
 def refresh
  self.contents.clear
  self.contents.draw_text(0, 0, width - 32, WLH, @caption)
 end
end
Â
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
Â
#==============================================================================
# â–¡ Window_PartyFormMember
#------------------------------------------------------------------------------
#  パーティ編æˆç”»é¢ã§ãƒ¡ãƒ³ãƒãƒ¼ã‚’表示ã™ã‚‹ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã§ã™ã€‚
#==============================================================================
Â
class Window_PartyFormMember < Window_Selectable
 #--------------------------------------------------------------------------
 # ○ 定数
 #--------------------------------------------------------------------------
 DRAW_SIZE = KGC::LargeParty::PARTY_FORM_CHARACTER_SIZE
 #--------------------------------------------------------------------------
 # ◠公開インスタンス変数
 #--------------------------------------------------------------------------
 attr_accessor :selected_index      # é¸æŠžæ¸ˆã¿ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹
 #--------------------------------------------------------------------------
 # ◠オブジェクトåˆæœŸåŒ–
 #   x    : ウィンドウ㮠X 座標
 #   y    : ウィンドウ㮠Y 座標
 #   width  : ウィンドウã®å¹…
 #   height  : ウィンドウã®é«˜ã•
 #   spacing : 横ã«é …ç›®ãŒä¸¦ã¶ã¨ãã®ç©ºç™½ã®å¹…
 #--------------------------------------------------------------------------
 def initialize(x, y, width, height, spacing = 8)
  super(x, y, width, height, spacing)
  self.z = 1000
 end
 #--------------------------------------------------------------------------
 # ◠ウィンドウ内容ã®ä½œæˆ
 #--------------------------------------------------------------------------
 def create_contents
  self.contents.dispose
  self.contents = Bitmap.new(width - 32,
   [height - 32, row_max * DRAW_SIZE[1]].max)
 end
 #--------------------------------------------------------------------------
 # â— å…ˆé ã®è¡Œã®å–å¾—
 #--------------------------------------------------------------------------
 def top_row
  return self.oy / DRAW_SIZE[1]
 end
 #--------------------------------------------------------------------------
 # â— å…ˆé ã®è¡Œã®è¨å®š
 #   row : å…ˆé ã«è¡¨ç¤ºã™ã‚‹è¡Œ
 #--------------------------------------------------------------------------
 def top_row=(row)
  super(row)
  self.oy = self.oy / WLH * DRAW_SIZE[1]
 end
 #--------------------------------------------------------------------------
 # â— 1 ページã«è¡¨ç¤ºã§ãる行数ã®å–å¾—
 #--------------------------------------------------------------------------
 def page_row_max
  return (self.height - 32) / DRAW_SIZE[1]
 end
 #--------------------------------------------------------------------------
 # â— é …ç›®ã‚’æç”»ã™ã‚‹çŸ©å½¢ã®å–å¾—
 #   index : é …ç›®ç•ªå·
 #--------------------------------------------------------------------------
 def item_rect(index)
  rect = super(index)
  rect.width = DRAW_SIZE[0]
  rect.height = DRAW_SIZE[1]
  rect.y = index / @column_max * DRAW_SIZE[1]
  return rect
 end
 #--------------------------------------------------------------------------
 # â—‹ é¸æŠžã‚¢ã‚¯ã‚¿ãƒ¼å–å¾—
 #--------------------------------------------------------------------------
 def actor
  return @actors[self.index]
 end
 #--------------------------------------------------------------------------
 # ◠リフレッシュ
 #--------------------------------------------------------------------------
 def refresh
  self.contents.clear
  restore_member_list
  draw_member
 end
 #--------------------------------------------------------------------------
 # â—‹ メンãƒãƒ¼ãƒªã‚¹ãƒˆä¿®å¾©
 #--------------------------------------------------------------------------
 def restore_member_list
  # 継承先ã§å®šç¾©
 end
 #--------------------------------------------------------------------------
 # â—‹ メンãƒãƒ¼æç”»
 #--------------------------------------------------------------------------
 def draw_member
  # 継承先ã§å®šç¾©
 end
 #--------------------------------------------------------------------------
 # â—‹ 空欄アクターæç”»
 #   index : é …ç›®ç•ªå·
 #--------------------------------------------------------------------------
 def draw_empty_actor(index)
  # 継承先ã§å®šç¾©
 end
 #--------------------------------------------------------------------------
 # â—‹ 固定ã‚ャラ背景æç”»
 #   index : é …ç›®ç•ªå·
 #--------------------------------------------------------------------------
 def draw_fixed_back(index)
  rect = item_rect(index)
  self.contents.fill_rect(rect, KGC::LargeParty::FIXED_COLOR)
 end
 #--------------------------------------------------------------------------
 # â—‹ é¸æŠžä¸ã‚ャラ背景æç”»
 #   index : é …ç›®ç•ªå·
 #--------------------------------------------------------------------------
 def draw_selected_back(index)
  rect = item_rect(index)
  self.contents.fill_rect(rect, KGC::LargeParty::SELECTED_COLOR)
 end
end
Â
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
Â
#==============================================================================
# â–¡ Window_PartyFormBattleMember
#------------------------------------------------------------------------------
#  パーティ編æˆç”»é¢ã§æˆ¦é—˜ãƒ¡ãƒ³ãƒãƒ¼ã‚’表示ã™ã‚‹ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã§ã™ã€‚
#==============================================================================
Â
class Window_PartyFormBattleMember < Window_PartyFormMember
 #--------------------------------------------------------------------------
 # ◠公開インスタンス変数
 #--------------------------------------------------------------------------
 attr_accessor :selected_index      # é¸æŠžæ¸ˆã¿ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹
 #--------------------------------------------------------------------------
 # ◠オブジェクトåˆæœŸåŒ–
 #--------------------------------------------------------------------------
 def initialize
  super(0, 0, 64, DRAW_SIZE[1] + 32)
  column_width = DRAW_SIZE[0] + @spacing
  nw = [column_width * $game_party.max_battle_member_count + 32,
   Graphics.width].min
  self.width = nw
Â
  @item_max = $game_party.max_battle_member_count
  @column_max = width / column_width
  @selected_index = nil
  create_contents
  refresh
  self.active = true
  self.index = 0
 end
 #--------------------------------------------------------------------------
 # â—‹ メンãƒãƒ¼ãƒªã‚¹ãƒˆä¿®å¾©
 #--------------------------------------------------------------------------
 def restore_member_list
  @actors = $game_party.battle_members
 end
 #--------------------------------------------------------------------------
 # â—‹ メンãƒãƒ¼æç”»
 #--------------------------------------------------------------------------
 def draw_member
  @item_max.times { |i|
   actor = @actors
   if actor == nil
    draw_empty_actor(i)
   else
    if i == @selected_index
     draw_selected_back(i)
    elsif $game_party.actor_fixed?(actor.id)
     draw_fixed_back(i)
    end
    rect = item_rect(i)
    draw_actor_graphic(actor,
     rect.x + DRAW_SIZE[0] / 2,
     rect.y + DRAW_SIZE[1] - 4)
   end
  }
 end
 #--------------------------------------------------------------------------
 # â—‹ 空欄アクターæç”»
 #   index : é …ç›®ç•ªå·
 #--------------------------------------------------------------------------
 def draw_empty_actor(index)
  rect = item_rect(index)
  self.contents.font.color = system_color
  self.contents.draw_text(rect, KGC::LargeParty::BATTLE_MEMBER_BLANK_TEXT, 1)
  self.contents.font.color = normal_color
 end
end
Â
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
Â
#==============================================================================
# â–¡ Window_PartyFormAllMember
#------------------------------------------------------------------------------
#  パーティ編æˆç”»é¢ã§å…¨ãƒ¡ãƒ³ãƒãƒ¼ã‚’表示ã™ã‚‹ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã§ã™ã€‚
#==============================================================================
Â
class Window_PartyFormAllMember < Window_PartyFormMember
 #--------------------------------------------------------------------------
 # ◠オブジェクトåˆæœŸåŒ–
 #--------------------------------------------------------------------------
 def initialize
  super(0, 0, 64, 64)
  restore_member_list
  @item_max = $game_party.all_members.size
Â
  # å„種サイズ計算
  column_width = DRAW_SIZE[0] + @spacing
  sw = [@item_max * column_width + 32, Graphics.width].min
  @column_max = (sw - 32) / column_width
  sh = ([@item_max - 1, 0].max / @column_max + 1) * DRAW_SIZE[1] + 32
  sh = [sh, DRAW_SIZE[1] * KGC::LargeParty::PARTY_MEMBER_WINDOW_ROW_MAX + 32].min
Â
  # 座標・サイズ調整
  self.y += DRAW_SIZE[1] + 32
  self.width = sw
  self.height = sh
Â
  create_contents
  refresh
  self.active = false
  self.index = 0
 end
 #--------------------------------------------------------------------------
 # â—‹ é¸æŠžã—ã¦ã„るアクターã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹å–å¾—
 #--------------------------------------------------------------------------
 def actor_index
  return @index_offset + self.index
 end
 #--------------------------------------------------------------------------
 # â—‹ メンãƒãƒ¼ãƒªã‚¹ãƒˆä¿®å¾©
 #--------------------------------------------------------------------------
 def restore_member_list
  if KGC::LargeParty::SHOW_BATTLE_MEMBER_IN_PARTY
   @actors = $game_party.all_members
   @index_offset = 0
  else
   @actors = $game_party.stand_by_members
   @index_offset = $game_party.battle_members.size
  end
 end
 #--------------------------------------------------------------------------
 # â—‹ メンãƒãƒ¼æç”»
 #--------------------------------------------------------------------------
 def draw_member
  @item_max.times { |i|
   actor = @actors
   if actor == nil
    draw_empty_actor(i)
    next
   end
Â
   if $game_party.actor_fixed?(actor.id)
    draw_fixed_back(i)
   end
   rect = item_rect(i)
   opacity = ($game_party.battle_members.include?(actor) ? 96 : 255)
   draw_actor_graphic(actor,
    rect.x + DRAW_SIZE[0] / 2,
    rect.y + DRAW_SIZE[1] - 4,
    opacity)
  }
 end
 #--------------------------------------------------------------------------
 # ◠アクターã®æ©è¡Œã‚°ãƒ©ãƒ•ã‚£ãƒƒã‚¯æç”»
 #   actor  : アクター
 #   x    : æ画先 X 座標
 #   y    : æ画先 Y 座標
 #   opacity : ä¸é€æ˜Žåº¦
 #--------------------------------------------------------------------------
 def draw_actor_graphic(actor, x, y, opacity = 255)
  draw_character(actor.character_name, actor.character_index, x, y, opacity)
 end
 #--------------------------------------------------------------------------
 # â— æ©è¡Œã‚°ãƒ©ãƒ•ã‚£ãƒƒã‚¯ã®æç”»
 #   character_name  : æ©è¡Œã‚°ãƒ©ãƒ•ã‚£ãƒƒã‚¯ ファイルå
 #   character_index : æ©è¡Œã‚°ãƒ©ãƒ•ã‚£ãƒƒã‚¯ インデックス
 #   x        : æ画先 X 座標
 #   y        : æ画先 Y 座標
 #   opacity     : ä¸é€æ˜Žåº¦
 #--------------------------------------------------------------------------
 def draw_character(character_name, character_index, x, y, opacity = 255)
  return if character_name == nil
  bitmap = Cache.character(character_name)
  sign = character_name[/^[\!\$]./]
  if sign != nil and sign.include?('$')
   cw = bitmap.width / 3
   ch = bitmap.height / 4
  else
   cw = bitmap.width / 12
   ch = bitmap.height / 8
  end
  n = character_index
  src_rect = Rect.new((n%4*3+1)*cw, (n/4*4)*ch, cw, ch)
  self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect, opacity)
 end
 #--------------------------------------------------------------------------
 # â—‹ 空欄アクターæç”»
 #   index : é …ç›®ç•ªå·
 #--------------------------------------------------------------------------
 def draw_empty_actor(index)
  rect = item_rect(index)
  self.contents.font.color = system_color
  self.contents.draw_text(rect, KGC::LargeParty::PARTY_MEMBER_BLANK_TEXT, 1)
  self.contents.font.color = normal_color
 end
end
Â
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
Â
#==============================================================================
# â–¡ Window_PartyFormStatus
#------------------------------------------------------------------------------
#  パーティ編æˆç”»é¢ã§ã‚¢ã‚¯ã‚¿ãƒ¼ã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã‚’表示ã™ã‚‹ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã§ã™ã€‚
#==============================================================================
Â
class Window_PartyFormStatus < Window_Base
 #--------------------------------------------------------------------------
 # ◠オブジェクトåˆæœŸåŒ–
 #--------------------------------------------------------------------------
 def initialize
  super(0, 0, 384, 128)
  self.z = 1000
  @actor = nil
  refresh
 end
 #--------------------------------------------------------------------------
 # â—‹ アクターè¨å®š
 #--------------------------------------------------------------------------
 def set_actor(actor)
  if @actor != actor
   @actor = actor
   refresh
  end
 end
 #--------------------------------------------------------------------------
 # ◠リフレッシュ
 #--------------------------------------------------------------------------
 def refresh
  self.contents.clear
  if @actor == nil
   return
  end
Â
  draw_actor_face(@actor, 0, 0)
  dx = 104
  draw_actor_name(@actor, dx, 0)
  draw_actor_level(@actor, dx, WLH * 1)
  draw_actor_hp(@actor, dx, WLH * 2)
  draw_actor_mp(@actor, dx, WLH * 3)
  4.times { |i|
   draw_actor_parameter(@actor, dx + 128, WLH * i, i, 120)
  }
 end
 #--------------------------------------------------------------------------
 # ◠能力値ã®æç”»
 #   actor : アクター
 #   x   : æ画先 X 座標
 #   y   : æ画先 Y 座標
 #   type  : 能力値ã®ç¨®é¡ž (0~3)
 #   width : æ画幅
 #--------------------------------------------------------------------------
 def draw_actor_parameter(actor, x, y, type, width = 156)
  case type
  when 0
   parameter_name = Vocab::atk
   parameter_value = actor.atk
  when 1
   parameter_name = Vocab::def
   parameter_value = actor.def
  when 2
   parameter_name = Vocab::spi
   parameter_value = actor.spi
  when 3
   parameter_name = Vocab::agi
   parameter_value = actor.agi
  end
  nw = width - 36
  self.contents.font.color = system_color
  self.contents.draw_text(x, y, nw, WLH, parameter_name)
  self.contents.font.color = normal_color
  self.contents.draw_text(x + nw, y, 36, WLH, parameter_value, 2)
 end
end
Â
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
Â
#==============================================================================
# â–¡ Window_PartyFormControl
#------------------------------------------------------------------------------
#  パーティ編æˆç”»é¢ã§æ“作方法を表示ã™ã‚‹ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã§ã™ã€‚
#==============================================================================
Â
class Window_PartyFormControl < Window_Base
 #--------------------------------------------------------------------------
 # ○ 定数
 #--------------------------------------------------------------------------
 MODE_BATTLE_MEMBER = 0
 MODE_SHIFT_CHANGE  = 1
 MODE_PARTY_MEMBER  = 2
 #--------------------------------------------------------------------------
 # ◠オブジェクトåˆæœŸåŒ–
 #--------------------------------------------------------------------------
 def initialize
  super(0, 0, Graphics.width - 384, 128)
  self.z = 1000
  @mode = MODE_BATTLE_MEMBER
  refresh
 end
 #--------------------------------------------------------------------------
 # ○ モード変更
 #--------------------------------------------------------------------------
 def mode=(value)
  @mode = value
  refresh
 end
 #--------------------------------------------------------------------------
 # ◠リフレッシュ
 #--------------------------------------------------------------------------
 def refresh
  self.contents.clear
  case @mode
  when MODE_BATTLE_MEMBER  # 戦闘メンãƒãƒ¼
   buttons = [
    "A: Switch",
    "C: Standby",
    "X: Return"
   ]
  when MODE_SHIFT_CHANGE  # 並ã³æ›¿ãˆ
   buttons = [
    "C: Select",
    "X: Return"
   ]
  when MODE_PARTY_MEMBER  # パーティメンãƒãƒ¼
   buttons = [
    "X: Return",
    "C: Select"
   ]
  else
   return
  end
Â
  buttons.each_with_index { |c, i|
   self.contents.draw_text(0, WLH * i, width - 32, WLH, c)
  }
 end
end
Â
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
Â
#==============================================================================
# â– Scene_Title
#==============================================================================
Â
class Scene_Title < Scene_Base
 #--------------------------------------------------------------------------
 # â— å„種ゲームオブジェクトã®ä½œæˆ
 #--------------------------------------------------------------------------
 alias create_game_objects_KGC_LargeParty create_game_objects
 def create_game_objects
  create_game_objects_KGC_LargeParty
Â
  if KGC::LargeParty::DEFAULT_PARTYFORM_ENABLED
   $game_switches[KGC::LargeParty::PARTYFORM_SWITCH] = true
   $game_switches[KGC::LargeParty::BATTLE_PARTYFORM_SWITCH] = true
  end
 end
end
Â
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
Â
#==============================================================================
# â– Scene_Map
#==============================================================================
Â
class Scene_Map < Scene_Base
 #--------------------------------------------------------------------------
 # â— ç”»é¢åˆ‡ã‚Šæ›¿ãˆã®å®Ÿè¡Œ
 #--------------------------------------------------------------------------
 alias update_scene_change_KGC_LargeParty update_scene_change
 def update_scene_change
  return if $game_player.moving?   # プレイヤーã®ç§»å‹•ä¸ï¼Ÿ
Â
  if $game_temp.next_scene == :partyform
   call_partyform
   return
  end
Â
  update_scene_change_KGC_LargeParty
 end
 #--------------------------------------------------------------------------
 # â—‹ パーティ編æˆç”»é¢ã¸ã®åˆ‡ã‚Šæ›¿ãˆ
 #--------------------------------------------------------------------------
 def call_partyform
  $game_temp.next_scene = nil
  $scene = Scene_PartyForm.new(0, Scene_PartyForm::HOST_MAP)
 end
end
Â
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
=begin
#==============================================================================
# â– Scene_Menu
#==============================================================================
Â
class Scene_Menu < Scene_Base
 if KGC::LargeParty::USE_MENU_PARTYFORM_COMMAND
 #--------------------------------------------------------------------------
 # ◠コマンドウィンドウã®ä½œæˆ
 #--------------------------------------------------------------------------
 alias create_command_window_KGC_LargeParty create_command_window
 def create_command_window
  create_command_window_KGC_LargeParty
Â
  return if $imported["CustomMenuCommand"]
Â
  @__command_partyform_index =
   @command_window.add_command(Vocab.partyform)
  @command_window.draw_item(@__command_partyform_index,
   $game_party.partyform_enable?)
  if @command_window.oy > 0
   @command_window.oy -= Window_Base::WLH
  end
  @command_window.index = @menu_index
 end
 end
 #--------------------------------------------------------------------------
 # ◠コマンドé¸æŠžã®æ›´æ–°
 #--------------------------------------------------------------------------
 alias update_command_selection_KGC_LargeParty update_command_selection
 def update_command_selection
  current_menu_index = @__command_partyform_index
  call_partyform_flag = false
Â
  if Input.trigger?(Input::C)
   case @command_window.index
   when @__command_partyform_index  # パーティ編æˆ
    call_partyform_flag = true
   end
  # パーティ編æˆãƒœã‚¿ãƒ³æŠ¼ä¸‹
  elsif KGC::LargeParty::MENU_PARTYFORM_BUTTON != nil &&
    Input.trigger?(KGC::LargeParty::MENU_PARTYFORM_BUTTON)
   call_partyform_flag = true
   current_menu_index = @command_window.index if current_menu_index == nil
  end
Â
  # パーティ編æˆç”»é¢ã«ç§»è¡Œ
  if call_partyform_flag
   if $game_party.members.size == 0 || !$game_party.partyform_enable?
    Sound.play_buzzer
    return
   end
   Sound.play_decision
   $scene = Scene_PartyForm.new(current_menu_index)
   return
  end
Â
  update_command_selection_KGC_LargeParty
 end
end
Â
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
=end
#==============================================================================
# â– Scene_Shop
#==============================================================================
Â
unless $imported["HelpExtension"]
class Scene_Shop < Scene_Base
 #--------------------------------------------------------------------------
 # ◠フレーム更新
 #--------------------------------------------------------------------------
 alias udpate_KGC_LargeParty update
 def update
  # スクãƒãƒ¼ãƒ«åˆ¤å®š
  if !@command_window.active &&
    KGC::LargeParty::SHOP_STATUS_SCROLL_BUTTON != nil &&
    Input.press?(KGC::LargeParty::SHOP_STATUS_SCROLL_BUTTON)
   super
   update_menu_background
   update_scroll_status
   return
  else
   @status_window.cursor_rect.empty
  end
Â
  udpate_KGC_LargeParty
 end
 #--------------------------------------------------------------------------
 # â—‹ ステータスウィンドウã®ã‚¹ã‚¯ãƒãƒ¼ãƒ«å‡¦ç†
 #--------------------------------------------------------------------------
 def update_scroll_status
  # ステータスウィンドウã«ã‚«ãƒ¼ã‚½ãƒ«ã‚’表示
  @status_window.cursor_rect.width = @status_window.contents.width
  @status_window.cursor_rect.height = @status_window.height - 32
  @status_window.update
Â
  if Input.press?(Input::UP)
   @status_window.oy = [@status_window.oy - 4, 0].max
  elsif Input.press?(Input::DOWN)
   max_pos = [@status_window.contents.height -
    (@status_window.height - 32), 0].max
   @status_window.oy = [@status_window.oy + 4, max_pos].min
  end
 end
end
end
Â
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
Â
#==============================================================================
# â–¡ Scene_PartyForm
#------------------------------------------------------------------------------
#  パーティ編æˆç”»é¢ã®å‡¦ç†ã‚’è¡Œã†ã‚¯ãƒ©ã‚¹ã§ã™ã€‚
#==============================================================================
Â
class Scene_PartyForm < Scene_Base
 #--------------------------------------------------------------------------
 # ○ 定数
 #--------------------------------------------------------------------------
 CAPTION_OFFSET = 40  # ã‚ャプションウィンドウã®ä½ç½®è£œæ£
 HOST_MENU  = 0    # 呼ã³å‡ºã—å…ƒ : メニュー
 HOST_MAP   = 1    # 呼ã³å‡ºã—å…ƒ : マップ
 HOST_BATTLE = 2    # 呼ã³å‡ºã—å…ƒ : 戦闘
 #--------------------------------------------------------------------------
 # ◠オブジェクトåˆæœŸåŒ–
 #   menu_index : コマンドã®ã‚«ãƒ¼ã‚½ãƒ«åˆæœŸä½ç½®
 #   host_scene : 呼ã³å‡ºã—å…ƒ (0..メニュー  1..マップ  2..戦闘)
 #--------------------------------------------------------------------------
 def initialize(menu_index = 0, host_scene = HOST_MENU)
  @menu_index = menu_index
  @host_scene = host_scene
 end
 #--------------------------------------------------------------------------
 # ◠開始処ç†
 #--------------------------------------------------------------------------
 def start
  super
  create_menu_background
Â
  create_windows
  create_confirm_window
  adjust_window_location
Â
  # ç·¨æˆå‰ã®ãƒ‘ーティをä¿å˜
  @battle_actors = $game_party.battle_members.dup
  @party_actors = $game_party.all_members.dup
 end
 #--------------------------------------------------------------------------
 # â—‹ ウィンドウã®ä½œæˆ
 #--------------------------------------------------------------------------
 def create_windows
  # ç·¨æˆç”¨ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’作æˆ
  @battle_member_window = Window_PartyFormBattleMember.new
  @party_member_window = Window_PartyFormAllMember.new
  @status_window = Window_PartyFormStatus.new
  @status_window.set_actor(@battle_member_window.actor)
Â
  # ãã®ä»–ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’作æˆ
  @battle_member_caption_window =
   Window_PartyFormCaption.new(KGC::LargeParty::BATTLE_MEMBER_CAPTION)
  @party_member_caption_window =
   Window_PartyFormCaption.new(KGC::LargeParty::PARTY_MEMBER_CAPTION)
  @control_window = Window_PartyFormControl.new
 end
 #--------------------------------------------------------------------------
 # â—‹ 確èªã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®ä½œæˆ
 #--------------------------------------------------------------------------
 def create_confirm_window
  commands = KGC::LargeParty::CONFIRM_WINDOW_COMMANDS
  @confirm_window =
   Window_Command.new(KGC::LargeParty::CONFIRM_WINDOW_WIDTH, commands)
  @confirm_window.index = 0
  @confirm_window.x = (Graphics.width - @confirm_window.width) / 2
  @confirm_window.y = (Graphics.height - @confirm_window.height) / 2
  @confirm_window.z = 2000
  @confirm_window.openness = 0
  @confirm_window.active = false
 end
 #--------------------------------------------------------------------------
 # â—‹ ウィンドウã®åº§æ¨™èª¿æ•´
 #--------------------------------------------------------------------------
 def adjust_window_location
  # 基準座標を計算
  base_x = [@battle_member_window.width, @party_member_window.width].max
  base_x = [(Graphics.width - base_x) / 2, 0].max
  base_y = @battle_member_window.height + @party_member_window.height +
   @status_window.height + CAPTION_OFFSET * 2
  base_y = [(Graphics.height - base_y) / 2, 0].max
Â
  # ç·¨æˆç”¨ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®åº§æ¨™ã‚’セット
  @battle_member_window.x = base_x
  @battle_member_window.y = base_y + CAPTION_OFFSET
  @party_member_window.x = base_x
  @party_member_window.y = @battle_member_window.y +
   @battle_member_window.height + CAPTION_OFFSET
  @status_window.x = 0
  @status_window.y = @party_member_window.y + @party_member_window.height
Â
  # ãã®ä»–ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®åº§æ¨™ã‚’セット
  @battle_member_caption_window.x = [base_x - 16, 0].max
  @battle_member_caption_window.y = @battle_member_window.y - CAPTION_OFFSET
  @party_member_caption_window.x = [base_x - 16, 0].max
  @party_member_caption_window.y = @party_member_window.y - CAPTION_OFFSET
  @control_window.x = @status_window.width
  @control_window.y = @status_window.y
 end
 #--------------------------------------------------------------------------
 # ◠終了処ç†
 #--------------------------------------------------------------------------
 def terminate
  super
  dispose_menu_background
  @battle_member_window.dispose
  @party_member_window.dispose
  @status_window.dispose
  @battle_member_caption_window.dispose
  @party_member_caption_window.dispose
  @control_window.dispose
  @confirm_window.dispose
 end
 #--------------------------------------------------------------------------
 # ◠メニュー画é¢ç³»ã®èƒŒæ™¯ä½œæˆ
 #--------------------------------------------------------------------------
 def create_menu_background
  super
  @menuback_sprite.z = 500
 end
 #--------------------------------------------------------------------------
 # â— å…ƒã®ç”»é¢ã¸æˆ»ã‚‹
 #--------------------------------------------------------------------------
 def return_scene
  case @host_scene
  when HOST_MENU
   $scene = Scene_Menu.new(@menu_index)
  when HOST_MAP
   $scene = Scene_Map.new
  when HOST_BATTLE
   $scene = Scene_Battle.new
  end
  $game_player.refresh
 end
 #--------------------------------------------------------------------------
 # ◠フレーム更新
 #--------------------------------------------------------------------------
 def update
  super
  update_menu_background
  update_window
  if @battle_member_window.active
   update_battle_member
  elsif @party_member_window.active
   update_party_member
  elsif @confirm_window.active
   update_confirm
  end
 end
 #--------------------------------------------------------------------------
 # ○ ウィンドウ更新
 #--------------------------------------------------------------------------
 def update_window
  @battle_member_window.update
  @party_member_window.update
  @status_window.update
  @battle_member_caption_window.update
  @party_member_caption_window.update
  @control_window.update
  @confirm_window.update
 end
 #--------------------------------------------------------------------------
 # â—‹ ウィンドウå†æç”»
 #--------------------------------------------------------------------------
 def refresh_window
  @battle_member_window.refresh
  @party_member_window.refresh
 end
 #--------------------------------------------------------------------------
 # â—‹ フレーム更新 (戦闘メンãƒãƒ¼ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãŒã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã®å ´åˆ)
 #--------------------------------------------------------------------------
 def update_battle_member
  @status_window.set_actor(@battle_member_window.actor)
  if Input.trigger?(Input::A)
   if @battle_member_window.selected_index == nil  # 並ã³æ›¿ãˆä¸ã§ãªã„
    actor = @battle_member_window.actor
    # アクターを外ã›ãªã„å ´åˆ
    if actor == nil || $game_party.actor_fixed?(actor.id)
     Sound.play_buzzer
     return
    end
    # アクターを外ã™
    Sound.play_decision
    actors = $game_party.battle_members
    actors.delete_at(@battle_member_window.index)
    $game_party.set_battle_member(actors)
    refresh_window
   end
  elsif Input.trigger?(Input::B)
   if @battle_member_window.selected_index == nil  # 並ã³æ›¿ãˆä¸ã§ãªã„
    # 確èªã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã«åˆ‡ã‚Šæ›¿ãˆ
    Sound.play_cancel
    show_confirm_window
   else                       # 並ã³æ›¿ãˆä¸
    # 並ã³æ›¿ãˆè§£é™¤
    Sound.play_cancel
    @battle_member_window.selected_index = nil
    @battle_member_window.refresh
    @control_window.mode = Window_PartyFormControl::MODE_BATTLE_MEMBER
   end
  elsif Input.trigger?(Input::C)
   if @battle_member_window.selected_index == nil  # 並ã³æ›¿ãˆä¸ã§ãªã„
    actor = @battle_member_window.actor
    # アクターを外ã›ãªã„å ´åˆ
    if actor != nil && $game_party.actor_fixed?(actor.id)
     Sound.play_buzzer
     return
    end
    # パーティメンãƒãƒ¼ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã«åˆ‡ã‚Šæ›¿ãˆ
    Sound.play_decision
    @battle_member_window.active = false
    @party_member_window.active = true
    @control_window.mode = Window_PartyFormControl::MODE_PARTY_MEMBER
   else                       # 並ã³æ›¿ãˆä¸
    unless can_change_shift?(@battle_member_window.actor)
     Sound.play_buzzer
     return
    end
    # 並ã³æ›¿ãˆå®Ÿè¡Œ
    Sound.play_decision
    index1 = @battle_member_window.selected_index
    index2 = @battle_member_window.index
    change_shift(index1, index2)
    @control_window.mode = Window_PartyFormControl::MODE_BATTLE_MEMBER
   end
  elsif Input.trigger?(Input::X)
   # 並ã³æ›¿ãˆä¸å¯èƒ½ãªå ´åˆ
   unless can_change_shift?(@battle_member_window.actor)
    Sound.play_buzzer
    return
   end
   if @battle_member_window.selected_index == nil  # 並ã³æ›¿ãˆä¸ã§ãªã„
    # 並ã³æ›¿ãˆé–‹å§‹
    Sound.play_decision
    @battle_member_window.selected_index = @battle_member_window.index
    @battle_member_window.refresh
    @control_window.mode = Window_PartyFormControl::MODE_SHIFT_CHANGE
   else                       # 並ã³æ›¿ãˆä¸
    # 並ã³æ›¿ãˆå®Ÿè¡Œ
    Sound.play_decision
    index1 = @battle_member_window.selected_index
    index2 = @battle_member_window.index
    change_shift(index1, index2)
    @control_window.mode = Window_PartyFormControl::MODE_BATTLE_MEMBER
   end
  end
 end
 #--------------------------------------------------------------------------
 # â—‹ 並ã³æ›¿ãˆå¯å¦åˆ¤å®š
 #--------------------------------------------------------------------------
 def can_change_shift?(actor)
  # é¸æŠžã—ãŸã‚¢ã‚¯ã‚¿ãƒ¼ãŒå˜åœ¨ã—ãªã„ã€ã¾ãŸã¯ä¸¦ã³æ›¿ãˆä¸èƒ½ãªå ´åˆ
  if actor == nil ||
    (KGC::LargeParty::FORBID_CHANGE_SHIFT_FIXED &&
     $game_party.actor_fixed?(actor.id))
   return false
  end
  return true
 end
 #--------------------------------------------------------------------------
 # â—‹ 並ã³æ›¿ãˆ
 #--------------------------------------------------------------------------
 def change_shift(index1, index2)
  # ä½ç½®ã‚’入れ替ãˆ
  $game_party.change_shift(index1, index2)
  # é¸æŠžæ¸ˆã¿ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’クリア
  @battle_member_window.selected_index = nil
  refresh_window
 end
 #--------------------------------------------------------------------------
 # â—‹ フレーム更新 (パーティウィンドウãŒã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã®å ´åˆ)
 #--------------------------------------------------------------------------
 def update_party_member
  @status_window.set_actor(@party_member_window.actor)
  if Input.trigger?(Input::B)
   Sound.play_cancel
   # 戦闘メンãƒãƒ¼ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã«åˆ‡ã‚Šæ›¿ãˆ
   @battle_member_window.active = true
   @party_member_window.active = false
    @control_window.mode = Window_PartyFormControl::MODE_BATTLE_MEMBER
  elsif Input.trigger?(Input::C)
   actor = @party_member_window.actor
   # アクターãŒæˆ¦é—˜ãƒ¡ãƒ³ãƒãƒ¼ã«å«ã¾ã‚Œã‚‹å ´åˆ
   if $game_party.battle_members.include?(actor)
    Sound.play_buzzer
    return
   end
   # アクターを入れ替ãˆ
   Sound.play_decision
   actors = $game_party.all_members
   battle_actors = $game_party.battle_members
   if @battle_member_window.actor != nil
    actors[@party_member_window.actor_index] = @battle_member_window.actor
    actors[@battle_member_window.index] = actor
    $game_party.set_member(actors.compact)
   end
   battle_actors[@battle_member_window.index] = actor
   $game_party.set_battle_member(battle_actors.compact)
   refresh_window
   # 戦闘メンãƒãƒ¼ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã«åˆ‡ã‚Šæ›¿ãˆ
   @battle_member_window.active = true
   @party_member_window.active = false
   @control_window.mode = Window_PartyFormControl::MODE_BATTLE_MEMBER
  end
 end
 #--------------------------------------------------------------------------
 # â—‹ フレーム更新 (確èªã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãŒã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã®å ´åˆ)
 #--------------------------------------------------------------------------
 def update_confirm
  if Input.trigger?(Input::B)
   Sound.play_cancel
   hide_confirm_window
  elsif Input.trigger?(Input::C)
   case @confirm_window.index
   when 0  # ç·¨æˆå®Œäº†
    # パーティãŒç„¡åŠ¹ã®å ´åˆ
    unless battle_member_valid?
     Sound.play_buzzer
     return
    end
    Sound.play_decision
    return_scene
   when 1  # ç·¨æˆä¸æ–
    Sound.play_decision
    # パーティを編æˆå‰ã®çŠ¶æ…‹ã«æˆ»ã™
    $game_party.set_member(@party_actors)
    $game_party.set_battle_member(@battle_actors)
    return_scene
   when 2  # ã‚ャンセル
    Sound.play_cancel
    hide_confirm_window
   end
  end
 end
 #--------------------------------------------------------------------------
 # â—‹ 戦闘メンãƒãƒ¼æœ‰åŠ¹åˆ¤å®š
 #--------------------------------------------------------------------------
 def battle_member_valid?
  return false if $game_party.battle_members.size == 0  # 戦闘メンãƒãƒ¼ãŒç©º
  $game_party.battle_members.each { |actor|
   return true if actor.exist?  # 生å˜è€…ãŒã„ã‚Œã°OK
  }
  return false
 end
 #--------------------------------------------------------------------------
 # â—‹ 確èªã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®è¡¨ç¤º
 #--------------------------------------------------------------------------
 def show_confirm_window
  if @battle_member_window.active
   @last_active_window = @battle_member_window
  else
   @last_active_window = @party_member_window
  end
  @battle_member_window.active = false
  @party_member_window.active = false
Â
  @confirm_window.draw_item(0, battle_member_valid?)
  @confirm_window.open
  @confirm_window.active = true
 end
 #--------------------------------------------------------------------------
 # â—‹ 確èªã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®éžè¡¨ç¤º
 #--------------------------------------------------------------------------
 def hide_confirm_window
  @confirm_window.active = false
  @confirm_window.close
  @last_active_window.active = true
 end
end
Â
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
Â
#==============================================================================
# â– Scene_Battle
#==============================================================================
Â
class Scene_Battle < Scene_Base
 #--------------------------------------------------------------------------
 # ◠メッセージ表示ãŒçµ‚ã‚ã‚‹ã¾ã§ã‚¦ã‚§ã‚¤ãƒˆ
 #--------------------------------------------------------------------------
 alias wait_for_message_KGC_LargeParty wait_for_message
 def wait_for_message
  return if @ignore_wait_for_message  # メッセージ終了ã¾ã§ã®ã‚¦ã‚§ã‚¤ãƒˆã‚’無視
Â
  wait_for_message_KGC_LargeParty
 end
 #--------------------------------------------------------------------------
 # ◠レベルアップã®è¡¨ç¤º
 #--------------------------------------------------------------------------
 alias display_level_up_KGC_LargeParty display_level_up
 def display_level_up
  @ignore_wait_for_message = true
Â
  display_level_up_KGC_LargeParty
Â
  exp = $game_troop.exp_total * KGC::LargeParty::STAND_BY_EXP_RATE / 1000
  $game_party.stand_by_members.each { |actor|
   if actor.exist?
    actor.gain_exp(exp, KGC::LargeParty::SHOW_STAND_BY_LEVEL_UP)
   end
  }
  @ignore_wait_for_message = false
  wait_for_message
 end
 #--------------------------------------------------------------------------
 # ◠パーティコマンドé¸æŠžã®é–‹å§‹
 #--------------------------------------------------------------------------
 alias start_party_command_selection_KGC_LargeParty start_party_command_selection
 def start_party_command_selection
  if $game_temp.in_battle
   @status_window.index = 0
  end
Â
  start_party_command_selection_KGC_LargeParty
 end
Â
 if KGC::LargeParty::USE_BATTLE_PARTYFORM
 #--------------------------------------------------------------------------
 # â— æƒ…å ±è¡¨ç¤ºãƒ“ãƒ¥ãƒ¼ãƒãƒ¼ãƒˆã®ä½œæˆ
 #--------------------------------------------------------------------------
 alias create_info_viewport_KGC_LargeParty create_info_viewport
 def create_info_viewport
  create_info_viewport_KGC_LargeParty
Â
  @__command_partyform_index =
   @party_command_window.add_command(Vocab.partyform_battle)
  @party_command_window.draw_item(@__command_partyform_index,
   $game_party.battle_partyform_enable?)
 end
 #--------------------------------------------------------------------------
 # ◠パーティコマンドé¸æŠžã®æ›´æ–°
 #--------------------------------------------------------------------------
 alias update_party_command_selection_KGC_LargeParty update_party_command_selection
 def update_party_command_selection
  if Input.trigger?(Input::C)
   case @party_command_window.index
   when @__command_partyform_index  # パーティ編æˆ
    unless $game_party.battle_partyform_enable?
     Sound.play_buzzer
     return
    end
    Sound.play_decision
    process_partyform
    return
   end
  end
Â
  update_party_command_selection_KGC_LargeParty
 end
 #--------------------------------------------------------------------------
 # â—‹ パーティ編æˆã®å‡¦ç†
 #--------------------------------------------------------------------------
 def process_partyform
  Graphics.freeze
  snapshot_for_background
  $scene = Scene_PartyForm.new(0, Scene_PartyForm::HOST_BATTLE)
  $scene.main
  $scene = self
  @status_window.refresh
  perform_transition
 end
 end
end
Â
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_
#_/ Â The original untranslated version of this script can be found here:
# http://f44.aaa.livedoor.jp/~ytomy/tkool ... arge_party
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_
and the Ring Menu script
#==============================================================================
# ** Ring Menu
#-------------------------------------------------------------------------------
# by Syvkal
# Version 1.1
# 06-23-08
#==============================================================================
Â
  #===================================================#
  #  **  C O N F I G U R A T I O N  S Y S T E M  **  #
  #===================================================#
Â
 # Amount of frames for Startup Animation
 STARTUP_FRAMES = 20
 # Amount of frames for Movement Animation
 MOVING_FRAMES = 15
 # Radius of the Menu Ring
 RING_R = 75
 # Disabled icon to display when disabled
 ICON_DISABLE= Cache::picture('Icon_Disable')
Â
Â
  #-------------D-O---N-O-T---T-O-U-C-H---------------#
 Â
 class Scene_Title < Scene_Base
  alias game_objects_original create_game_objects
  def create_game_objects
   game_objects_original
 Â
  #-------------D-O---N-O-T---T-O-U-C-H---------------#
Â
 # As this script allows you to make a custom Menu I thought to make it easier
 # I would make it possible to add extra Menu Options from here
Â
 # All you need to do is specify the Text to display, the icon and the command
 # The command must be in a STRING
 # Simply add to the array below :
Â
 $game_ring_menu = [
Â
  # Menu Option 0  eg. Item
  [Vocab::item, Cache::picture('Icon_Items'), "$scene = Scene_Item.new"],
 Â
  # Menu Option 1  eg. Skill
  [Vocab::skill, Cache::picture('Icon_Skills'), "start_actor_selection",
   "$scene = Scene_Skill.new(@status_window.index)"],
 Â
  # Menu Option 2  eg. Equip
  [Vocab::equip, Cache::picture('Icon_Equip'), "start_actor_selection",
   "$scene = Scene_Equip.new(@status_window.index)"],
 Â
  # Menu Option 3  eg. Status
  [Vocab::status, Cache::picture('Icon_Status'), "start_actor_selection",
   "$scene = Scene_Status.new(@status_window.index)"],
 Â
  #---------------------------------------------------#
  #  **    I N S E R T  M O R E  H E R E    **  #
  #---------------------------------------------------#
 Â
  # Preferably Insert your custom Menu Options Here
  # Otherwise the existing Menu Options will return to wrong point on the Menu
 Â
  # Menu Option 4  eg. Save
  ["Save Game", Cache::picture('Icon_Save'), "$scene = Scene_File.new(true, false, false)"],
 Â
  # Menu Option 5 eg. Monsterbook
  ["Monsterbook", Cache::picture('Monsterbook'), "$scene = Scene_MonsterBook.new"],
 Â
  # Menu Option 6 eg. Party Changer/Switcher
  ["Party Switcher", Cache::picture('Icon_Load'), "$game_switches[KGC::LargeParty::PARTYFORM_SWITCH] = true"],
 Â
  # Menu Option 6  eg. Load
  ["Load Game", Cache::picture('Icon_Load'), "$scene = Scene_File.new(false, false, false)"],
 Â
  # Menu Option 7  eg. End Game
  [Vocab::game_end, Cache::picture('Icon_End'), "$scene = Scene_End.new"]
 Â
  ] # <--- Do no Delete This
 Â
  #===================================================#
  #  **   E N D  C O N F I G U R A T I Of N   **  #
  #===================================================#
 end
end
#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
# Â Edited to add Ring Menu
#==============================================================================
Â
class Scene_Menu < Scene_Base
 #--------------------------------------------------------------------------
 # * Alias Listings
 #--------------------------------------------------------------------------
 alias initialize_original initialize
 alias start_selection_original start_actor_selection
 alias end_selection_original end_actor_selection
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 def initialize(menu_index = 0, move = true)
  @move = move
  initialize_original(menu_index)
 end
 #--------------------------------------------------------------------------
 # * Start processing
 #--------------------------------------------------------------------------
 def start
  super
  create_menu_background
  create_command_window
  @gold_window = Window_Gold.new(0, 360)
  @location_window = Window_location.new(0, 0)
 end
 #--------------------------------------------------------------------------
 # * Termination Processing
 #--------------------------------------------------------------------------
 def terminate
  super
  dispose_menu_background
  @command_window.dispose
  @gold_window.dispose
  @status_window.dispose if @status_window
  @location_window.dispose
 end
 #--------------------------------------------------------------------------
 # * Frame Update
 #--------------------------------------------------------------------------
 def update
  super
  update_menu_background
  @command_window.update
  @gold_window.update
  @status_window.update if @status_window
  @location_window.update
  if @command_window.active
   update_command_selection
  elsif @status_window.active
   update_actor_selection
  end
 end
 #--------------------------------------------------------------------------
 # * Create Command Window
 #--------------------------------------------------------------------------
 def create_command_window
  commands = []
  for i in 0...$game_ring_menu.size
   commands.push($game_ring_menu[0])
  end
  icons = []
  for i in 0...$game_ring_menu.size
   icons.push($game_ring_menu[1])
  end
  @command_window = Window_RingMenu.new(232, 164, commands, icons, @move, @menu_index)
  if $game_party.members.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
 end
 #--------------------------------------------------------------------------
 # * Create Command Window
 #--------------------------------------------------------------------------
 def create_status_window
  names = []
  chars = []
  for i in 0...$game_party.members.size
   names = $game_party.members.name
   chars = $game_party.members
  end
  @status_window = Window_RingMenu.new(255, 200, names, chars, true, $game_party.last_actor_index, true)
 end
 #--------------------------------------------------------------------------
 # * Update Command Selection
 #--------------------------------------------------------------------------
 def update_command_selection
  if Input.trigger?(Input::B)
   Sound.play_cancel
   $scene = Scene_Map.new
  elsif Input.trigger?(Input::C)
   if $game_party.members.size == 0 and @command_window.index < 4
    Sound.play_buzzer
    return
   elsif $game_system.save_disabled and @command_window.index == 4
    Sound.play_buzzer
    return
   end
   Sound.play_decision
   eval($game_ring_menu[@command_window.index][2])
  end
 end
 #--------------------------------------------------------------------------
 # * Start Actor Selection
 #--------------------------------------------------------------------------
 def start_actor_selection
  @command_window.active = false
  @command_window.visible = false
  create_status_window
  if $game_party.last_actor_index < @status_window.item_max
   @status_window.index = $game_party.last_actor_index
  else
   @status_window.index = 0
  end
 end
 #--------------------------------------------------------------------------
 # * End Actor Selection
 #--------------------------------------------------------------------------
 def end_actor_selection
  @command_window.active = true
  @command_window.visible = true
  @status_window.dispose if @status_window
  @status_window = nil
 end
 #--------------------------------------------------------------------------
 # * Update Actor Selection
 #--------------------------------------------------------------------------
 def update_actor_selection
  if Input.trigger?(Input::B)
   Sound.play_cancel
   end_actor_selection
  elsif Input.trigger?(Input::C)
   $game_party.last_actor_index = @status_window.index
   Sound.play_decision
   eval($game_ring_menu[@command_window.index][3])
  end
 end
end
Â
#==============================================================================
# ** Scene_File
#------------------------------------------------------------------------------
# Â Edited to return to the menu properly when loading
#==============================================================================
Â
class Scene_File
 alias return_scene_original return_scene
 def return_scene
  if @from_title
   $scene = Scene_Title.new
  elsif @from_event
   $scene = Scene_Map.new
  else
   if @saving
    $scene = Scene_Menu.new($game_ring_menu.size - 3)
   else
    $scene = Scene_Menu.new($game_ring_menu.size - 2)
   end
  end
 end
end
Â
#==============================================================================
# ** Scene_End
#------------------------------------------------------------------------------
# Â Edited to return to the menu properly due to loading being added
#==============================================================================
Â
class Scene_End
 alias return_scene_original return_scene
 def return_scene
  $scene = Scene_Menu.new($game_ring_menu.size - 1)
 end
end
Â
#==============================================================================
# ** Window_Location
#------------------------------------------------------------------------------
# Â This class shows the current map name.
#==============================================================================
Â
class Window_location < Window_Base
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 def initialize(x, y)
  super(x, y, 160, (WLH*2) + 32)
  self.contents = Bitmap.new(width - 32, height - 32)
  refresh
 end
 #--------------------------------------------------------------------------
 # * Refresh
 #--------------------------------------------------------------------------
 def refresh
  self.contents.clear
  $maps = load_data("Data/MapInfos.rvdata")
  @map_id = $game_map.map_id
  @currmap = $maps[@map_id].name
  self.contents.font.color = system_color
  self.contents.draw_text(0, -4, 128, 32, "Location :")
  self.contents.font.color = normal_color
  self.contents.draw_text(0, -4+WLH, 128, 32, @currmap, 1)
 end
end
Â
#==============================================================================
# ** Window_RingMenu
#------------------------------------------------------------------------------
# Â This Window creates a Ring Menu system
#==============================================================================
Â
class Window_RingMenu < Window_Base Â
 #--------------------------------------------------------------------------
 # * Public Instance Variables
 #--------------------------------------------------------------------------
 attr_accessor :index
 attr_reader  :item_max
 #--------------------------------------------------------------------------
 # * Refresh Setup
 #--------------------------------------------------------------------------
 START = 1
 WAIT  = 2
 MOVER = 3
 MOVEL = 4
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 def initialize(center_x, center_y, commands, items, move = true, index = 0, character = false)
  super(0, 0, 544, 416)
  self.contents = Bitmap.new(width-32, height-32)
  self.opacity = 0
  @move = move
  @char = character
  @startup = STARTUP_FRAMES
  @commands = commands
  @item_max = commands.size
  @index = index
  @items = items
  @disabled = []
  for i in 0...commands.size-1
   @disabled = false
  end
  @cx = center_x
  @cy = center_y
  start_setup
  refresh
 end
 #--------------------------------------------------------------------------
 # * Start Setup
 #--------------------------------------------------------------------------
 def start_setup
  @mode = START
  @steps = @startup
 end
 #--------------------------------------------------------------------------
 # * Disable index
 #   index : item number
 #--------------------------------------------------------------------------
 def disable_item(index)
  @disabled[index] = true
 end
 #--------------------------------------------------------------------------
 # * Determines if is moving
 #--------------------------------------------------------------------------
 def animation?
  return @mode != WAIT
 end
 #--------------------------------------------------------------------------
 # * Determine if cursor is moveable
 #--------------------------------------------------------------------------
 def cursor_movable?
  return false if (not visible or not active)
  return false if (@opening or @closing)
  return false if animation?
  return true
 end
 #--------------------------------------------------------------------------
 # * Move cursor right
 #--------------------------------------------------------------------------
 def cursor_right
  @index -= 1
  @index = @items.size - 1 if @index < 0
  @mode = MOVER
  @steps = MOVING_FRAMES
 end
 #--------------------------------------------------------------------------
 # * Move cursor left
 #--------------------------------------------------------------------------
 def cursor_left
  @index += 1
  @index = 0 if @index >= @items.size
  @mode = MOVEL
  @steps = MOVING_FRAMES
 end
 #--------------------------------------------------------------------------
 # * Frame Update
 #--------------------------------------------------------------------------
 def update
  super
  if self.active
   if cursor_movable?
    last_index = @index
    if Input.repeat?(Input::DOWN) or Input.repeat?(Input::RIGHT)
     cursor_right
    end
    if Input.repeat?(Input::UP) or Input.repeat?(Input::LEFT)
     cursor_left
    end
    if @index != last_index
     Sound.play_cursor
    end
   end
   refresh
  end
 end
 #--------------------------------------------------------------------------
 # * Refresh
 #--------------------------------------------------------------------------
 def refresh  Â
  self.contents.clear
  case @mode
  when START
   refresh_start
  when WAIT
   refresh_wait
  when MOVER
   refresh_move(1)
  when MOVEL
   refresh_move(0)
  end
  rect = Rect.new(18, 196, self.contents.width-32, 32)
  self.contents.draw_text(rect, @commands[@index], 1)
 end
 #--------------------------------------------------------------------------
 # * Refresh Start Period
 #--------------------------------------------------------------------------
 def refresh_start
  d1 = 2.0 * Math::PI / @item_max
  d2 = 1.0 * Math::PI / @startup
  for i in 0...@item_max
   j = i - @index
   if @move
    r = RING_R - 1.0 * RING_R * @steps / @startup
    d = d1 * j + d2 * @steps
   else
    r = RING_R
    d = d1 * j
   end
   x = @cx + ( r * Math.sin( d ) ).to_i
   y = @cy - ( r * Math.cos( d ) ).to_i
   draw_item(x, y, i)
  end
  @steps -= 1
  if @steps < 1
   @mode = WAIT
  end
 end
 #--------------------------------------------------------------------------
 # * Refresh Wait Period
 #--------------------------------------------------------------------------
 def refresh_wait
  d = 2.0 * Math::PI / @item_max
  for i in 0...@item_max
   j = i - @index
   x = @cx + ( RING_R * Math.sin( d * j ) ).to_i
   y = @cy - ( RING_R * Math.cos( d * j ) ).to_i
   draw_item(x, y, i)
  end
 end
 #--------------------------------------------------------------------------
 # * Refresh Movement Period
 #--------------------------------------------------------------------------
 def refresh_move( mode )
  d1 = 2.0 * Math::PI / @item_max
  d2 = d1 / MOVING_FRAMES
  d2 *= -1 if mode != 0
  for i in 0...@item_max
   j = i - @index
   d = d1 * j + d2 * @steps
   x = @cx + ( RING_R * Math.sin( d ) ).to_i
   y = @cy - ( RING_R * Math.cos( d ) ).to_i
   draw_item(x, y, i)
  end
  @steps -= 1
  if @steps < 1
   @mode = WAIT
  end
 end
 #--------------------------------------------------------------------------
 # * Draw Item
 #   x   : draw spot x-coordinate
 #   y   : draw spot y-coordinate
 #   index : item number
 #--------------------------------------------------------------------------
 def draw_item(x, y, index)
  if @char
   if @index == index
    draw_character(@items[index].character_name, @items[index].character_index , x, y)
    if @mode == WAIT
     draw_actor_hp_ring(@items[index], @cx, @cy-16, 50, 6, 84, 270, true)
     draw_actor_mp_ring(@items[index], @cx, @cy-16, 50, 6, 84, 180, false)
     draw_actor_exp_ring(@items[index], @cx, @cy-16, 50, 6, 155, 12, false)
    end
   else
    draw_character(@items[index].character_name, @items[index].character_index , x, y, false)
   end
  else
   rect = Rect.new(0, 0, @items[index].width, @items[index].height)
   if @index == index
    self.contents.blt( x, y, @items[index], rect )
    if @disabled[@index]
     self.contents.blt( x, y, ICON_DISABLE, rect )
    end
   else
    self.contents.blt( x, y, @items[index], rect, 128 )
   end
  end
 end
end
Â
#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
# Â Edited to allow disabled character icons
#==============================================================================
Â
class Window_Base < Window
 #--------------------------------------------------------------------------
 # * Draw Character Graphic
 #--------------------------------------------------------------------------
 def draw_character(character_name, character_index, x, y, enabled = true)
  return if character_name == nil
  bitmap = Cache.character(character_name)
  sign = character_name[/^[\!\$]./]
  if sign != nil and sign.include?('$')
   cw = bitmap.width / 3
   ch = bitmap.height / 4
  else
   cw = bitmap.width / 12
   ch = bitmap.height / 8
  end
  n = character_index
  src_rect = Rect.new((n%4*3+1)*cw, (n/4*4)*ch, cw, ch)
  self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect, enabled ? 255 : 128)
 end
end
# ** Ring Menu
#-------------------------------------------------------------------------------
# by Syvkal
# Version 1.1
# 06-23-08
#==============================================================================
Â
  #===================================================#
  #  **  C O N F I G U R A T I O N  S Y S T E M  **  #
  #===================================================#
Â
 # Amount of frames for Startup Animation
 STARTUP_FRAMES = 20
 # Amount of frames for Movement Animation
 MOVING_FRAMES = 15
 # Radius of the Menu Ring
 RING_R = 75
 # Disabled icon to display when disabled
 ICON_DISABLE= Cache::picture('Icon_Disable')
Â
Â
  #-------------D-O---N-O-T---T-O-U-C-H---------------#
 Â
 class Scene_Title < Scene_Base
  alias game_objects_original create_game_objects
  def create_game_objects
   game_objects_original
 Â
  #-------------D-O---N-O-T---T-O-U-C-H---------------#
Â
 # As this script allows you to make a custom Menu I thought to make it easier
 # I would make it possible to add extra Menu Options from here
Â
 # All you need to do is specify the Text to display, the icon and the command
 # The command must be in a STRING
 # Simply add to the array below :
Â
 $game_ring_menu = [
Â
  # Menu Option 0  eg. Item
  [Vocab::item, Cache::picture('Icon_Items'), "$scene = Scene_Item.new"],
 Â
  # Menu Option 1  eg. Skill
  [Vocab::skill, Cache::picture('Icon_Skills'), "start_actor_selection",
   "$scene = Scene_Skill.new(@status_window.index)"],
 Â
  # Menu Option 2  eg. Equip
  [Vocab::equip, Cache::picture('Icon_Equip'), "start_actor_selection",
   "$scene = Scene_Equip.new(@status_window.index)"],
 Â
  # Menu Option 3  eg. Status
  [Vocab::status, Cache::picture('Icon_Status'), "start_actor_selection",
   "$scene = Scene_Status.new(@status_window.index)"],
 Â
  #---------------------------------------------------#
  #  **    I N S E R T  M O R E  H E R E    **  #
  #---------------------------------------------------#
 Â
  # Preferably Insert your custom Menu Options Here
  # Otherwise the existing Menu Options will return to wrong point on the Menu
 Â
  # Menu Option 4  eg. Save
  ["Save Game", Cache::picture('Icon_Save'), "$scene = Scene_File.new(true, false, false)"],
 Â
  # Menu Option 5 eg. Monsterbook
  ["Monsterbook", Cache::picture('Monsterbook'), "$scene = Scene_MonsterBook.new"],
 Â
  # Menu Option 6 eg. Party Changer/Switcher
  ["Party Switcher", Cache::picture('Icon_Load'), "$game_switches[KGC::LargeParty::PARTYFORM_SWITCH] = true"],
 Â
  # Menu Option 6  eg. Load
  ["Load Game", Cache::picture('Icon_Load'), "$scene = Scene_File.new(false, false, false)"],
 Â
  # Menu Option 7  eg. End Game
  [Vocab::game_end, Cache::picture('Icon_End'), "$scene = Scene_End.new"]
 Â
  ] # <--- Do no Delete This
 Â
  #===================================================#
  #  **   E N D  C O N F I G U R A T I Of N   **  #
  #===================================================#
 end
end
#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
# Â Edited to add Ring Menu
#==============================================================================
Â
class Scene_Menu < Scene_Base
 #--------------------------------------------------------------------------
 # * Alias Listings
 #--------------------------------------------------------------------------
 alias initialize_original initialize
 alias start_selection_original start_actor_selection
 alias end_selection_original end_actor_selection
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 def initialize(menu_index = 0, move = true)
  @move = move
  initialize_original(menu_index)
 end
 #--------------------------------------------------------------------------
 # * Start processing
 #--------------------------------------------------------------------------
 def start
  super
  create_menu_background
  create_command_window
  @gold_window = Window_Gold.new(0, 360)
  @location_window = Window_location.new(0, 0)
 end
 #--------------------------------------------------------------------------
 # * Termination Processing
 #--------------------------------------------------------------------------
 def terminate
  super
  dispose_menu_background
  @command_window.dispose
  @gold_window.dispose
  @status_window.dispose if @status_window
  @location_window.dispose
 end
 #--------------------------------------------------------------------------
 # * Frame Update
 #--------------------------------------------------------------------------
 def update
  super
  update_menu_background
  @command_window.update
  @gold_window.update
  @status_window.update if @status_window
  @location_window.update
  if @command_window.active
   update_command_selection
  elsif @status_window.active
   update_actor_selection
  end
 end
 #--------------------------------------------------------------------------
 # * Create Command Window
 #--------------------------------------------------------------------------
 def create_command_window
  commands = []
  for i in 0...$game_ring_menu.size
   commands.push($game_ring_menu[0])
  end
  icons = []
  for i in 0...$game_ring_menu.size
   icons.push($game_ring_menu[1])
  end
  @command_window = Window_RingMenu.new(232, 164, commands, icons, @move, @menu_index)
  if $game_party.members.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
 end
 #--------------------------------------------------------------------------
 # * Create Command Window
 #--------------------------------------------------------------------------
 def create_status_window
  names = []
  chars = []
  for i in 0...$game_party.members.size
   names = $game_party.members.name
   chars = $game_party.members
  end
  @status_window = Window_RingMenu.new(255, 200, names, chars, true, $game_party.last_actor_index, true)
 end
 #--------------------------------------------------------------------------
 # * Update Command Selection
 #--------------------------------------------------------------------------
 def update_command_selection
  if Input.trigger?(Input::B)
   Sound.play_cancel
   $scene = Scene_Map.new
  elsif Input.trigger?(Input::C)
   if $game_party.members.size == 0 and @command_window.index < 4
    Sound.play_buzzer
    return
   elsif $game_system.save_disabled and @command_window.index == 4
    Sound.play_buzzer
    return
   end
   Sound.play_decision
   eval($game_ring_menu[@command_window.index][2])
  end
 end
 #--------------------------------------------------------------------------
 # * Start Actor Selection
 #--------------------------------------------------------------------------
 def start_actor_selection
  @command_window.active = false
  @command_window.visible = false
  create_status_window
  if $game_party.last_actor_index < @status_window.item_max
   @status_window.index = $game_party.last_actor_index
  else
   @status_window.index = 0
  end
 end
 #--------------------------------------------------------------------------
 # * End Actor Selection
 #--------------------------------------------------------------------------
 def end_actor_selection
  @command_window.active = true
  @command_window.visible = true
  @status_window.dispose if @status_window
  @status_window = nil
 end
 #--------------------------------------------------------------------------
 # * Update Actor Selection
 #--------------------------------------------------------------------------
 def update_actor_selection
  if Input.trigger?(Input::B)
   Sound.play_cancel
   end_actor_selection
  elsif Input.trigger?(Input::C)
   $game_party.last_actor_index = @status_window.index
   Sound.play_decision
   eval($game_ring_menu[@command_window.index][3])
  end
 end
end
Â
#==============================================================================
# ** Scene_File
#------------------------------------------------------------------------------
# Â Edited to return to the menu properly when loading
#==============================================================================
Â
class Scene_File
 alias return_scene_original return_scene
 def return_scene
  if @from_title
   $scene = Scene_Title.new
  elsif @from_event
   $scene = Scene_Map.new
  else
   if @saving
    $scene = Scene_Menu.new($game_ring_menu.size - 3)
   else
    $scene = Scene_Menu.new($game_ring_menu.size - 2)
   end
  end
 end
end
Â
#==============================================================================
# ** Scene_End
#------------------------------------------------------------------------------
# Â Edited to return to the menu properly due to loading being added
#==============================================================================
Â
class Scene_End
 alias return_scene_original return_scene
 def return_scene
  $scene = Scene_Menu.new($game_ring_menu.size - 1)
 end
end
Â
#==============================================================================
# ** Window_Location
#------------------------------------------------------------------------------
# Â This class shows the current map name.
#==============================================================================
Â
class Window_location < Window_Base
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 def initialize(x, y)
  super(x, y, 160, (WLH*2) + 32)
  self.contents = Bitmap.new(width - 32, height - 32)
  refresh
 end
 #--------------------------------------------------------------------------
 # * Refresh
 #--------------------------------------------------------------------------
 def refresh
  self.contents.clear
  $maps = load_data("Data/MapInfos.rvdata")
  @map_id = $game_map.map_id
  @currmap = $maps[@map_id].name
  self.contents.font.color = system_color
  self.contents.draw_text(0, -4, 128, 32, "Location :")
  self.contents.font.color = normal_color
  self.contents.draw_text(0, -4+WLH, 128, 32, @currmap, 1)
 end
end
Â
#==============================================================================
# ** Window_RingMenu
#------------------------------------------------------------------------------
# Â This Window creates a Ring Menu system
#==============================================================================
Â
class Window_RingMenu < Window_Base Â
 #--------------------------------------------------------------------------
 # * Public Instance Variables
 #--------------------------------------------------------------------------
 attr_accessor :index
 attr_reader  :item_max
 #--------------------------------------------------------------------------
 # * Refresh Setup
 #--------------------------------------------------------------------------
 START = 1
 WAIT  = 2
 MOVER = 3
 MOVEL = 4
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 def initialize(center_x, center_y, commands, items, move = true, index = 0, character = false)
  super(0, 0, 544, 416)
  self.contents = Bitmap.new(width-32, height-32)
  self.opacity = 0
  @move = move
  @char = character
  @startup = STARTUP_FRAMES
  @commands = commands
  @item_max = commands.size
  @index = index
  @items = items
  @disabled = []
  for i in 0...commands.size-1
   @disabled = false
  end
  @cx = center_x
  @cy = center_y
  start_setup
  refresh
 end
 #--------------------------------------------------------------------------
 # * Start Setup
 #--------------------------------------------------------------------------
 def start_setup
  @mode = START
  @steps = @startup
 end
 #--------------------------------------------------------------------------
 # * Disable index
 #   index : item number
 #--------------------------------------------------------------------------
 def disable_item(index)
  @disabled[index] = true
 end
 #--------------------------------------------------------------------------
 # * Determines if is moving
 #--------------------------------------------------------------------------
 def animation?
  return @mode != WAIT
 end
 #--------------------------------------------------------------------------
 # * Determine if cursor is moveable
 #--------------------------------------------------------------------------
 def cursor_movable?
  return false if (not visible or not active)
  return false if (@opening or @closing)
  return false if animation?
  return true
 end
 #--------------------------------------------------------------------------
 # * Move cursor right
 #--------------------------------------------------------------------------
 def cursor_right
  @index -= 1
  @index = @items.size - 1 if @index < 0
  @mode = MOVER
  @steps = MOVING_FRAMES
 end
 #--------------------------------------------------------------------------
 # * Move cursor left
 #--------------------------------------------------------------------------
 def cursor_left
  @index += 1
  @index = 0 if @index >= @items.size
  @mode = MOVEL
  @steps = MOVING_FRAMES
 end
 #--------------------------------------------------------------------------
 # * Frame Update
 #--------------------------------------------------------------------------
 def update
  super
  if self.active
   if cursor_movable?
    last_index = @index
    if Input.repeat?(Input::DOWN) or Input.repeat?(Input::RIGHT)
     cursor_right
    end
    if Input.repeat?(Input::UP) or Input.repeat?(Input::LEFT)
     cursor_left
    end
    if @index != last_index
     Sound.play_cursor
    end
   end
   refresh
  end
 end
 #--------------------------------------------------------------------------
 # * Refresh
 #--------------------------------------------------------------------------
 def refresh  Â
  self.contents.clear
  case @mode
  when START
   refresh_start
  when WAIT
   refresh_wait
  when MOVER
   refresh_move(1)
  when MOVEL
   refresh_move(0)
  end
  rect = Rect.new(18, 196, self.contents.width-32, 32)
  self.contents.draw_text(rect, @commands[@index], 1)
 end
 #--------------------------------------------------------------------------
 # * Refresh Start Period
 #--------------------------------------------------------------------------
 def refresh_start
  d1 = 2.0 * Math::PI / @item_max
  d2 = 1.0 * Math::PI / @startup
  for i in 0...@item_max
   j = i - @index
   if @move
    r = RING_R - 1.0 * RING_R * @steps / @startup
    d = d1 * j + d2 * @steps
   else
    r = RING_R
    d = d1 * j
   end
   x = @cx + ( r * Math.sin( d ) ).to_i
   y = @cy - ( r * Math.cos( d ) ).to_i
   draw_item(x, y, i)
  end
  @steps -= 1
  if @steps < 1
   @mode = WAIT
  end
 end
 #--------------------------------------------------------------------------
 # * Refresh Wait Period
 #--------------------------------------------------------------------------
 def refresh_wait
  d = 2.0 * Math::PI / @item_max
  for i in 0...@item_max
   j = i - @index
   x = @cx + ( RING_R * Math.sin( d * j ) ).to_i
   y = @cy - ( RING_R * Math.cos( d * j ) ).to_i
   draw_item(x, y, i)
  end
 end
 #--------------------------------------------------------------------------
 # * Refresh Movement Period
 #--------------------------------------------------------------------------
 def refresh_move( mode )
  d1 = 2.0 * Math::PI / @item_max
  d2 = d1 / MOVING_FRAMES
  d2 *= -1 if mode != 0
  for i in 0...@item_max
   j = i - @index
   d = d1 * j + d2 * @steps
   x = @cx + ( RING_R * Math.sin( d ) ).to_i
   y = @cy - ( RING_R * Math.cos( d ) ).to_i
   draw_item(x, y, i)
  end
  @steps -= 1
  if @steps < 1
   @mode = WAIT
  end
 end
 #--------------------------------------------------------------------------
 # * Draw Item
 #   x   : draw spot x-coordinate
 #   y   : draw spot y-coordinate
 #   index : item number
 #--------------------------------------------------------------------------
 def draw_item(x, y, index)
  if @char
   if @index == index
    draw_character(@items[index].character_name, @items[index].character_index , x, y)
    if @mode == WAIT
     draw_actor_hp_ring(@items[index], @cx, @cy-16, 50, 6, 84, 270, true)
     draw_actor_mp_ring(@items[index], @cx, @cy-16, 50, 6, 84, 180, false)
     draw_actor_exp_ring(@items[index], @cx, @cy-16, 50, 6, 155, 12, false)
    end
   else
    draw_character(@items[index].character_name, @items[index].character_index , x, y, false)
   end
  else
   rect = Rect.new(0, 0, @items[index].width, @items[index].height)
   if @index == index
    self.contents.blt( x, y, @items[index], rect )
    if @disabled[@index]
     self.contents.blt( x, y, ICON_DISABLE, rect )
    end
   else
    self.contents.blt( x, y, @items[index], rect, 128 )
   end
  end
 end
end
Â
#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
# Â Edited to allow disabled character icons
#==============================================================================
Â
class Window_Base < Window
 #--------------------------------------------------------------------------
 # * Draw Character Graphic
 #--------------------------------------------------------------------------
 def draw_character(character_name, character_index, x, y, enabled = true)
  return if character_name == nil
  bitmap = Cache.character(character_name)
  sign = character_name[/^[\!\$]./]
  if sign != nil and sign.include?('$')
   cw = bitmap.width / 3
   ch = bitmap.height / 4
  else
   cw = bitmap.width / 12
   ch = bitmap.height / 8
  end
  n = character_index
  src_rect = Rect.new((n%4*3+1)*cw, (n/4*4)*ch, cw, ch)
  self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect, enabled ? 255 : 128)
 end
end
If I open up my menu and open Party Switch in the Ring Menu, I first have to exit the menu to let the Party Switcher scene open... I don't know how to prevent this. Could someone help me, please?
Thank you very much,
Joeri