查看: 1189|回复: 0

[已经过期] 菜单角色数据条显示变量值问题

[复制链接]
梦石
0
星屑
1345
在线时间
378 小时
注册时间
2015-6-16
回帖
526
发表于 2017-9-2 09:27:28 | 显示全部楼层 |阅读模式

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

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

×
我想问问有没有大大知道怎么将角色的MP值改为显示变量值,能够特殊处理的(有些角色只有变量消耗的,肉包大大解决了战斗方面,菜单没有解决,还是显示HP和MP太违和了),自己添加是那种变量的条,或者是MP或者是TP。
以防万一,我发一个ACE菜单,不然一会基于默认系统改的脚本放到ACE菜单可能会无效。



  1. #==============================================================================
  2. #
  3. # ▼ Yanfly Engine Ace - Ace Menu Engine v1.07
  4. # -- Last Updated: 2012.01.03
  5. # -- Level: Normal, Hard
  6. # -- Requires: n/a
  7. #
  8. #==============================================================================

  9. $imported = {} if $imported.nil?
  10. $imported["YEA-AceMenuEngine"] = true

  11. #==============================================================================
  12. # ▼ Updates
  13. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  14. # 2012.01.03 - Compatibility Update: Ace Item Menu
  15. # 2012.01.01 - Compatibility Update: Kread-EX's Synthesis
  16. #            - Compatibility Update: Kread-EX's Grathnode Install
  17. #            - Compatibility Update: Yami's Slot Battle
  18. # 2011.12.23 - Script efficiency optimized.
  19. # 2011.12.19 - Compatibility Update: Class System
  20. # 2011.12.15 - Updated for better menu MP/TP gauge management.
  21. # 2011.12.13 - Compatibility Update: Ace Equip Engine
  22. # 2011.12.07 - Update to allow for switches to also hide custom commands.
  23. # 2011.12.06 - Started Script and Finished.
  24. #
  25. #==============================================================================
  26. # ▼ Introduction
  27. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  28. # The menu system in RPG Maker VX Ace is great. However, it lacks the user
  29. # customization that RPG Maker 2003 allowed. With this script, you can add,
  30. # remove, and rearrange menu commands as you see fit. In addition to that, you
  31. # can add in menu commands that lead to common events or even custom commands
  32. # provided through other scripts.
  33. #
  34. # This script also provides window appearance management such as setting almost
  35. # all command windows to be center aligned or changing the position of the
  36. # help window. You can also opt to show the TP Gauge in the main menu as well
  37. # as in the skill menu.
  38. #
  39. #==============================================================================
  40. # ▼ Instructions
  41. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  42. # To install this script, open up your script editor and copy/paste this script
  43. # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
  44. #
  45. # Edit the settings in the module below as you see fit.
  46. #
  47. #==============================================================================
  48. # ▼ Compatibility
  49. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  50. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  51. # it will run with RPG Maker VX without adjusting.
  52. #
  53. #==============================================================================

  54. module YEA
  55.   module MENU
  56.    
  57.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  58.     # - General Menu Settings -
  59.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  60.     # This changes the way menus appear in your game. You can change their
  61.     # alignment, and the location of the help window, Note that any non-Yanfly
  62.     # Engine Ace scripts may not conform to these menu styles.
  63.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  64.     HELP_WINDOW_LOCATION = 0     # 0-Top, 1-Middle, 2-Bottom.
  65.     COMMAND_WINDOW_ALIGN = 1     # 0-Left, 1-Middle, 2-Right.
  66.    
  67.     # These settings below adjust the visual appearance of the main menu.
  68.     # Change the settings as you see fit.
  69.     MAIN_MENU_ALIGN = 0          # 0-Left, 1-Middle, 2-Right.
  70.     MAIN_MENU_RIGHT = false      # false-Left, true-Right.
  71.     MAIN_MENU_ROWS  = 14         # Maximum number of rows for main menu.
  72.     DRAW_TP_GAUGE   = true       # If true, draws TP in the main menu.
  73.    
  74.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  75.     # - Main Menu Settings -
  76.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  77.     # These settings adjust the main menu, the order at which commands appear,
  78.     # what text is displayed, and what the commands are linked to. Here's a
  79.     # list of which commands do what:
  80.     #
  81.     # -------------------------------------------------------------------------
  82.     # :command         Description
  83.     # -------------------------------------------------------------------------
  84.     # :item            Opens up the item menu. Default menu item.
  85.     # :skill           Opens up the skill menu. Default menu item.
  86.     # :equip           Opens up the equip menu. Default menu item.
  87.     # :status          Opens up the status menu. Default menu item.
  88.     # :formation       Lets player manage party. Default menu item.
  89.     # :save            Opens up the save menu. Default menu item.
  90.     # :game_end        Opens up the shutdown menu. Default menu item.
  91.     #
  92.     # :class           Requires YEA - Class System
  93.     #
  94.     # :gogototori      Requires Kread-EX's Go Go Totori! Synthesis
  95.     # :grathnode       Requires Kread-EX's Grathnote Install
  96.     # :sslots          Requires Yami's YSA - Slot Battle
  97.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  98.     COMMANDS =[
  99.       :item,         # Opens up the item menu. Default menu item.
  100.       :skill,        # Opens up the skill menu. Default menu item.
  101.       :equip,        # Opens up the equip menu. Default menu item.
  102.       :class,        # Requires YEA - Class System.
  103.       :status,       # Opens up the status menu. Default menu item.
  104.       :formation,    # Lets player manage party. Default menu item.
  105.       :event_1,      # Launches Common Event 3. Common Event Command.
  106.       :event_2,      # Launches Common Event 4. Common Event Command.
  107.       :event_3,      # Launches Common Event 4. Common Event Command.
  108.       :event_4,      # Launches Common Event 13. Common Event Command.
  109.       :event_5,      # Launches Common Event 14. Common Event Command.
  110.       :event_6,      # Launches Common Event 15. Common Event Command.
  111.       :event_7,      # Launches Common Event 15. Common Event Command.
  112.       :event_8,      # Launches Common Event 16. Common Event Command.
  113.       :event_9,      # Launches Common Event 16. Common Event Command.
  114.       :event_10,      # Launches Common Event 16. Common Event Command.
  115.       :event_11,      # Launches Common Event 16. Common Event Command.
  116.       :event_12,
  117.       :event_13,
  118.       :event_14,
  119.       :event_15,
  120.       :event_16,
  121.       :event_17,
  122.       :event_18,
  123.       :event_19,
  124.       :event_礼包,
  125.     # :debug,        # Opens up debug menu. Custom Command.
  126.       :shop,         # Opens up a shop to pawn items. Custom Command.
  127.       :save,         # Opens up the save menu. Default menu item.
  128.       :game_end,     # Opens up the shutdown menu. Default menu item.
  129.     ] # Do not remove this.
  130.    
  131.     #--------------------------------------------------------------------------
  132.     # - Common Event Commands -
  133.     # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  134.     # If you insert one of the following commands into the COMMANDS array, the
  135.     # player can trigger a common event to launch. You can disable certain
  136.     # commands in the menu by binding them to a switch. If you don't want to
  137.     # disable them, set the switch to 0 and it will always be enabled. The
  138.     # ShowSwitch will prevent a command from appear if that switch is false.
  139.     # Set it to 0 for it to have no impact.
  140.     #--------------------------------------------------------------------------
  141.     COMMON_EVENT_COMMANDS ={
  142.     # :command => ["Display Name", EnableSwitch, ShowSwitch, Event ID],
  143.       :event_1 => [        "队伍管理",           0,        0  ,        98],
  144.       :event_2 => [        "职业",           0,          0,        12],
  145.       :event_3 => [        "兑换商店",           0,          0,        4],
  146.       :event_4 => [        "奖池系统",           0,          0,        7],
  147.       :event_5 => [        "天赋",           0,          0,        52],
  148.       :event_6 => [        "技能库",           0,          0,        46],
  149.       :event_7 => [        "宠物系统",           0,          57,        114],
  150.       :event_8 => [        "合成",           0,          3,        1],
  151.       :event_9 => [        "装备改造",           0,          4,        3],
  152.       :event_10 => [        "升级技能",           0,          7,        11],
  153.       :event_11 => [        "CG与图鉴",           0,          0,        31],
  154.       :event_12 => [        "副本",           0,          0,        59],
  155.       :event_13 => [        "打谱尼",           0,          5,        9],
  156. #~       :event_14 => [        "音乐盒",           0,          0,        111],
  157.       :event_15 => [        "按钮器游戏",           0,         0 ,        112],
  158.       :event_18 => [        "存档",           0,          0,        116],
  159.       :event_19 => [        "作弊模式",           0,          0,        2],
  160.       :debug   => [       "Debug",            0,          0, :command_debug],
  161.       :gogototori => ["Synthesis",            0,        0,  :command_totori],
  162.       :grathnode => [ "Grathnode",            0,        0, :command_install],

  163.     } # Do not remove this.
  164.    
  165.     #--------------------------------------------------------------------------
  166.     # - Custom Commands -
  167.     # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  168.     # For those who use scripts that may lead to other menu scenes, use this
  169.     # hash to manage custom commands that run specific script calls. You can
  170.     # disable certain commands in the menu by binding them to a switch. If you
  171.     # don't want to disable them, set the switch to 0. The ShowSwitch will
  172.     # prevent a command from appear if that switch is false. Set it to 0 for
  173.     # it to have no impact.
  174.     #--------------------------------------------------------------------------
  175.     CUSTOM_COMMANDS ={
  176.     # :command => ["Display Name", EnableSwitch, ShowSwitch, Handler Method],
  177.       :debug   => [       "Debug",            0,          0, :command_debug],
  178.       :gogototori => ["Synthesis",            0,        0,  :command_totori],
  179.       :formation => ["整队",            0,        0,  :command_formation],
  180.       :grathnode => [ "Grathnode",            0,        0, :command_install],
  181.     } # Do not remove this.
  182.    
  183.   end # MENU
  184. end # YEA

  185. #==============================================================================
  186. # ▼ Editting anything past this point may potentially result in causing
  187. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  188. # halitosis so edit at your own risk.
  189. #==============================================================================

  190. #==============================================================================
  191. # ■ Window_MenuCommand
  192. #------------------------------------------------------------------------------
  193. # This class is kept towards the top of the script to provide easier access.
  194. #==============================================================================

  195. class Window_MenuCommand < Window_Command
  196.   
  197.   #--------------------------------------------------------------------------
  198.   # overwrite method: make_command_list
  199.   #--------------------------------------------------------------------------
  200.   def make_command_list
  201.     for command in YEA::MENU::COMMANDS
  202.       case command
  203.       #--- Default Commands ---
  204.       when :item
  205.         add_command(Vocab::item,   :item,   main_commands_enabled)
  206.       when :skill
  207.         add_command(Vocab::skill,  :skill,  main_commands_enabled)
  208.       when :equip
  209.         add_command(Vocab::equip,  :equip,  main_commands_enabled)
  210.       when :status
  211.         add_command(Vocab::status, :status, main_commands_enabled)
  212.       when :formation
  213.         add_formation_command
  214.       when :save
  215.         add_original_commands
  216.         add_save_command
  217.       when :game_end
  218.         add_game_end_command
  219.       #--- Yanfly Engine Ace Commands ---
  220.       when :class
  221.         next unless $imported["YEA-ClassSystem"]
  222.         add_class_command
  223.       #--- Imported Commands ---
  224.       when :sslots
  225.         next unless $imported["YSA-SlotBattle"]
  226.         add_sslots_command
  227.       when :grathnode
  228.         next unless $imported["KRX-GrathnodeInstall"]
  229.         process_custom_command(command)
  230.       when :gogototori
  231.         next unless $imported["KRX-AlchemicSynthesis"]
  232.         process_custom_command(command)
  233.       #--- Imported Commands ---
  234.       else
  235.         process_common_event_command(command)
  236.         process_custom_command(command)
  237.       end
  238.     end
  239.   end
  240.   
  241.   #--------------------------------------------------------------------------
  242.   # new method: process_common_event_command
  243.   #--------------------------------------------------------------------------
  244.   def process_common_event_command(command)
  245.     return unless YEA::MENU::COMMON_EVENT_COMMANDS.include?(command)
  246.     show = YEA::MENU::COMMON_EVENT_COMMANDS[command][2]
  247.     continue = show <= 0 ? true : $game_switches[show]
  248.     return unless continue
  249.     text = YEA::MENU::COMMON_EVENT_COMMANDS[command][0]
  250.     switch = YEA::MENU::COMMON_EVENT_COMMANDS[command][1]
  251.     ext = YEA::MENU::COMMON_EVENT_COMMANDS[command][3]
  252.     enabled = switch <= 0 ? true : $game_switches[switch]
  253.     add_command(text, command, enabled, ext)
  254.   end
  255.   
  256.   #--------------------------------------------------------------------------
  257.   # new method: process_custom_command
  258.   #--------------------------------------------------------------------------
  259.   def process_custom_command(command)
  260.     return unless YEA::MENU::CUSTOM_COMMANDS.include?(command)
  261.     show = YEA::MENU::CUSTOM_COMMANDS[command][2]
  262.     continue = show <= 0 ? true : $game_switches[show]
  263.     return unless continue
  264.     text = YEA::MENU::CUSTOM_COMMANDS[command][0]
  265.     switch = YEA::MENU::CUSTOM_COMMANDS[command][1]
  266.     enabled = switch <= 0 ? true : $game_switches[switch]
  267.     add_command(text, command, enabled)
  268.   end
  269.   
  270. end # Window_MenuCommand

  271. #==============================================================================
  272. # ■ Menu
  273. #==============================================================================

  274. module Menu
  275.   
  276.   #--------------------------------------------------------------------------
  277.   # self.help_window_location
  278.   #--------------------------------------------------------------------------
  279.   def self.help_window_location
  280.     return YEA::MENU::HELP_WINDOW_LOCATION
  281.   end
  282.   
  283.   #--------------------------------------------------------------------------
  284.   # self.command_window_align
  285.   #--------------------------------------------------------------------------
  286.   def self.command_window_align
  287.     return YEA::MENU::COMMAND_WINDOW_ALIGN
  288.   end
  289.   
  290.   #--------------------------------------------------------------------------
  291.   # self.main_menu_align
  292.   #--------------------------------------------------------------------------
  293.   def self.main_menu_align
  294.     return YEA::MENU::MAIN_MENU_ALIGN
  295.   end
  296.   
  297.   #--------------------------------------------------------------------------
  298.   # self.main_menu_right
  299.   #--------------------------------------------------------------------------
  300.   def self.main_menu_right
  301.     return YEA::MENU::MAIN_MENU_RIGHT
  302.   end
  303.   
  304. end # Menu

  305. #==============================================================================
  306. # ■ Game_Actor
  307. #==============================================================================

  308. class Game_Actor < Game_Battler
  309.   
  310.   #--------------------------------------------------------------------------
  311.   # new method: draw_mp?
  312.   #--------------------------------------------------------------------------
  313.   def draw_mp?
  314.     return true unless draw_tp?
  315.     for skill in skills
  316.       next unless added_skill_types.include?(skill.stype_id)
  317.       return true if skill.mp_cost > 0
  318.     end
  319.     return false
  320.   end
  321.   
  322.   #--------------------------------------------------------------------------
  323.   # new method: draw_tp?
  324.   #--------------------------------------------------------------------------
  325.   def draw_tp?
  326.     return false unless $data_system.opt_display_tp
  327.     for skill in skills
  328.       next unless added_skill_types.include?(skill.stype_id)
  329.       return true if skill.tp_cost > 0
  330.     end
  331.     return false
  332.   end
  333.   
  334. end # Game_Actor

  335. #==============================================================================
  336. # ■ Window_Base
  337. #==============================================================================

  338. class Window_Base < Window
  339.   
  340.   #--------------------------------------------------------------------------
  341.   # overwrite method: draw_actor_simple_status
  342.   #--------------------------------------------------------------------------
  343.   def draw_actor_simple_status(actor, dx, dy)
  344.     dy -= line_height / 2
  345.     draw_actor_name(actor, dx, dy)
  346.     draw_actor_level(actor, dx, dy + line_height * 1)
  347.     draw_actor_icons(actor, dx, dy + line_height * 2)
  348.     dw = contents.width - dx - 124
  349.     draw_actor_class(actor, dx + 120, dy, dw)
  350.     draw_actor_hp(actor, dx + 120, dy + line_height * 1, dw)
  351.     if YEA::MENU::DRAW_TP_GAUGE && actor.draw_tp? && !actor.draw_mp?
  352.       draw_actor_tp(actor, dx + 120, dy + line_height * 2, dw)
  353.     elsif YEA::MENU::DRAW_TP_GAUGE && actor.draw_tp? && actor.draw_mp?
  354.       if $imported["YEA-BattleEngine"]
  355.         draw_actor_tp(actor, dx + 120, dy + line_height * 2, dw/2 + 1)
  356.         draw_actor_mp(actor, dx + 120 + dw/2, dy + line_height * 2, dw/2)
  357.       else
  358.         draw_actor_mp(actor, dx + 120, dy + line_height * 2, dw/2 + 1)
  359.         draw_actor_tp(actor, dx + 120 + dw/2, dy + line_height * 2, dw/2)
  360.       end
  361.     else
  362.       draw_actor_mp(actor, dx + 120, dy + line_height * 2, dw)
  363.     end
  364.   end
  365.   
  366. end # Window_Base

  367. #==============================================================================
  368. # ■ Window_Command
  369. #==============================================================================

  370. class Window_Command < Window_Selectable
  371.   
  372.   #--------------------------------------------------------------------------
  373.   # overwrite method: alignment
  374.   #--------------------------------------------------------------------------
  375.   def alignment
  376.     return Menu.command_window_align
  377.   end
  378.   
  379. end # Window_Command

  380. #==============================================================================
  381. # ■ Window_MenuCommand
  382. #==============================================================================

  383. class Window_MenuCommand < Window_Command
  384.   
  385.   #--------------------------------------------------------------------------
  386.   # alias method: init_command_position
  387.   #--------------------------------------------------------------------------
  388.   class <<self; alias init_command_position_ame init_command_position; end
  389.   def self.init_command_position
  390.     init_command_position_ame
  391.     @@last_command_oy = nil
  392.   end
  393.   
  394.   #--------------------------------------------------------------------------
  395.   # overwrite method: visible_line_number
  396.   #--------------------------------------------------------------------------
  397.   def visible_line_number
  398.     return [[item_max, YEA::MENU::MAIN_MENU_ROWS].min, 1].max
  399.   end
  400.   
  401.   #--------------------------------------------------------------------------
  402.   # overwrite method: alignment
  403.   #--------------------------------------------------------------------------
  404.   def alignment
  405.     return Menu.main_menu_align
  406.   end
  407.   
  408.   #--------------------------------------------------------------------------
  409.   # alias method: process_ok
  410.   #--------------------------------------------------------------------------
  411.   alias window_menucommand_process_ok_ame process_ok
  412.   def process_ok
  413.     @@last_command_oy = self.oy
  414.     window_menucommand_process_ok_ame
  415.   end
  416.   
  417.   #--------------------------------------------------------------------------
  418.   # alias method: select_last
  419.   #--------------------------------------------------------------------------
  420.   alias window_menucommand_select_last_ame select_last
  421.   def select_last
  422.     window_menucommand_select_last_ame
  423.     self.oy = @@last_command_oy unless @@last_command_oy.nil?
  424.     @@last_command_oy = nil
  425.   end
  426.   
  427. end # Window_MenuCommand

  428. #==============================================================================
  429. # ■ Scene_Menu
  430. #==============================================================================

  431. class Scene_Menu < Scene_MenuBase
  432.   
  433.   #--------------------------------------------------------------------------
  434.   # alias method: start
  435.   #--------------------------------------------------------------------------
  436.   alias scene_menu_start_ame start
  437.   def start
  438.     scene_menu_start_ame
  439.     relocate_windows
  440.   end
  441.   
  442.   #--------------------------------------------------------------------------
  443.   # new method: relocate_windows
  444.   #--------------------------------------------------------------------------
  445.   def relocate_windows
  446.     return unless Menu.main_menu_right
  447.     @command_window.x = Graphics.width - @command_window.width
  448.     @gold_window.x = Graphics.width - @gold_window.width
  449.     @status_window.x = 0
  450.   end
  451.   
  452.   def return_scene
  453.     $game_map.autoplay
  454.     SceneManager.return
  455.   end
  456.   
  457. end # Scene_Menu

  458. #==============================================================================
  459. # ■ Scene_Item
  460. #==============================================================================

  461. class Scene_Item < Scene_ItemBase
  462.   
  463.   #--------------------------------------------------------------------------
  464.   # alias method: start
  465.   #--------------------------------------------------------------------------
  466.   alias scene_item_start_ame start
  467.   def start
  468.     scene_item_start_ame
  469.     return if $imported["YEA-ItemMenu"]
  470.     relocate_windows
  471.   end
  472.   
  473.   #--------------------------------------------------------------------------
  474.   # new method: relocate_windows
  475.   #--------------------------------------------------------------------------
  476.   def relocate_windows
  477.     case Menu.help_window_location
  478.     when 0 # Top
  479.       @help_window.y = 0
  480.       @category_window.y = @help_window.height
  481.       @item_window.y = @category_window.y + @category_window.height
  482.     when 1 # Middle
  483.       @category_window.y = 0
  484.       @help_window.y = @category_window.height
  485.       @item_window.y = @help_window.y + @help_window.height
  486.     else # Bottom
  487.       @category_window.y = 0
  488.       @item_window.y = @category_window.height
  489.       @help_window.y = @item_window.y + @item_window.height
  490.     end
  491.     if $imported["YEA-ItemMenu"]
  492.       @types_window.y = @category_window.y
  493.       @status_window.y = @category_window.y
  494.     end
  495.   end
  496.   
  497. end # Scene_Item

  498. #==============================================================================
  499. # ■ Scene_Skill
  500. #==============================================================================

  501. class Scene_Skill < Scene_ItemBase
  502.   
  503.   #--------------------------------------------------------------------------
  504.   # alias method: start
  505.   #--------------------------------------------------------------------------
  506.   alias scene_skill_start_ame start
  507.   def start
  508.     scene_skill_start_ame
  509.     relocate_windows
  510.   end
  511.   
  512.   #--------------------------------------------------------------------------
  513.   # new method: relocate_windows
  514.   #--------------------------------------------------------------------------
  515.   def relocate_windows
  516.     case Menu.help_window_location
  517.     when 0 # Top
  518.       @help_window.y = 0
  519.       @command_window.y = @help_window.height
  520.       @status_window.y = @help_window.height
  521.       @item_window.y = @status_window.y + @status_window.height
  522.     when 1 # Middle
  523.       @command_window.y = 0
  524.       @status_window.y = 0
  525.       @help_window.y = @status_window.y + @status_window.height
  526.       @item_window.y = @help_window.y + @help_window.height
  527.     else # Bottom
  528.       @command_window.y = 0
  529.       @status_window.y = 0
  530.       @item_window.y = @status_window.y + @status_window.height
  531.       @help_window.y = @item_window.y + @item_window.height
  532.     end
  533.   end
  534.   
  535. end # Scene_Skill

  536. #==============================================================================
  537. # ■ Scene_Equip
  538. #==============================================================================

  539. class Scene_Equip < Scene_MenuBase
  540.   
  541.   #--------------------------------------------------------------------------
  542.   # alias method: start
  543.   #--------------------------------------------------------------------------
  544.   alias scene_equip_start_ame start
  545.   def start
  546.     scene_equip_start_ame
  547.     relocate_windows
  548.     relocate_aee_windows
  549.   end
  550.   
  551.   #--------------------------------------------------------------------------
  552.   # new method: relocate_windows
  553.   #--------------------------------------------------------------------------
  554.   def relocate_windows
  555.     return if $imported["YEA-AceEquipEngine"]
  556.     case Menu.help_window_location
  557.     when 0 # Top
  558.       @help_window.y = 0
  559.       @status_window.y = @help_window.height
  560.       @command_window.y = @help_window.height
  561.       @slot_window.y = @command_window.y + @command_window.height
  562.       @item_window.y = @slot_window.y + @slot_window.height
  563.     when 1 # Middle
  564.       @status_window.y = 0
  565.       @command_window.y = 0
  566.       @slot_window.y = @command_window.y + @command_window.height
  567.       @help_window.y = @slot_window.y + @slot_window.height
  568.       @item_window.y = @help_window.y + @help_window.height
  569.     else # Bottom
  570.       @status_window.y = 0
  571.       @command_window.y = 0
  572.       @slot_window.y = @command_window.y + @command_window.height
  573.       @item_window.y = @slot_window.y + @slot_window.height
  574.       @help_window.y = @item_window.y + @item_window.height
  575.     end
  576.   end
  577.   
  578.   #--------------------------------------------------------------------------
  579.   # new method: relocate_aee_windows
  580.   #--------------------------------------------------------------------------
  581.   def relocate_aee_windows
  582.     return unless $imported["YEA-AceEquipEngine"]
  583.     case Menu.help_window_location
  584.     when 0 # Top
  585.       @help_window.y = 0
  586.       @command_window.y = @help_window.height
  587.       @slot_window.y = @command_window.y + @command_window.height
  588.     when 1 # Middle
  589.       @command_window.y = 0
  590.       @help_window.y = @command_window.height
  591.       @slot_window.y = @help_window.y + @help_window.height
  592.     else # Bottom
  593.       @command_window.y = 0
  594.       @slot_window.y = @command_window.height
  595.       @help_window.y = @slot_window.y + @slot_window.height
  596.     end
  597.     @actor_window.y = @command_window.y
  598.     @item_window.y = @slot_window.y
  599.     @status_window.y = @slot_window.y
  600.   end
  601.   
  602. end # Scene_Equip

  603. #==============================================================================
  604. # ■ Scene_Menu
  605. #==============================================================================

  606. class Scene_Menu < Scene_MenuBase
  607.   
  608.   #--------------------------------------------------------------------------
  609.   # alias method: create_command_window
  610.   #--------------------------------------------------------------------------
  611.   alias scene_menu_create_command_window_ame create_command_window
  612.   def create_command_window
  613.     scene_menu_create_command_window_ame
  614.     process_common_event_commands
  615.     process_custom_commands
  616.   end
  617.   
  618.   #--------------------------------------------------------------------------
  619.   # new method: process_common_event_commands
  620.   #--------------------------------------------------------------------------
  621.   def process_common_event_commands
  622.     for command in YEA::MENU::COMMANDS
  623.       next unless YEA::MENU::COMMON_EVENT_COMMANDS.include?(command)
  624.       @command_window.set_handler(command, method(:command_common_event))
  625.     end
  626.   end
  627.   
  628.   #--------------------------------------------------------------------------
  629.   # new method: command_common_event
  630.   #--------------------------------------------------------------------------
  631.   def command_common_event
  632.     event_id = @command_window.current_ext
  633.     return return_scene if event_id.nil?
  634.     return return_scene if $data_common_events[event_id].nil?
  635.     $game_temp.reserve_common_event(event_id)
  636.     return_scene
  637.   end
  638.   
  639.   #--------------------------------------------------------------------------
  640.   # new method: process_custom_commands
  641.   #--------------------------------------------------------------------------
  642.   def process_custom_commands
  643.     for command in YEA::MENU::COMMANDS
  644.       next unless YEA::MENU::CUSTOM_COMMANDS.include?(command)
  645.       called_method = YEA::MENU::CUSTOM_COMMANDS[command][3]
  646.       @command_window.set_handler(command, method(called_method))
  647.     end
  648.   end
  649.   
  650.   #--------------------------------------------------------------------------
  651.   # new method: command_debug
  652.   #--------------------------------------------------------------------------
  653.   def command_debug
  654.     SceneManager.call(Scene_Debug)
  655.   end
  656.   
  657.   #--------------------------------------------------------------------------
  658.   # new method: command_shop
  659.   #--------------------------------------------------------------------------
  660.   def command_shop
  661.     goods = []
  662.     SceneManager.call(Scene_Shop)
  663.     SceneManager.scene.prepare(goods, false)
  664.   end
  665.   
  666.   #--------------------------------------------------------------------------
  667.   # new method: command_totori
  668.   #--------------------------------------------------------------------------
  669.   def command_totori
  670.     return unless $imported['KRX-AlchemicSynthesis']
  671.     SceneManager.call(Scene_Alchemy)
  672.   end
  673.   
  674. end # Scene_Menu

  675. #==============================================================================
  676. #
  677. # ▼ End of File
  678. #
  679. #==============================================================================
复制代码
P1不太上了,有问题加个Q1286124843,不管是脚本还是游戏问题都可以来找我
您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部