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

Project1

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

[已经过期] 如何改变人物装备显示的顺序?

[复制链接]

Lv2.观梦者

梦石
0
星屑
581
在线时间
123 小时
注册时间
2011-6-14
帖子
36
跳转到指定楼层
1
发表于 2012-12-1 22:38:05 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x
如何改变人物装备显示的顺序?

就是在人物装备页面,原来的显示顺序是:武器、盾牌、头、身体、饰品,这个顺序能不能改?比如改成武器、头、身体、盾牌、饰品这样?
如图,将排在第二的盾牌移到第四去。

谢谢。

无标题.jpg (18.92 KB, 下载次数: 38)

无标题.jpg

Lv4.逐梦者

送快递的水表员

梦石
10
星屑
4852
在线时间
3303 小时
注册时间
2012-6-27
帖子
7160

开拓者贵宾

2
发表于 2012-12-2 13:38:01 | 只看该作者
数据库——用语,把盾的用语改为身体,身体的用语改为盾

然后把防具设置类型也颠倒,盾的类型设置为身体,身体护具把类型设置成盾……

大概就是这样:



好吧……方法很诡异……

点评

见回帖,谢谢  发表于 2012-12-2 20:41

评分

参与人数 3星屑 +42 收起 理由
咕噜 + 40 威猛先生
怪蜀黍 + 1 你太猛了
satgo1546 + 1 事件真强大

查看全部评分

回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
227
在线时间
313 小时
注册时间
2010-8-14
帖子
378
3
发表于 2012-12-2 14:58:25 | 只看该作者
直接改脚本不就完了么。。。

改事件到时候你弄糊涂了就糟了

点评

评分中那堆乱码是怎么回事……  发表于 2012-12-3 22:26
这么会糊涂 = =  发表于 2012-12-2 19:53
+1  发表于 2012-12-2 15:48

评分

参与人数 1星屑 +20 收起 理由
咕噜 + 20 <font><font>我很赞同</font&gt

查看全部评分

回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
581
在线时间
123 小时
注册时间
2011-6-14
帖子
36
4
 楼主| 发表于 2012-12-2 20:40:05 | 只看该作者
Password 发表于 2012-12-2 13:38
数据库——用语,把盾的用语改为身体,身体的用语改为盾

然后把防具设置类型也颠倒,盾的类型设置为身体, ...

Pa先生好,你的建议很好,不过这看上去是一个治标的方法,而且我使用时还需要增加一些步骤,因为我的想法是盾到第四,然后头到第二,身体到第三,而不是二、四互换。所以我需要把:

头盔设为盾牌,把铠甲设为头部,把盾牌设为身体。

万分感谢。

点评

他叫苏君0w0  发表于 2012-12-3 22:26
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
581
在线时间
123 小时
注册时间
2011-6-14
帖子
36
5
 楼主| 发表于 2012-12-2 20:40:54 | 只看该作者
行风之影 发表于 2012-12-2 14:58
直接改脚本不就完了么。。。

改事件到时候你弄糊涂了就糟了

行风先生好,请问应该怎么改脚本能?

谢谢
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
275
在线时间
1373 小时
注册时间
2005-10-16
帖子
5113

贵宾

6
发表于 2012-12-2 22:54:12 | 只看该作者
dddzz 发表于 2012-12-2 20:40
行风先生好,请问应该怎么改脚本能?

谢谢

脚本 Game_Actor
  1.   #--------------------------------------------------------------------------
  2.   # ● 获取装备栏的数组
  3.   #--------------------------------------------------------------------------
  4.   def equip_slots
  5.     return [0,0,2,3,4] if dual_wield?       # 双持武器
  6.     return [0,1,2,3,4]                      # 普通
  7.   end
复制代码
0武器、1盾牌、2头盔、3盔甲、4饰品,自己调顺序吧。

评分

参与人数 1星屑 +70 收起 理由
咕噜 + 70 我很赞同

查看全部评分

