设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1314|回复: 4
打印 上一主题 下一主题

[已经解决] 关于队员替换脚本~

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
3 小时
注册时间
2007-3-2
帖子
13
跳转到指定楼层
1
发表于 2012-12-22 21:49:55 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
本帖最后由 xjqy1989 于 2012-12-26 17:03 编辑

这个脚本非常好用~但是有些地方不会设置
这个里面的
  #--------------------------------------------------------------------------
  # ○ アクターの固定状態を設定
  #     actor_id : アクター ID
  #     fixed    : 固定フラグ (省略時 : true)
  #--------------------------------------------------------------------------
  def fix_actor(actor_id, fixed = true)
    $game_party.fix_actor(actor_id, fixed)
  end
应该是设置不允许替换的固定队员吧~
为什么我把TRUE改成1~ 还是不好使啊~~
  1. #==============================================================================
  2. #汉化说明 :汉化者 MagicFlash
  3. #个人BBS: MagicFlash.ttsite.com
  4. #本人由于时间有限 只翻译了在游戏中看得见的文字 并没有翻译注释
  5. #这个脚本效果超强!能够在战斗中 菜单中 替换自己的队伍!!!(包括更换领队)
  6. #使用脚本后 在菜单的最后一格会多出来“更换成员” 用这个就可以使用强大的脚本了!
  7. #问:为什么 “更换成员” 是灰色的?
  8. #答:这是因为记录过旧 请重新开始游戏……
  9. #
  10. #
  11. #http://MagicFlash.ttsite.com/
  12. #http://rpg.blue

  13. #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
  14. #_/    ◆ 多人数パーティ - KGC_LargeParty ◆ VX ◆
  15. #_/    ◇ Last update : 2008/02/06 ◇
  16. #_/----------------------------------------------------------------------------
  17. #_/  5人以上の大規模パーティを構築可能にします。
  18. #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

  19. #==============================================================================
  20. # ★ カスタマイズ項目 - Customize ★
  21. #==============================================================================

  22. module KGC
  23. module LargeParty
  24.   # ◆ パーティ編成許可を表すスイッチ番号
  25.   #  このスイッチの ON/OFF でパーティ編成の 許可/不許可 を切り替えます。
  26.   PARTYFORM_SWITCH          = 1
  27.   # ◆ 戦闘中のパーティ編成許可を表すスイッチ番号
  28.   #  ↑と異なる番号を指定すると、戦闘中のみの入れ替え可否を設定できます。
  29.   BATTLE_PARTYFORM_SWITCH   = 1
  30.   # ◆ デフォルトの編成許可フラグ
  31.   #  true にすると、「ニューゲーム」選択時に両方のパーティ編成許可スイッチが
  32.   #  自動的に ON になります。
  33.   DEFAULT_PARTYFORM_ENABLED = true

  34.   # ◆ 戦闘メンバー最大数 (デフォルト値)
  35.   #  5 以上にすると、戦闘画面のステータスがやや見辛くなります。
  36.   MAX_BATTLE_MEMBERS = 4
  37.   # ◆ パーティメンバー最大数
  38.   #  Game_Party::MAX_MEMBERS を上書きします。
  39.   #  100 以上にすると [Window_MenuStatus] がバグります。
  40.   MAX_MEMBERS = 99

  41.   # ◆ 固定メンバーの並び替えを禁止
  42.   #  スクリプトからの操作以外では並び替えできなくなります。
  43.   FORBID_CHANGE_SHIFT_FIXED = false

  44.   # ◆ 待機メンバーの背景色
  45.   #  色を変えない場合は  Color.new(0, 0, 0, 0)
  46.   STAND_BY_COLOR = Color.new(0, 0, 0, 128)
  47.   # ◆ 固定メンバーの背景色
  48.   FIXED_COLOR    = Color.new(255, 128, 64, 96)
  49.   # ◆ 並び替え時の背景色
  50.   SELECTED_COLOR = Color.new(64, 255, 128, 128)

  51.   # ◆ パーティ編成ボタン (メニュー画面用)
  52.   #  メニュー画面でこのボタンを押すと、パーティ編成画面に移行します。
  53.   #  使用しない場合は nil
  54.   MENU_PARTYFORM_BUTTON      = Input::A
  55.   # ◆ メニュー画面にパーティ編成コマンドを追加する
  56.   #  追加する場所は、メニューコマンドの最下部です。
  57.   #  他の部分に追加したければ、?カスタムメニューコマンド? をご利用ください。
  58.   USE_MENU_PARTYFORM_COMMAND = true
  59.   # ◆ メニュー画面のパーティ編成コマンドの名称
  60.   VOCAB_MENU_PARTYFORM       = "更换成员"

  61.   # ◆ 戦闘中にパーティ編成コマンドを使用する
  62.   #  追加する場所は、パーティコマンドの最下部(「逃げる」の下)です。
  63.   USE_BATTLE_PARTYFORM   = true
  64.   # ◆ 戦闘中のパーティ編成コマンドの名称
  65.   VOCAB_BATTLE_PARTYFORM = "更换成员"

  66.   # ◆ 編成画面のキャラクター描画サイズ [幅, 高さ]
  67.   #  アクターの歩行グラフィックのサイズに応じて書き換えてください。
  68.   PARTY_FORM_CHARACTER_SIZE   = [40, 48]
  69.   # ◆ 編成画面の戦闘メンバーウィンドウの空欄に表示するテキスト
  70.   BATTLE_MEMBER_BLANK_TEXT    = "空白"
  71.   # ◆ 編成画面のパーティメンバーウィンドウの最大行数
  72.   #  ステータスウィンドウが画面からはみ出る場合は、
  73.   #  この値を 1 にしてください。
  74.   PARTY_MEMBER_WINDOW_ROW_MAX = 2
  75.   # ◆ 編成画面のパーティメンバーウィンドウに戦闘メンバーを表示する
  76.   SHOW_BATTLE_MEMBER_IN_PARTY = false
  77.   # ◆ 編成画面のパーティメンバーウィンドウの空欄に表示するテキスト
  78.   PARTY_MEMBER_BLANK_TEXT     = "-"

  79.   # ◆ 編成画面のキャプションウィンドウの幅
  80.   CAPTION_WINDOW_WIDTH  = 192
  81.   # ◆ 編成画面の戦闘メンバーウィンドウのキャプション
  82.   BATTLE_MEMBER_CAPTION = "战斗成员"

  83.   if SHOW_BATTLE_MEMBER_IN_PARTY
  84.     # ◆ 編成画面のパーティメンバーウィンドウのキャプション
  85.     #  SHOW_BATTLE_MEMBER_IN_PARTY = true のとき
  86.     PARTY_MEMBER_CAPTION = "现有成员"
  87.   else
  88.     # ◆ 編成画面のパーティメンバーウィンドウのキャプション
  89.     #  SHOW_BATTLE_MEMBER_IN_PARTY = false のとき
  90.     PARTY_MEMBER_CAPTION = "备战成员"
  91.   end

  92.   # ◆ 編成確認ウィンドウの幅
  93.   CONFIRM_WINDOW_WIDTH    = 160
  94.   # ◆ 編成確認ウィンドウの文字列
  95.   #  ※コマンド数?順番を変更するとバグります。
  96.   CONFIRM_WINDOW_COMMANDS = ["改变结束", "放弃改变", "继续改变"]

  97.   # ◆ ショップ画面のステータスウィンドウスクロール時に使用するボタン
  98.   #  このボタンを押している間、上下ボタンでスクロールできます。
  99.   #  スクロールを無効にする場合は nil を指定。
  100.   #  ?ヘルプウィンドウ機能拡張?併用時は、上に導入したものを優先。
  101.   SHOP_STATUS_SCROLL_BUTTON = Input::A

  102.   # ◆ 待機メンバー獲得経験値割合【単位:‰(千分率 1‰=0.1%)】
  103.   #  500 なら 50.0% です。
  104.   STAND_BY_EXP_RATE = 500
  105.   # ◆ リザルト画面で待機メンバーのレベルアップを表示する
  106.   #  false にすると、戦闘メンバーのみ表示します。
  107.   SHOW_STAND_BY_LEVEL_UP = true
  108. end
  109. end

  110. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  111. $imported = {} if $imported == nil
  112. $imported["LargeParty"] = true

  113. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  114. #==============================================================================
  115. # □ KGC::Commands
  116. #==============================================================================

  117. module KGC::Commands
  118.   # メンバーのソート形式
  119.   SORT_BY_ID    = 0  # ID順
  120.   SORT_BY_NAME  = 1  # 名前順
  121.   SORT_BY_LEVEL = 2  # レベル順

  122.   module_function
  123.   #--------------------------------------------------------------------------
  124.   # ○ パーティ編成画面の呼び出し
  125.   #--------------------------------------------------------------------------
  126.   def call_partyform
  127.     return if $game_temp.in_battle
  128.     $game_temp.next_scene = :partyform
  129.   end
  130.   #--------------------------------------------------------------------------
  131.   # ○ 戦闘メンバー最大数を設定
  132.   #     value : 人数 (省略した場合はデフォルト値を使用)
  133.   #--------------------------------------------------------------------------
  134.   def set_max_battle_member_count(value = nil)
  135.     $game_party.max_battle_member_count = value
  136.   end
  137.   #--------------------------------------------------------------------------
  138.   # ○ パーティ人数が一杯か
  139.   #--------------------------------------------------------------------------
  140.   def party_full?
  141.     return $game_party.full?
  142.   end
  143.   #--------------------------------------------------------------------------
  144.   # ○ パーティ編成可否を設定
  145.   #     enabled : 有効フラグ (省略時 : true)
  146.   #--------------------------------------------------------------------------
  147.   def permit_partyform(enabled = true)
  148.     $game_switches[KGC::LargeParty::PARTYFORM_SWITCH] = enabled
  149.   end
  150.   #--------------------------------------------------------------------------
  151.   # ○ 戦闘中のパーティ編成可否を設定
  152.   #     enabled : 有効フラグ (省略時 : true)
  153.   #--------------------------------------------------------------------------
  154.   def permit_battle_partyform(enabled = true)
  155.     $game_switches[KGC::LargeParty::BATTLE_PARTYFORM_SWITCH] = enabled
  156.   end
  157.   #--------------------------------------------------------------------------
  158.   # ○ アクターの固定状態を設定
  159.   #     actor_id : アクター ID
  160.   #     fixed    : 固定フラグ (省略時 : true)
  161.   #--------------------------------------------------------------------------
  162.   def fix_actor(actor_id, fixed = true)
  163.     $game_party.fix_actor(actor_id, fixed)
  164.   end
  165.   #--------------------------------------------------------------------------
  166.   # ○ 並び替え
  167.   #    メンバーの index1 番目と index2 番目を入れ替える
  168.   #--------------------------------------------------------------------------
  169.   def change_party_shift(index1, index2)
  170.     $game_party.change_shift(index1, index2)
  171.   end
  172.   #--------------------------------------------------------------------------
  173.   # ○ メンバー整列 (昇順)
  174.   #     sort_type : ソート形式 (SORT_BY_xxx)
  175.   #     reverse   : true だと降順
  176.   #--------------------------------------------------------------------------
  177.   def sort_party_member(sort_type = SORT_BY_ID, reverse = false)
  178.     $game_party.sort_member(sort_type, reverse)
  179.   end
  180. end

  181. class Game_Interpreter
  182.   include KGC::Commands
  183. end

  184. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  185. #==============================================================================
  186. # ■ Vocab
  187. #==============================================================================

  188. module Vocab
  189.   # 「パーティ編成」コマンド名 (メニュー)
  190.   def self.partyform
  191.     return KGC::LargeParty::VOCAB_MENU_PARTYFORM
  192.   end

  193.   # 「パーティ編成」コマンド名 (戦闘)
  194.   def self.partyform_battle
  195.     return KGC::LargeParty::VOCAB_BATTLE_PARTYFORM
  196.   end
  197. end

  198. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  199. #==============================================================================
  200. # ■ Game_Actor
  201. #==============================================================================

  202. class Game_Actor < Game_Battler
  203.   #--------------------------------------------------------------------------
  204.   # ○ パーティ内インデックス取得
  205.   #--------------------------------------------------------------------------
  206.   def party_index
  207.     return $game_party.all_members.index(self)
  208.   end
  209.   #--------------------------------------------------------------------------
  210.   # ○ 戦闘メンバーか判定
  211.   #--------------------------------------------------------------------------
  212.   def battle_member?
  213.     return $game_party.battle_members.include?(self)
  214.   end
  215. end

  216. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  217. #==============================================================================
  218. # ■ Game_Party
  219. #==============================================================================

  220. class Game_Party
  221.   #--------------------------------------------------------------------------
  222.   # ● 定数
  223.   #--------------------------------------------------------------------------
  224.   MAX_MEMBERS = KGC::LargeParty::MAX_MEMBERS  # 最大パーティ人数
  225.   #--------------------------------------------------------------------------
  226.   # ● オブジェクト初期化
  227.   #--------------------------------------------------------------------------
  228.   alias initialize_KGC_LargeParty initialize
  229.   def initialize
  230.     initialize_KGC_LargeParty

  231.     @max_battle_member_count = nil
  232.     @battle_member_count = 0
  233.     @fixed_actors = []
  234.   end
  235.   #--------------------------------------------------------------------------
  236.   # ○ 戦闘メンバー最大数取得
  237.   #--------------------------------------------------------------------------
  238.   def max_battle_member_count
  239.     if @max_battle_member_count == nil
  240.       return KGC::LargeParty::MAX_BATTLE_MEMBERS
  241.     else
  242.       return @max_battle_member_count
  243.     end
  244.   end
  245.   #--------------------------------------------------------------------------
  246.   # ○ 戦闘メンバー最大数変更
  247.   #--------------------------------------------------------------------------
  248.   def max_battle_member_count=(value)
  249.     if value.is_a?(Integer)
  250.       value = [value, 1].max
  251.     end
  252.     @max_battle_member_count = value
  253.   end
  254.   #--------------------------------------------------------------------------
  255.   # ○ 戦闘メンバー数取得
  256.   #--------------------------------------------------------------------------
  257.   def battle_member_count
  258.     if @battle_member_count == nil
  259.       @battle_member_count = @actors.size
  260.     end
  261.     @battle_member_count =
  262.       [@battle_member_count, @actors.size, max_battle_member_count].min
  263.     return @battle_member_count
  264.   end
  265.   #--------------------------------------------------------------------------
  266.   # ○ 戦闘メンバー数設定
  267.   #--------------------------------------------------------------------------
  268.   def battle_member_count=(value)
  269.     @battle_member_count = [[value, 0].max,
  270.       @actors.size, max_battle_member_count].min
  271.   end
  272.   #--------------------------------------------------------------------------
  273.   # ● メンバーの取得
  274.   #--------------------------------------------------------------------------
  275.   alias members_KGC_LargeParty members
  276.   def members
  277.     return ($game_temp.in_battle ? battle_members : members_KGC_LargeParty)
  278.   end
  279.   #--------------------------------------------------------------------------
  280.   # ○ 全メンバーの取得
  281.   #--------------------------------------------------------------------------
  282.   def all_members
  283.     return members_KGC_LargeParty
  284.   end
  285.   #--------------------------------------------------------------------------
  286.   # ○ 戦闘メンバーの取得
  287.   #--------------------------------------------------------------------------
  288.   def battle_members
  289.     result = []
  290.     battle_member_count.times { |i| result << $game_actors[@actors[i]] }
  291.     return result
  292.   end
  293.   #--------------------------------------------------------------------------
  294.   # ○ 待機メンバーの取得
  295.   #--------------------------------------------------------------------------
  296.   def stand_by_members
  297.     return (all_members - battle_members)
  298.   end
  299.   #--------------------------------------------------------------------------
  300.   # ○ 固定メンバーの取得
  301.   #--------------------------------------------------------------------------
  302.   def fixed_members
  303.     result = []
  304.     @fixed_actors.each { |i| result << $game_actors[i] }
  305.     return result
  306.   end
  307.   #--------------------------------------------------------------------------
  308.   # ● 初期パーティのセットアップ
  309.   #--------------------------------------------------------------------------
  310.   alias setup_starting_members_KGC_LargeParty setup_starting_members
  311.   def setup_starting_members
  312.     setup_starting_members_KGC_LargeParty

  313.     self.battle_member_count = @actors.size
  314.   end
  315.   #--------------------------------------------------------------------------
  316.   # ● 戦闘テスト用パーティのセットアップ
  317.   #--------------------------------------------------------------------------
  318.   alias setup_battle_test_members_KGC_LargeParty setup_battle_test_members
  319.   def setup_battle_test_members
  320.     setup_battle_test_members_KGC_LargeParty

  321.     self.battle_member_count = @actors.size
  322.   end
  323.   #--------------------------------------------------------------------------
  324.   # ○ メンバーの新規設定
  325.   #     new_member : 新しいメンバー
  326.   #--------------------------------------------------------------------------
  327.   def set_member(new_member)
  328.     @actors = []
  329.     new_member.each { |actor| @actors << actor.id }
  330.   end
  331.   #--------------------------------------------------------------------------
  332.   # ○ 戦闘メンバーの新規設定
  333.   #     new_member : 新しい戦闘メンバー
  334.   #--------------------------------------------------------------------------
  335.   def set_battle_member(new_member)
  336.     new_battle_member = []
  337.     new_member.each { |actor|
  338.       @actors.delete(actor.id)
  339.       new_battle_member << actor.id
  340.     }
  341.     @actors = new_battle_member + @actors
  342.     self.battle_member_count = new_member.size
  343.   end
  344.   #--------------------------------------------------------------------------
  345.   # ○ パーティ編成を許可しているか判定
  346.   #--------------------------------------------------------------------------
  347.   def partyform_enable?
  348.     return $game_switches[KGC::LargeParty::PARTYFORM_SWITCH]
  349.   end
  350.   #--------------------------------------------------------------------------
  351.   # ○ 戦闘中のパーティ編成を許可しているか判定
  352.   #--------------------------------------------------------------------------
  353.   def battle_partyform_enable?
  354.     return false unless partyform_enable?
  355.     return $game_switches[KGC::LargeParty::BATTLE_PARTYFORM_SWITCH]
  356.   end
  357.   #--------------------------------------------------------------------------
  358.   # ○ メンバーが一杯か判定
  359.   #--------------------------------------------------------------------------
  360.   def full?
  361.     return (@actors.size >= MAX_MEMBERS)
  362.   end
  363.   #--------------------------------------------------------------------------
  364.   # ○ 固定アクターか判定
  365.   #     actor_id : 判定するアクターの ID
  366.   #--------------------------------------------------------------------------
  367.   def actor_fixed?(actor_id)
  368.     return @fixed_actors.include?(actor_id)
  369.   end
  370.   #--------------------------------------------------------------------------
  371.   # ○ アクターを加える
  372.   #     actor_id : アクター ID
  373.   #--------------------------------------------------------------------------
  374.   alias add_actor_KGC_LargeParty add_actor
  375.   def add_actor(actor_id)
  376.     last_size = @actors.size

  377.     add_actor_KGC_LargeParty(actor_id)

  378.     if last_size < @actors.size
  379.       self.battle_member_count += 1
  380.     end
  381.   end
  382.   #--------------------------------------------------------------------------
  383.   # ○ アクターの固定状態を設定
  384.   #     actor_id : アクター ID
  385.   #     fixed    : 固定フラグ (省略時 : false)
  386.   #--------------------------------------------------------------------------
  387.   def fix_actor(actor_id, fixed = false)
  388.     unless @actors.include?(actor_id)
  389.       return
  390.     end

  391.     if fixed
  392.       # 固定
  393.       unless @fixed_actors.include?(actor_id)
  394.         @fixed_actors << actor_id
  395.         unless battle_members.include?($game_actors[actor_id])
  396.           self.battle_member_count += 1
  397.         end
  398.       end
  399.       # 強制出撃
  400.       apply_force_launch
  401.     else
  402.       # 固定解除
  403.       @fixed_actors.delete(actor_id)
  404.     end
  405.     $game_player.refresh
  406.   end
  407.   #--------------------------------------------------------------------------
  408.   # ○ 強制出撃適用
  409.   #--------------------------------------------------------------------------
  410.   def apply_force_launch
  411.     @actors -= @fixed_actors
  412.     @actors = @fixed_actors + @actors
  413.   end
  414.   #--------------------------------------------------------------------------
  415.   # ○ メンバー整列 (昇順)
  416.   #     sort_type : ソート形式 (SORT_BY_xxx)
  417.   #     reverse   : true だと降順
  418.   #--------------------------------------------------------------------------
  419.   def sort_member(sort_type = KGC::Commands::SORT_BY_ID,
  420.                   reverse = false)
  421.     # バッファを準備
  422.     b_actors = battle_members
  423.     actors = all_members - b_actors
  424.     f_actors = fixed_members
  425.     # 固定キャラはソートしない
  426.     if KGC::LargeParty::FORBID_CHANGE_SHIFT_FIXED
  427.       actors -= f_actors
  428.       b_actors -= f_actors
  429.     end
  430.     # ソート
  431.     case sort_type
  432.     when KGC::Commands::SORT_BY_ID     # ID順
  433.       actors.sort!   { |a, b| a.id <=> b.id }
  434.       b_actors.sort! { |a, b| a.id <=> b.id }
  435.     when KGC::Commands::SORT_BY_NAME   # 名前順
  436.       actors.sort!   { |a, b| a.name <=> b.name }
  437.       b_actors.sort! { |a, b| a.name <=> b.name }
  438.     when KGC::Commands::SORT_BY_LEVEL  # レベル順
  439.       actors.sort!   { |a, b| a.level <=> b.level }
  440.       b_actors.sort! { |a, b| a.level <=> b.level }
  441.     end
  442.     # 反転
  443.     if reverse
  444.       actors.reverse!
  445.       b_actors.reverse!
  446.     end
  447.     # 固定キャラを先頭に持ってくる
  448.     if KGC::LargeParty::FORBID_CHANGE_SHIFT_FIXED
  449.       actors = f_actors + actors
  450.       b_actors = f_actors + b_actors
  451.     end
  452.     # 復帰
  453.     set_member(actors)
  454.     set_battle_member(b_actors)

  455.     apply_force_launch
  456.     $game_player.refresh
  457.   end
  458.   #--------------------------------------------------------------------------
  459.   # ○ 並び替え
  460.   #    戦闘メンバーの index1 番目と index2 番目を入れ替える
  461.   #--------------------------------------------------------------------------
  462.   def change_shift(index1, index2)
  463.     size = @actors.size
  464.     if index1 >= size || index2 >= size
  465.       return
  466.     end
  467.     buf = @actors[index1]
  468.     @actors[index1] = @actors[index2]
  469.     @actors[index2] = buf
  470.     $game_player.refresh
  471.   end
  472. end

  473. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  474. #==============================================================================
  475. # ■ Window_Command
  476. #==============================================================================

  477. class Window_Command < Window_Selectable
  478.   unless method_defined?(:add_command)
  479.   #--------------------------------------------------------------------------
  480.   # ○ コマンドを追加
  481.   #    追加した位置を返す
  482.   #--------------------------------------------------------------------------
  483.   def add_command(command)
  484.     @commands << command
  485.     @item_max = @commands.size
  486.     item_index = @item_max - 1
  487.     refresh_command
  488.     draw_item(item_index)
  489.     return item_index
  490.   end
  491.   #--------------------------------------------------------------------------
  492.   # ○ コマンドをリフレッシュ
  493.   #--------------------------------------------------------------------------
  494.   def refresh_command
  495.     buf = self.contents.clone
  496.     self.height = [self.height, row_max * WLH + 32].max
  497.     create_contents
  498.     self.contents.blt(0, 0, buf, buf.rect)
  499.     buf.dispose
  500.   end
  501.   #--------------------------------------------------------------------------
  502.   # ○ コマンドを挿入
  503.   #--------------------------------------------------------------------------
  504.   def insert_command(index, command)
  505.     @commands.insert(index, command)
  506.     @item_max = @commands.size
  507.     refresh_command
  508.     refresh
  509.   end
  510.   #--------------------------------------------------------------------------
  511.   # ○ コマンドを削除
  512.   #--------------------------------------------------------------------------
  513.   def remove_command(command)
  514.     @commands.delete(command)
  515.     @item_max = @commands.size
  516.     refresh
  517.   end
  518.   end
  519. end

  520. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  521. #==============================================================================
  522. # ■ Window_MenuStatus
  523. #==============================================================================

  524. class Window_MenuStatus < Window_Selectable
  525.   #--------------------------------------------------------------------------
  526.   # ● 定数
  527.   #--------------------------------------------------------------------------
  528.   STATUS_HEIGHT = 96  # ステータス一人分の高さ
  529.   #--------------------------------------------------------------------------
  530.   # ● ウィンドウ内容の作成
  531.   #--------------------------------------------------------------------------
  532.   def create_contents
  533.     self.contents.dispose
  534.     self.contents = Bitmap.new(width - 32,
  535.       [height - 32, row_max * STATUS_HEIGHT].max)
  536.   end
  537.   #--------------------------------------------------------------------------
  538.   # ● 先頭の行の取得
  539.   #--------------------------------------------------------------------------
  540.   def top_row
  541.     return self.oy / STATUS_HEIGHT
  542.   end
  543.   #--------------------------------------------------------------------------
  544.   # ● 先頭の行の設定
  545.   #     row : 先頭に表示する行
  546.   #--------------------------------------------------------------------------
  547.   def top_row=(row)
  548.     super(row)
  549.     self.oy = self.oy / WLH * STATUS_HEIGHT
  550.   end
  551.   #--------------------------------------------------------------------------
  552.   # ● 1 ページに表示できる行数の取得
  553.   #--------------------------------------------------------------------------
  554.   def page_row_max
  555.     return (self.height - 32) / STATUS_HEIGHT
  556.   end
  557.   #--------------------------------------------------------------------------
  558.   # ● 項目を描画する矩形の取得
  559.   #     index : 項目番号
  560.   #--------------------------------------------------------------------------
  561.   def item_rect(index)
  562.     rect = super(index)
  563.     rect.height = STATUS_HEIGHT
  564.     rect.y = index / @column_max * STATUS_HEIGHT
  565.     return rect
  566.   end
  567.   #--------------------------------------------------------------------------
  568.   # ● リフレッシュ
  569.   #--------------------------------------------------------------------------
  570.   def refresh
  571.     @item_max = $game_party.all_members.size
  572.     create_contents
  573.     fill_stand_by_background
  574.     draw_member
  575.   end
  576.   #--------------------------------------------------------------------------
  577.   # ○ パーティメンバー描画
  578.   #--------------------------------------------------------------------------
  579.   def draw_member
  580.     for actor in $game_party.members
  581.       draw_actor_face(actor, 2, actor.party_index * 96 + 2, 92)
  582.       x = 104
  583.       y = actor.party_index * 96 + WLH / 2
  584.       draw_actor_name(actor, x, y)
  585.       draw_actor_class(actor, x + 120, y)
  586.       draw_actor_level(actor, x, y + WLH * 1)
  587.       draw_actor_state(actor, x, y + WLH * 2)
  588.       draw_actor_hp(actor, x + 120, y + WLH * 1)
  589.       draw_actor_mp(actor, x + 120, y + WLH * 2)
  590.     end
  591.   end
  592.   #--------------------------------------------------------------------------
  593.   # ○ 待機メンバーの背景色を塗る
  594.   #--------------------------------------------------------------------------
  595.   def fill_stand_by_background
  596.     color = KGC::LargeParty::STAND_BY_COLOR
  597.     dy = STATUS_HEIGHT * $game_party.battle_members.size
  598.     dh = STATUS_HEIGHT * $game_party.stand_by_members.size
  599.     if dh > 0
  600.       self.contents.fill_rect(0, dy, self.width - 32, dh, color)
  601.     end
  602.   end
  603.   #--------------------------------------------------------------------------
  604.   # ● カーソルの更新
  605.   #--------------------------------------------------------------------------
  606.   def update_cursor
  607.     if @index < 0               # カーソルなし
  608.       self.cursor_rect.empty
  609.     elsif @index < @item_max    # 通常
  610.       super
  611.     elsif @index >= 100         # 自分
  612.       self.cursor_rect.set(0, (@index - 100) * STATUS_HEIGHT,
  613.         contents.width, STATUS_HEIGHT)
  614.     else                        # 全体
  615.       self.cursor_rect.set(0, 0, contents.width, @item_max * STATUS_HEIGHT)
  616.     end
  617.   end
  618. end

  619. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  620. #==============================================================================
  621. # ■ Window_ShopStatus
  622. #==============================================================================

  623. class Window_ShopStatus < Window_Base
  624.   #--------------------------------------------------------------------------
  625.   # ● ウィンドウ内容の作成
  626.   #--------------------------------------------------------------------------
  627.   def create_contents
  628.     self.contents.dispose
  629.     self.contents = Bitmap.new(width - 32,
  630.       WLH * ($game_party.members.size + 1) * 2)
  631.   end
  632. end

  633. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  634. #==============================================================================
  635. # ■ Window_BattleStatus
  636. #==============================================================================

  637. class Window_BattleStatus < Window_Selectable
  638.   #--------------------------------------------------------------------------
  639.   # ● ウィンドウ内容の作成
  640.   #--------------------------------------------------------------------------
  641.   def create_contents
  642.     self.contents.dispose
  643.     self.contents = Bitmap.new(width - 32,
  644.       [WLH * $game_party.members.size, height - 32].max)
  645.   end
  646.   #--------------------------------------------------------------------------
  647.   # ● リフレッシュ
  648.   #--------------------------------------------------------------------------
  649.   alias refresh_KGC_LargeParty refresh
  650.   def refresh
  651.     create_contents

  652.     refresh_KGC_LargeParty
  653.   end
  654. end

  655. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  656. #==============================================================================
  657. # □ Window_PartyFormCaption
  658. #------------------------------------------------------------------------------
  659. #  パーティ編成画面でウィンドウのキャプションを表示するウィンドウです。
  660. #==============================================================================

  661. class Window_PartyFormCaption < Window_Base
  662.   #--------------------------------------------------------------------------
  663.   # ● オブジェクト初期化
  664.   #     caption : 表示するキャプション
  665.   #--------------------------------------------------------------------------
  666.   def initialize(caption = "")
  667.     super(0, 0, KGC::LargeParty::CAPTION_WINDOW_WIDTH, WLH + 32)
  668.     self.z = 1500
  669.     @caption = caption
  670.     refresh
  671.   end
  672.   #--------------------------------------------------------------------------
  673.   # ● リフレッシュ
  674.   #--------------------------------------------------------------------------
  675.   def refresh
  676.     self.contents.clear
  677.     self.contents.draw_text(0, 0, width - 32, WLH, @caption)
  678.   end
  679. end

  680. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  681. #==============================================================================
  682. # □ Window_PartyFormMember
  683. #------------------------------------------------------------------------------
  684. #  パーティ編成画面でメンバーを表示するウィンドウです。
  685. #==============================================================================

  686. class Window_PartyFormMember < Window_Selectable
  687.   #--------------------------------------------------------------------------
  688.   # ○ 定数
  689.   #--------------------------------------------------------------------------
  690.   DRAW_SIZE = KGC::LargeParty::PARTY_FORM_CHARACTER_SIZE
  691.   #--------------------------------------------------------------------------
  692.   # ● 公開インスタンス変数
  693.   #--------------------------------------------------------------------------
  694.   attr_accessor :selected_index           # 選択済みインデックス
  695.   #--------------------------------------------------------------------------
  696.   # ● オブジェクト初期化
  697.   #     x       : ウィンドウの X 座標
  698.   #     y       : ウィンドウの Y 座標
  699.   #     width   : ウィンドウの幅
  700.   #     height  : ウィンドウの高さ
  701.   #     spacing : 横に項目が並ぶときの空白の幅
  702.   #--------------------------------------------------------------------------
  703.   def initialize(x, y, width, height, spacing = 8)
  704.     super(x, y, width, height, spacing)
  705.     self.z = 1000
  706.   end
  707.   #--------------------------------------------------------------------------
  708.   # ● ウィンドウ内容の作成
  709.   #--------------------------------------------------------------------------
  710.   def create_contents
  711.     self.contents.dispose
  712.     self.contents = Bitmap.new(width - 32,
  713.       [height - 32, row_max * DRAW_SIZE[1]].max)
  714.   end
  715.   #--------------------------------------------------------------------------
  716.   # ● 先頭の行の取得
  717.   #--------------------------------------------------------------------------
  718.   def top_row
  719.     return self.oy / DRAW_SIZE[1]
  720.   end
  721.   #--------------------------------------------------------------------------
  722.   # ● 先頭の行の設定
  723.   #     row : 先頭に表示する行
  724.   #--------------------------------------------------------------------------
  725.   def top_row=(row)
  726.     super(row)
  727.     self.oy = self.oy / WLH * DRAW_SIZE[1]
  728.   end
  729.   #--------------------------------------------------------------------------
  730.   # ● 1 ページに表示できる行数の取得
  731.   #--------------------------------------------------------------------------
  732.   def page_row_max
  733.     return (self.height - 32) / DRAW_SIZE[1]
  734.   end
  735.   #--------------------------------------------------------------------------
  736.   # ● 項目を描画する矩形の取得
  737.   #     index : 項目番号
  738.   #--------------------------------------------------------------------------
  739.   def item_rect(index)
  740.     rect = super(index)
  741.     rect.width = DRAW_SIZE[0]
  742.     rect.height = DRAW_SIZE[1]
  743.     rect.y = index / @column_max * DRAW_SIZE[1]
  744.     return rect
  745.   end
  746.   #--------------------------------------------------------------------------
  747.   # ○ 選択アクター取得
  748.   #--------------------------------------------------------------------------
  749.   def actor
  750.     return @actors[self.index]
  751.   end
  752.   #--------------------------------------------------------------------------
  753.   # ● リフレッシュ
  754.   #--------------------------------------------------------------------------
  755.   def refresh
  756.     self.contents.clear
  757.     restore_member_list
  758.     draw_member
  759.   end
  760.   #--------------------------------------------------------------------------
  761.   # ○ メンバーリスト修復
  762.   #--------------------------------------------------------------------------
  763.   def restore_member_list
  764.     # 継承先で定義
  765.   end
  766.   #--------------------------------------------------------------------------
  767.   # ○ メンバー描画
  768.   #--------------------------------------------------------------------------
  769.   def draw_member
  770.     # 継承先で定義
  771.   end
  772.   #--------------------------------------------------------------------------
  773.   # ○ 空欄アクター描画
  774.   #     index : 項目番号
  775.   #--------------------------------------------------------------------------
  776.   def draw_empty_actor(index)
  777.     # 継承先で定義
  778.   end
  779.   #--------------------------------------------------------------------------
  780.   # ○ 固定キャラ背景描画
  781.   #     index : 項目番号
  782.   #--------------------------------------------------------------------------
  783.   def draw_fixed_back(index)
  784.     rect = item_rect(index)
  785.     self.contents.fill_rect(rect, KGC::LargeParty::FIXED_COLOR)
  786.   end
  787.   #--------------------------------------------------------------------------
  788.   # ○ 選択中キャラ背景描画
  789.   #     index : 項目番号
  790.   #--------------------------------------------------------------------------
  791.   def draw_selected_back(index)
  792.     rect = item_rect(index)
  793.     self.contents.fill_rect(rect, KGC::LargeParty::SELECTED_COLOR)
  794.   end
  795. end

  796. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  797. #==============================================================================
  798. # □ Window_PartyFormBattleMember
  799. #------------------------------------------------------------------------------
  800. #  パーティ編成画面で戦闘メンバーを表示するウィンドウです。
  801. #==============================================================================

  802. class Window_PartyFormBattleMember < Window_PartyFormMember
  803.   #--------------------------------------------------------------------------
  804.   # ● 公開インスタンス変数
  805.   #--------------------------------------------------------------------------
  806.   attr_accessor :selected_index           # 選択済みインデックス
  807.   #--------------------------------------------------------------------------
  808.   # ● オブジェクト初期化
  809.   #--------------------------------------------------------------------------
  810.   def initialize
  811.     super(0, 0, 64, DRAW_SIZE[1] + 32)
  812.     column_width = DRAW_SIZE[0] + @spacing
  813.     nw = [column_width * $game_party.max_battle_member_count + 32,
  814.       Graphics.width].min
  815.     self.width = nw

  816.     @item_max = $game_party.max_battle_member_count
  817.     @column_max = width / column_width
  818.     @selected_index = nil
  819.     create_contents
  820.     refresh
  821.     self.active = true
  822.     self.index = 0
  823.   end
  824.   #--------------------------------------------------------------------------
  825.   # ○ メンバーリスト修復
  826.   #--------------------------------------------------------------------------
  827.   def restore_member_list
  828.     @actors = $game_party.battle_members
  829.   end
  830.   #--------------------------------------------------------------------------
  831.   # ○ メンバー描画
  832.   #--------------------------------------------------------------------------
  833.   def draw_member
  834.     @item_max.times { |i|
  835.       actor = @actors[i]
  836.       if actor == nil
  837.         draw_empty_actor(i)
  838.       else
  839.         if i == @selected_index
  840.           draw_selected_back(i)
  841.         elsif $game_party.actor_fixed?(actor.id)
  842.           draw_fixed_back(i)
  843.         end
  844.         rect = item_rect(i)
  845.         draw_actor_graphic(actor,
  846.           rect.x + DRAW_SIZE[0] / 2,
  847.           rect.y + DRAW_SIZE[1] - 4)
  848.       end
  849.     }
  850.   end
  851.   #--------------------------------------------------------------------------
  852.   # ○ 空欄アクター描画
  853.   #     index : 項目番号
  854.   #--------------------------------------------------------------------------
  855.   def draw_empty_actor(index)
  856.     rect = item_rect(index)
  857.     self.contents.font.color = system_color
  858.     self.contents.draw_text(rect, KGC::LargeParty::BATTLE_MEMBER_BLANK_TEXT, 1)
  859.     self.contents.font.color = normal_color
  860.   end
  861. end

  862. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  863. #==============================================================================
  864. # □ Window_PartyFormAllMember
  865. #------------------------------------------------------------------------------
  866. #  パーティ編成画面で全メンバーを表示するウィンドウです。
  867. #==============================================================================

  868. class Window_PartyFormAllMember < Window_PartyFormMember
  869.   #--------------------------------------------------------------------------
  870.   # ● オブジェクト初期化
  871.   #--------------------------------------------------------------------------
  872.   def initialize
  873.     super(0, 0, 64, 64)
  874.     restore_member_list
  875.     @item_max = $game_party.all_members.size

  876.     # 各種サイズ計算
  877.     column_width = DRAW_SIZE[0] + @spacing
  878.     sw = [@item_max * column_width + 32, Graphics.width].min
  879.     @column_max = (sw - 32) / column_width
  880.     sh = ([@item_max - 1, 0].max / @column_max + 1) * DRAW_SIZE[1] + 32
  881.     sh = [sh, DRAW_SIZE[1] * KGC::LargeParty::PARTY_MEMBER_WINDOW_ROW_MAX + 32].min

  882.     # 座標?サイズ調整
  883.     self.y += DRAW_SIZE[1] + 32
  884.     self.width = sw
  885.     self.height = sh

  886.     create_contents
  887.     refresh
  888.     self.active = false
  889.     self.index = 0
  890.   end
  891.   #--------------------------------------------------------------------------
  892.   # ○ 選択しているアクターのインデックス取得
  893.   #--------------------------------------------------------------------------
  894.   def actor_index
  895.     return @index_offset + self.index
  896.   end
  897.   #--------------------------------------------------------------------------
  898.   # ○ メンバーリスト修復
  899.   #--------------------------------------------------------------------------
  900.   def restore_member_list
  901.     if KGC::LargeParty::SHOW_BATTLE_MEMBER_IN_PARTY
  902.       @actors = $game_party.all_members
  903.       @index_offset = 0
  904.     else
  905.       @actors = $game_party.stand_by_members
  906.       @index_offset = $game_party.battle_members.size
  907.     end
  908.   end
  909.   #--------------------------------------------------------------------------
  910.   # ○ メンバー描画
  911.   #--------------------------------------------------------------------------
  912.   def draw_member
  913.     @item_max.times { |i|
  914.       actor = @actors[i]
  915.       if actor == nil
  916.         draw_empty_actor(i)
  917.         next
  918.       end

  919.       if $game_party.actor_fixed?(actor.id)
  920.         draw_fixed_back(i)
  921.       end
  922.       rect = item_rect(i)
  923.       opacity = ($game_party.battle_members.include?(actor) ? 96 : 255)
  924.       draw_actor_graphic(actor,
  925.         rect.x + DRAW_SIZE[0] / 2,
  926.         rect.y + DRAW_SIZE[1] - 4,
  927.         opacity)
  928.     }
  929.   end
  930.   #--------------------------------------------------------------------------
  931.   # ● アクターの歩行グラフィック描画
  932.   #     actor   : アクター
  933.   #     x       : 描画先 X 座標
  934.   #     y       : 描画先 Y 座標
  935.   #     opacity : 不透明度
  936.   #--------------------------------------------------------------------------
  937.   def draw_actor_graphic(actor, x, y, opacity = 255)
  938.     draw_character(actor.character_name, actor.character_index, x, y, opacity)
  939.   end
  940.   #--------------------------------------------------------------------------
  941.   # ● 歩行グラフィックの描画
  942.   #     character_name  : 歩行グラフィック ファイル名
  943.   #     character_index : 歩行グラフィック インデックス
  944.   #     x               : 描画先 X 座標
  945.   #     y               : 描画先 Y 座標
  946.   #     opacity         : 不透明度
  947.   #--------------------------------------------------------------------------
  948.   def draw_character(character_name, character_index, x, y, opacity = 255)
  949.     return if character_name == nil
  950.     bitmap = Cache.character(character_name)
  951.     sign = character_name[/^[\!\$]./]
  952.     if sign != nil and sign.include?('$')
  953.       cw = bitmap.width / 3
  954.       ch = bitmap.height / 4
  955.     else
  956.       cw = bitmap.width / 12
  957.       ch = bitmap.height / 8
  958.     end
  959.     n = character_index
  960.     src_rect = Rect.new((n%4*3+1)*cw, (n/4*4)*ch, cw, ch)
  961.     self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect, opacity)
  962.   end
  963.   #--------------------------------------------------------------------------
  964.   # ○ 空欄アクター描画
  965.   #     index : 項目番号
  966.   #--------------------------------------------------------------------------
  967.   def draw_empty_actor(index)
  968.     rect = item_rect(index)
  969.     self.contents.font.color = system_color
  970.     self.contents.draw_text(rect, KGC::LargeParty::PARTY_MEMBER_BLANK_TEXT, 1)
  971.     self.contents.font.color = normal_color
  972.   end
  973. end

  974. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  975. #==============================================================================
  976. # □ Window_PartyFormStatus
  977. #------------------------------------------------------------------------------
  978. #  パーティ編成画面でアクターのステータスを表示するウィンドウです。
  979. #==============================================================================
