#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#_/ ◆ Party Expansion & Formation - KGC_LargeParty ◆ VX ◆
#_/ ◇ Last Update: 02/15/09 ◇
#_/ ◆ Translation by Mr. Anonymous ◆
#_/ ◆ KGC Site: ◆
#_/ ◆ http://ytomy.sakura.ne.jp/ ◆
#_/ ◆ Translator's Blog: ◆
#_/ ◆ http://mraprojects.wordpress.com ◆
#_/---------------------------------------------- ------------------------------
#_/ 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.
#_/============================================================================
#_/ ◆ 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.
#_/
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
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 = true
# ◆ Maximum Party Members (In Combat) ◆
# Allows you to choose how many actors may participate in a battle.
MAX_BATTLE_MEMBERS = 5
# ◆ 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 = true
# 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 = true
# 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", "Menu", "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
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]) # 待機中
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
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
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