我只个搬答案的
叔叔我已经当爹了~
婚后闪人了……
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
616 小时
注册时间
2010-10-29
帖子
463
7
发表于 2012-12-2 23:10:45 | 只看该作者
有问题,找Yanfly!
  1. #==============================================================================
  2. #
  3. # ▼ Yanfly Engine Ace - Ace Equip Engine v1.06
  4. # -- Last Updated: 2012.02.02
  5. # -- Level: Normal, Hard
  6. # -- Requires: n/a
  7. #
  8. #==============================================================================

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

  11. #==============================================================================
  12. # ▼ Updates
  13. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  14. # 2012.02.02 - Bug Fixed: Crash when changing classes to different equip slots.
  15. # 2012.01.22 - Bug Fixed: <equip slot> notetags updated to factor in spaces.
  16. # 2012.01.05 - Compatibility Update: Equip Dynamic Stats
  17. # 2011.12.30 - Bug Fixed: Stats didn't update.
  18. # 2011.12.23 - Script efficiency optimized.
  19. # 2011.12.18 - Script efficiency optimized.
  20. # 2011.12.13 - Started Script and Finished.
  21. #
  22. #==============================================================================
  23. # ▼ Introduction
  24. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  25. # The default equipment system in RPG Maker VX is the standard equipment system
  26. # seen in all of the previous iterations, which consists of weapon, shield,
  27. # headgear, bodygear, and accessory. To break free of that norm, this script
  28. # allows users access to giving actors and/or classes dynamic equipment setups
  29. # (including having multiples of the same categories). In addition to having
  30. # different equip slot setups, newer equipment types can be made to allow for
  31. # more diversity in armour types.
  32. #
  33. #==============================================================================
  34. # ▼ Instructions
  35. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  36. # To install this script, open up your script editor and copy/paste this script
  37. # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
  38. #
  39. # -----------------------------------------------------------------------------
  40. # Actor Notetags - These notetags go in the actors notebox in the database.
  41. # -----------------------------------------------------------------------------
  42. # <equip slots>
  43. #  string
  44. #  string
  45. # </equip slots>
  46. # This sets the actor's default slots to whatever is listed in between the two
  47. # notetags. An actor's custom equip slots will take priority over a class's
  48. # custom equip slots, which will take priority over the default equip slots.
  49. # Replace "string" with the proper equipment type name or when in doubt, use
  50. # "equip type: x" with x as the equipment type.
  51. #
  52. # <starting gear: x>
  53. # <starting gear: x, x>
  54. # Adds armour x to the actor's list of starting gear. This is used primarily
  55. # for the newer pieces of gear that can't be added through the starting set of
  56. # equipment through the RPG Maker VX Ace editor by default. Insert multiple of
  57. # these notetags to add more pieces of starting gear if so desired.
  58. #
  59. # <fixed equip: x>
  60. # <fixed equip: x, x>
  61. # This will fix the equip type x. Fixed equip slots mean that the equipment
  62. # already on it are unable to be exchanged in or out by the player. This tag
  63. # has been made so that equip types can be fixed for equip type 5 and above.
  64. # Use multiple of these notetags to add more fixed equipment restrictions.
  65. #
  66. # <sealed equip: x>
  67. # <sealed equip: x, x>
  68. # This will seal the equip type x. Sealed equip slots mean that no equipment
  69. # can be equipped onto that equip type slot. This tag has been made so that
  70. # equip types can be sealed for equip type 5 and above. Use multiple of these
  71. # notetags to add more sealed equipment restrictions.
  72. #
  73. # -----------------------------------------------------------------------------
  74. # Class Notetags - These notetags go in the class notebox in the database.
  75. # -----------------------------------------------------------------------------
  76. # <equip slots>
  77. #  string
  78. #  string
  79. # </equip slots>
  80. # This sets the class's default slots to whatever is listed in between the two
  81. # notetags. An actor's custom equip slots will take priority over a class's
  82. # custom equip slots, which will take priority over the default equip slots.
  83. # Replace "string" with the proper equipment type name or when in doubt, use
  84. # "equip type: x" with x as the equipment type.
  85. #
  86. # <fixed equip: x>
  87. # <fixed equip: x, x>
  88. # This will fix the equip type x. Fixed equip slots mean that the equipment
  89. # already on it are unable to be exchanged in or out by the player. This tag
  90. # has been made so that equip types can be fixed for equip type 5 and above.
  91. # Use multiple of these notetags to add more fixed equipment restrictions.
  92. #
  93. # <sealed equip: x>
  94. # <sealed equip: x, x>
  95. # This will seal the equip type x. Sealed equip slots mean that no equipment
  96. # can be equipped onto that equip type slot. This tag has been made so that
  97. # equip types can be sealed for equip type 5 and above. Use multiple of these
  98. # notetags to add more sealed equipment restrictions.
  99. #
  100. # -----------------------------------------------------------------------------
  101. # Weapon Notetags - These notetags go in the weapons notebox in the database.
  102. # -----------------------------------------------------------------------------
  103. # <fixed equip: x>
  104. # <fixed equip: x, x>
  105. # This will fix the equip type x. Fixed equip slots mean that the equipment
  106. # already on it are unable to be exchanged in or out by the player. This tag
  107. # has been made so that equip types can be fixed for equip type 5 and above.
  108. # Use multiple of these notetags to add more fixed equipment restrictions.
  109. #
  110. # <sealed equip: x>
  111. # <sealed equip: x, x>
  112. # This will seal the equip type x. Sealed equip slots mean that no equipment
  113. # can be equipped onto that equip type slot. This tag has been made so that
  114. # equip types can be sealed for equip type 5 and above. Use multiple of these
  115. # notetags to add more sealed equipment restrictions.
  116. #
  117. # -----------------------------------------------------------------------------
  118. # Armour Notetags - These notetags go in the armour notebox in the database.
  119. # -----------------------------------------------------------------------------
  120. # <equip type: x>
  121. # <equip type: string>
  122. # For the newer equip types, replace x or string with the equip type ID or the
  123. # name of the equip type respectively. This will set that armour to that
  124. # particular equip type.
  125. #
  126. # <fixed equip: x>
  127. # <fixed equip: x, x>
  128. # This will fix the equip type x. Fixed equip slots mean that the equipment
  129. # already on it are unable to be exchanged in or out by the player. This tag
  130. # has been made so that equip types can be fixed for equip type 5 and above.
  131. # Use multiple of these notetags to add more fixed equipment restrictions.
  132. #
  133. # <sealed equip: x>
  134. # <sealed equip: x, x>
  135. # This will seal the equip type x. Sealed equip slots mean that no equipment
  136. # can be equipped onto that equip type slot. This tag has been made so that
  137. # equip types can be sealed for equip type 5 and above. Use multiple of these
  138. # notetags to add more sealed equipment restrictions.
  139. #
  140. # -----------------------------------------------------------------------------
  141. # State Notetags - These notetags go in the states notebox in the database.
  142. # -----------------------------------------------------------------------------
  143. # <fixed equip: x>
  144. # <fixed equip: x, x>
  145. # This will fix the equip type x. Fixed equip slots mean that the equipment
  146. # already on it are unable to be exchanged in or out by the player. This tag
  147. # has been made so that equip types can be fixed for equip type 5 and above.
  148. # Use multiple of these notetags to add more fixed equipment restrictions.
  149. #
  150. # <sealed equip: x>
  151. # <sealed equip: x, x>
  152. # This will seal the equip type x. Sealed equip slots mean that no equipment
  153. # can be equipped onto that equip type slot. This tag has been made so that
  154. # equip types can be sealed for equip type 5 and above. Use multiple of these
  155. # notetags to add more sealed equipment restrictions.
  156. #
  157. #==============================================================================
  158. # ▼ Compatibility
  159. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  160. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  161. # it will run with RPG Maker VX without adjusting.
  162. #
  163. #==============================================================================

  164. module YEA
  165.   module EQUIP
  166.    
  167.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  168.     # - General Equip Settings -
  169.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  170.     # This adjusts the default equip configuration. While actors can have their
  171.     # own unique equipment configurations, it's recommended to not change too
  172.     # much as things get really hairy when it comes to proper eventing.
  173.     #
  174.     # ID   Equip Type
  175.     # ---  ------------
  176.     #  0   Weapon
  177.     #  1   Shield
  178.     #  2   Headgear
  179.     #  3   Bodygear
  180.     #  4   Accessory
  181.     #
  182.     # Whatever you set the below slots to, the dual wield setup will be exactly
  183.     # identical except that the second slot will be changed to a weapon (0).
  184.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  185.     # Adjust this array to set the default slots used for all of your actors
  186.     # and classes if they do not have a custom equipment slot setup.
  187.     DEFAULT_BASE_SLOTS = [ 0, 1, 2, 3, 5, 6, 4, 4]
  188.    
  189.     # This hash adjusts the new equip types (past 4+). Adjust them to match
  190.     # their names properly. You can choose to allow certain types of equipment
  191.     # be removable or not, or whether or not optimize will affect them.
  192.     TYPES ={
  193.     # TypeID => ["Type Name", Removable?, Optimize?],
  194.            0 => [   "Weapon",      false,      true],
  195.            1 => [   "Shield",       true,      true],
  196.            2 => [ "Headgear",       true,      true],
  197.            3 => [ "Bodygear",       true,      true],
  198.            4 => ["Accessory",       true,     false],
  199.            5 => [    "Cloak",       true,      true],
  200.            6 => [ "Necklace",       true,      true],
  201.     } # Do not remove this.
  202.    
  203.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  204.     # - Equip Command List -
  205.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  206.     # Here, you can adjust the order at which the commands appear (or even
  207.     # remove commands as you see fit). Here's a list of which does what:
  208.     #
  209.     # -------------------------------------------------------------------------
  210.     # :command         Description
  211.     # -------------------------------------------------------------------------
  212.     # :equip           Activates the manual equip window. Default.
  213.     # :optimize        Optimizes equipment for the actor. Default.
  214.     # :clear           Clears all equipment from the actor. Default
  215.     #
  216.     # And that's all of the currently available commands. This list will be
  217.     # updated as more scripts become available.
  218.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  219.     # This array arranges the order of which the commands appear in the Equip
  220.     # Command window in the Equip Scene.
  221.     COMMAND_LIST =[
  222.       :equip,
  223.       :optimize,
  224.       :clear,
  225.     # :custom1,
  226.     # :custom2,
  227.     ] # Do not remove this.
  228.    
  229.     #--------------------------------------------------------------------------
  230.     # - Equip Custom Commands -
  231.     # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  232.     # For those who use scripts to that may produce unique effects for
  233.     # equipping, use this hash to manage the custom commands for the Equip
  234.     # Command Window. You can disable certain commands or prevent them from
  235.     # appearing by using switches. If you don't wish to bind them to a switch,
  236.     # set the proper switch to 0 for it to have no impact.
  237.     #--------------------------------------------------------------------------
  238.     CUSTOM_EQUIP_COMMANDS ={
  239.     # :command => ["Display Name", EnableSwitch, ShowSwitch, Handler Method],
  240.       :custom1 => [ "Custom Name",            0,          0, :command_name1],
  241.       :custom2 => [ "Custom Text",           13,          0, :command_name2],
  242.     } # Do not remove this.
  243.    
  244.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  245.     # - Misc Window Settings -
  246.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  247.     # This section adjusts the minor visuals that you see inside of the newly
  248.     # organized Equip Scene. Adjust the settings as you see fit.
  249.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  250.     # This sets the font size used for the status window in the lower right
  251.     # corner of the screen (which shows stats and comparisons).
  252.     STATUS_FONT_SIZE = 20
  253.    
  254.     # This sets the remove equip command in the item window.
  255.     REMOVE_EQUIP_ICON = 185
  256.     REMOVE_EQUIP_TEXT = "<Remove Equip>"
  257.    
  258.     # This sets the no-equipment text in the slot window.
  259.     NOTHING_ICON = 185
  260.     NOTHING_TEXT = "<Empty>"
  261.    
  262.   end # EQUIP
  263. end # YEA

  264. #==============================================================================
  265. # ▼ Editting anything past this point may potentially result in causing
  266. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  267. # halitosis so edit at your own risk.
  268. #==============================================================================

  269. module YEA
  270.   module REGEXP
  271.   module BASEITEM
  272.    
  273.     EQUIP_SLOTS_ON  = /<(?:EQUIP_SLOTS|equip slots)>/i
  274.     EQUIP_SLOTS_OFF = /<\/(?:EQUIP_SLOTS|equip slots)>/i
  275.    
  276.     EQUIP_TYPE_INT = /<(?:EQUIP_TYPE|equip type):[ ]*(\d+)>/i
  277.     EQUIP_TYPE_STR = /<(?:EQUIP_TYPE|equip type):[ ]*(.*)>/i
  278.    
  279.     STARTING_GEAR = /<(?:STARTING_GEAR|starting gear):[ ](\d+(?:\s*,\s*\d+)*)>/i
  280.    
  281.     FIXED_EQUIP = /<(?:FIXED_EQUIP|fixed equip):[ ](\d+(?:\s*,\s*\d+)*)>/i
  282.     SEALED_EQUIP = /<(?:SEALED_EQUIP|sealed equip):[ ](\d+(?:\s*,\s*\d+)*)>/i
  283.    
  284.   end # BASEITEM
  285.   end # REGEXP
  286. end # YEA

  287. #==============================================================================
  288. # ■ Vocab
  289. #==============================================================================

  290. module Vocab
  291.   
  292.   #--------------------------------------------------------------------------
  293.   # overwrite method: self.etype
  294.   #--------------------------------------------------------------------------
  295.   def self.etype(etype)
  296.     return $data_system.terms.etypes[etype] if [0,1,2,3,4].include?(etype)
  297.     return YEA::EQUIP::TYPES[etype][0] if YEA::EQUIP::TYPES.include?(etype)
  298.     return ""
  299.   end
  300.   
  301. end # Vocab

  302. #==============================================================================
  303. # ■ Icon
  304. #==============================================================================

  305. module Icon
  306.   
  307.   #--------------------------------------------------------------------------
  308.   # self.remove_equip
  309.   #--------------------------------------------------------------------------
  310.   def self.remove_equip; return YEA::EQUIP::REMOVE_EQUIP_ICON; end
  311.   
  312.   #--------------------------------------------------------------------------
  313.   # self.nothing_equip
  314.   #--------------------------------------------------------------------------
  315.   def self.nothing_equip; return YEA::EQUIP::NOTHING_ICON; end
  316.    
  317. end # Icon

  318. #==============================================================================
  319. # ■ Numeric
  320. #==============================================================================

  321. class Numeric
  322.   
  323.   #--------------------------------------------------------------------------
  324.   # new method: group_digits
  325.   #--------------------------------------------------------------------------
  326.   unless $imported["YEA-CoreEngine"]
  327.   def group; return self.to_s; end
  328.   end # $imported["YEA-CoreEngine"]
  329.    
  330. end # Numeric

  331. #==============================================================================
  332. # ■ DataManager
  333. #==============================================================================

  334. module DataManager
  335.   
  336.   #--------------------------------------------------------------------------
  337.   # alias method: load_database
  338.   #--------------------------------------------------------------------------
  339.   class <<self; alias load_database_aee load_database; end
  340.   def self.load_database
  341.     load_database_aee
  342.     load_notetags_aee
  343.   end
  344.   
  345.   #--------------------------------------------------------------------------
  346.   # new method: load_notetags_aee
  347.   #--------------------------------------------------------------------------
  348.   def self.load_notetags_aee
  349.     groups = [$data_actors, $data_classes, $data_weapons, $data_armors,
  350.       $data_states]
  351.     for group in groups
  352.       for obj in group
  353.         next if obj.nil?
  354.         obj.load_notetags_aee
  355.       end
  356.     end
  357.   end
  358.   
  359. end # DataManager

  360. #==============================================================================
  361. # ■ RPG::BaseItem
  362. #==============================================================================

  363. class RPG::BaseItem
  364.   
  365.   #--------------------------------------------------------------------------
  366.   # public instance variables
  367.   #--------------------------------------------------------------------------
  368.   attr_accessor :base_equip_slots
  369.   attr_accessor :fixed_equip_type
  370.   attr_accessor :sealed_equip_type
  371.   attr_accessor :extra_starting_equips
  372.   
  373.   #--------------------------------------------------------------------------
  374.   # common cache: load_notetags_aee
  375.   #--------------------------------------------------------------------------
  376.   def load_notetags_aee
  377.     @base_equip_slots = []
  378.     @equip_slots_on = false
  379.     @fixed_equip_type = []
  380.     @sealed_equip_type = []
  381.     @extra_starting_equips = []
  382.     #---
  383.     self.note.split(/[\r\n]+/).each { |line|
  384.       case line
  385.       #---
  386.       when YEA::REGEXP::BASEITEM::EQUIP_SLOTS_ON
  387.         next unless self.is_a?(RPG::Actor) ||self.is_a?(RPG::Class)
  388.         @equip_slots_on = true
  389.       when YEA::REGEXP::BASEITEM::EQUIP_SLOTS_OFF
  390.         next unless self.is_a?(RPG::Actor) ||self.is_a?(RPG::Class)
  391.         @equip_slots_on = false
  392.       #---
  393.       when YEA::REGEXP::BASEITEM::STARTING_GEAR
  394.         next unless self.is_a?(RPG::Actor)
  395.         $1.scan(/\d+/).each { |num|
  396.         @extra_starting_equips.push(num.to_i) if num.to_i > 0 }
  397.       when YEA::REGEXP::BASEITEM::FIXED_EQUIP
  398.         $1.scan(/\d+/).each { |num|
  399.         @fixed_equip_type.push(num.to_i) if num.to_i > 0 }
  400.       when YEA::REGEXP::BASEITEM::SEALED_EQUIP
  401.         $1.scan(/\d+/).each { |num|
  402.         @sealed_equip_type.push(num.to_i) if num.to_i > 0 }
  403.       #---
  404.       when YEA::REGEXP::BASEITEM::EQUIP_TYPE_INT
  405.         next unless self.is_a?(RPG::Armor)
  406.         @etype_id = [1, $1.to_i].max
  407.       when YEA::REGEXP::BASEITEM::EQUIP_TYPE_STR
  408.         next unless self.is_a?(RPG::Armor)
  409.         for key in YEA::EQUIP::TYPES
  410.           id = key[0]
  411.           next if YEA::EQUIP::TYPES[id][0].upcase != $1.to_s.upcase
  412.           @etype_id = [1, id].max
  413.           break
  414.         end
  415.       #---
  416.       else
  417.         if @equip_slots_on
  418.           case line.upcase
  419.           when /EQUIP TYPE[ ](\d+)/i, /EQUIP TYPE:[ ](\d+)/i
  420.             id = $1.to_i
  421.             @base_equip_slots.push(id) if [0,1,2,3,4].include?(id)
  422.             @base_equip_slots.push(id) if YEA::EQUIP::TYPES.include?(id)
  423.           when /WEAPON/i
  424.             @base_equip_slots.push(0)
  425.           when /SHIELD/i
  426.             @base_equip_slots.push(1)
  427.           when /HEAD/i
  428.             @base_equip_slots.push(2)
  429.           when /BODY/i, /ARMOR/i, /ARMOUR/i
  430.             @base_equip_slots.push(3)
  431.           when /ETC/i, /OTHER/i, /ACCESSOR/i
  432.             @base_equip_slots.push(4)
  433.           else
  434.             text = line.upcase.delete(" ")
  435.             for key in YEA::EQUIP::TYPES
  436.               id = key[0]
  437.               next if YEA::EQUIP::TYPES[id][0].upcase.delete(" ")!= text
  438.               @base_equip_slots.push(id)
  439.               break
  440.             end
  441.           end
  442.         end
  443.       end
  444.     } # self.note.split
  445.     #---
  446.     return unless self.is_a?(RPG::Class)
  447.     if @base_equip_slots.empty?
  448.       @base_equip_slots = YEA::EQUIP::DEFAULT_BASE_SLOTS.clone
  449.     end
  450.   end
  451.   
  452. end # RPG::BaseItem

  453. #==============================================================================
  454. # ■ Game_Temp
  455. #==============================================================================

  456. class Game_Temp
  457.   
  458.   #--------------------------------------------------------------------------
  459.   # public instance variables
  460.   #--------------------------------------------------------------------------
  461.   attr_accessor :eds_actor
  462.   attr_accessor :scene_equip_index
  463.   attr_accessor :scene_equip_oy
  464.   
  465. end # Game_Temp

  466. #==============================================================================
  467. # ■ Game_BaseItem
  468. #==============================================================================

  469. class Game_BaseItem
  470.   
  471.   #--------------------------------------------------------------------------
  472.   # public instance variables
  473.   #--------------------------------------------------------------------------
  474.   attr_accessor :item_id
  475.   
  476. end # Game_BaseItem

  477. #==============================================================================
  478. # ■ Game_BattlerBase
  479. #==============================================================================

  480. class Game_BattlerBase
  481.   
  482.   #--------------------------------------------------------------------------
  483.   # alias method: equip_type_fixed?
  484.   #--------------------------------------------------------------------------
  485.   alias game_battlerbase_equip_type_fixed_aee equip_type_fixed?
  486.   def equip_type_fixed?(etype_id)
  487.     return true if fixed_etypes.include?(etype_id) if actor?
  488.     return game_battlerbase_equip_type_fixed_aee(etype_id)
  489.   end
  490.   
  491.   #--------------------------------------------------------------------------
  492.   # alias method: equip_type_sealed?
  493.   #--------------------------------------------------------------------------
  494.   alias game_battlerbase_equip_type_sealed_aee equip_type_sealed?
  495.   def equip_type_sealed?(etype_id)
  496.     return true if sealed_etypes.include?(etype_id) if actor?
  497.     return game_battlerbase_equip_type_sealed_aee(etype_id)
  498.   end
  499.   
  500. end # Game_BattlerBase

  501. #==============================================================================
  502. # ■ Game_Actor
  503. #==============================================================================

  504. class Game_Actor < Game_Battler
  505.   
  506.   #--------------------------------------------------------------------------
  507.   # alias method: init_equips
  508.   #--------------------------------------------------------------------------
  509.   alias game_actor_init_equips_aee init_equips
  510.   def init_equips(equips)
  511.     game_actor_init_equips_aee(equips)
  512.     equip_extra_starting_equips
  513.   end
  514.   
  515.   #--------------------------------------------------------------------------
  516.   # new method: equip_extra_starting_equips
  517.   #--------------------------------------------------------------------------
  518.   def equip_extra_starting_equips
  519.     for equip_id in actor.extra_starting_equips
  520.       armour = $data_armors[equip_id]
  521.       next if armour.nil?
  522.       etype_id = armour.etype_id
  523.       next unless equip_slots.include?(etype_id)
  524.       slot_id = empty_slot(etype_id)
  525.       @equips[slot_id].set_equip(etype_id == 0, armour.id)
  526.     end
  527.     refresh
  528.   end
  529.   
  530.   #--------------------------------------------------------------------------
  531.   # overwrite method: equip_slots
  532.   #--------------------------------------------------------------------------
  533.   def equip_slots
  534.     return equip_slots_dual if dual_wield?
  535.     return equip_slots_normal
  536.   end
  537.   
  538.   #--------------------------------------------------------------------------
  539.   # new method: equip_slots_normal
  540.   #--------------------------------------------------------------------------
  541.   def equip_slots_normal
  542.     return self.actor.base_equip_slots if self.actor.base_equip_slots != []
  543.     return self.class.base_equip_slots
  544.   end
  545.   
  546.   #--------------------------------------------------------------------------
  547.   # new method: equip_slots_dual
  548.   #--------------------------------------------------------------------------
  549.   def equip_slots_dual
  550.     array = equip_slots_normal.clone
  551.     array[1] = 0 if array.size >= 2
  552.     return array
  553.   end
  554.   
  555.   #--------------------------------------------------------------------------
  556.   # new method: fixed_etypes
  557.   #--------------------------------------------------------------------------
  558.   def fixed_etypes
  559.     array = []
  560.     array |= self.actor.fixed_equip_type
  561.     array |= self.class.fixed_equip_type
  562.     for equip in equips
  563.       next if equip.nil?
  564.       array |= equip.fixed_equip_type
  565.     end
  566.     for state in states
  567.       next if state.nil?
  568.       array |= state.fixed_equip_type
  569.     end
  570.     return array
  571.   end
  572.   
  573.   #--------------------------------------------------------------------------
  574.   # new method: sealed_etypes
  575.   #--------------------------------------------------------------------------
  576.   def sealed_etypes
  577.     array = []
  578.     array |= self.actor.sealed_equip_type
  579.     array |= self.class.sealed_equip_type
  580.     for equip in equips
  581.       next if equip.nil?
  582.       array |= equip.sealed_equip_type
  583.     end
  584.     for state in states
  585.       next if state.nil?
  586.       array |= state.sealed_equip_type
  587.     end
  588.     return array
  589.   end
  590.   
  591.   #--------------------------------------------------------------------------
  592.   # alias method: change_equip
  593.   #--------------------------------------------------------------------------
  594.   alias game_actor_change_equip_aee change_equip
  595.   def change_equip(slot_id, item)
  596.     if item.nil? && !@optimize_clear
  597.       etype_id = equip_slots[slot_id]
  598.       return unless YEA::EQUIP::TYPES[etype_id][1]
  599.     elsif item.nil? && @optimize_clear
  600.       etype_id = equip_slots[slot_id]
  601.       return unless YEA::EQUIP::TYPES[etype_id][2]
  602.     end
  603.     @equips[slot_id] = Game_BaseItem.new if @equips[slot_id].nil?
  604.     game_actor_change_equip_aee(slot_id, item)
  605.   end
  606.   
  607.   #--------------------------------------------------------------------------
  608.   # overwrite method: optimize_equipments
  609.   #--------------------------------------------------------------------------
  610.   def optimize_equipments
  611.     $game_temp.eds_actor = self
  612.     @optimize_clear = true
  613.     clear_equipments
  614.     @optimize_clear = false
  615.     equip_slots.size.times do |i|
  616.       next if !equip_change_ok?(i)
  617.       next unless can_optimize?(i)
  618.       items = $game_party.equip_items.select do |item|
  619.         item.etype_id == equip_slots[i] &&
  620.         equippable?(item) && item.performance >= 0
  621.       end
  622.       change_equip(i, items.max_by {|item| item.performance })
  623.     end
  624.     $game_temp.eds_actor = nil
  625.   end
  626.   
  627.   #--------------------------------------------------------------------------
  628.   # new method: can_optimize?
  629.   #--------------------------------------------------------------------------
  630.   def can_optimize?(slot_id)
  631.     etype_id = equip_slots[slot_id]
  632.     return YEA::EQUIP::TYPES[etype_id][2]
  633.   end
  634.   
  635.   #--------------------------------------------------------------------------
  636.   # alias method: force_change_equip
  637.   #--------------------------------------------------------------------------
  638.   alias game_actor_force_change_equip_aee force_change_equip
  639.   def force_change_equip(slot_id, item)
  640.     @equips[slot_id] = Game_BaseItem.new if @equips[slot_id].nil?
  641.     game_actor_force_change_equip_aee(slot_id, item)
  642.   end
  643.   
  644.   #--------------------------------------------------------------------------
  645.   # alias method: weapons
  646.   #--------------------------------------------------------------------------
  647.   alias game_actor_weapons_aee weapons
  648.   def weapons
  649.     anti_crash_equips
  650.     return game_actor_weapons_aee
  651.   end
  652.   
  653.   #--------------------------------------------------------------------------
  654.   # alias method: armors
  655.   #--------------------------------------------------------------------------
  656.   alias game_actor_armors_aee armors
  657.   def armors
  658.     anti_crash_equips
  659.     return game_actor_armors_aee
  660.   end
  661.   
  662.   #--------------------------------------------------------------------------
  663.   # alias method: equips
  664.   #--------------------------------------------------------------------------
  665.   alias game_actor_equips_aee equips
  666.   def equips
  667.     anti_crash_equips
  668.     return game_actor_equips_aee
  669.   end
  670.   
  671.   #--------------------------------------------------------------------------
  672.   # new method: equips
  673.   #--------------------------------------------------------------------------
  674.   def anti_crash_equips
  675.     for i in [email protected]
  676.       next unless @equips[i].nil?
  677.       @equips[i] = Game_BaseItem.new
  678.     end
  679.   end
  680.   
  681. end # Game_Actor

  682. #==============================================================================
  683. # ■ Game_Interpreter
  684. #==============================================================================

  685. class Game_Interpreter
  686.   
  687.   #--------------------------------------------------------------------------
  688.   # overwrite method: change equip
  689.   #--------------------------------------------------------------------------
  690.   def command_319
  691.     actor = $game_actors[@params[0]]
  692.     return if actor.nil?
  693.     if @params[1] == 0 && @params[2] != 0
  694.       item = $data_weapons[@params[2]]
  695.       return unless actor.equip_slots.include?(0)
  696.       slot_id = actor.empty_slot(0)
  697.     elsif @params[2] != 0
  698.       item = $data_armors[@params[2]]
  699.       return unless actor.equip_slots.include?(item.etype_id)
  700.       slot_id = actor.empty_slot(item.etype_id)
  701.     else
  702.       slot_id = @params[1]
  703.     end
  704.     actor.change_equip_by_id(slot_id, @params[2])
  705.   end
  706.   
  707. end # Game_Interpreter

  708. #==============================================================================
  709. # ■ Window_EquipStatus
  710. #==============================================================================

  711. class Window_EquipStatus < Window_Base
  712.   
  713.   #--------------------------------------------------------------------------
  714.   # overwrite method: initialize
  715.   #--------------------------------------------------------------------------
  716.   def initialize(dx, dy)
  717.     super(dx, dy, window_width, Graphics.height - dy)
  718.     [url=home.php?mod=space&uid=95897]@actor[/url] = nil
  719.     @temp_actor = nil
  720.     refresh
  721.   end
  722.   
  723.   #--------------------------------------------------------------------------
  724.   # overwrite method: window_width
  725.   #--------------------------------------------------------------------------
  726.   def window_width; return Graphics.width * 2 / 5; end
  727.   
  728.   #--------------------------------------------------------------------------
  729.   # overwrite method: refresh
  730.   #--------------------------------------------------------------------------
  731.   def refresh
  732.     contents.clear
  733.     8.times {|i| draw_item(0, line_height * i, i) }
  734.   end
  735.   
  736.   #--------------------------------------------------------------------------
  737.   # overwrite method: draw_item
  738.   #--------------------------------------------------------------------------
  739.   def draw_item(dx, dy, param_id)
  740.     draw_background_colour(dx, dy)
  741.     draw_param_name(dx + 4, dy, param_id)
  742.     draw_current_param(dx + 4, dy, param_id) if @actor
  743.     drx = (contents.width + 22) / 2
  744.     draw_right_arrow(drx, dy)
  745.     draw_new_param(drx + 22, dy, param_id) if @temp_actor
  746.     reset_font_settings
  747.   end
  748.   
  749.   #--------------------------------------------------------------------------
  750.   # new method: draw_background_colour
  751.   #--------------------------------------------------------------------------
  752.   def draw_background_colour(dx, dy)
  753.     colour = Color.new(0, 0, 0, translucent_alpha/2)
  754.     rect = Rect.new(dx+1, dy+1, contents.width - 2, line_height - 2)
  755.     contents.fill_rect(rect, colour)
  756.   end
  757.   
  758.   #--------------------------------------------------------------------------
  759.   # overwrite method: draw_param_name
  760.   #--------------------------------------------------------------------------
  761.   def draw_param_name(dx, dy, param_id)
  762.     contents.font.size = YEA::EQUIP::STATUS_FONT_SIZE
  763.     change_color(system_color)
  764.     draw_text(dx, dy, contents.width, line_height, Vocab::param(param_id))
  765.   end
  766.   
  767.   #--------------------------------------------------------------------------
  768.   # overwrite method: draw_current_param
  769.   #--------------------------------------------------------------------------
  770.   def draw_current_param(dx, dy, param_id)
  771.     change_color(normal_color)
  772.     dw = (contents.width + 22) / 2
  773.     draw_text(0, dy, dw, line_height, @actor.param(param_id).group, 2)
  774.     reset_font_settings
  775.   end
  776.   
  777.   #--------------------------------------------------------------------------
  778.   # overwrite method: draw_new_param
  779.   #--------------------------------------------------------------------------
  780.   def draw_new_param(dx, dy, param_id)
  781.     contents.font.size = YEA::EQUIP::STATUS_FONT_SIZE
  782.     new_value = @temp_actor.param(param_id)
  783.     change_color(param_change_color(new_value - @actor.param(param_id)))
  784.     draw_text(0, dy, contents.width-4, line_height, new_value.group, 2)
  785.     reset_font_settings
  786.   end
  787.   
  788. end # Window_EquipStatus

  789. #==============================================================================
  790. # ■ Window_EquipCommand
  791. #==============================================================================

  792. class Window_EquipCommand < Window_HorzCommand
  793.   
  794.   #--------------------------------------------------------------------------
  795.   # overwrite method: make_command_list
  796.   #--------------------------------------------------------------------------
  797.   def make_command_list
  798.     for command in YEA::EQUIP::COMMAND_LIST
  799.       case command
  800.       when :equip
  801.         add_command(Vocab::equip2, :equip)
  802.       when :optimize
  803.         add_command(Vocab::optimize, :optimize)
  804.       when :clear
  805.         add_command(Vocab::clear, :clear)
  806.       else
  807.         process_custom_command(command)
  808.       end
  809.     end
  810.   end
  811.   
  812.   #--------------------------------------------------------------------------
  813.   # process_ok
  814.   #--------------------------------------------------------------------------
  815.   def process_ok
  816.     $game_temp.scene_equip_index = index
  817.     $game_temp.scene_equip_oy = self.oy
  818.     super
  819.   end
  820.   
  821.   #--------------------------------------------------------------------------
  822.   # new method: process_custom_command
  823.   #--------------------------------------------------------------------------
  824.   def process_custom_command(command)
  825.     return unless YEA::EQUIP::CUSTOM_EQUIP_COMMANDS.include?(command)
  826.     show = YEA::EQUIP::CUSTOM_EQUIP_COMMANDS[command][2]
  827.     continue = show <= 0 ? true : $game_switches[show]
  828.     return unless continue
  829.     text = YEA::EQUIP::CUSTOM_EQUIP_COMMANDS[command][0]
  830.     switch = YEA::EQUIP::CUSTOM_EQUIP_COMMANDS[command][1]
  831.     enabled = switch <= 0 ? true : $game_switches[switch]
  832.     add_command(text, command, enabled)
  833.   end
  834.   
  835.   #--------------------------------------------------------------------------
  836.   # overwrite method: window_width
  837.   #--------------------------------------------------------------------------
  838.   def window_width; return 160; end
  839.   
  840.   #--------------------------------------------------------------------------
  841.   # overwrite method: contents_width
  842.   #--------------------------------------------------------------------------
  843.   def contents_width; return width - standard_padding * 2; end
  844.   
  845.   #--------------------------------------------------------------------------
  846.   # overwrite method: contents_height
  847.   #--------------------------------------------------------------------------
  848.   def contents_height
  849.     ch = height - standard_padding * 2
  850.     return [ch - ch % item_height, row_max * item_height].max
  851.   end
  852.   
  853.   #--------------------------------------------------------------------------
  854.   # overwrite method: visible_line_number
  855.   #--------------------------------------------------------------------------
  856.   def visible_line_number; return 4; end
  857.   
  858.   #--------------------------------------------------------------------------
  859.   # overwrite method: col_max
  860.   #--------------------------------------------------------------------------
  861.   def col_max; return 1; end
  862.    
  863.   #--------------------------------------------------------------------------
  864.   # overwrite method: item_rect
  865.   #--------------------------------------------------------------------------
  866.   def item_rect(index)
  867.     rect = Rect.new
  868.     rect.width = item_width
  869.     rect.height = item_height
  870.     rect.x = index % col_max * (item_width + spacing)
  871.     rect.y = index / col_max * item_height
  872.     rect
  873.   end
  874.   
  875.   #--------------------------------------------------------------------------
  876.   # overwrite method: ensure_cursor_visible
  877.   #--------------------------------------------------------------------------
  878.   def ensure_cursor_visible
  879.     self.top_row = row if row < top_row
  880.     self.bottom_row = row if row > bottom_row
  881.   end
  882.    
  883.   #--------------------------------------------------------------------------
  884.   # overwrite method: cursor_down
  885.   #--------------------------------------------------------------------------
  886.   def cursor_down(wrap = false)
  887.     if index < item_max - col_max || (wrap && col_max == 1)
  888.       select((index + col_max) % item_max)
  889.     end
  890.   end
  891.   
  892.   #--------------------------------------------------------------------------
  893.   # overwrite method: cursor_up
  894.   #--------------------------------------------------------------------------
  895.   def cursor_up(wrap = false)
  896.     if index >= col_max || (wrap && col_max == 1)
  897.       select((index - col_max + item_max) % item_max)
  898.     end
  899.   end
  900.   
  901.   #--------------------------------------------------------------------------
  902.   # overwrite method: process_pageup
  903.   #--------------------------------------------------------------------------
  904.   def process_pageup
  905.     Sound.play_cursor
  906.     Input.update
  907.     deactivate
  908.     call_handler(:pageup)
  909.   end
  910.   
  911.   #--------------------------------------------------------------------------
  912.   # overwrite method: process_pagedown
  913.   #--------------------------------------------------------------------------
  914.   def process_pagedown
  915.     Sound.play_cursor
  916.     Input.update
  917.     deactivate
  918.     call_handler(:pagedown)
  919.   end
  920.   
  921. end # Window_EquipCommand

  922. #==============================================================================
  923. # ■ Window_EquipSlot
  924. #==============================================================================

  925. class Window_EquipSlot < Window_Selectable
  926.   
  927.   #--------------------------------------------------------------------------
  928.   # overwrite method: initialize
  929.   #--------------------------------------------------------------------------
  930.   def initialize(dx, dy, dw)
  931.     super(dx, dy, dw, Graphics.height - dy)
  932.     @actor = nil
  933.     refresh
  934.   end
  935.   
  936.   #--------------------------------------------------------------------------
  937.   # overwrite method: window_height
  938.   #--------------------------------------------------------------------------
  939.   def window_height; return self.height; end
  940.   
  941.   #--------------------------------------------------------------------------
  942.   # overwrite method: visible_line_number
  943.   #--------------------------------------------------------------------------
  944.   def visible_line_number; return item_max; end
  945.   
  946.   #--------------------------------------------------------------------------
  947.   # overwrite method: refresh
  948.   #--------------------------------------------------------------------------
  949.   def refresh
  950.     create_contents
  951.     super
  952.   end
  953.   
  954.   #--------------------------------------------------------------------------
  955.   # overwrite method: draw_item
  956.   #--------------------------------------------------------------------------
  957.   def draw_item(index)
  958.     return unless @actor
  959.     rect = item_rect_for_text(index)
  960.     change_color(system_color, enable?(index))
  961.     draw_text(rect.x, rect.y, 92, line_height, slot_name(index))
  962.     item = @actor.equips[index]
  963.     dx = rect.x + 92
  964.     dw = contents.width - dx - 24
  965.     if item.nil?
  966.       draw_nothing_equip(dx, rect.y, false, dw)
  967.     else
  968.       draw_item_name(item, dx, rect.y, enable?(index), dw)
  969.     end
  970.   end
  971.   
  972.   #--------------------------------------------------------------------------
  973.   # new method: draw_nothing_equip
  974.   #--------------------------------------------------------------------------
  975.   def draw_nothing_equip(dx, dy, enabled, dw)
  976.     change_color(normal_color, enabled)
  977.     draw_icon(Icon.nothing_equip, dx, dy, enabled)
  978.     text = YEA::EQUIP::NOTHING_TEXT
  979.     draw_text(dx + 24, dy, dw - 24, line_height, text)
  980.   end
  981.   
  982. end # Window_EquipSlot

  983. #==============================================================================
  984. # ■ Window_EquipItem
  985. #==============================================================================

  986. class Window_EquipItem < Window_ItemList
  987.   
  988.   #--------------------------------------------------------------------------
  989.   # overwrite method: col_max
  990.   #--------------------------------------------------------------------------
  991.   def col_max; return 1; end
  992.   
  993.   #--------------------------------------------------------------------------
  994.   # overwrite method: slot_id=
  995.   #--------------------------------------------------------------------------
  996.   def slot_id=(slot_id)
  997.     return if @slot_id == slot_id
  998.     @slot_id = slot_id
  999.     @last_item = nil
  1000.     self.oy = 0
  1001.   end
  1002.   
  1003.   #--------------------------------------------------------------------------
  1004.   # overwrite method: draw_item
  1005.   #--------------------------------------------------------------------------
  1006.   def draw_item(index)
  1007.     item = @data[index]
  1008.     rect = item_rect(index)
  1009.     rect.width -= 4
  1010.     if item.nil?
  1011.       draw_remove_equip(rect)
  1012.       return
  1013.     end
  1014.     dw = contents.width - rect.x - 24
  1015.     draw_item_name(item, rect.x, rect.y, enable?(item), dw)
  1016.     draw_item_number(rect, item)
  1017.   end
  1018.   
  1019.   #--------------------------------------------------------------------------
  1020.   # new method: draw_remove_equip
  1021.   #--------------------------------------------------------------------------
  1022.   def draw_remove_equip(rect)
  1023.     draw_icon(Icon.remove_equip, rect.x, rect.y)
  1024.     text = YEA::EQUIP::REMOVE_EQUIP_TEXT
  1025.     rect.x += 24
  1026.     rect.width -= 24
  1027.     draw_text(rect, text)
  1028.   end
  1029.   
  1030.   #--------------------------------------------------------------------------
  1031.   # overwrite method: include?
  1032.   #--------------------------------------------------------------------------
  1033.   def include?(item)
  1034.     if item.nil? && [email protected]?
  1035.       etype_id = @actor.equip_slots[@slot_id]
  1036.       return YEA::EQUIP::TYPES[etype_id][1]
  1037.     end
  1038.     return true if item.nil?
  1039.     return false unless item.is_a?(RPG::EquipItem)
  1040.     return false if @slot_id < 0
  1041.     return false if item.etype_id != @actor.equip_slots[@slot_id]
  1042.     return @actor.equippable?(item)
  1043.   end
  1044.   
  1045.   #--------------------------------------------------------------------------
  1046.   # overwrite method: enable?
  1047.   #--------------------------------------------------------------------------
  1048.   def enable?(item)
  1049.     if item.nil? && [email protected]?
  1050.       etype_id = @actor.equip_slots[@slot_id]
  1051.       return YEA::EQUIP::TYPES[etype_id][1]
  1052.     end
  1053.     return @actor.equippable?(item)
  1054.   end
  1055.   
  1056.   #--------------------------------------------------------------------------
  1057.   # new method: show
  1058.   #--------------------------------------------------------------------------
  1059.   def show
  1060.     @last_item = 0
  1061.     update_help
  1062.     super
  1063.   end
  1064.   
  1065.   #--------------------------------------------------------------------------
  1066.   # overwrite method: update_help
  1067.   #--------------------------------------------------------------------------
  1068.   def update_help
  1069.     super
  1070.     return if @actor.nil?
  1071.     return if @status_window.nil?
  1072.     return if @last_item == item
  1073.     @last_item = item
  1074.     temp_actor = Marshal.load(Marshal.dump(@actor))
  1075.     temp_actor.force_change_equip(@slot_id, item)
  1076.     @status_window.set_temp_actor(temp_actor)
  1077.   end
  1078.   
  1079. end # Window_EquipItem

  1080. #==============================================================================
  1081. # ■ Window_EquipActor
  1082. #==============================================================================

  1083. class Window_EquipActor < Window_Base
  1084.   
  1085.   #--------------------------------------------------------------------------
  1086.   # initialize
  1087.   #--------------------------------------------------------------------------
  1088.   def initialize(dx, dy)
  1089.     super(dx, dy, window_width, fitting_height(4))
  1090.     @actor = nil
  1091.   end
  1092.   
  1093.   #--------------------------------------------------------------------------
  1094.   # window_width
  1095.   #--------------------------------------------------------------------------
  1096.   def window_width; return Graphics.width - 160; end
  1097.   
  1098.   #--------------------------------------------------------------------------
  1099.   # actor=
  1100.   #--------------------------------------------------------------------------
  1101.   def actor=(actor)
  1102.     return if @actor == actor
  1103.     @actor = actor
  1104.     refresh
  1105.   end
  1106.   
  1107.   #--------------------------------------------------------------------------
  1108.   # refresh
  1109.   #--------------------------------------------------------------------------
  1110.   def refresh
  1111.     contents.clear
  1112.     return unless @actor
  1113.     draw_actor_face(@actor, 0, 0)
  1114.     draw_actor_simple_status(@actor, 108, line_height / 2)
  1115.   end
  1116.   
  1117. end # Window_EquipActor

  1118. #==============================================================================
  1119. # ■ Scene_Equip
  1120. #==============================================================================

  1121. class Scene_Equip < Scene_MenuBase
  1122.   
  1123.   #--------------------------------------------------------------------------
  1124.   # overwrite method: create_status_window
  1125.   #--------------------------------------------------------------------------
  1126.   def create_status_window
  1127.     wx = Graphics.width - (Graphics.width * 2 / 5)
  1128.     wy = @help_window.height + 120
  1129.     @status_window = Window_EquipStatus.new(wx, wy)
  1130.     @status_window.viewport = @viewport
  1131.     @status_window.actor = @actor
  1132.   end
  1133.   
  1134.   #--------------------------------------------------------------------------
  1135.   # overwrite method: create_command_window
  1136.   #--------------------------------------------------------------------------
  1137.   def create_command_window
  1138.     wx = 0
  1139.     wy = @help_window.height
  1140.     ww = 160
  1141.     @command_window = Window_EquipCommand.new(wx, wy, ww)
  1142.     @command_window.viewport = @viewport
  1143.     @command_window.help_window = @help_window
  1144.     if !$game_temp.scene_equip_index.nil?
  1145.       @command_window.select($game_temp.scene_equip_index)
  1146.       @command_window.oy = $game_temp.scene_equip_oy
  1147.     end
  1148.     $game_temp.scene_equip_index = nil
  1149.     $game_temp.scene_equip_oy = nil
  1150.     @command_window.set_handler(:equip,    method(:command_equip))
  1151.     @command_window.set_handler(:optimize, method(:command_optimize))
  1152.     @command_window.set_handler(:clear,    method(:command_clear))
  1153.     @command_window.set_handler(:cancel,   method(:return_scene))
  1154.     @command_window.set_handler(:pagedown, method(:next_actor))
  1155.     @command_window.set_handler(:pageup,   method(:prev_actor))
  1156.     process_custom_equip_commands
  1157.     create_actor_window
  1158.   end
  1159.   
  1160.   #--------------------------------------------------------------------------
  1161.   # new method: create_actor_window
  1162.   #--------------------------------------------------------------------------
  1163.   def create_actor_window
  1164.     wy = @help_window.height
  1165.     @actor_window = Window_EquipActor.new(@command_window.width, wy)
  1166.     @actor_window.viewport = @viewport
  1167.     @actor_window.actor = @actor
  1168.   end
  1169.   
  1170.   #--------------------------------------------------------------------------
  1171.   # new method: process_custom_equip_commands
  1172.   #--------------------------------------------------------------------------
  1173.   def process_custom_equip_commands
  1174.     for command in YEA::EQUIP::COMMAND_LIST
  1175.       next unless YEA::EQUIP::CUSTOM_EQUIP_COMMANDS.include?(command)
  1176.       called_method = YEA::EQUIP::CUSTOM_EQUIP_COMMANDS[command][3]
  1177.       @command_window.set_handler(command, method(called_method))
  1178.     end
  1179.   end
  1180.   
  1181.   #--------------------------------------------------------------------------
  1182.   # overwrite method: create_slot_window
  1183.   #--------------------------------------------------------------------------
  1184.   def create_slot_window
  1185.     wx = 0
  1186.     wy = @command_window.y + @command_window.height
  1187.     ww = Graphics.width - @status_window.width
  1188.     @slot_window = Window_EquipSlot.new(wx, wy, ww)
  1189.     @slot_window.viewport = @viewport
  1190.     @slot_window.help_window = @help_window
  1191.     @slot_window.status_window = @status_window
  1192.     @slot_window.actor = @actor
  1193.     @slot_window.set_handler(:ok,       method(:on_slot_ok))
  1194.     @slot_window.set_handler(:cancel,   method(:on_slot_cancel))
  1195.   end
  1196.   
  1197.   #--------------------------------------------------------------------------
  1198.   # overwrite method: create_item_window
  1199.   #--------------------------------------------------------------------------
  1200.   def create_item_window
  1201.     wx = @slot_window.x
  1202.     wy = @slot_window.y
  1203.     ww = @slot_window.width
  1204.     wh = @slot_window.height
  1205.     @item_window = Window_EquipItem.new(wx, wy, ww, wh)
  1206.     @item_window.viewport = @viewport
  1207.     @item_window.help_window = @help_window
  1208.     @item_window.status_window = @status_window
  1209.     @item_window.actor = @actor
  1210.     @item_window.set_handler(:ok,     method(:on_item_ok))
  1211.     @item_window.set_handler(:cancel, method(:on_item_cancel))
  1212.     @slot_window.item_window = @item_window
  1213.     @item_window.hide
  1214.   end
  1215.   
  1216.   #--------------------------------------------------------------------------
  1217.   # alias method: command_optimize
  1218.   #--------------------------------------------------------------------------
  1219.   alias scene_equip_command_optimize_aee command_optimize
  1220.   def command_optimize
  1221.     scene_equip_command_optimize_aee
  1222.     @actor_window.refresh
  1223.   end
  1224.   
  1225.   #--------------------------------------------------------------------------
  1226.   # alias method: command_clear
  1227.   #--------------------------------------------------------------------------
  1228.   alias scene_equip_command_clear_aee command_clear
  1229.   def command_clear
  1230.     scene_equip_command_clear_aee
  1231.     @actor_window.refresh
  1232.   end
  1233.   
  1234.   #--------------------------------------------------------------------------
  1235.   # alias method: on_slot_ok
  1236.   #--------------------------------------------------------------------------
  1237.   alias scene_equip_on_slot_ok_aee on_slot_ok
  1238.   def on_slot_ok
  1239.     scene_equip_on_slot_ok_aee
  1240.     @slot_window.hide
  1241.     @item_window.refresh
  1242.     @item_window.show
  1243.   end
  1244.   
  1245.   #--------------------------------------------------------------------------
  1246.   # alias method: on_item_ok
  1247.   #--------------------------------------------------------------------------
  1248.   alias scene_equip_on_item_ok_aee on_item_ok
  1249.   def on_item_ok
  1250.     scene_equip_on_item_ok_aee
  1251.     @actor_window.refresh
  1252.     @slot_window.show
  1253.     @item_window.hide
  1254.   end
  1255.   
  1256.   #--------------------------------------------------------------------------
  1257.   # alias method: on_item_cancel
  1258.   #--------------------------------------------------------------------------
  1259.   alias scene_equip_on_item_cancel_aee on_item_cancel
  1260.   def on_item_cancel
  1261.     scene_equip_on_item_cancel_aee
  1262.     @slot_window.show
  1263.     @item_window.hide
  1264.   end
  1265.   
  1266.   #--------------------------------------------------------------------------
  1267.   # alias method: on_actor_change
  1268.   #--------------------------------------------------------------------------
  1269.   alias scene_equip_on_actor_change_aee on_actor_change
  1270.   def on_actor_change
  1271.     scene_equip_on_actor_change_aee
  1272.     @actor_window.actor = @actor
  1273.   end
  1274.   
  1275.   #--------------------------------------------------------------------------
  1276.   # new method: command_name1
  1277.   #--------------------------------------------------------------------------
  1278.   def command_name1
  1279.     # Do nothing.
  1280.   end
  1281.   
  1282.   #--------------------------------------------------------------------------
  1283.   # new method: command_name2
  1284.   #--------------------------------------------------------------------------
  1285.   def command_name2
  1286.     # Do nothing.
  1287.   end
  1288.   
  1289. end # Scene_Equip

  1290. #==============================================================================
  1291. #
  1292. # ▼ End of File
  1293. #
  1294. #==============================================================================