复制代码
脚本第二部分

  1. class Window_PartyFormStatus < Window_Base
  2.   #--------------------------------------------------------------------------
  3.   # ● オブジェクト初期化
  4.   #--------------------------------------------------------------------------
  5.   def initialize
  6.     super(0, 0, 384, 128)
  7.     self.z = 1000
  8.     [url=home.php?mod=space&uid=95897]@actor[/url] = nil
  9.     refresh
  10.   end
  11.   #--------------------------------------------------------------------------
  12.   # ○ アクター設定
  13.   #--------------------------------------------------------------------------
  14.   def set_actor(actor)
  15.     if [url=home.php?mod=space&uid=95897]@actor[/url] != actor
  16.       @actor = actor
  17.       refresh
  18.     end
  19.   end
  20.   #--------------------------------------------------------------------------
  21.   # ● リフレッシュ
  22.   #--------------------------------------------------------------------------
  23.   def refresh
  24.     self.contents.clear
  25.     if @actor == nil
  26.       return
  27.     end

  28.     draw_actor_face(@actor, 0, 0)
  29.     dx = 104
  30.     draw_actor_name(@actor, dx, 0)
  31.     draw_actor_level(@actor, dx, WLH * 1)
  32.     draw_actor_hp(@actor, dx, WLH * 2)
  33.     draw_actor_mp(@actor, dx, WLH * 3)
  34.     4.times { |i|
  35.       draw_actor_parameter(@actor, dx + 128, WLH * i, i, 120)
  36.     }
  37.   end
  38.   #--------------------------------------------------------------------------
  39.   # ● 能力値の描画
  40.   #     actor : アクター
  41.   #     x     : 描画先 X 座標
  42.   #     y     : 描画先 Y 座標
  43.   #     type  : 能力値の種類 (0~3)
  44.   #     width : 描画幅
  45.   #--------------------------------------------------------------------------
  46.   def draw_actor_parameter(actor, x, y, type, width = 156)
  47.     case type
  48.     when 0
  49.       parameter_name = Vocab::atk
  50.       parameter_value = actor.atk
  51.     when 1
  52.       parameter_name = Vocab::def
  53.       parameter_value = actor.def
  54.     when 2
  55.       parameter_name = Vocab::spi
  56.       parameter_value = actor.spi
  57.     when 3
  58.       parameter_name = Vocab::agi
  59.       parameter_value = actor.agi
  60.     end
  61.     nw = width - 36
  62.     self.contents.font.color = system_color
  63.     self.contents.draw_text(x, y, nw, WLH, parameter_name)
  64.     self.contents.font.color = normal_color
  65.     self.contents.draw_text(x + nw, y, 36, WLH, parameter_value, 2)
  66.   end
  67. end

  68. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  69. #==============================================================================
  70. # □ Window_PartyFormControl
  71. #------------------------------------------------------------------------------
  72. #  パーティ編成画面で操作方法を表示するウィンドウです。
  73. #==============================================================================

  74. class Window_PartyFormControl < Window_Base
  75.   #--------------------------------------------------------------------------
  76.   # ○ 定数
  77.   #--------------------------------------------------------------------------
  78.   MODE_BATTLE_MEMBER = 0
  79.   MODE_SHIFT_CHANGE  = 1
  80.   MODE_PARTY_MEMBER  = 2
  81.   #--------------------------------------------------------------------------
  82.   # ● オブジェクト初期化
  83.   #--------------------------------------------------------------------------
  84.   def initialize
  85.     super(0, 0, Graphics.width - 384, 128)
  86.     self.z = 1000
  87.     @mode = MODE_BATTLE_MEMBER
  88.     refresh
  89.   end
  90.   #--------------------------------------------------------------------------
  91.   # ○ モード変更
  92.   #--------------------------------------------------------------------------
  93.   def mode=(value)
  94.     @mode = value
  95.     refresh
  96.   end
  97.   #--------------------------------------------------------------------------
  98.   # ● リフレッシュ
  99.   #--------------------------------------------------------------------------
  100.   def refresh
  101.     self.contents.clear
  102.     case @mode
  103.     when MODE_BATTLE_MEMBER  # 戦闘メンバー
  104.       buttons = [
  105.         "SPACE: 替换",
  106.         "Z    : 替换",
  107.         "A  : 换顺序",
  108.         "X    : 结束"
  109.       ]
  110.     when MODE_SHIFT_CHANGE   # 並び替え
  111.       buttons = [
  112.         "移动指示",
  113.         "再次按A",
  114.         "替换顺序"
  115.       ]
  116.     when MODE_PARTY_MEMBER   # パーティメンバー
  117.       buttons = [
  118.         "Z: 决定",
  119.         "X: 取消"
  120.       ]
  121.     else
  122.       return
  123.     end

  124.     buttons.each_with_index { |c, i|
  125.       self.contents.draw_text(0, WLH * i, width - 32, WLH, c)
  126.     }
  127.   end
  128. end

  129. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  130. #==============================================================================
  131. # ■ Scene_Title
  132. #==============================================================================

  133. class Scene_Title < Scene_Base
  134.   #--------------------------------------------------------------------------
  135.   # ● 各種ゲームオブジェクトの作成
  136.   #--------------------------------------------------------------------------
  137.   alias create_game_objects_KGC_LargeParty create_game_objects
  138.   def create_game_objects
  139.     create_game_objects_KGC_LargeParty

  140.     if KGC::LargeParty::DEFAULT_PARTYFORM_ENABLED
  141.       $game_switches[KGC::LargeParty::PARTYFORM_SWITCH] = true
  142.       $game_switches[KGC::LargeParty::BATTLE_PARTYFORM_SWITCH] = true
  143.     end
  144.   end
  145. end

  146. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  147. #==============================================================================
  148. # ■ Scene_Map
  149. #==============================================================================

  150. class Scene_Map < Scene_Base
  151.   #--------------------------------------------------------------------------
  152.   # ● 画面切り替えの実行
  153.   #--------------------------------------------------------------------------
  154.   alias update_scene_change_KGC_LargeParty update_scene_change
  155.   def update_scene_change
  156.     return if $game_player.moving?    # プレイヤーの移動中?

  157.     if $game_temp.next_scene == :partyform
  158.       call_partyform
  159.       return
  160.     end

  161.     update_scene_change_KGC_LargeParty
  162.   end
  163.   #--------------------------------------------------------------------------
  164.   # ○ パーティ編成画面への切り替え
  165.   #--------------------------------------------------------------------------
  166.   def call_partyform
  167.     $game_temp.next_scene = nil
  168.     $scene = Scene_PartyForm.new(0, Scene_PartyForm::HOST_MAP)
  169.   end
  170. end

  171. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  172. #==============================================================================
  173. # ■ Scene_Menu
  174. #==============================================================================

  175. class Scene_Menu < Scene_Base
  176.   if KGC::LargeParty::USE_MENU_PARTYFORM_COMMAND
  177.   #--------------------------------------------------------------------------
  178.   # ● コマンドウィンドウの作成
  179.   #--------------------------------------------------------------------------
  180.   alias create_command_window_KGC_LargeParty create_command_window
  181.   def create_command_window
  182.     create_command_window_KGC_LargeParty

  183.     return if $imported["CustomMenuCommand"]

  184.     @__command_partyform_index =
  185.       @command_window.add_command(Vocab.partyform)
  186.     @command_window.draw_item(@__command_partyform_index,
  187.       $game_party.partyform_enable?)
  188.     if @command_window.oy > 0
  189.       @command_window.oy -= Window_Base::WLH
  190.     end
  191.     @command_window.index = @menu_index
  192.   end
  193.   end
  194.   #--------------------------------------------------------------------------
  195.   # ● コマンド選択の更新
  196.   #--------------------------------------------------------------------------
  197.   alias update_command_selection_KGC_LargeParty update_command_selection
  198.   def update_command_selection
  199.     current_menu_index = @__command_partyform_index
  200.     call_partyform_flag = false

  201.     if Input.trigger?(Input::C)
  202.       case @command_window.index
  203.       when @__command_partyform_index  # パーティ編成
  204.         call_partyform_flag = true
  205.       end
  206.     # パーティ編成ボタン押下
  207.     elsif KGC::LargeParty::MENU_PARTYFORM_BUTTON != nil &&
  208.         Input.trigger?(KGC::LargeParty::MENU_PARTYFORM_BUTTON)
  209.       call_partyform_flag = true
  210.       current_menu_index = @command_window.index if current_menu_index == nil
  211.     end

  212.     # パーティ編成画面に移行
  213.     if call_partyform_flag
  214.       if $game_party.members.size == 0 || !$game_party.partyform_enable?
  215.         Sound.play_buzzer
  216.         return
  217.       end
  218.       Sound.play_decision
  219.       $scene = Scene_PartyForm.new(current_menu_index)
  220.       return
  221.     end

  222.     update_command_selection_KGC_LargeParty
  223.   end
  224. end

  225. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  226. #==============================================================================
  227. # ■ Scene_Shop
  228. #==============================================================================

  229. unless $imported["HelpExtension"]
  230. class Scene_Shop < Scene_Base
  231.   #--------------------------------------------------------------------------
  232.   # ● フレーム更新
  233.   #--------------------------------------------------------------------------
  234.   alias udpate_KGC_LargeParty update
  235.   def update
  236.     # スクロール判定
  237.     if !@command_window.active &&
  238.         KGC::LargeParty::SHOP_STATUS_SCROLL_BUTTON != nil &&
  239.         Input.press?(KGC::LargeParty::SHOP_STATUS_SCROLL_BUTTON)
  240.       super
  241.       update_menu_background
  242.       update_scroll_status
  243.       return
  244.     else
  245.       @status_window.cursor_rect.empty
  246.     end

  247.     udpate_KGC_LargeParty
  248.   end
  249.   #--------------------------------------------------------------------------
  250.   # ○ ステータスウィンドウのスクロール処理
  251.   #--------------------------------------------------------------------------
  252.   def update_scroll_status
  253.     # ステータスウィンドウにカーソルを表示
  254.     @status_window.cursor_rect.width = @status_window.contents.width
  255.     @status_window.cursor_rect.height = @status_window.height - 32
  256.     @status_window.update

  257.     if Input.press?(Input::UP)
  258.       @status_window.oy = [@status_window.oy - 4, 0].max
  259.     elsif Input.press?(Input::DOWN)
  260.       max_pos = [@status_window.contents.height -
  261.         (@status_window.height - 32), 0].max
  262.       @status_window.oy = [@status_window.oy + 4, max_pos].min
  263.     end
  264.   end
  265. end
  266. end

  267. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  268. #==============================================================================
  269. # □ Scene_PartyForm
  270. #------------------------------------------------------------------------------
  271. #  パーティ編成画面の処理を行うクラスです。
  272. #==============================================================================

  273. class Scene_PartyForm < Scene_Base
  274.   #--------------------------------------------------------------------------
  275.   # ○ 定数
  276.   #--------------------------------------------------------------------------
  277.   CAPTION_OFFSET = 40  # キャプションウィンドウの位置補正
  278.   HOST_MENU   = 0      # 呼び出し元 : メニュー
  279.   HOST_MAP    = 1      # 呼び出し元 : マップ
  280.   HOST_BATTLE = 2      # 呼び出し元 : 戦闘
  281.   #--------------------------------------------------------------------------
  282.   # ● オブジェクト初期化
  283.   #     menu_index : コマンドのカーソル初期位置
  284.   #     host_scene : 呼び出し元 (0..メニュー  1..マップ  2..戦闘)
  285.   #--------------------------------------------------------------------------
  286.   def initialize(menu_index = 0, host_scene = HOST_MENU)
  287.     @menu_index = menu_index
  288.     @host_scene = host_scene
  289.   end
  290.   #--------------------------------------------------------------------------
  291.   # ● 開始処理
  292.   #--------------------------------------------------------------------------
  293.   def start
  294.     super
  295.     create_menu_background

  296.     create_windows
  297.     create_confirm_window
  298.     adjust_window_location

  299.     # 編成前のパーティを保存
  300.     @battle_actors = $game_party.battle_members.dup
  301.     @party_actors = $game_party.all_members.dup
  302.   end
  303.   #--------------------------------------------------------------------------
  304.   # ○ ウィンドウの作成
  305.   #--------------------------------------------------------------------------
  306.   def create_windows
  307.     # 編成用ウィンドウを作成
  308.     @battle_member_window = Window_PartyFormBattleMember.new
  309.     @party_member_window = Window_PartyFormAllMember.new
  310.     @status_window = Window_PartyFormStatus.new
  311.     @status_window.set_actor(@battle_member_window.actor)

  312.     # その他のウィンドウを作成
  313.     @battle_member_caption_window =
  314.       Window_PartyFormCaption.new(KGC::LargeParty::BATTLE_MEMBER_CAPTION)
  315.     @party_member_caption_window =
  316.       Window_PartyFormCaption.new(KGC::LargeParty::PARTY_MEMBER_CAPTION)
  317.     @control_window = Window_PartyFormControl.new
  318.   end
  319.   #--------------------------------------------------------------------------
  320.   # ○ 確認ウィンドウの作成
  321.   #--------------------------------------------------------------------------
  322.   def create_confirm_window
  323.     commands = KGC::LargeParty::CONFIRM_WINDOW_COMMANDS
  324.     @confirm_window =
  325.       Window_Command.new(KGC::LargeParty::CONFIRM_WINDOW_WIDTH, commands)
  326.     @confirm_window.index = 0
  327.     @confirm_window.x = (Graphics.width - @confirm_window.width) / 2
  328.     @confirm_window.y = (Graphics.height - @confirm_window.height) / 2
  329.     @confirm_window.z = 2000
  330.     @confirm_window.openness = 0
  331.     @confirm_window.active = false
  332.   end
  333.   #--------------------------------------------------------------------------
  334.   # ○ ウィンドウの座標調整
  335.   #--------------------------------------------------------------------------
  336.   def adjust_window_location
  337.     # 基準座標を計算
  338.     base_x = [@battle_member_window.width, @party_member_window.width].max
  339.     base_x = [(Graphics.width - base_x) / 2, 0].max
  340.     base_y = @battle_member_window.height + @party_member_window.height +
  341.       @status_window.height + CAPTION_OFFSET * 2
  342.     base_y = [(Graphics.height - base_y) / 2, 0].max

  343.     # 編成用ウィンドウの座標をセット
  344.     @battle_member_window.x = base_x
  345.     @battle_member_window.y = base_y + CAPTION_OFFSET
  346.     @party_member_window.x = base_x
  347.     @party_member_window.y = @battle_member_window.y +
  348.       @battle_member_window.height + CAPTION_OFFSET
  349.     @status_window.x = 0
  350.     @status_window.y = @party_member_window.y + @party_member_window.height

  351.     # その他のウィンドウの座標をセット
  352.     @battle_member_caption_window.x = [base_x - 16, 0].max
  353.     @battle_member_caption_window.y = @battle_member_window.y - CAPTION_OFFSET
  354.     @party_member_caption_window.x = [base_x - 16, 0].max
  355.     @party_member_caption_window.y = @party_member_window.y - CAPTION_OFFSET
  356.     @control_window.x = @status_window.width
  357.     @control_window.y = @status_window.y
  358.   end
  359.   #--------------------------------------------------------------------------
  360.   # ● 終了処理
  361.   #--------------------------------------------------------------------------
  362.   def terminate
  363.     super
  364.     dispose_menu_background
  365.     @battle_member_window.dispose
  366.     @party_member_window.dispose
  367.     @status_window.dispose
  368.     @battle_member_caption_window.dispose
  369.     @party_member_caption_window.dispose
  370.     @control_window.dispose
  371.     @confirm_window.dispose
  372.   end
  373.   #--------------------------------------------------------------------------
  374.   # ● メニュー画面系の背景作成
  375.   #--------------------------------------------------------------------------
  376.   def create_menu_background
  377.     super
  378.     @menuback_sprite.z = 500
  379.   end
  380.   #--------------------------------------------------------------------------
  381.   # ● 元の画面へ戻る
  382.   #--------------------------------------------------------------------------
  383.   def return_scene
  384.     case @host_scene
  385.     when HOST_MENU
  386.       $scene = Scene_Menu.new(@menu_index)
  387.     when HOST_MAP
  388.       $scene = Scene_Map.new
  389.     when HOST_BATTLE
  390.       $scene = Scene_Battle.new
  391.     end
  392.     $game_player.refresh
  393.   end
  394.   #--------------------------------------------------------------------------
  395.   # ● フレーム更新
  396.   #--------------------------------------------------------------------------
  397.   def update
  398.     super
  399.     update_menu_background
  400.     update_window
  401.     if @battle_member_window.active
  402.       update_battle_member
  403.     elsif @party_member_window.active
  404.       update_party_member
  405.     elsif @confirm_window.active
  406.       update_confirm
  407.     end
  408.   end
  409.   #--------------------------------------------------------------------------
  410.   # ○ ウィンドウ更新
  411.   #--------------------------------------------------------------------------
  412.   def update_window
  413.     @battle_member_window.update
  414.     @party_member_window.update
  415.     @status_window.update
  416.     @battle_member_caption_window.update
  417.     @party_member_caption_window.update
  418.     @control_window.update
  419.     @confirm_window.update
  420.   end
  421.   #--------------------------------------------------------------------------
  422.   # ○ ウィンドウ再描画
  423.   #--------------------------------------------------------------------------
  424.   def refresh_window
  425.     @battle_member_window.refresh
  426.     @party_member_window.refresh
  427.   end
  428.   #--------------------------------------------------------------------------
  429.   # ○ フレーム更新 (戦闘メンバーウィンドウがアクティブの場合)
  430.   #--------------------------------------------------------------------------
  431.   def update_battle_member
  432.     @status_window.set_actor(@battle_member_window.actor)
  433.     if Input.trigger?(Input::A)
  434.       if @battle_member_window.selected_index == nil  # 並び替え中でない
  435.         actor = @battle_member_window.actor
  436.         # アクターを外せない場合
  437.         if actor == nil || $game_party.actor_fixed?(actor.id)
  438.           Sound.play_buzzer
  439.           return
  440.         end
  441.         # アクターを外す
  442.         Sound.play_decision
  443.         actors = $game_party.battle_members
  444.         actors.delete_at(@battle_member_window.index)
  445.         $game_party.set_battle_member(actors)
  446.         refresh_window
  447.       end
  448.     elsif Input.trigger?(Input::B)
  449.       if @battle_member_window.selected_index == nil  # 並び替え中でない
  450.         # 確認ウィンドウに切り替え
  451.         Sound.play_cancel
  452.         show_confirm_window
  453.       else                                            # 並び替え中
  454.         # 並び替え解除
  455.         Sound.play_cancel
  456.         @battle_member_window.selected_index = nil
  457.         @battle_member_window.refresh
  458.         @control_window.mode = Window_PartyFormControl::MODE_BATTLE_MEMBER
  459.       end
  460.     elsif Input.trigger?(Input::C)
  461.       if @battle_member_window.selected_index == nil  # 並び替え中でない
  462.         actor = @battle_member_window.actor
  463.         # アクターを外せない場合
  464.         if actor != nil && $game_party.actor_fixed?(actor.id)
  465.           Sound.play_buzzer
  466.           return
  467.         end
  468.         # パーティメンバーウィンドウに切り替え
  469.         Sound.play_decision
  470.         @battle_member_window.active = false
  471.         @party_member_window.active = true
  472.         @control_window.mode = Window_PartyFormControl::MODE_PARTY_MEMBER
  473.       else                                            # 並び替え中
  474.         unless can_change_shift?(@battle_member_window.actor)
  475.           Sound.play_buzzer
  476.           return
  477.         end
  478.         # 並び替え実行
  479.         Sound.play_decision
  480.         index1 = @battle_member_window.selected_index
  481.         index2 = @battle_member_window.index
  482.         change_shift(index1, index2)
  483.         @control_window.mode = Window_PartyFormControl::MODE_BATTLE_MEMBER
  484.       end
  485.     elsif Input.trigger?(Input::X)
  486.       # 並び替え不可能な場合
  487.       unless can_change_shift?(@battle_member_window.actor)
  488.         Sound.play_buzzer
  489.         return
  490.       end
  491.       if @battle_member_window.selected_index == nil  # 並び替え中でない
  492.         # 並び替え開始
  493.         Sound.play_decision
  494.         @battle_member_window.selected_index = @battle_member_window.index
  495.         @battle_member_window.refresh
  496.         @control_window.mode = Window_PartyFormControl::MODE_SHIFT_CHANGE
  497.       else                                            # 並び替え中
  498.         # 並び替え実行
  499.         Sound.play_decision
  500.         index1 = @battle_member_window.selected_index
  501.         index2 = @battle_member_window.index
  502.         change_shift(index1, index2)
  503.         @control_window.mode = Window_PartyFormControl::MODE_BATTLE_MEMBER
  504.       end
  505.     end
  506.   end
  507.   #--------------------------------------------------------------------------
  508.   # ○ 並び替え可否判定
  509.   #--------------------------------------------------------------------------
  510.   def can_change_shift?(actor)
  511.     # 選択したアクターが存在しない、または並び替え不能な場合
  512.     if actor == nil ||
  513.         (KGC::LargeParty::FORBID_CHANGE_SHIFT_FIXED &&
  514.          $game_party.actor_fixed?(actor.id))
  515.       return false
  516.     end
  517.     return true
  518.   end
  519.   #--------------------------------------------------------------------------
  520.   # ○ 並び替え
  521.   #--------------------------------------------------------------------------
  522.   def change_shift(index1, index2)
  523.     # 位置を入れ替え
  524.     $game_party.change_shift(index1, index2)
  525.     # 選択済みインデックスをクリア
  526.     @battle_member_window.selected_index = nil
  527.     refresh_window
  528.   end
  529.   #--------------------------------------------------------------------------
  530.   # ○ フレーム更新 (パーティウィンドウがアクティブの場合)
  531.   #--------------------------------------------------------------------------
  532.   def update_party_member
  533.     @status_window.set_actor(@party_member_window.actor)
  534.     if Input.trigger?(Input::B)
  535.       Sound.play_cancel
  536.       # 戦闘メンバーウィンドウに切り替え
  537.       @battle_member_window.active = true
  538.       @party_member_window.active = false
  539.         @control_window.mode = Window_PartyFormControl::MODE_BATTLE_MEMBER
  540.     elsif Input.trigger?(Input::C)
  541.       actor = @party_member_window.actor
  542.       # アクターが戦闘メンバーに含まれる場合
  543.       if $game_party.battle_members.include?(actor)
  544.         Sound.play_buzzer
  545.         return
  546.       end
  547.       # アクターを入れ替え
  548.       Sound.play_decision
  549.       actors = $game_party.all_members
  550.       battle_actors = $game_party.battle_members
  551.       if @battle_member_window.actor != nil
  552.         actors[@party_member_window.actor_index] = @battle_member_window.actor
  553.         actors[@battle_member_window.index] = actor
  554.         $game_party.set_member(actors.compact)
  555.       end
  556.       battle_actors[@battle_member_window.index] = actor
  557.       $game_party.set_battle_member(battle_actors.compact)
  558.       refresh_window
  559.       # 戦闘メンバーウィンドウに切り替え
  560.       @battle_member_window.active = true
  561.       @party_member_window.active = false
  562.       @control_window.mode = Window_PartyFormControl::MODE_BATTLE_MEMBER
  563.     end
  564.   end
  565.   #--------------------------------------------------------------------------
  566.   # ○ フレーム更新 (確認ウィンドウがアクティブの場合)
  567.   #--------------------------------------------------------------------------
  568.   def update_confirm
  569.     if Input.trigger?(Input::B)
  570.       Sound.play_cancel
  571.       hide_confirm_window
  572.     elsif Input.trigger?(Input::C)
  573.       case @confirm_window.index
  574.       when 0  # 編成完了
  575.         # 戦闘メンバーがいない場合
  576.         if $game_party.battle_members.size == 0
  577.           Sound.play_buzzer
  578.           return
  579.         end
  580.         Sound.play_decision
  581.         return_scene
  582.       when 1  # 編成中断
  583.         Sound.play_decision
  584.         # パーティを編成前の状態に戻す
  585.         $game_party.set_member(@party_actors)
  586.         $game_party.set_battle_member(@battle_actors)
  587.         return_scene
  588.       when 2  # キャンセル
  589.         Sound.play_cancel
  590.         hide_confirm_window
  591.       end
  592.     end
  593.   end
  594.   #--------------------------------------------------------------------------
  595.   # ○ 確認ウィンドウの表示
  596.   #--------------------------------------------------------------------------
  597.   def show_confirm_window
  598.     if @battle_member_window.active
  599.       @last_active_window = @battle_member_window
  600.     else
  601.       @last_active_window = @party_member_window
  602.     end
  603.     @battle_member_window.active = false
  604.     @party_member_window.active = false

  605.     @confirm_window.draw_item(0, $game_party.battle_members.size > 0)
  606.     @confirm_window.open
  607.     @confirm_window.active = true
  608.   end
  609.   #--------------------------------------------------------------------------
  610.   # ○ 確認ウィンドウの非表示
  611.   #--------------------------------------------------------------------------
  612.   def hide_confirm_window
  613.     @confirm_window.active = true
  614.     @confirm_window.close
  615.     @last_active_window.active = true
  616.   end
  617. end

  618. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  619. #==============================================================================
  620. # ■ Scene_Battle
  621. #==============================================================================

  622. class Scene_Battle < Scene_Base
  623.   #--------------------------------------------------------------------------
  624.   # ● メッセージ表示が終わるまでウェイト
  625.   #--------------------------------------------------------------------------
  626.   alias wait_for_message_KGC_LargeParty wait_for_message
  627.   def wait_for_message
  628.     return if @ignore_wait_for_message  # メッセージ終了までのウェイトを無視

  629.     wait_for_message_KGC_LargeParty
  630.   end
  631.   #--------------------------------------------------------------------------
  632.   # ● レベルアップの表示
  633.   #--------------------------------------------------------------------------
  634.   alias display_level_up_KGC_LargeParty display_level_up
  635.   def display_level_up
  636.     @ignore_wait_for_message = true

  637.     display_level_up_KGC_LargeParty

  638.     exp = $game_troop.exp_total * KGC::LargeParty::STAND_BY_EXP_RATE / 1000
  639.     $game_party.stand_by_members.each { |actor|
  640.       if actor.exist?
  641.         actor.gain_exp(exp, KGC::LargeParty::SHOW_STAND_BY_LEVEL_UP)
  642.       end
  643.     }
  644.     @ignore_wait_for_message = false
  645.     wait_for_message
  646.   end
  647.   #--------------------------------------------------------------------------
  648.   # ● パーティコマンド選択の開始
  649.   #--------------------------------------------------------------------------
  650.   alias start_party_command_selection_KGC_LargeParty start_party_command_selection
  651.   def start_party_command_selection
  652.     if $game_temp.in_battle
  653.       @status_window.index = 0
  654.     end

  655.     start_party_command_selection_KGC_LargeParty
  656.   end

  657.   if KGC::LargeParty::USE_BATTLE_PARTYFORM
  658.   #--------------------------------------------------------------------------
  659.   # ● 情報表示ビューポートの作成
  660.   #--------------------------------------------------------------------------
  661.   alias create_info_viewport_KGC_LargeParty create_info_viewport
  662.   def create_info_viewport
  663.     create_info_viewport_KGC_LargeParty

  664.     @__command_partyform_index =
  665.       @party_command_window.add_command(Vocab.partyform_battle)
  666.     @party_command_window.draw_item(@__command_partyform_index,
  667.       $game_party.battle_partyform_enable?)
  668.   end
  669.   #--------------------------------------------------------------------------
  670.   # ● パーティコマンド選択の更新
  671.   #--------------------------------------------------------------------------
  672.   alias update_party_command_selection_KGC_LargeParty update_party_command_selection
  673.   def update_party_command_selection
  674.     if Input.trigger?(Input::C)
  675.       case @party_command_window.index
  676.       when @__command_partyform_index  # パーティ編成
  677.         unless $game_party.battle_partyform_enable?
  678.           Sound.play_buzzer
  679.           return
  680.         end
  681.         Sound.play_decision
  682.         process_partyform
  683.         return
  684.       end
  685.     end

  686.     update_party_command_selection_KGC_LargeParty
  687.   end
  688.   #--------------------------------------------------------------------------
  689.   # ○ パーティ編成の処理
  690.   #--------------------------------------------------------------------------
  691.   def process_partyform
  692.     Graphics.freeze
  693.     snapshot_for_background
  694.     $scene = Scene_PartyForm.new(0, Scene_PartyForm::HOST_BATTLE)
  695.     $scene.main
  696.     $scene = self
  697.     @status_window.refresh
  698.     perform_transition
  699.   end
  700.   end
  701. end
