Project1

标题: 【新人求问】求一个能和怪物图鉴共存的人物扩张的脚本 [打印本页]

作者: cx940418cx    时间: 2014-8-15 02:26
标题: 【新人求问】求一个能和怪物图鉴共存的人物扩张的脚本
本帖最后由 cx940418cx 于 2014-8-15 02:27 编辑

这两天刚接触RMXP,在自己的工程中用了怪物图鉴的脚本,然后今天看到有人物扩张的脚本,待机人数10人的那个版本直接贴在脚本编辑器里结果进入战斗的时候报错。尝试着删掉图鉴之后恢复正常。无奈之下再网上找到了另一个待机人数20人的版本,可能我找的脚本不太对,用了之后倒是不和图鉴冲突了,但是战斗之后待机角色全都会不翼而飞,只剩下参展角色。所以在这里求个解决办法,希望能把这两个功能整合到一起,毕竟这两个功能真的都很好用。错误的贴图,和工程我下面贴出来,希望大大么能帮着看下

另外,如果人物扩张不能和图鉴兼容的话,能不能给个能和图鉴兼容的人物仓库,网上的我试了,也是报错
这是报错的截图
Project8.rar (199.19 KB, 下载次数: 43) 这是出错的文件,图鉴和人物扩张脚本都在里面
这个是每次战斗之后待机队员都会不翼而飞的那个人物扩张脚本,我尝试过新开一个工程再用这个脚本,结果还是一样,应该不是冲突问题
RUBY 代码复制
  1. #==============================================================================
  2. # 本脚本来自[url]www.66RPG.com[/url],使用和转载请保留此信息
  3. #==============================================================================  
  4.  
  5. # ▼▲▼ XRXS26. 人物扩张系统 ver..05 ▼▲▼
  6. # by 桜雅 在土
  7.  
  8. #==============================================================================
  9. # □ 初始化定义
  10. #==============================================================================
  11. module XRXS26
  12.   FRONT_MEMBER_LIMIT    = 4        # 战斗参战人数最大值
  13.   BACKWARD_MEMBER_LIMIT = 16        # 待机人数最大值
  14.   BACKWARD_EXP_GAINABLE = false     # 待机人物是否获得经验
  15.   MENU_STATUS_STRETCH   = true    # 3人以下的时候,菜单是否拉伸大小
  16. end
  17. #------------------------------------------------------------------------------
  18. # 菜单页面状态
  19. #------------------------------------------------------------------------------
  20. class Window_MenuStatus < Window_Selectable
  21.   # 列数
  22.   COLUMN_MAX = 1
  23.   # 光标高度
  24.   CURSOR_HEIGHT = 96
  25.   # 一行的高度
  26.   LINE_HEIGHT = 116
  27. end
  28. #------------------------------------------------------------------------------
  29. # 菜单场景
  30. #------------------------------------------------------------------------------
  31. class Scene_Menu
  32.   MENU_MEMBER_CHANGE_KEY_GO    = Input::RIGHT # 进入键
  33.   MENU_MEMBER_CHANGE_KEY_END   = Input::LEFT  # 离开键
  34.   MENU_MEMBER_CHANGE_INDEX_MIN = 0            # 可更换角色最小编号
  35.   FORCETOBATTLE_ACTORS         = []           # 不能待机的角色编号
  36.   UMBATTLABLE_ACTORS           = []           # 不能加入战斗的角色编号
  37.   UNMOVABLE_ACTORS             = []           # 不能移动的角色编号
  38. end
  39. #------------------------------------------------------------------------------
  40. #
  41. # 解説
  42. #    Game_Partyの @actors のうち先頭から↑FRONT_MEMBER_LIMIT番目までのアクターを
  43. #   戦闘メンバーとして、それ以上を待機メンバーとして扱います。
  44. #
  45. #==============================================================================
  46. # ■ Game_Party
  47. #==============================================================================
  48. class Game_Party
  49.   #--------------------------------------------------------------------------
  50.   # ○ インクルード
  51.   #--------------------------------------------------------------------------
  52.   include XRXS26
  53.   #--------------------------------------------------------------------------
  54.   # ○ 公開インスタンス変数
  55.   #--------------------------------------------------------------------------
  56.   attr_reader   :backword_actors          # 待機アクター
  57.   #--------------------------------------------------------------------------
  58.   # ● オブジェクト初期化
  59.   #--------------------------------------------------------------------------
  60.   alias xrxs26_initialize initialize
  61.   def initialize
  62.     xrxs26_initialize
  63.     # 待機メンバー配列を初期化
  64.     @backword_actors = []
  65.   end
  66.   #--------------------------------------------------------------------------
  67.   # ● アクターを加える
  68.   #--------------------------------------------------------------------------
  69.   def add_actor(actor_id)
  70.     # アクターを取得
  71.     actor = $game_actors[actor_id]
  72.     # このアクターがパーティにいない場合
  73.     if not @actors.include?(actor)
  74.       # 満員でないならメンバーに追加
  75.       if @actors.size < (FRONT_MEMBER_LIMIT + BACKWARD_MEMBER_LIMIT)
  76.         # アクターを追加
  77.         @actors.push(actor)
  78.         # プレイヤーをリフレッシュ
  79.         $game_player.refresh
  80.       end
  81.     end
  82.   end
  83. end
  84. #==============================================================================
  85. # ■ Spriteset_Battle
  86. #==============================================================================
  87. class Spriteset_Battle
  88.   #--------------------------------------------------------------------------
  89.   # ● インクルード
  90.   #--------------------------------------------------------------------------
  91.   include XRXS26
  92.   #--------------------------------------------------------------------------
  93.   # ● フレーム更新
  94.   #--------------------------------------------------------------------------
  95.   alias xrxs26_initialize initialize
  96.   def initialize
  97.     xrxs26_initialize
  98.     #
  99.     # 以下、五人目以降のアクタースプライトの追加処理---
  100.     #
  101.     # アクターが表示されるビューポートを、とりあえず先頭の人から取得しとく(素
  102.     actor_viewport = @actor_sprites[0].viewport
  103.     # 戦闘参加メンバーが5人以上の場合
  104.     if FRONT_MEMBER_LIMIT > 4
  105.       for i in 5..FRONT_MEMBER_LIMIT
  106.         # アクタースプライトを追加
  107.         @actor_sprites.push(Sprite_Battler.new(actor_viewport))
  108.         @actor_sprites[i-1].battler = $game_party.actors[i-1]
  109.       end
  110.     end
  111.     # ビューポートを更新
  112.     actor_viewport.update
  113.   end
  114. end
  115. #==============================================================================
  116. # ■ Scene_Battle
  117. #==============================================================================
  118. class Scene_Battle
  119.   #--------------------------------------------------------------------------
  120.   # ● インクルード
  121.   #--------------------------------------------------------------------------
  122.   include XRXS26
  123.   #--------------------------------------------------------------------------
  124.   # ● メイン処理 をパーティメンバー処理ではさむ
  125.   #--------------------------------------------------------------------------
  126.   alias xrxs26_main main
  127.   def main
  128.     # 待機メンバーへ退避----------
  129.     $game_party.actors[FRONT_MEMBER_LIMIT, BACKWARD_MEMBER_LIMIT] = nil
  130.     $game_party.actors.compact!
  131.     # メイン処理
  132.     xrxs26_main
  133.     # 待機メンバーから復帰
  134.     $game_party.actors[$game_party.actors.size,0] = $game_party.backword_actors
  135.     $game_party.actors.compact!
  136.   end
  137.   #--------------------------------------------------------------------------
  138.   # ● アフターバトルフェーズ開始
  139.   #--------------------------------------------------------------------------
  140.   alias xrxs26_start_phase5 start_phase5
  141.   def start_phase5
  142.     # 「待機メンバー経験値獲得」が有効 and 待機アクターが一人以上いる
  143.     if BACKWARD_EXP_GAINABLE and $game_party.backword_actors.size >= 1
  144.       # 待機メンバーから復帰
  145.       $game_party.actors[$game_party.actors.size,0] = $game_party.backword_actors
  146.       $game_party.backword_actors.clear
  147.       # 呼び戻す
  148.       xrxs26_start_phase5
  149.       # 待機メンバーへ退避----------
  150.       $game_party.backword_actors[0,0] = $game_party.actors[FRONT_MEMBER_LIMIT, BACKWARD_MEMBER_LIMIT]
  151.       $game_party.actors[FRONT_MEMBER_LIMIT, BACKWARD_MEMBER_LIMIT] = nil
  152.       $game_party.actors.compact!
  153.     else
  154.       # 呼び戻す
  155.       xrxs26_start_phase5
  156.     end
  157.   end
  158. end
  159. # ▽△▽ XRXL 4. 第二カーソル 機構 ▽△▽
  160. # by 桜雅 在土
  161.  
  162. #==============================================================================
  163. # --- XRXS. 第二カーソル 機構 ---
  164. #------------------------------------------------------------------------------
  165. #     ウィンドウに .index2 プロパティを追加します。
  166. #==============================================================================
  167. module XRXS_Cursor2
  168.   #--------------------------------------------------------------------------
  169.   # ● オブジェクト初期化
  170.   #--------------------------------------------------------------------------
  171.   def initialize(x, y, w, h)
  172.     super(x, y, h, w)
  173.     # 補助ウィンドウ(透明)を作成:カーソル専用
  174.     @xrxsc2_window = Window_Selectable.new(self.x, self.y, self.width, self.height)
  175.     @xrxsc2_window.opacity = 0
  176.     @xrxsc2_window.active = false
  177.     @xrxsc2_window.index = -1
  178.   end
  179.   #--------------------------------------------------------------------------
  180.   # ○ 第二カーソルの設置
  181.   #--------------------------------------------------------------------------
  182.   def index2
  183.     return @xrxsc2_window.index
  184.   end
  185.   def index2=(index)
  186.     @xrxsc2_window.index = index
  187.     if index == -1
  188.       @xrxsc2_window.cursor_rect.empty
  189.     else
  190.       @xrxsc2_window.x = self.x
  191.       @xrxsc2_window.y = self.y
  192.       @xrxsc2_window.cursor_rect = self.cursor_rect
  193.     end
  194.   end
  195.   #--------------------------------------------------------------------------
  196.   # ○ 先頭の行の設定
  197.   #--------------------------------------------------------------------------
  198.   def top_row=(row)
  199.     super
  200.     # 補助ウィンドウの oy を更新
  201.     pre_oy = @xrxsc2_window.oy
  202.     @xrxsc2_window.oy = self.oy
  203.     @xrxsc2_window.cursor_rect.y -= self.oy - pre_oy
  204.   end
  205.   #--------------------------------------------------------------------------
  206.   # ○ 解放
  207.   #--------------------------------------------------------------------------
  208.   def dispose
  209.     @xrxsc2_window.dispose
  210.     super
  211.   end
  212.   #--------------------------------------------------------------------------
  213.   # ○ X, Y 座標
  214.   #--------------------------------------------------------------------------
  215.   def x=(n)
  216.     super
  217.     @xrxsc2_window.x = self.x unless @xrxsc2_window.nil?
  218.   end
  219.   def y=(n)
  220.     super
  221.     @xrxsc2_window.y = self.y unless @xrxsc2_window.nil?
  222.   end
  223. end
  224. # ▼▲▼ XRXS26AX. +入れ替えメニュー ver.2 ▼▲▼ built 081113
  225. # by 桜雅 在土
  226.  
  227. #==============================================================================
  228. # ■ Window_MenuStatus
  229. #==============================================================================
  230. class Window_MenuStatus < Window_Selectable
  231.   #--------------------------------------------------------------------------
  232.   # ○ インクルード
  233.   #--------------------------------------------------------------------------
  234.   include XRXS26
  235.   include XRXS_Cursor2
  236.   #--------------------------------------------------------------------------
  237.   # ● 公開インスタンス変数
  238.   #--------------------------------------------------------------------------
  239.   attr_reader   :column_max             # 列数
  240.   #--------------------------------------------------------------------------
  241.   # ● オブジェクト初期化
  242.   #--------------------------------------------------------------------------
  243.   def initialize
  244.     h = 480
  245.     if MENU_STATUS_STRETCH
  246.       h = FRONT_MEMBER_LIMIT * 116 + 16
  247.     end
  248.     super(0, 0, 480, h)
  249.     h = ($game_party.actors.size - 1) * LINE_HEIGHT + CURSOR_HEIGHT
  250.     self.contents = Bitmap.new(width - 32, h)
  251.     refresh
  252.     self.active = false
  253.     self.index = -1
  254.   end
  255.   #--------------------------------------------------------------------------
  256.   # ○ 1 ページに表示できる行数の取得
  257.   #--------------------------------------------------------------------------
  258.   def page_row_max
  259.     if MENU_STATUS_STRETCH
  260.       return FRONT_MEMBER_LIMIT          # 戦闘パーティ最大数
  261.     else
  262.       return [FRONT_MEMBER_LIMIT, 4].max # 戦闘パーティ最大数(最低4)
  263.     end
  264.   end
  265.   #--------------------------------------------------------------------------
  266.   # ○ 先頭の行の取得
  267.   #--------------------------------------------------------------------------
  268.   def top_row
  269.     # ウィンドウ内容の転送元 Y 座標を、1 行の高さ LINE_HEIGHT で割る
  270.     return self.oy / LINE_HEIGHT
  271.   end
  272.   #--------------------------------------------------------------------------
  273.   # ○ 先頭の行の設定
  274.   #--------------------------------------------------------------------------
  275.   def top_row=(row)
  276.     super
  277.     self.oy = self.oy/32 * LINE_HEIGHT
  278.   end
  279.   #--------------------------------------------------------------------------
  280.   # ● カーソルの矩形更新
  281.   #--------------------------------------------------------------------------
  282.   def update_cursor_rect
  283.     super
  284.     unless @index < 0
  285.       y = (self.cursor_rect.y + self.oy) * LINE_HEIGHT/32 - self.oy
  286.       self.cursor_rect.set(0, y, self.cursor_rect.width, CURSOR_HEIGHT)
  287.     end
  288.   end
  289. end
  290. #==============================================================================
  291. # ■ Scene_Menu
  292. #==============================================================================
  293. class Scene_Menu
  294.   #--------------------------------------------------------------------------
  295.   # ○ インクルード
  296.   #--------------------------------------------------------------------------
  297.   include XRXS26
  298.   #--------------------------------------------------------------------------
  299.   # ● フレーム更新
  300.   #--------------------------------------------------------------------------
  301.   alias xrxs26ax_update update
  302.   def update
  303.     # インデックスを保存
  304.     @status_index = @status_window.index
  305.     # 呼び戻す
  306.     xrxs26ax_update
  307.   end
  308.   #--------------------------------------------------------------------------
  309.   # ● フレーム更新 (コマンドウィンドウがアクティブの場合)
  310.   #--------------------------------------------------------------------------
  311.   alias xrxs26ax_update_command update_command
  312.   def update_command
  313.     # 呼び戻す
  314.     xrxs26ax_update_command
  315.     # 入れ替え移行キーが押されたとき、@command_window.indexが設定値以上
  316.     if Input.trigger?(MENU_MEMBER_CHANGE_KEY_GO) and
  317.        @command_window.index >= MENU_MEMBER_CHANGE_INDEX_MIN
  318.       # 決定 SE を演奏
  319.       $game_system.se_play($data_system.decision_se)
  320.       # カーソル位置を記憶
  321.       @command_index_before_menu_member_change = @command_window.index
  322.       # 入れ替えウィンドウへ移行
  323.       @command_window.active = false
  324.       @command_window.index = -1
  325.       @status_window.active = true
  326.       @status_window.index = 0
  327.     end
  328.   end
  329.   #--------------------------------------------------------------------------
  330.   # ● フレーム更新 (ステータスウィンドウがアクティブの場合)
  331.   #--------------------------------------------------------------------------
  332.   alias xrxs26ax_update_status update_status
  333.   def update_status
  334.     # 呼び戻す
  335.     if @command_window.index != -1
  336.       xrxs26ax_update_status
  337.       return
  338.     end
  339.     # B ボタンか入れ替え終了キーが押されたとき
  340.     if ((Input.trigger?(Input::B) or Input.trigger?(MENU_MEMBER_CHANGE_KEY_END)) and
  341.         @status_window.index2 == -1 and
  342.         @status_index%@status_window.column_max == 0)
  343.       # キャンセル SE を演奏
  344.       $game_system.se_play($data_system.cancel_se)
  345.       # コマンドウィンドウをアクティブにする
  346.       @command_window.active = true
  347.       @command_window.index = 0
  348.       @status_window.active = false
  349.       @status_window.index = -1
  350.       return
  351.     end
  352.     # B ボタンが押されたとき
  353.     if Input.trigger?(Input::B) and @status_window.index2 >= 0
  354.       @status_window.index = @status_window.index2
  355.       @status_window.index2 = -1
  356.       return
  357.     end
  358.     # 決定キーが押されたとき
  359.     if Input.trigger?(Input::C)
  360.       if @status_window.index2 == -1
  361.         if UNMOVABLE_ACTORS.include?($game_party.actors[@status_window.index].id)
  362.           # ブザー SE を演奏
  363.           $game_system.se_play($data_system.buzzer_se)
  364.           return
  365.         end
  366.         # 決定 SE を演奏
  367.         $game_system.se_play($data_system.decision_se)
  368.         # メンバーの入れ替え一人目の決定
  369.         @status_window.index2 = @status_window.index
  370.       else
  371.         if UNMOVABLE_ACTORS.include?($game_party.actors[@status_window.index].id)
  372.           # ブザー SE を演奏
  373.           $game_system.se_play($data_system.buzzer_se)
  374.           return
  375.         end
  376.         # どちらかが戦闘メンバー かつ どちらかが戦闘禁止アクター の場合
  377.         if (@status_window.index < FRONT_MEMBER_LIMIT or
  378.             @status_window.index2 < FRONT_MEMBER_LIMIT) and
  379.            (UMBATTLABLE_ACTORS.include?($game_party.actors[@status_window.index].id) or
  380.             UMBATTLABLE_ACTORS.include?($game_party.actors[@status_window.index2].id))
  381.           # ブザー SE を演奏
  382.           $game_system.se_play($data_system.buzzer_se)
  383.           return
  384.         end
  385.         # どちらかが待機メンバー かつ どちらかが待機禁止アクター の場合
  386.         if (@status_window.index >= FRONT_MEMBER_LIMIT or
  387.             @status_window.index2 >= FRONT_MEMBER_LIMIT) and
  388.            (FORCETOBATTLE_ACTORS.include?($game_party.actors[@status_window.index].id) or
  389.             FORCETOBATTLE_ACTORS.include?($game_party.actors[@status_window.index2].id))
  390.           # ブザー SE を演奏
  391.           $game_system.se_play($data_system.buzzer_se)
  392.           return
  393.         end
  394.         # 決定 SE を演奏
  395.         $game_system.se_play($data_system.decision_se)
  396.         # メンバーの入れ替え二人目の決定と入れ替えの実行
  397.         actor2 = $game_party.actors[@status_window.index]
  398.         actor = $game_party.actors[@status_window.index2]
  399.         $game_party.actors[@status_window.index2] = actor2
  400.         $game_party.actors[@status_window.index] = actor
  401.         @status_window.index = @status_window.index2
  402.         @status_window.index2 = -1
  403.         # プレイヤーをリフレッシュ
  404.         $game_player.refresh
  405.         # ステータスウィンドウをリフレッシュ
  406.         @status_window.refresh
  407.       end
  408.       return
  409.     end
  410.   end
  411. end
  412.  
  413. #============================================================================================
  414. # 本脚本来自[url]www.66RPG.com[/url],转载和使用请保留此信息
  415. #============================================================================================
  416.  
  417. # ▼▲▼ XRXS26BX. +BUZZデザイン ▼▲▼ built 033109
  418. # by 桜雅 在土
  419.  
  420. #==============================================================================
  421. # □ 初始化定义
  422. #==============================================================================
  423. class Window_MenuStatus < Window_Selectable
  424.   #
  425.   # 不显示能力值的角色编号
  426.   #
  427.   NO_PARAMETER_ACTORS = []
  428. end
  429. #==============================================================================
  430. # ■ Window_MenuStatus
  431. #==============================================================================
  432. class Window_MenuStatus < Window_Selectable
  433.   #--------------------------------------------------------------------------
  434.   # ○ インクルード
  435.   #--------------------------------------------------------------------------
  436.   include XRXS26
  437.   #--------------------------------------------------------------------------
  438.   # ● 公開インスタンス変数
  439.   #--------------------------------------------------------------------------
  440.   attr_reader   :newitem_window
  441.   attr_reader   :bottomkeyhelp_window
  442.   #--------------------------------------------------------------------------
  443.   # ● オブジェクト初期化
  444.   #--------------------------------------------------------------------------
  445.   alias xrxs26bx_initialize initialize
  446.   def initialize
  447.     # 呼び戻す
  448.     xrxs26bx_initialize
  449.     # 寄生してウィンドウを作成
  450.     # ボトルキーヘルプウィンドウ
  451.     @bottomkeyhelp_window = Window_BottomKeyHelp.new
  452.     @bottomkeyhelp_window.visible = false
  453.     # 設定変更
  454.     self.height   = 448
  455.     self.contents = Bitmap.new(width - 32, height - 32)
  456.     refresh
  457.   end
  458.   #--------------------------------------------------------------------------
  459.   # ● リフレッシュ
  460.   #--------------------------------------------------------------------------
  461.   def refresh
  462.     self.contents.clear
  463.     @item_max = $game_party.actors.size
  464.     @column_max = 4
  465.     y = (FRONT_MEMBER_LIMIT+1)/2 * 64 + 28
  466.     self.contents.font.size = 18
  467.     self.contents.font.color = system_color
  468.     self.contents.draw_text(4, 0, 92, 28, "战斗人数")
  469.     self.contents.draw_text(4, y-48, 92, 28, "待机人数")
  470.     self.contents.font.size = 12
  471.     for i in 0...$game_party.actors.size
  472.       x = 64 + i%4 * 112
  473.       y = i/4 *  72 + 24
  474.       actor = $game_party.actors[i]
  475.       if i >= FRONT_MEMBER_LIMIT
  476.         y += 32
  477.         self.contents.font.color = disabled_color
  478.         self.contents.draw_text(x, y, 80, 32, actor.name)
  479.       else
  480.         draw_actor_name(actor   , x   -24  , y     )
  481.       end
  482.       draw_actor_graphic(actor, x - 48, y + 64)
  483.       unless NO_PARAMETER_ACTORS.include?(actor.id)
  484.         draw_actor_level(actor  , x -64, y +48   )
  485.         draw_actor_hp_k(actor     , x- 32, y + 16)
  486.         draw_actor_sp_k(actor     , x- 32 , y + 32)
  487.         draw_actor_state(actor  , x, y + 48)
  488.       end
  489.     end
  490.   end
  491.   #--------------------------------------------------------------------------
  492.   # ○ フレーム更新
  493.   #--------------------------------------------------------------------------
  494.   def update
  495.     # ウィンドウを更新
  496.     @bottomkeyhelp_window.update
  497.     super
  498.   end
  499.   #--------------------------------------------------------------------------
  500.   # ○ 解放
  501.   #--------------------------------------------------------------------------
  502.   def dispose
  503.     @bottomkeyhelp_window.dispose
  504.     super
  505.   end
  506.   #--------------------------------------------------------------------------
  507.   # ● カーソルの矩形更新
  508.   #--------------------------------------------------------------------------
  509.   def update_cursor_rect
  510.     if @index < 0
  511.       self.cursor_rect.empty
  512.     else
  513.       y = @index/4 * 72 + 24
  514.       if @index >= FRONT_MEMBER_LIMIT
  515.         y += 32
  516.       end
  517.       self.cursor_rect.set(@index%4 * 112, y, 112, 72)
  518.     end
  519.   end
  520. end
  521. #==============================================================================
  522. # ■ Scene_Menu
  523. #==============================================================================
  524. class Scene_Menu
  525.   #--------------------------------------------------------------------------
  526.   # ● フレーム更新
  527.   #--------------------------------------------------------------------------
  528.   alias xrxs26bx_update update
  529.   def update
  530.     # 登録
  531.     if @bottomkeyhelp_window.nil?
  532.       @bottomkeyhelp_window = @status_window.bottomkeyhelp_window
  533.       @bottomkeyhelp_window.visible = true
  534.       set_keyhelp1
  535.     end
  536.     # 呼び戻す
  537.     xrxs26bx_update
  538.   end
  539.   #--------------------------------------------------------------------------
  540.   # ● フレーム更新 (コマンドウィンドウがアクティブの場合)
  541.   #--------------------------------------------------------------------------
  542.   alias xrxs26bx_update_command update_command
  543.   def update_command
  544.     # 呼び戻す
  545.     xrxs26bx_update_command
  546.     # 入れ替え移行キーが押されたとき
  547.     if @command_window.index == -1 and @status_window.active
  548.       set_keyhelp2
  549.     end
  550.   end
  551.   #--------------------------------------------------------------------------
  552.   # ● フレーム更新 (ステータスウィンドウがアクティブの場合)
  553.   #--------------------------------------------------------------------------
  554.   alias xrxs26bx_update_status update_status
  555.   def update_status
  556.     # 保存
  557.     last_index = @status_window.index2
  558.     # 呼び戻す
  559.     xrxs26bx_update_status
  560.     #
  561.     if last_index != @status_window.index2
  562.       # 一人目を選択した場合
  563.       if @status_window.index2 >= 0
  564.         set_keyhelp3
  565.       else
  566.         set_keyhelp2
  567.       end
  568.     end
  569.     # 戻った場合
  570.     unless @status_window.active
  571.       set_keyhelp1
  572.     end
  573.   end
  574.   #--------------------------------------------------------------------------
  575.   # ○ キーヘルプを設定 1
  576.   #--------------------------------------------------------------------------
  577.   def set_keyhelp1
  578.     @bottomkeyhelp_window.clear
  579.     @bottomkeyhelp_window.add("B","关闭本窗口")
  580.     @bottomkeyhelp_window.add("C","确定")
  581.     @bottomkeyhelp_window.add("→","人物顺序调整")
  582.   end
  583.   #--------------------------------------------------------------------------
  584.   # ○ キーヘルプを設定 2
  585.   #--------------------------------------------------------------------------
  586.   def set_keyhelp2
  587.     @bottomkeyhelp_window.clear
  588.     @bottomkeyhelp_window.add("←,B","返回")
  589.     @bottomkeyhelp_window.add("C","第一个人物确定")
  590.   end
  591.   #--------------------------------------------------------------------------
  592.   # ○ キーヘルプを設定 3
  593.   #--------------------------------------------------------------------------
  594.   def set_keyhelp3
  595.     @bottomkeyhelp_window.clear
  596.     @bottomkeyhelp_window.add("B","返回")
  597.     @bottomkeyhelp_window.add("C","第二个人物确定")
  598.   end
  599. end
  600.  
  601.  
  602.  
  603. #==============================================================================
  604. # □ Window_BottomKeyHelp
  605. #------------------------------------------------------------------------------
  606. #     画面下で操作説明をする透明なウィンドウです。
  607. #==============================================================================
  608. class Window_BottomKeyHelp < Window_Base
  609.   #--------------------------------------------------------------------------
  610.   # ○ オブジェクト初期化
  611.   #--------------------------------------------------------------------------
  612.   def initialize
  613.     super(0, 432, 640, 64)
  614.     self.contents = Bitmap.new(width - 32, height - 32)
  615.     self.opacity = 0
  616.     clear
  617.   end
  618.   #--------------------------------------------------------------------------
  619.   # ○ クリア
  620.   #--------------------------------------------------------------------------
  621.   def clear
  622.     self.contents.clear
  623.     @now_x = 608
  624.   end
  625.   #--------------------------------------------------------------------------
  626.   # ○ 追加
  627.   #--------------------------------------------------------------------------
  628.   def add(key, explanation)
  629.     # 計算
  630.     self.contents.font.size = 20
  631.     x  = self.contents.text_size(key).width
  632.     self.contents.font.size = 16
  633.     x += self.contents.text_size(explanation).width + 8
  634.     @now_x -= x
  635.     # 描写
  636.     self.contents.font.size = 20
  637.     self.contents.font.color = system_color
  638.     self.contents.draw_text(@now_x, 0, x, 32, key, 0)
  639.     self.contents.font.size = 16
  640.     self.contents.font.color = normal_color
  641.     self.contents.draw_text(@now_x, 0, x, 32, explanation, 2)
  642.     # 余白
  643.     @now_x -= 32
  644.   end
  645. end
  646.  
  647. #==============================================================================
  648. # ■ Window_Target
  649. #------------------------------------------------------------------------------
  650. #  物品画面与特技画面的、使用对像角色选择窗口。
  651. #==============================================================================
  652.  
  653. class Window_Target < Window_Selectable
  654. #--------------------------------------------------------------------------
  655. # ● 初始化对像
  656. #--------------------------------------------------------------------------
  657. def initialize
  658.    super(0, 0, 336, 480)
  659.    self.contents = Bitmap.new(width - 32, $game_party.actors.size*112)
  660.    self.z += 10
  661.    @item_max = $game_party.actors.size
  662.    @top_row = 0
  663.    refresh
  664. end
  665. #--------------------------------------------------------------------------
  666. # ● 刷新
  667. #--------------------------------------------------------------------------
  668. def refresh
  669.    self.contents.clear
  670.    for i in 0...$game_party.actors.size
  671.      x = 4
  672.      y = i * 112
  673.      actor = $game_party.actors[i]
  674.      draw_actor_name(actor, x, y)
  675.      draw_actor_class(actor, x + 144, y)
  676.      draw_actor_level(actor, x + 8, y + 32)
  677.      draw_actor_state(actor, x + 8, y + 64)
  678.      draw_actor_hp(actor, x + 152, y + 32)
  679.      draw_actor_sp(actor, x + 152, y + 64)
  680.    end
  681. end  
  682. #--------------------------------------------------------------------------
  683. # ● 刷新光标矩形
  684. #--------------------------------------------------------------------------
  685. def update_cursor_rect   
  686.    # 光标位置 -1 为全选、-2 以下为单独选择 (使用者自身)
  687.    if @index <= -2
  688.      self.cursor_rect.set(0, (@index + 10) * 112, self.width - 32, 96)
  689.    elsif @index == -1
  690.      self.cursor_rect.set(0, 0, self.width - 32, @item_max * 112 - 20)
  691.    else
  692.      tpy = @index * 112 - self.oy
  693.      self.cursor_rect.set(0, tpy, self.width - 32, 96)
  694.      if @index < @top_row
  695.        @top_row = @index
  696.        self.oy = @top_row *112
  697.      end
  698.      if @index > @top_row+3
  699.        @top_row = @index-3
  700.        self.oy = @top_row *112
  701.      end
  702.    end   
  703. end
  704. end
  705.  
  706. class Window_Base
  707.   #--------------------------------------------------------------------------
  708.   # ● 描绘 HP
  709.   #     actor : 角色
  710.   #     x     : 描画目标 X 坐标
  711.   #     y     : 描画目标 Y 坐标
  712.   #     width : 描画目标的宽
  713.   #--------------------------------------------------------------------------
  714.   def draw_actor_hp_k(actor, x, y, width = 144)
  715.     # 描绘字符串 "HP"
  716.     self.contents.font.color = system_color
  717.     self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
  718.     # 计算描绘 MaxHP 所需的空间
  719.     if width - 32 >= 108
  720.       hp_x = x + width - 108 - 40
  721.       flag = true
  722.     elsif width - 32 >= 48
  723.       hp_x = x + width - 48
  724.       flag = false
  725.     end
  726.     # 描绘 HP
  727.     self.contents.font.color = actor.hp == 0 ? knockout_color :
  728.       actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
  729.     self.contents.draw_text(hp_x, y, 48, 32, actor.hp.to_s, 2)
  730.     # 描绘 MaxHP
  731.     if flag
  732.       self.contents.font.color = normal_color
  733.       self.contents.draw_text(hp_x + 48, y, 12, 32, "/", 1)
  734.       self.contents.draw_text(hp_x + 60, y, 48, 32, actor.maxhp.to_s)
  735.     end
  736.   end
  737.   #--------------------------------------------------------------------------
  738.   # ● 描绘 SP
  739.   #     actor : 角色
  740.   #     x     : 描画目标 X 坐标
  741.   #     y     : 描画目标 Y 坐标
  742.   #     width : 描画目标的宽
  743.   #--------------------------------------------------------------------------
  744.   def draw_actor_sp_k(actor, x, y, width = 144)
  745.     # 描绘字符串 "SP"
  746.     self.contents.font.color = system_color
  747.     self.contents.draw_text(x, y, 32, 32, $data_system.words.sp)
  748.     # 计算描绘 MaxSP 所需的空间
  749.     if width - 32 >= 108
  750.       sp_x = x + width - 108 - 40
  751.       flag = true
  752.     elsif width - 32 >= 48
  753.       sp_x = x + width - 48
  754.       flag = false
  755.     end
  756.     # 描绘 SP
  757.     self.contents.font.color = actor.sp == 0 ? knockout_color :
  758.       actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
  759.     self.contents.draw_text(sp_x, y, 48, 32, actor.sp.to_s, 2)
  760.     # 描绘 MaxSP
  761.     if flag
  762.       self.contents.font.color = normal_color
  763.       self.contents.draw_text(sp_x + 48, y, 12, 32, "/", 1)
  764.       self.contents.draw_text(sp_x + 60, y, 48, 32, actor.maxsp.to_s)
  765.     end
  766.   end
  767. end
  768. #==============================================================================
  769. # 本脚本来自[url]www.66RPG.com[/url],使用和转载请保留此信息
  770. #==============================================================================

作者: RyanBern    时间: 2014-8-15 10:47
应该是重复定义initialize导致的某些实变量没有初始化的问题,怪物图鉴脚本写得有点问题。
Scripts.rxdata (130.14 KB, 下载次数: 38)
把这个文件覆盖到Data/Scripts.rxdata即可,暂时没有发现问题。
作者: cx940418cx    时间: 2014-8-16 02:00
RyanBern 发表于 2014-8-15 10:47
应该是重复定义initialize导致的某些实变量没有初始化的问题,怪物图鉴脚本写得有点问题。

把这个文件覆盖 ...

可以用了,替换了文件之后不冲突了,谢谢版主O(∩_∩)O




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1