复制代码
我命令你给我点下面的东西!

LBQ Works
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
581
在线时间
123 小时
注册时间
2011-6-14
帖子
36
8
 楼主| 发表于 2012-12-3 22:14:52 | 只看该作者
亿万星辰 发表于 2012-12-2 22:54
脚本 Game_Actor0武器、1盾牌、2头盔、3盔甲、4饰品,自己调顺序吧。

是把这段代码加在《Game_Actor》中吗,我试了,没有效果啊?

点评

还请明示啊!我在Game_Actor中没有找到“# ● 获取装备栏的数组”这段,也没有下面[0,1,2,3,4]这样的代码啊~  发表于 2012-12-3 23:05
同学,不要急躁,耐下性子把我写的每个字看完。  发表于 2012-12-3 22:41
我在原来的《Game_Actor》没有找到这一段?你们的有?  发表于 2012-12-3 22:40
不是加,是调整顺序。  发表于 2012-12-3 22:27
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
581
在线时间
123 小时
注册时间
2011-6-14
帖子
36
9
 楼主| 发表于 2012-12-3 22:15:59 | 只看该作者
本帖最后由 dddzz 于 2012-12-3 22:18 编辑
896409879 发表于 2012-12-2 23:10
有问题,找Yanfly!


是加入这个脚本吗?我试了,【745.   “ @actor = nil”】(见截图)这句报错?

无标题.jpg (6.4 KB, 下载次数: 35)

无标题.jpg
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-11-16 05:55

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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