复制代码

Lv1.梦旅人

梦石
0
星屑
835
在线时间
20 小时
注册时间
2012-3-16
帖子
4
2
发表于 2012-12-26 00:03:50 | 只看该作者
這個我正好也在用!
您要固定成員是嗎?
只要在地圖中新增一個事件點,
選擇事件指令的"腳本",
在裡面輸入:$game_party.fix_actor(1,true)-1就是1號角色,
這樣就ok啦!
希望能幫到您!

评分

参与人数 1星屑 +80 收起 理由
咕噜 + 80 认可答案

查看全部评分

回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
3 小时
注册时间
2007-3-2
帖子
13
3
 楼主| 发表于 2012-12-26 16:47:19 | 只看该作者
小星星兔 发表于 2012-12-26 00:03
這個我正好也在用!
您要固定成員是嗎?
只要在地圖中新增一個事件點,

那我试试~~这脚本还有什么其他功能吗~?我是脚本白痴~~
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
3 小时
注册时间
2007-3-2
帖子
13
4
 楼主| 发表于 2012-12-26 16:51:53 | 只看该作者
小星星兔 发表于 2012-12-26 00:03
這個我正好也在用!
您要固定成員是嗎?
只要在地圖中新增一個事件點,

还有个问题~~就是更换顺序问题~~如果角色1和角色2更换了领队顺序~~那如果主角显示动画~或是主角跳跃什么的~
那是在主角身上显示~还是在角色2身上显示??
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
3 小时
注册时间
2007-3-2
帖子
13
5
 楼主| 发表于 2012-12-26 17:04:50 | 只看该作者
小星星兔 发表于 2012-12-26 00:03
這個我正好也在用!
您要固定成員是嗎?
只要在地圖中新增一個事件點,

谢谢~这个差不多会用了~~原来得在事件调用脚本~~谢谢~~
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-9-27 22:15

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表