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

Project1

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

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

[复制链接]

Lv3.寻梦者

梦石
0
星屑
1345
在线时间
378 小时
注册时间
2015-6-16
帖子
571
跳转到指定楼层
1
发表于 2017-9-2 09:27:28 | 只看该作者 回帖奖励 |正序浏览 |阅读模式

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

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

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



RUBY 代码复制
  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.  
  10. $imported = {} if $imported.nil?
  11. $imported["YEA-AceMenuEngine"] = true
  12.  
  13. #==============================================================================
  14. # ▼ Updates
  15. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  16. # 2012.01.03 - Compatibility Update: Ace Item Menu
  17. # 2012.01.01 - Compatibility Update: Kread-EX's Synthesis
  18. #            - Compatibility Update: Kread-EX's Grathnode Install
  19. #            - Compatibility Update: Yami's Slot Battle
  20. # 2011.12.23 - Script efficiency optimized.
  21. # 2011.12.19 - Compatibility Update: Class System
  22. # 2011.12.15 - Updated for better menu MP/TP gauge management.
  23. # 2011.12.13 - Compatibility Update: Ace Equip Engine
  24. # 2011.12.07 - Update to allow for switches to also hide custom commands.
  25. # 2011.12.06 - Started Script and Finished.
  26. #
  27. #==============================================================================
  28. # ▼ Introduction
  29. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  30. # The menu system in RPG Maker VX Ace is great. However, it lacks the user
  31. # customization that RPG Maker 2003 allowed. With this script, you can add,
  32. # remove, and rearrange menu commands as you see fit. In addition to that, you
  33. # can add in menu commands that lead to common events or even custom commands
  34. # provided through other scripts.
  35. #
  36. # This script also provides window appearance management such as setting almost
  37. # all command windows to be center aligned or changing the position of the
  38. # help window. You can also opt to show the TP Gauge in the main menu as well
  39. # as in the skill menu.
  40. #
  41. #==============================================================================
  42. # ▼ Instructions
  43. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  44. # To install this script, open up your script editor and copy/paste this script
  45. # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
  46. #
  47. # Edit the settings in the module below as you see fit.
  48. #
  49. #==============================================================================
  50. # ▼ Compatibility
  51. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  52. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  53. # it will run with RPG Maker VX without adjusting.
  54. #
  55. #==============================================================================
  56.  
  57. module YEA
  58.   module MENU
  59.  
  60.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  61.     # - General Menu Settings -
  62.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  63.     # This changes the way menus appear in your game. You can change their
  64.     # alignment, and the location of the help window, Note that any non-Yanfly
  65.     # Engine Ace scripts may not conform to these menu styles.
  66.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  67.     HELP_WINDOW_LOCATION = 0     # 0-Top, 1-Middle, 2-Bottom.
  68.     COMMAND_WINDOW_ALIGN = 1     # 0-Left, 1-Middle, 2-Right.
  69.  
  70.     # These settings below adjust the visual appearance of the main menu.
  71.     # Change the settings as you see fit.
  72.     MAIN_MENU_ALIGN = 0          # 0-Left, 1-Middle, 2-Right.
  73.     MAIN_MENU_RIGHT = false      # false-Left, true-Right.
  74.     MAIN_MENU_ROWS  = 14         # Maximum number of rows for main menu.
  75.     DRAW_TP_GAUGE   = true       # If true, draws TP in the main menu.
  76.  
  77.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  78.     # - Main Menu Settings -
  79.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  80.     # These settings adjust the main menu, the order at which commands appear,
  81.     # what text is displayed, and what the commands are linked to. Here's a
  82.     # list of which commands do what:
  83.     #
  84.     # -------------------------------------------------------------------------
  85.     # :command         Description
  86.     # -------------------------------------------------------------------------
  87.     # :item            Opens up the item menu. Default menu item.
  88.     # :skill           Opens up the skill menu. Default menu item.
  89.     # :equip           Opens up the equip menu. Default menu item.
  90.     # :status          Opens up the status menu. Default menu item.
  91.     # :formation       Lets player manage party. Default menu item.
  92.     # :save            Opens up the save menu. Default menu item.
  93.     # :game_end        Opens up the shutdown menu. Default menu item.
  94.     #
  95.     # :class           Requires YEA - Class System
  96.     #
  97.     # :gogototori      Requires Kread-EX's Go Go Totori! Synthesis
  98.     # :grathnode       Requires Kread-EX's Grathnote Install
  99.     # :sslots          Requires Yami's YSA - Slot Battle
  100.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  101.     COMMANDS =[
  102.       :item,         # Opens up the item menu. Default menu item.
  103.       :skill,        # Opens up the skill menu. Default menu item.
  104.       :equip,        # Opens up the equip menu. Default menu item.
  105.       :class,        # Requires YEA - Class System.
  106.       :status,       # Opens up the status menu. Default menu item.
  107.       :formation,    # Lets player manage party. Default menu item.
  108.       :event_1,      # Launches Common Event 3. Common Event Command.
  109.       :event_2,      # Launches Common Event 4. Common Event Command.
  110.       :event_3,      # Launches Common Event 4. Common Event Command.
  111.       :event_4,      # Launches Common Event 13. Common Event Command.
  112.       :event_5,      # Launches Common Event 14. Common Event Command.
  113.       :event_6,      # Launches Common Event 15. Common Event Command.
  114.       :event_7,      # Launches Common Event 15. Common Event Command.
  115.       :event_8,      # Launches Common Event 16. Common Event Command.
  116.       :event_9,      # Launches Common Event 16. Common Event Command.
  117.       :event_10,      # Launches Common Event 16. Common Event Command.
  118.       :event_11,      # Launches Common Event 16. Common Event Command.
  119.       :event_12,
  120.       :event_13,
  121.       :event_14,
  122.       :event_15,
  123.       :event_16,
  124.       :event_17,
  125.       :event_18,
  126.       :event_19,
  127.       :event_礼包,
  128.     # :debug,        # Opens up debug menu. Custom Command.
  129.       :shop,         # Opens up a shop to pawn items. Custom Command.
  130.       :save,         # Opens up the save menu. Default menu item.
  131.       :game_end,     # Opens up the shutdown menu. Default menu item.
  132.     ] # Do not remove this.
  133.  
  134.     #--------------------------------------------------------------------------
  135.     # - Common Event Commands -
  136.     # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  137.     # If you insert one of the following commands into the COMMANDS array, the
  138.     # player can trigger a common event to launch. You can disable certain
  139.     # commands in the menu by binding them to a switch. If you don't want to
  140.     # disable them, set the switch to 0 and it will always be enabled. The
  141.     # ShowSwitch will prevent a command from appear if that switch is false.
  142.     # Set it to 0 for it to have no impact.
  143.     #--------------------------------------------------------------------------
  144.     COMMON_EVENT_COMMANDS ={
  145.     # :command => ["Display Name", EnableSwitch, ShowSwitch, Event ID],
  146.       :event_1 => [        "队伍管理",           0,        0  ,        98],
  147.       :event_2 => [        "职业",           0,          0,        12],
  148.       :event_3 => [        "兑换商店",           0,          0,        4],
  149.       :event_4 => [        "奖池系统",           0,          0,        7],
  150.       :event_5 => [        "天赋",           0,          0,        52],
  151.       :event_6 => [        "技能库",           0,          0,        46],
  152.       :event_7 => [        "宠物系统",           0,          57,        114],
  153.       :event_8 => [        "合成",           0,          3,        1],
  154.       :event_9 => [        "装备改造",           0,          4,        3],
  155.       :event_10 => [        "升级技能",           0,          7,        11],
  156.       :event_11 => [        "CG与图鉴",           0,          0,        31],
  157.       :event_12 => [        "副本",           0,          0,        59],
  158.       :event_13 => [        "打谱尼",           0,          5,        9],
  159. #~       :event_14 => [        "音乐盒",           0,          0,        111],
  160.       :event_15 => [        "按钮器游戏",           0,         0 ,        112],
  161.       :event_18 => [        "存档",           0,          0,        116],
  162.       :event_19 => [        "作弊模式",           0,          0,        2],
  163.       :debug   => [       "Debug",            0,          0, :command_debug],
  164.       :gogototori => ["Synthesis",            0,        0,  :command_totori],
  165.       :grathnode => [ "Grathnode",            0,        0, :command_install],
  166.  
  167.     } # Do not remove this.
  168.  
  169.     #--------------------------------------------------------------------------
  170.     # - Custom Commands -
  171.     # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  172.     # For those who use scripts that may lead to other menu scenes, use this
  173.     # hash to manage custom commands that run specific script calls. You can
  174.     # disable certain commands in the menu by binding them to a switch. If you
  175.     # don't want to disable them, set the switch to 0. The ShowSwitch will
  176.     # prevent a command from appear if that switch is false. Set it to 0 for
  177.     # it to have no impact.
  178.     #--------------------------------------------------------------------------
  179.     CUSTOM_COMMANDS ={
  180.     # :command => ["Display Name", EnableSwitch, ShowSwitch, Handler Method],
  181.       :debug   => [       "Debug",            0,          0, :command_debug],
  182.       :gogototori => ["Synthesis",            0,        0,  :command_totori],
  183.       :formation => ["整队",            0,        0,  :command_formation],
  184.       :grathnode => [ "Grathnode",            0,        0, :command_install],
  185.     } # Do not remove this.
  186.  
  187.   end # MENU
  188. end # YEA
  189.  
  190. #==============================================================================
  191. # ▼ Editting anything past this point may potentially result in causing
  192. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  193. # halitosis so edit at your own risk.
  194. #==============================================================================
  195.  
  196. #==============================================================================
  197. # ■ Window_MenuCommand
  198. #------------------------------------------------------------------------------
  199. # This class is kept towards the top of the script to provide easier access.
  200. #==============================================================================
  201.  
  202. class Window_MenuCommand < Window_Command
  203.  
  204.   #--------------------------------------------------------------------------
  205.   # overwrite method: make_command_list
  206.   #--------------------------------------------------------------------------
  207.   def make_command_list
  208.     for command in YEA::MENU::COMMANDS
  209.       case command
  210.       #--- Default Commands ---
  211.       when :item
  212.         add_command(Vocab::item,   :item,   main_commands_enabled)
  213.       when :skill
  214.         add_command(Vocab::skill,  :skill,  main_commands_enabled)
  215.       when :equip
  216.         add_command(Vocab::equip,  :equip,  main_commands_enabled)
  217.       when :status
  218.         add_command(Vocab::status, :status, main_commands_enabled)
  219.       when :formation
  220.         add_formation_command
  221.       when :save
  222.         add_original_commands
  223.         add_save_command
  224.       when :game_end
  225.         add_game_end_command
  226.       #--- Yanfly Engine Ace Commands ---
  227.       when :class
  228.         next unless $imported["YEA-ClassSystem"]
  229.         add_class_command
  230.       #--- Imported Commands ---
  231.       when :sslots
  232.         next unless $imported["YSA-SlotBattle"]
  233.         add_sslots_command
  234.       when :grathnode
  235.         next unless $imported["KRX-GrathnodeInstall"]
  236.         process_custom_command(command)
  237.       when :gogototori
  238.         next unless $imported["KRX-AlchemicSynthesis"]
  239.         process_custom_command(command)
  240.       #--- Imported Commands ---
  241.       else
  242.         process_common_event_command(command)
  243.         process_custom_command(command)
  244.       end
  245.     end
  246.   end
  247.  
  248.   #--------------------------------------------------------------------------
  249.   # new method: process_common_event_command
  250.   #--------------------------------------------------------------------------
  251.   def process_common_event_command(command)
  252.     return unless YEA::MENU::COMMON_EVENT_COMMANDS.include?(command)
  253.     show = YEA::MENU::COMMON_EVENT_COMMANDS[command][2]
  254.     continue = show <= 0 ? true : $game_switches[show]
  255.     return unless continue
  256.     text = YEA::MENU::COMMON_EVENT_COMMANDS[command][0]
  257.     switch = YEA::MENU::COMMON_EVENT_COMMANDS[command][1]
  258.     ext = YEA::MENU::COMMON_EVENT_COMMANDS[command][3]
  259.     enabled = switch <= 0 ? true : $game_switches[switch]
  260.     add_command(text, command, enabled, ext)
  261.   end
  262.  
  263.   #--------------------------------------------------------------------------
  264.   # new method: process_custom_command
  265.   #--------------------------------------------------------------------------
  266.   def process_custom_command(command)
  267.     return unless YEA::MENU::CUSTOM_COMMANDS.include?(command)
  268.     show = YEA::MENU::CUSTOM_COMMANDS[command][2]
  269.     continue = show <= 0 ? true : $game_switches[show]
  270.     return unless continue
  271.     text = YEA::MENU::CUSTOM_COMMANDS[command][0]
  272.     switch = YEA::MENU::CUSTOM_COMMANDS[command][1]
  273.     enabled = switch <= 0 ? true : $game_switches[switch]
  274.     add_command(text, command, enabled)
  275.   end
  276.  
  277. end # Window_MenuCommand
  278.  
  279. #==============================================================================
  280. # ■ Menu
  281. #==============================================================================
  282.  
  283. module Menu
  284.  
  285.   #--------------------------------------------------------------------------
  286.   # self.help_window_location
  287.   #--------------------------------------------------------------------------
  288.   def self.help_window_location
  289.     return YEA::MENU::HELP_WINDOW_LOCATION
  290.   end
  291.  
  292.   #--------------------------------------------------------------------------
  293.   # self.command_window_align
  294.   #--------------------------------------------------------------------------
  295.   def self.command_window_align
  296.     return YEA::MENU::COMMAND_WINDOW_ALIGN
  297.   end
  298.  
  299.   #--------------------------------------------------------------------------
  300.   # self.main_menu_align
  301.   #--------------------------------------------------------------------------
  302.   def self.main_menu_align
  303.     return YEA::MENU::MAIN_MENU_ALIGN
  304.   end
  305.  
  306.   #--------------------------------------------------------------------------
  307.   # self.main_menu_right
  308.   #--------------------------------------------------------------------------
  309.   def self.main_menu_right
  310.     return YEA::MENU::MAIN_MENU_RIGHT
  311.   end
  312.  
  313. end # Menu
  314.  
  315. #==============================================================================
  316. # ■ Game_Actor
  317. #==============================================================================
  318.  
  319. class Game_Actor < Game_Battler
  320.  
  321.   #--------------------------------------------------------------------------
  322.   # new method: draw_mp?
  323.   #--------------------------------------------------------------------------
  324.   def draw_mp?
  325.     return true unless draw_tp?
  326.     for skill in skills
  327.       next unless added_skill_types.include?(skill.stype_id)
  328.       return true if skill.mp_cost > 0
  329.     end
  330.     return false
  331.   end
  332.  
  333.   #--------------------------------------------------------------------------
  334.   # new method: draw_tp?
  335.   #--------------------------------------------------------------------------
  336.   def draw_tp?
  337.     return false unless $data_system.opt_display_tp
  338.     for skill in skills
  339.       next unless added_skill_types.include?(skill.stype_id)
  340.       return true if skill.tp_cost > 0
  341.     end
  342.     return false
  343.   end
  344.  
  345. end # Game_Actor
  346.  
  347. #==============================================================================
  348. # ■ Window_Base
  349. #==============================================================================
  350.  
  351. class Window_Base < Window
  352.  
  353.   #--------------------------------------------------------------------------
  354.   # overwrite method: draw_actor_simple_status
  355.   #--------------------------------------------------------------------------
  356.   def draw_actor_simple_status(actor, dx, dy)
  357.     dy -= line_height / 2
  358.     draw_actor_name(actor, dx, dy)
  359.     draw_actor_level(actor, dx, dy + line_height * 1)
  360.     draw_actor_icons(actor, dx, dy + line_height * 2)
  361.     dw = contents.width - dx - 124
  362.     draw_actor_class(actor, dx + 120, dy, dw)
  363.     draw_actor_hp(actor, dx + 120, dy + line_height * 1, dw)
  364.     if YEA::MENU::DRAW_TP_GAUGE && actor.draw_tp? && !actor.draw_mp?
  365.       draw_actor_tp(actor, dx + 120, dy + line_height * 2, dw)
  366.     elsif YEA::MENU::DRAW_TP_GAUGE && actor.draw_tp? && actor.draw_mp?
  367.       if $imported["YEA-BattleEngine"]
  368.         draw_actor_tp(actor, dx + 120, dy + line_height * 2, dw/2 + 1)
  369.         draw_actor_mp(actor, dx + 120 + dw/2, dy + line_height * 2, dw/2)
  370.       else
  371.         draw_actor_mp(actor, dx + 120, dy + line_height * 2, dw/2 + 1)
  372.         draw_actor_tp(actor, dx + 120 + dw/2, dy + line_height * 2, dw/2)
  373.       end
  374.     else
  375.       draw_actor_mp(actor, dx + 120, dy + line_height * 2, dw)
  376.     end
  377.   end
  378.  
  379. end # Window_Base
  380.  
  381. #==============================================================================
  382. # ■ Window_Command
  383. #==============================================================================
  384.  
  385. class Window_Command < Window_Selectable
  386.  
  387.   #--------------------------------------------------------------------------
  388.   # overwrite method: alignment
  389.   #--------------------------------------------------------------------------
  390.   def alignment
  391.     return Menu.command_window_align
  392.   end
  393.  
  394. end # Window_Command
  395.  
  396. #==============================================================================
  397. # ■ Window_MenuCommand
  398. #==============================================================================
  399.  
  400. class Window_MenuCommand < Window_Command
  401.  
  402.   #--------------------------------------------------------------------------
  403.   # alias method: init_command_position
  404.   #--------------------------------------------------------------------------
  405.   class <<self; alias init_command_position_ame init_command_position; end
  406.   def self.init_command_position
  407.     init_command_position_ame
  408.     @@last_command_oy = nil
  409.   end
  410.  
  411.   #--------------------------------------------------------------------------
  412.   # overwrite method: visible_line_number
  413.   #--------------------------------------------------------------------------
  414.   def visible_line_number
  415.     return [[item_max, YEA::MENU::MAIN_MENU_ROWS].min, 1].max
  416.   end
  417.  
  418.   #--------------------------------------------------------------------------
  419.   # overwrite method: alignment
  420.   #--------------------------------------------------------------------------
  421.   def alignment
  422.     return Menu.main_menu_align
  423.   end
  424.  
  425.   #--------------------------------------------------------------------------
  426.   # alias method: process_ok
  427.   #--------------------------------------------------------------------------
  428.   alias window_menucommand_process_ok_ame process_ok
  429.   def process_ok
  430.     @@last_command_oy = self.oy
  431.     window_menucommand_process_ok_ame
  432.   end
  433.  
  434.   #--------------------------------------------------------------------------
  435.   # alias method: select_last
  436.   #--------------------------------------------------------------------------
  437.   alias window_menucommand_select_last_ame select_last
  438.   def select_last
  439.     window_menucommand_select_last_ame
  440.     self.oy = @@last_command_oy unless @@last_command_oy.nil?
  441.     @@last_command_oy = nil
  442.   end
  443.  
  444. end # Window_MenuCommand
  445.  
  446. #==============================================================================
  447. # ■ Scene_Menu
  448. #==============================================================================
  449.  
  450. class Scene_Menu < Scene_MenuBase
  451.  
  452.   #--------------------------------------------------------------------------
  453.   # alias method: start
  454.   #--------------------------------------------------------------------------
  455.   alias scene_menu_start_ame start
  456.   def start
  457.     scene_menu_start_ame
  458.     relocate_windows
  459.   end
  460.  
  461.   #--------------------------------------------------------------------------
  462.   # new method: relocate_windows
  463.   #--------------------------------------------------------------------------
  464.   def relocate_windows
  465.     return unless Menu.main_menu_right
  466.     @command_window.x = Graphics.width - @command_window.width
  467.     @gold_window.x = Graphics.width - @gold_window.width
  468.     @status_window.x = 0
  469.   end
  470.  
  471.   def return_scene
  472.     $game_map.autoplay
  473.     SceneManager.return
  474.   end
  475.  
  476. end # Scene_Menu
  477.  
  478. #==============================================================================
  479. # ■ Scene_Item
  480. #==============================================================================
  481.  
  482. class Scene_Item < Scene_ItemBase
  483.  
  484.   #--------------------------------------------------------------------------
  485.   # alias method: start
  486.   #--------------------------------------------------------------------------
  487.   alias scene_item_start_ame start
  488.   def start
  489.     scene_item_start_ame
  490.     return if $imported["YEA-ItemMenu"]
  491.     relocate_windows
  492.   end
  493.  
  494.   #--------------------------------------------------------------------------
  495.   # new method: relocate_windows
  496.   #--------------------------------------------------------------------------
  497.   def relocate_windows
  498.     case Menu.help_window_location
  499.     when 0 # Top
  500.       @help_window.y = 0
  501.       @category_window.y = @help_window.height
  502.       @item_window.y = @category_window.y + @category_window.height
  503.     when 1 # Middle
  504.       @category_window.y = 0
  505.       @help_window.y = @category_window.height
  506.       @item_window.y = @help_window.y + @help_window.height
  507.     else # Bottom
  508.       @category_window.y = 0
  509.       @item_window.y = @category_window.height
  510.       @help_window.y = @item_window.y + @item_window.height
  511.     end
  512.     if $imported["YEA-ItemMenu"]
  513.       @types_window.y = @category_window.y
  514.       @status_window.y = @category_window.y
  515.     end
  516.   end
  517.  
  518. end # Scene_Item
  519.  
  520. #==============================================================================
  521. # ■ Scene_Skill
  522. #==============================================================================
  523.  
  524. class Scene_Skill < Scene_ItemBase
  525.  
  526.   #--------------------------------------------------------------------------
  527.   # alias method: start
  528.   #--------------------------------------------------------------------------
  529.   alias scene_skill_start_ame start
  530.   def start
  531.     scene_skill_start_ame
  532.     relocate_windows
  533.   end
  534.  
  535.   #--------------------------------------------------------------------------
  536.   # new method: relocate_windows
  537.   #--------------------------------------------------------------------------
  538.   def relocate_windows
  539.     case Menu.help_window_location
  540.     when 0 # Top
  541.       @help_window.y = 0
  542.       @command_window.y = @help_window.height
  543.       @status_window.y = @help_window.height
  544.       @item_window.y = @status_window.y + @status_window.height
  545.     when 1 # Middle
  546.       @command_window.y = 0
  547.       @status_window.y = 0
  548.       @help_window.y = @status_window.y + @status_window.height
  549.       @item_window.y = @help_window.y + @help_window.height
  550.     else # Bottom
  551.       @command_window.y = 0
  552.       @status_window.y = 0
  553.       @item_window.y = @status_window.y + @status_window.height
  554.       @help_window.y = @item_window.y + @item_window.height
  555.     end
  556.   end
  557.  
  558. end # Scene_Skill
  559.  
  560. #==============================================================================
  561. # ■ Scene_Equip
  562. #==============================================================================
  563.  
  564. class Scene_Equip < Scene_MenuBase
  565.  
  566.   #--------------------------------------------------------------------------
  567.   # alias method: start
  568.   #--------------------------------------------------------------------------
  569.   alias scene_equip_start_ame start
  570.   def start
  571.     scene_equip_start_ame
  572.     relocate_windows
  573.     relocate_aee_windows
  574.   end
  575.  
  576.   #--------------------------------------------------------------------------
  577.   # new method: relocate_windows
  578.   #--------------------------------------------------------------------------
  579.   def relocate_windows
  580.     return if $imported["YEA-AceEquipEngine"]
  581.     case Menu.help_window_location
  582.     when 0 # Top
  583.       @help_window.y = 0
  584.       @status_window.y = @help_window.height
  585.       @command_window.y = @help_window.height
  586.       @slot_window.y = @command_window.y + @command_window.height
  587.       @item_window.y = @slot_window.y + @slot_window.height
  588.     when 1 # Middle
  589.       @status_window.y = 0
  590.       @command_window.y = 0
  591.       @slot_window.y = @command_window.y + @command_window.height
  592.       @help_window.y = @slot_window.y + @slot_window.height
  593.       @item_window.y = @help_window.y + @help_window.height
  594.     else # Bottom
  595.       @status_window.y = 0
  596.       @command_window.y = 0
  597.       @slot_window.y = @command_window.y + @command_window.height
  598.       @item_window.y = @slot_window.y + @slot_window.height
  599.       @help_window.y = @item_window.y + @item_window.height
  600.     end
  601.   end
  602.  
  603.   #--------------------------------------------------------------------------
  604.   # new method: relocate_aee_windows
  605.   #--------------------------------------------------------------------------
  606.   def relocate_aee_windows
  607.     return unless $imported["YEA-AceEquipEngine"]
  608.     case Menu.help_window_location
  609.     when 0 # Top
  610.       @help_window.y = 0
  611.       @command_window.y = @help_window.height
  612.       @slot_window.y = @command_window.y + @command_window.height
  613.     when 1 # Middle
  614.       @command_window.y = 0
  615.       @help_window.y = @command_window.height
  616.       @slot_window.y = @help_window.y + @help_window.height
  617.     else # Bottom
  618.       @command_window.y = 0
  619.       @slot_window.y = @command_window.height
  620.       @help_window.y = @slot_window.y + @slot_window.height
  621.     end
  622.     @actor_window.y = @command_window.y
  623.     @item_window.y = @slot_window.y
  624.     @status_window.y = @slot_window.y
  625.   end
  626.  
  627. end # Scene_Equip
  628.  
  629. #==============================================================================
  630. # ■ Scene_Menu
  631. #==============================================================================
  632.  
  633. class Scene_Menu < Scene_MenuBase
  634.  
  635.   #--------------------------------------------------------------------------
  636.   # alias method: create_command_window
  637.   #--------------------------------------------------------------------------
  638.   alias scene_menu_create_command_window_ame create_command_window
  639.   def create_command_window
  640.     scene_menu_create_command_window_ame
  641.     process_common_event_commands
  642.     process_custom_commands
  643.   end
  644.  
  645.   #--------------------------------------------------------------------------
  646.   # new method: process_common_event_commands
  647.   #--------------------------------------------------------------------------
  648.   def process_common_event_commands
  649.     for command in YEA::MENU::COMMANDS
  650.       next unless YEA::MENU::COMMON_EVENT_COMMANDS.include?(command)
  651.       @command_window.set_handler(command, method(:command_common_event))
  652.     end
  653.   end
  654.  
  655.   #--------------------------------------------------------------------------
  656.   # new method: command_common_event
  657.   #--------------------------------------------------------------------------
  658.   def command_common_event
  659.     event_id = @command_window.current_ext
  660.     return return_scene if event_id.nil?
  661.     return return_scene if $data_common_events[event_id].nil?
  662.     $game_temp.reserve_common_event(event_id)
  663.     return_scene
  664.   end
  665.  
  666.   #--------------------------------------------------------------------------
  667.   # new method: process_custom_commands
  668.   #--------------------------------------------------------------------------
  669.   def process_custom_commands
  670.     for command in YEA::MENU::COMMANDS
  671.       next unless YEA::MENU::CUSTOM_COMMANDS.include?(command)
  672.       called_method = YEA::MENU::CUSTOM_COMMANDS[command][3]
  673.       @command_window.set_handler(command, method(called_method))
  674.     end
  675.   end
  676.  
  677.   #--------------------------------------------------------------------------
  678.   # new method: command_debug
  679.   #--------------------------------------------------------------------------
  680.   def command_debug
  681.     SceneManager.call(Scene_Debug)
  682.   end
  683.  
  684.   #--------------------------------------------------------------------------
  685.   # new method: command_shop
  686.   #--------------------------------------------------------------------------
  687.   def command_shop
  688.     goods = []
  689.     SceneManager.call(Scene_Shop)
  690.     SceneManager.scene.prepare(goods, false)
  691.   end
  692.  
  693.   #--------------------------------------------------------------------------
  694.   # new method: command_totori
  695.   #--------------------------------------------------------------------------
  696.   def command_totori
  697.     return unless $imported['KRX-AlchemicSynthesis']
  698.     SceneManager.call(Scene_Alchemy)
  699.   end
  700.  
  701. end # Scene_Menu
  702.  
  703. #==============================================================================
  704. #
  705. # ▼ End of File
  706. #
  707. #==============================================================================
P1不太上了,有问题加个Q1286124843,不管是脚本还是游戏问题都可以来找我
您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

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

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

GMT+8, 2024-11-17 18:23

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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