查看: 3907|回复: 16

[已经过期] MOG 破限脚本最大HP值问题

[复制链接]
梦石
0
星屑
2457
在线时间
912 小时
注册时间
2014-10-14
回帖
1155

开拓者

发表于 2017-6-27 02:41:11 | 显示全部楼层 |阅读模式

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

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

×

MOG 破限脚本最大HP值不能超过9千万  超过就显示1千万 。。{:2_271:}
这是VA系统的问题 吗? 能设置超过1亿的HP吗?求大佬路过看看
{:2_286:}

  1. # ▼ Yanfly Engine Ace - Adjust Limits v1.00
  2. # -- Last Updated: 2011.12.03
  3. # -- Level: Normal
  4. # -- Requires: n/a
  5. #
  6. #==============================================================================

  7. $imported = {} if $imported.nil?
  8. $imported["YEA-AdjustLimits"] = true

  9. #==============================================================================
  10. # ▼ Updates
  11. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  12. # 2011.12.03 - Finished Script.
  13. # 2011.12.02 - Started Script.
  14. #
  15. #==============================================================================
  16. # ▼ Introduction
  17. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  18. # There exists some limitations in RPG Maker VX Ace that not everybody's fond
  19. # of. With this script, you can easily adjust the limits of each limitation.
  20. # Here's the list of various limits that can be changed:
  21. #
  22. # - Gold Max  - Have more than 99,999,999 gold.
  23. # - Item Max  - Have more than 99 items. Customizable per item, too.
  24. # - Level Max - Exceed 99 levels. Parameters are automatically calculated based
  25. #               on the level 99 and level 98 stats in the class parameters.
  26. # - Stat Max  - Stats can exceed 999. Does not adjust for current formulas.
  27. #
  28. #==============================================================================
  29. # ▼ Instructions
  30. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  31. # To install this script, open up your script editor and copy/paste this script
  32. # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
  33. #
  34. # -----------------------------------------------------------------------------
  35. # 角色备注栏 - These notetags go in the actors notebox in the database.
  36. # -----------------------------------------------------------------------------
  37. # <initial level: x>   设置角色的初始等级,可超过99.

  38. # <max level: x>       设置角色的最高等级,可超过99.

  39. # -----------------------------------------------------------------------------
  40. # 职业备注栏 - These notetags go in the class notebox in the database.
  41. # -----------------------------------------------------------------------------
  42. # <learn at level: x>  在职业的技能备注栏里设置,等级可超过99.

  43. # -----------------------------------------------------------------------------
  44. # 物品备注栏 - These notetags go in the items notebox in the database.
  45. # -----------------------------------------------------------------------------
  46. # <max limit: x>       设置该物品的可持有上限,比如50.

  47. # <price: x>           设置物品的价格,可打破数据库限制的999999。

  48. # -----------------------------------------------------------------------------
  49. # 武器备注栏 - These notetags go in the weapons notebox in the database.
  50. # -----------------------------------------------------------------------------
  51. # <max limit: x>       设置该物品的可持有上限,比如50.

  52. # <price: x>           设置物品的价格,可打破数据库限制的999999。

  53. # <stat: +x>           设置武器的能力值变化量,例:<ATK: +500>
  54. # <stat: -x>

  55. # -----------------------------------------------------------------------------
  56. # 防具备注栏 - These notetags go in the armours notebox in the database.
  57. # -----------------------------------------------------------------------------
  58. # <max limit: x>       同上
  59. #
  60. # <price: x>

  61. # <stat: +x>
  62. # <stat: -x>
  63. #
  64. # -----------------------------------------------------------------------------
  65. # 敌人备注栏 - These notetags go in the enemy notebox in the database.
  66. # -----------------------------------------------------------------------------
  67. # <stat: x>            设置敌人属性值,可破限。例:<EXP: 6666666>
  68. # MAXHP, MAXMP, ATK, DEF, MAT, MDF, AGI, LUK, EXP, GOLD

  69. # -----------------------------------------------------------------------------
  70. # 脚本呼出语句 - These commands are used with script calls.
  71. # -----------------------------------------------------------------------------
  72. # gain_gold(x)         设置增减金币,可破限。
  73. # lose_gold(x)
  74. #
  75. # gain_item(x, y)      设置增减X物品Y数目,可破限。
  76. # lose_item(x, y)
  77. # gain_weapon(x, y)
  78. # lose_weapon(x, y)
  79. # gain_armour(x, y)
  80. # lose_armour(x, y)

  81. #==============================================================================
  82. # ▼ Compatibility
  83. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  84. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  85. # it will run with RPG Maker VX without adjusting.
  86. #
  87. #==============================================================================

  88. module YEA
  89.   module LIMIT

  90.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  91.     # - Gold Settings -
  92.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  93.     # Adjust gold settings here. You can change the maximum amount of gold to
  94.     # whatever you want. In addition to that, you can also adjust whether or
  95.     # not you wish for your gold display to show an icon instead, (and change
  96.     # the font size if needed). If there's too much gold that's to be displayed
  97.     # then you can change the text shown in place of that.
  98.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  99.     GOLD_MAX  = 999999999999999  # Maximum gold.
  100.     GOLD_ICON = 95               # Icon used for gold. Use 0 for text currency.
  101.     GOLD_FONT = 20               # Font size used to display gold.
  102.     TOO_MUCH_GOLD = "A lotta gold!"   # Text used when gold cannot fit.

  103.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  104.     # - Item Settings -
  105.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  106.     # Adjust item settings here. You can change the maximum number of items
  107.     # held from 99 to whatever you want. In addition to that, change the prefix
  108.     # used for items when shown in the item display menu (and the font size if
  109.     # needed). Items can have individual maximums through usage of the
  110.     # <max limit: x> notetag.
  111.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  112.     ITEM_MAX  = 999      # The default maximum number of items held each.
  113.     ITEM_FONT = 20       # Font size used to display item quantity.
  114.     SHOP_FONT = 20       # Font size used for shop item costs.
  115.     ITEM_PREFIX = "×%s" # Prefix used for item quantity in item lists.

  116.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  117.     # - Parameter Settings -
  118.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  119.     # Adjust the limits for each of the various stats (for MaxHP, MaxMP, ATK,
  120.     # DEF, MAT, and more). Adjust them as you see fit.
  121.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  122.     LEVEL_MAX = 90000     # Sets max level to x for those with 99 level limit.
  123.     MAXHP_MAX = 90000000 # Sets MaxHP to something higher than 9999.
  124.     MAXMP_MAX = 9999999 # Sets MaxMP to something higher than 9999.
  125.     PARAM_MAX = 9999999 # Sets stat max for something higher than 999.
  126.     EQUIP_FONT = 20     # Changes the default equip window font size.

  127.   end # LIMIT
  128. end # YEA

  129. #==============================================================================
  130. # ▼ Editting anything past this point may potentially result in causing
  131. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  132. # halitosis so edit at your own risk.
  133. #==============================================================================

  134. module YEA
  135.   module REGEXP
  136.   module ACTOR

  137.     MAX_LEVEL = /<(?:MAX_LEVEL|max level):[ ](\d+)>/i
  138.     INI_LEVEL = /<(?:INITIAL_LEVEL|initial level):[ ](\d+)>/i

  139.   end # ACTOR
  140.   module CLASS

  141.     LEARN_AT_LV = /<(?:LEARN_AT_LEVEL|learn at level):[ ](\d+)>/i

  142.   end # CLASS
  143.   module BASEITEM

  144.     PRICE     = /<(?:GOLD|price|COST):[ ](\d+)>/i
  145.     MAX_LIMIT = /<(?:MAX_LIMIT|max limit):[ ](\d+)>/i
  146.     STAT_SET  = /<(.*):[ ]*([\+\-]\d+)>/i

  147.   end # BASEITEM
  148.   module ENEMY

  149.     STAT_SET  = /<(.*):[ ]*(\d+)>/i

  150.   end # ENEMY
  151.   end # REGEXP
  152. end # YEA

  153. #==============================================================================
  154. # ■ Icon
  155. #==============================================================================

  156. module Icon

  157.   #--------------------------------------------------------------------------
  158.   # self.gold
  159.   #--------------------------------------------------------------------------
  160.   def self.gold; return YEA::LIMIT::GOLD_ICON; end

  161. end # Icon

  162. #==============================================================================
  163. # ■ Numeric
  164. #==============================================================================

  165. class Numeric

  166.   #--------------------------------------------------------------------------
  167.   # new method: group_digits
  168.   #--------------------------------------------------------------------------
  169.   unless $imported["YEA-CoreEngine"]
  170.   def group; return self.to_s; end
  171.   end # $imported["YEA-CoreEngine"]

  172. end # Numeric

  173. #==============================================================================
  174. # ■ DataManager
  175. #==============================================================================

  176. module DataManager

  177.   #--------------------------------------------------------------------------
  178.   # alias method: load_database
  179.   #--------------------------------------------------------------------------
  180.   class <<self; alias load_database_al load_database; end
  181.   def self.load_database
  182.     load_database_al
  183.     load_notetags_al
  184.   end

  185.   #--------------------------------------------------------------------------
  186.   # new method: load_notetags_al
  187.   #--------------------------------------------------------------------------
  188.   def self.load_notetags_al
  189.     groups = [$data_actors, $data_items, $data_weapons, $data_armors,
  190.       $data_enemies, $data_classes]
  191.     for group in groups
  192.       for obj in group
  193.         next if obj.nil?
  194.         obj.load_notetags_al
  195.       end
  196.     end
  197.   end
  198.   
  199. end # DataManager

  200. #==============================================================================
  201. # ■ RPG::Actor
  202. #==============================================================================

  203. class RPG::Actor < RPG::BaseItem

  204.   #--------------------------------------------------------------------------
  205.   # common cache: load_notetags_al
  206.   #--------------------------------------------------------------------------
  207.   def load_notetags_al
  208.     @max_level = YEA::LIMIT::LEVEL_MAX if @max_level == 99
  209.     #---
  210.     self.note.split(/[\r\n]+/).each { |line|
  211.       case line
  212.       #---
  213.       when YEA::REGEXP::ACTOR::MAX_LEVEL
  214.         @max_level = [[$1.to_i, 1].max, YEA::LIMIT::LEVEL_MAX].min
  215.         @ini_level = [@ini_level, @max_level].min
  216.       when YEA::REGEXP::ACTOR::INI_LEVEL
  217.         @ini_level = [[$1.to_i, 1].max, @max_level].min
  218.       #---
  219.       end
  220.     } # self.note.split
  221.     #---
  222.   end

  223. end # RPG::Actor

  224. #==============================================================================
  225. # ■ RPG::Class
  226. #==============================================================================

  227. class RPG::Class < RPG::BaseItem

  228.   #--------------------------------------------------------------------------
  229.   # new method: above_lv99_params
  230.   #--------------------------------------------------------------------------
  231.   def above_lv99_params(param_id, level)
  232.     return @params[param_id, level] if level <= 99
  233.     n = @params[param_id, 99]
  234.     multiplier = [level - 99, 1].max
  235.     change = (@params[param_id, 99] - @params[param_id, 98]) + 1
  236.     n += change * multiplier
  237.     return n
  238.   end

  239.   #--------------------------------------------------------------------------
  240.   # new method: load_notetags_al
  241.   #--------------------------------------------------------------------------
  242.   def load_notetags_al
  243.     for item in @learnings; item.load_notetags_al; end
  244.   end
  245.   
  246. end # RPG::Class

  247. #==============================================================================
  248. # ■ RPG::Class::Learning
  249. #==============================================================================

  250. class RPG::Class::Learning

  251.   #--------------------------------------------------------------------------
  252.   # common cache: load_notetags_al
  253.   #--------------------------------------------------------------------------
  254.   def load_notetags_al
  255.     #---
  256.     self.note.split(/[\r\n]+/).each { |line|
  257.       case line
  258.       #---
  259.       when YEA::REGEXP::CLASS::LEARN_AT_LV
  260.         @level = [[$1.to_i, 1].max, YEA::LIMIT::LEVEL_MAX].min
  261.       #---
  262.       end
  263.     } # self.note.split
  264.     #---
  265.   end

  266. end # RPG::Class::Learning

  267. #==============================================================================
  268. # ■ RPG::BaseItem
  269. #==============================================================================

  270. class RPG::BaseItem

  271.   #--------------------------------------------------------------------------
  272.   # public instance variables
  273.   #--------------------------------------------------------------------------
  274.   attr_accessor :max_limit

  275.   #--------------------------------------------------------------------------
  276.   # common cache: load_notetags_al
  277.   #--------------------------------------------------------------------------
  278.   def load_notetags_al
  279.     @max_limit = YEA::LIMIT::ITEM_MAX
  280.     #---
  281.     self.note.split(/[\r\n]+/).each { |line|
  282.       case line
  283.       #---
  284.       when YEA::REGEXP::BASEITEM::PRICE
  285.         @price = [$1.to_i, YEA::LIMIT::GOLD_MAX].min
  286.       when YEA::REGEXP::BASEITEM::MAX_LIMIT
  287.         @max_limit = [$1.to_i, 1].max
  288.       when YEA::REGEXP::BASEITEM::STAT_SET
  289.         case $1.upcase
  290.         when "HP", "MAXHP", "MHP"
  291.           @params[0] = $2.to_i
  292.         when "MP", "MAXMP", "MMP", "SP", "MAXSP", "MSP"
  293.           @params[1] = $2.to_i
  294.         when "ATK"
  295.           @params[2] = $2.to_i
  296.         when "DEF"
  297.           @params[3] = $2.to_i
  298.         when "MAT", "INT", "SPI"
  299.           @params[4] = $2.to_i
  300.         when "MDF", "RES"
  301.           @params[5] = $2.to_i
  302.         when "AGI", "SPD"
  303.           @params[6] = $2.to_i
  304.         when "LUK", "LUCK"
  305.           @params[7] = $2.to_i
  306.         end
  307.       #---
  308.       end
  309.     } # self.note.split
  310.     #---
  311.   end

  312.   #--------------------------------------------------------------------------
  313.   # new method: max_limit
  314.   #--------------------------------------------------------------------------
  315.   def max_limit; return @max_limit; end

  316. end # RPG::BaseItem

  317. #==============================================================================
  318. # ■ RPG::Enemy
  319. #==============================================================================

  320. class RPG::Enemy < RPG::BaseItem

  321.   #--------------------------------------------------------------------------
  322.   # common cache: load_notetags_al
  323.   #--------------------------------------------------------------------------
  324.   def load_notetags_al
  325.     #---
  326.     self.note.split(/[\r\n]+/).each { |line|
  327.       case line
  328.       #---
  329.       when YEA::REGEXP::ENEMY::STAT_SET
  330.         case $1.upcase
  331.         when "HP", "MAXHP", "MHP"
  332.           @params[0] = $2.to_i
  333.         when "MP", "MAXMP", "MMP", "SP", "MAXSP", "MSP"
  334.           @params[1] = $2.to_i
  335.         when "ATK"
  336.           @params[2] = $2.to_i
  337.         when "DEF"
  338.           @params[3] = $2.to_i
  339.         when "MAT", "INT", "SPI"
  340.           @params[4] = $2.to_i
  341.         when "MDF", "RES"
  342.           @params[5] = $2.to_i
  343.         when "AGI", "SPD"
  344.           @params[6] = $2.to_i
  345.         when "LUK", "LUCK"
  346.           @params[7] = $2.to_i
  347.         when "EXP", "XP"
  348.           @exp = $2.to_i
  349.         when "GOLD", "GP"
  350.           @gold = $2.to_i
  351.         end
  352.       #---
  353.       end
  354.     } # self.note.split
  355.     #---
  356.   end

  357. end # RPG::Enemy

  358. #==============================================================================
  359. # ■ Game_BattlerBase
  360. #==============================================================================

  361. class Game_BattlerBase

  362.   #--------------------------------------------------------------------------
  363.   # overwrite method: param_max
  364.   #--------------------------------------------------------------------------
  365.   def param_max(param_id)
  366.     return YEA::LIMIT::MAXHP_MAX if param_id == 0
  367.     return YEA::LIMIT::MAXMP_MAX if param_id == 1
  368.     return YEA::LIMIT::PARAM_MAX
  369.   end

  370. end # Game_BattlerBase

  371. #==============================================================================
  372. # ■ Game_Actor
  373. #==============================================================================

  374. class Game_Actor < Game_Battler

  375.   #--------------------------------------------------------------------------
  376.   # overwrite method: param_max
  377.   #--------------------------------------------------------------------------
  378.   def param_max(param_id)
  379.     return super
  380.   end

  381.   #--------------------------------------------------------------------------
  382.   # overwrite method: param_base
  383.   #--------------------------------------------------------------------------
  384.   def param_base(param_id)
  385.     return self.class.params[param_id, @level] if @level <= 99
  386.     return self.class.above_lv99_params(param_id, @level)
  387.   end

  388.   #--------------------------------------------------------------------------
  389.   # new method: check_levels
  390.   #--------------------------------------------------------------------------
  391.   def check_levels
  392.     last_level = @level
  393.     @level = [[@level, max_level].min, 1].max
  394.     return if @level == last_level
  395.     change_exp(exp_for_level(@level), false)
  396.   end

  397. end # Game_Actor

  398. #==============================================================================
  399. # ■ Game_Party
  400. #==============================================================================

  401. class Game_Party < Game_Unit

  402.   #--------------------------------------------------------------------------
  403.   # overwrite method: max_gold
  404.   #--------------------------------------------------------------------------
  405.   def max_gold; return YEA::LIMIT::GOLD_MAX; end

  406.   #--------------------------------------------------------------------------
  407.   # overwrite method: max_item_number
  408.   #--------------------------------------------------------------------------
  409.   def max_item_number(item); return item.max_limit; end

  410. end # Game_Party

  411. #==============================================================================
  412. # ■ Game_Interpreter
  413. #==============================================================================

  414. class Game_Interpreter

  415.   #--------------------------------------------------------------------------
  416.   # new method: gain_gold
  417.   #--------------------------------------------------------------------------
  418.   def gain_gold(value); $game_party.gain_gold(value); end

  419.   #--------------------------------------------------------------------------
  420.   # new method: lose_gold
  421.   #--------------------------------------------------------------------------
  422.   def lose_gold(value); $game_party.lose_gold(value); end

  423.   #--------------------------------------------------------------------------
  424.   # new method: gain_item
  425.   #--------------------------------------------------------------------------
  426.   def gain_item(id, amount)
  427.     return if $data_items[id].nil?
  428.     $game_party.gain_item($data_items[id], amount)
  429.   end

  430.   #--------------------------------------------------------------------------
  431.   # new method: lose_item
  432.   #--------------------------------------------------------------------------
  433.   def lose_item(id, amount)
  434.     return if $data_items[id].nil?
  435.     $game_party.lose_item($data_items[id], amount)
  436.   end

  437.   #--------------------------------------------------------------------------
  438.   # new method: gain_weapon
  439.   #--------------------------------------------------------------------------
  440.   def gain_weapon(id, amount)
  441.     return if $data_weapons[id].nil?
  442.     $game_party.gain_item($data_weapons[id], amount)
  443.   end

  444.   #--------------------------------------------------------------------------
  445.   # new method: lose_weapon
  446.   #--------------------------------------------------------------------------
  447.   def lose_weapon(id, amount)
  448.     return if $data_weapons[id].nil?
  449.     $game_party.lose_item($data_weapons[id], amount)
  450.   end

  451.   #--------------------------------------------------------------------------
  452.   # new method: gain_armour
  453.   #--------------------------------------------------------------------------
  454.   def gain_armour(id, amount)
  455.     return if $data_armors[id].nil?
  456.     $game_party.gain_item($data_armors[id], amount)
  457.   end

  458.   #--------------------------------------------------------------------------
  459.   # new method: lose_armour
  460.   #--------------------------------------------------------------------------
  461.   def lose_armour(id, amount)
  462.     return if $data_armors[id].nil?
  463.     $game_party.lose_item($data_armors[id], amount)
  464.   end

  465.   #--------------------------------------------------------------------------
  466.   # new method: gain_armor
  467.   #--------------------------------------------------------------------------
  468.   def gain_armor(id, amount)
  469.     return if $data_armors[id].nil?
  470.     $game_party.gain_item($data_armors[id], amount)
  471.   end

  472.   #--------------------------------------------------------------------------
  473.   # new method: lose_armor
  474.   #--------------------------------------------------------------------------
  475.   def lose_armor(id, amount)
  476.     return if $data_armors[id].nil?
  477.     $game_party.lose_item($data_armors[id], amount)
  478.   end

  479. end # Game_Interpreter

  480. #==============================================================================
  481. # ■ Window_Base
  482. #==============================================================================

  483. class Window_Base < Window

  484.   #--------------------------------------------------------------------------
  485.   # overwrite method: draw_actor_level
  486.   #--------------------------------------------------------------------------
  487.   def draw_actor_level(actor, dx, dy)
  488.     dw = text_size(Vocab::level_a + YEA::LIMIT::LEVEL_MAX.to_s).width
  489.     change_color(system_color)
  490.     draw_text(dx, dy, dw, line_height, Vocab::level_a)
  491.     change_color(normal_color)
  492.     cx = text_size(Vocab::level_a).width
  493.     draw_text(dx + cx, dy, dw, line_height, actor.level.group, 2)
  494.   end

  495.   #--------------------------------------------------------------------------
  496.   # overwrite method: draw_actor_param
  497.   #--------------------------------------------------------------------------
  498.   def draw_actor_param(actor, dx, dy, param_id)
  499.     change_color(system_color)
  500.     draw_text(dx, dy, 120, line_height, Vocab::param(param_id))
  501.     change_color(normal_color)
  502.     draw_text(dx, dy, 156, line_height, actor.param(param_id).group, 2)
  503.   end

  504.   #--------------------------------------------------------------------------
  505.   # draw_currency_value
  506.   #--------------------------------------------------------------------------
  507.   def draw_currency_value(value, unit, dx, dy, dw)
  508.     contents.font.size = YEA::LIMIT::GOLD_FONT
  509.     cx = gold_icon?(unit) ? 24 : text_size(unit).width
  510.     change_color(normal_color)
  511.     text = value.group
  512.     text = YEA::LIMIT::TOO_MUCH_GOLD if contents.text_size(text).width > dw-cx
  513.     draw_text(dx, dy, dw - cx - 2, line_height, text, 2)
  514.     change_color(system_color)
  515.     draw_icon(Icon.gold, dx+dw-24, dy) if gold_icon?(unit)
  516.     draw_text(dx, dy, dw, line_height, unit, 2) unless gold_icon?(unit)
  517.     reset_font_settings
  518.   end

  519.   #--------------------------------------------------------------------------
  520.   # new method: gold_icon?
  521.   #--------------------------------------------------------------------------
  522.   def gold_icon?(unit)
  523.     return false if unit != Vocab.currency_unit
  524.     return YEA::LIMIT::GOLD_ICON > 0
  525.   end

  526. end # Window_Base

  527. #==============================================================================
  528. # ■ Window_ItemList
  529. #==============================================================================

  530. class Window_ItemList < Window_Selectable

  531.   #--------------------------------------------------------------------------
  532.   # overwrite method: draw_item_number
  533.   #--------------------------------------------------------------------------
  534.   def draw_item_number(rect, item)
  535.     contents.font.size = YEA::LIMIT::ITEM_FONT
  536.     quantity = $game_party.item_number(item).group
  537.     text = sprintf(YEA::LIMIT::ITEM_PREFIX, quantity)
  538.     draw_text(rect, text, 2)
  539.     reset_font_settings
  540.   end

  541. end # Window_ItemList

  542. #==============================================================================
  543. # ■ Window_EquipStatus
  544. #==============================================================================

  545. class Window_EquipStatus < Window_Base

  546.   #--------------------------------------------------------------------------
  547.   # overwrite method: draw_item
  548.   #--------------------------------------------------------------------------
  549.   def draw_item(dx, dy, param_id)
  550.     draw_param_name(dx + 4, dy, param_id)
  551.     draw_current_param(dx + 64, dy, param_id) if @actor
  552.     draw_right_arrow(dx + 110, dy)
  553.     draw_new_param(dx + 132, dy, param_id) if @temp_actor
  554.     reset_font_settings
  555.   end
  556.   #--------------------------------------------------------------------------
  557.   # overwrite method: draw_param_name
  558.   #--------------------------------------------------------------------------
  559.   def draw_param_name(dx, dy, param_id)
  560.     contents.font.size = YEA::LIMIT::EQUIP_FONT
  561.     change_color(system_color)
  562.     draw_text(dx, dy, contents.width, line_height, Vocab::param(param_id))
  563.   end

  564.   #--------------------------------------------------------------------------
  565.   # overwrite method: draw_current_param
  566.   #--------------------------------------------------------------------------
  567.   def draw_current_param(dx, dy, param_id)
  568.     change_color(normal_color)
  569.     draw_text(0, dy, dx+48, line_height, @actor.param(param_id).group, 2)
  570.     reset_font_settings
  571.   end
  572.   #--------------------------------------------------------------------------
  573.   # overwrite method: draw_new_param
  574.   #--------------------------------------------------------------------------
  575.   def draw_new_param(dx, dy, param_id)
  576.     contents.font.size = YEA::LIMIT::EQUIP_FONT
  577.     new_value = @temp_actor.param(param_id)
  578.     change_color(param_change_color(new_value - @actor.param(param_id)))
  579.     draw_text(0, dy, contents.width-4, line_height, new_value.group, 2)
  580.     reset_font_settings
  581.   end

  582. end # Window_EquipStatus

  583. #==============================================================================
  584. # ■ Window_ShopBuy
  585. #==============================================================================

  586. class Window_ShopBuy < Window_Selectable

  587.   #--------------------------------------------------------------------------
  588.   # overwrite method: draw_item
  589.   #--------------------------------------------------------------------------
  590.   def draw_item(index)
  591.     item = @data[index]
  592.     rect = item_rect(index)
  593.     draw_item_name(item, rect.x, rect.y, enable?(item))
  594.     rect.width -= 4
  595.     contents.font.size = YEA::LIMIT::SHOP_FONT
  596.     draw_text(rect, price(item).group, 2)
  597.     reset_font_settings
  598.   end

  599. end # Window_ShopBuy

  600. #==============================================================================
  601. # ■ Scene_Load
  602. #==============================================================================

  603. class Scene_Load < Scene_File

  604.   #--------------------------------------------------------------------------
  605.   # alias method: on_load_success
  606.   #--------------------------------------------------------------------------
  607.   alias on_load_success_al on_load_success
  608.   def on_load_success
  609.     on_load_success_al
  610.     perform_level_check
  611.   end

  612.   #--------------------------------------------------------------------------
  613.   # new method: perform_level_check
  614.   #--------------------------------------------------------------------------
  615.   def perform_level_check
  616.     for i in 1..$data_actors.size
  617.       next if $game_actors[i].nil?
  618.       $game_actors[i].check_levels
  619.     end
  620.   end
  621.   
  622. end # Scene_Load

  623. #==============================================================================
  624. #
  625. # ▼ End of File
  626. #
  627. #==============================================================================
  628. #
  629. # ▼ 以下为我的修改,主要为了适应1024*576分辨率。By风宥雪
  630. #
  631. #==============================================================================
  632. #==============================================================================
  633. class Window_EquipStatus < Window_Base
  634.   #--------------------------------------------------------------------------
  635.   # ● 绘制更换装备前的能力值
  636.   #--------------------------------------------------------------------------
  637.   def draw_current_param(dx, dy, param_id)
  638.     reset_font_settings
  639.     change_color(normal_color)
  640.     draw_text(70, dy, 50, line_height, @actor.param(param_id).group, 1)
  641.   end
  642.   #--------------------------------------------------------------------------
  643.   # ● 绘制更换装备后的能力值
  644.   #--------------------------------------------------------------------------
  645.   def draw_new_param(x, y, param_id)
  646.     new_value = @temp_actor.param(param_id)
  647.     change = new_value - @actor.param(param_id)
  648.     change_color(param_change_color(change))
  649.     if change > 0
  650.       draw_text(120, y, 20, line_height, "↑", 1)
  651.     elsif change == 0
  652.       draw_text(120, y, 20, line_height, "→", 1)
  653.     else
  654.       draw_text(120, y, 20, line_height, "↓", 1)
  655.     end
  656.     draw_text(140, y, 50, line_height, new_value, 1)
  657.   end
  658. end
复制代码
------落尽红樱君不见,轻绘梨花泪沾衣。~~~
梦石
0
星屑
878
在线时间
576 小时
注册时间
2010-6-26
回帖
709
发表于 2017-6-27 06:34:36 来自手机 | 显示全部楼层
用了这些破限脚本的游戏一般平衡性很差,垃圾游戏的代名词,慎用。把简单的游戏做好最重要。

点评

请大佬是来求讨论的不是请你骂人 骂脚本的 这个脚本招惹你了?既然原作者 写出他 就有他的存在而不是你这种喷子  发表于 2017-6-27 12:27
同样都是人 差距怎么这么大  发表于 2017-6-27 12:25
回复

使用道具 举报

老黄鸡

梦石
4
星屑
46140
在线时间
7978 小时
注册时间
2009-7-6
回帖
13343

MZ评测员RM创作大赛01组委会开拓者贵宾

发表于 2017-6-27 09:02:48 | 显示全部楼层
1.png

我也是很服你们,遇到问题的时候甚至不愿意多思考一秒,多看一眼。
人家作者把上限写在这真是白写了。

点评

大佬 难道 我没 告诉 超过9千万的吗?。。。  发表于 2017-6-27 12:20

评分

参与人数 1星屑 +45 收起 理由
魔法丶小肉包 + 45 精品文章

查看全部评分

RGDirect - DirectX驱动的RGSS,点我了解.
(排满,暂停)RM全系列成套系统定制请联系QQ1213237796
不接受对其他插件维护的委托
回复

使用道具 举报

梦石
0
星屑
2457
在线时间
912 小时
注册时间
2014-10-14
回帖
1155

开拓者

 楼主| 发表于 2017-6-27 12:32:48 | 显示全部楼层
fux2 发表于 2017-6-27 09:02
我也是很服你们,遇到问题的时候甚至不愿意多思考一秒,多看一眼。
人家作者把上限写在这真是白写了。 ...

  这种事 我怎么不细看  
大佬 我都发图片了设置超9千万的血 真的生效了就会变成1千万的血了。。。


题外话   
一般不会设置超过一亿的血量
只是我很好奇 这算不算 VA 本身问题
360截图20170627122402542.jpg
360截图20170627122415893.jpg
360截图20170627122517504.jpg
------落尽红樱君不见,轻绘梨花泪沾衣。~~~
回复

使用道具 举报

梦石
0
星屑
1345
在线时间
378 小时
注册时间
2015-6-16
回帖
526
发表于 2017-6-27 13:03:13 | 显示全部楼层
其实这也是算搬VA默认脚本的,里面是有基础设定的。你不看那默认设定,VA本身没有问题。自己不看的问题,不愿意多看
在BATTLEBASE里面他就是搬了这一部分
  #--------------------------------------------------------------------------
  # ● 获取普通能力的最大值
  #--------------------------------------------------------------------------
  def param_max(param_id)
    return 999999 if param_id == 0  # MHP
    return 9999   if param_id == 1  # MMP
    return 999
  end

点评

我几乎得到一个证明 研究VA 那么久 破限的极限就是9千万不能超过一个亿 血量O(∩_∩)O哈!其他不宜讨论 你知道神龙王吗 ,5千万的血量 坑死 小伙...节奏   发表于 2017-6-27 13:25
我几乎研究了所有关于破限这个词 呃呃 讨论 强迫症 逼死 我  发表于 2017-6-27 13:22
P1不太上了,有问题加个Q1286124843,不管是脚本还是游戏问题都可以来找我
回复

使用道具 举报

梦石
0
星屑
2457
在线时间
912 小时
注册时间
2014-10-14
回帖
1155

开拓者

 楼主| 发表于 2017-6-27 13:18:36 | 显示全部楼层
300英雄 发表于 2017-6-27 13:03
其实这也是算搬VA默认脚本的,里面是有基础设定的。你不看那默认设定,VA本身没有问题。自己不看的问题,不 ...

你知道的我早已 用过
不过谢谢指导 虽然我明白这个问题
不然我也不说是VA 本身问题~\(≧▽≦)/~啦啦啦
360截图20170627131717676.jpg
360截图20170627131733969.jpg
------落尽红樱君不见,轻绘梨花泪沾衣。~~~
回复

使用道具 举报

职业の水客

梦石
2
星屑
17082
在线时间
7500 小时
注册时间
2010-6-16
回帖
3466

极短27评委MZ评测员极短26评委开拓者

发表于 2017-6-27 14:09:41 | 显示全部楼层
本帖最后由 寂静的夜里 于 2017-6-27 18:49 编辑

不能超过1E
QQ截图20170627141453.jpg


本来推荐的是yanfly的破限,
结果仔细看一眼,这不就是yanfly的吗?怎么标题是MOG的……
脚本我没有 已经删除了 这图还是几个月前的

PS:如果更换脚本还没有用 你可以试试更改BOSS血条脚本的 坐标  (可能没显示完整,往左调整位置)

点评

已更新帖子  发表于 2017-6-27 14:17
终于有大佬看出原因了  发表于 2017-6-27 14:12

评分

参与人数 1星屑 +20 收起 理由
j296196585 + 20 测试很久 总算成功了

查看全部评分

游戏开发工具集,一站式AI生图+图片完美像素化及相关处理网站。
群爆炸重建后状态:论坛老人最多(只剩下了活跃的老人),技术力很强(依旧不变)的编程灌水群:901540785
专门讨论RM相关的Q群:56875149
PS:第一个群不是专门讨论RM的,第二个才是哦。
PS2:接受MV/MZ插件定制(QQ763992443)
回复

使用道具 举报

梦石
0
星屑
2457
在线时间
912 小时
注册时间
2014-10-14
回帖
1155

开拓者

 楼主| 发表于 2017-6-27 14:31:02 | 显示全部楼层
本帖最后由 j296196585 于 2017-6-27 15:15 编辑


坐标超过了 怎么修改坐标。。。晕了

寂静的夜里 发表于 2017-6-27 14:09
不能超过1E
建议更换脚本Yanfly 有个脚本 叫 Adjust Limits 可以破限


可是 我看不懂 这真的无奈


  1. #==============================================================================
  2. # +++ MOG - Boss HP Meter (V1.2) +++
  3. #==============================================================================
  4. # By Moghunter
  5. # [url]http://www.atelier-rgss.com[/url]
  6. #==============================================================================
  7. # Apresenta um medidor animado com o HP do inimigo.
  8. #
  9. #==============================================================================
  10. # UTILIZAÇÃO
  11. #==============================================================================
  12. # Coloque o seguinte comentário na caixa de notas do inimigo.
  13. #
  14. # <Boss HP Meter>
  15. #
  16. # Caso desejar ocultar o valor numérico do HP use o código abaixo.
  17. #
  18. # <Boss HP Hide Number>
  19. #
  20. #==============================================================================
  21. # Caso precisar mudar a posição do medidor no meio do jogo use o código abaixo
  22. #
  23. # boss_hp_position(X,Y)
  24. #
  25. #==============================================================================
  26. # Serão necessários as imagens.
  27. #
  28. # Battle_Boss_Meter.png
  29. # Battle_Boss_Meter_Layout.png
  30. #==============================================================================
  31. # FACES (Opcional)
  32. #==============================================================================
  33. # Nomeie o arquivo da face da seguinte maneira. (Graphics/Faces/)
  34. #
  35. # Enemy_Name + _F.png         (Slime_F.png)
  36. #
  37. #==============================================================================
  38. # Definindo o LEVEL (Opcional)
  39. #==============================================================================
  40. # Coloque o seguinte comentário na caixa de notas do inimigo.
  41. #
  42. # <Level = X>
  43. #
  44. #==============================================================================

  45. #==============================================================================
  46. # ● Histórico (Version History)
  47. #==============================================================================
  48. # v 1.2 - Melhoria na performance.
  49. #       - Não é mais necessário o script Enemy HP.
  50. #==============================================================================

  51. module MOG_BOSS_HP_METER
  52.     #Posição geral do layout.
  53.     LAYOUT_POSITION = [100,35]
  54.     #Posição do medidor.
  55.     METER_POSITION = [3,3]
  56.     #Posição do nome do inimigo.
  57.     NAME_POSITION = [16,8]
  58.     #Posição da face.
  59.     FACE_POSITION = [0,-30]
  60.     #Posição do level do inimigo.
  61.     LEVEL_POSITION = [150, -24]#[290, 0]
  62.     #Posição do numero  de HP
  63.     HP_NUMBER_POSITION = [230, 5]
  64.     #Definição do espaço da palavra HP e o valor de numérico.
  65.     HP_STRING_SPACE = 36
  66.     #
  67.     HP_NUMBER_WAVE_EFFECT = true
  68.     #Definição da palavra Level.
  69.     LEVEL_WORD = "Level "
  70.     #Velocidade de animação do medidor
  71.     METER_ANIMATION_SPEED = 10
  72.     #Definição do nome da fonte.
  73.     FONT_NAME = "Georgia"
  74.    
  75.     #Definição do tamanho da fonte.
  76.     FONT_SIZE = 16
  77.     #Ativar contorno na fonte.
  78.     FONT_BOLD = true
  79.     #Fonte em itálico.
  80.     FONT_ITALIC = true
  81.     #Definição da cor da fonte.
  82.     FONT_COLOR = Color.new(255,255,255)
  83.     #Definição da prioridade da HUD.
  84.     PRIORITY_Z = 101
  85. end

  86. #==============================================================================
  87. # ■ Game System
  88. #==============================================================================
  89. class Game_System
  90.   
  91. attr_accessor :boss_hp_meter
  92.   
  93. #--------------------------------------------------------------------------
  94. # ● Initialize
  95. #--------------------------------------------------------------------------  
  96. alias mog_boss_hp_meter_initialize initialize
  97. def initialize
  98.      ix = MOG_BOSS_HP_METER::LAYOUT_POSITION[0]
  99.      iy = MOG_BOSS_HP_METER::LAYOUT_POSITION[1]
  100.      @boss_hp_meter = [ix,iy,false,"",0,1,0,nil,0,false]
  101.      mog_boss_hp_meter_initialize
  102. end
  103.   
  104. end

  105. #==============================================================================
  106. # ■ Game Enemy
  107. #==============================================================================
  108. class Game_Enemy < Game_Battler
  109.    
  110.   attr_accessor :boss_hp_meter
  111.   attr_accessor :boss_hp_number
  112.   attr_accessor :level
  113.   
  114.   #--------------------------------------------------------------------------
  115.   # ● Initialize
  116.   #--------------------------------------------------------------------------
  117.   alias mog_boss_hp_meter_initialize initialize
  118.   def initialize(index, enemy_id)
  119.       mog_boss_hp_meter_initialize(index, enemy_id)
  120.       @boss_hp_meter = enemy.note =~ /<Boss HP Meter>/ ? true : false
  121.       @boss_hp_number = enemy.note =~ /<Boss HP Hide Number>/ ? false : true
  122.       @level = enemy.note =~ /<Level = (\d+)>/i ? $1 : nil
  123.   end  

  124. end

  125. #==============================================================================
  126. # ■ Game Temp
  127. #==============================================================================
  128. class Game_Temp
  129.   
  130.   attr_accessor :battle_end
  131.   
  132.   #--------------------------------------------------------------------------
  133.   # ● Initialize
  134.   #--------------------------------------------------------------------------  
  135.   alias mog_boss_hp_meter_initialize initialize
  136.   def initialize
  137.       @battle_end = false
  138.       mog_boss_hp_meter_initialize
  139.   end  

  140. end

  141. #==============================================================================
  142. # ■ Game Interpreter
  143. #==============================================================================
  144. class Game_Interpreter
  145.   
  146. #--------------------------------------------------------------------------
  147. # ● Initialize
  148. #--------------------------------------------------------------------------   
  149. def boss_hp_position(x = 0,y = 0)
  150.      $game_system.boss_hp_meter[0] = x
  151.      $game_system.boss_hp_meter[1] = y
  152. end
  153.   
  154. end

  155. #==============================================================================
  156. # ■ Game Temp
  157. #==============================================================================
  158. class Game_Temp

  159.   attr_accessor :cache_boss_hp
  160.   
  161. #--------------------------------------------------------------------------
  162. # ● Initialize
  163. #--------------------------------------------------------------------------   
  164.   alias mog_boss_hp_initialize initialize
  165.   def initialize
  166.       mog_boss_hp_initialize
  167.       cache_bosshp
  168.   end
  169.   
  170. #--------------------------------------------------------------------------
  171. # ● Cache Bosshp
  172. #--------------------------------------------------------------------------  
  173.   def cache_bosshp
  174.       @cache_boss_hp = []
  175.       @cache_boss_hp.push(Cache.system("Battle_Boss_Meter_Layout"))
  176.       @cache_boss_hp.push(Cache.system("Battle_Boss_Meter"))
  177.       @cache_boss_hp.push(Cache.system("Battle_Boss_Number"))
  178.   end
  179.   
  180. end

  181. #==============================================================================
  182. # ■ Boss HP Meter
  183. #==============================================================================
  184. class Boss_HP_Meter
  185.   include MOG_BOSS_HP_METER
  186.   
  187.   #--------------------------------------------------------------------------
  188.   # ● Initialize
  189.   #--------------------------------------------------------------------------  
  190.   def initialize(viewport = nil)
  191.       clear_enemy_setup
  192.       @hp_vieport = viewport
  193.       check_boss_avaliable
  194.   end
  195.   
  196.   #--------------------------------------------------------------------------
  197.   # ● Clear Enemy Setup
  198.   #--------------------------------------------------------------------------   
  199.   def clear_enemy_setup
  200.       @name = ""   
  201.       @hp = 0
  202.       @hp2 = 0
  203.       @hp3 = 0
  204.       @maxhp = 0
  205.       @hp_old = 0
  206.       @level = nil
  207.       $game_system.boss_hp_meter[2] = false
  208.       $game_system.boss_hp_meter[3] = ""
  209.       $game_system.boss_hp_meter[4] = 0
  210.       $game_system.boss_hp_meter[5] = 1
  211.       $game_system.boss_hp_meter[7] = nil
  212.       $game_system.boss_hp_meter[8] = 0
  213.       $game_system.boss_hp_meter[9] = true
  214.   end

  215.   #--------------------------------------------------------------------------
  216.   # ● Check Boss Avaliable
  217.   #--------------------------------------------------------------------------   
  218.   def check_boss_avaliable
  219.       return if $game_troop.all_dead?
  220.       for i in $game_troop.members
  221.           if i.boss_hp_meter and !i.hidden? and i.hp > 0
  222.              create_boss_hp_meter(i)
  223.              break
  224.           end
  225.       end
  226.   end

  227.   #--------------------------------------------------------------------------
  228.   # ● Create Boss HP Meter
  229.   #--------------------------------------------------------------------------      
  230.   def create_boss_hp_meter(i)
  231.       $game_system.boss_hp_meter[2] = true
  232.       $game_system.boss_hp_meter[3] = i.name
  233.       $game_system.boss_hp_meter[4] = i.hp
  234.       $game_system.boss_hp_meter[5] = i.mhp
  235.       $game_system.boss_hp_meter[6] = i.hp
  236.       $game_system.boss_hp_meter[7] = i.level rescue nil
  237.       $game_system.boss_hp_meter[8] = 0
  238.       $game_system.boss_hp_meter[9] = i.boss_hp_number
  239.       refresh_hp_meter
  240.       create_layout
  241.       create_meter
  242.       create_name
  243.       create_face
  244.       create_level
  245.       create_hp_number
  246.   end
  247.    
  248.   #--------------------------------------------------------------------------
  249.   # ● Create Layout
  250.   #--------------------------------------------------------------------------        
  251.   def create_layout
  252.       return if @layout != nil
  253.       @layout = Sprite.new
  254.       @layout.bitmap = $game_temp.cache_boss_hp[0]
  255.       @layout.x = $game_system.boss_hp_meter[0]
  256.       @layout.y = $game_system.boss_hp_meter[1]
  257.       @layout.viewport = @hp_vieport
  258.       @layout.z = PRIORITY_Z
  259.   end
  260.   
  261.   #--------------------------------------------------------------------------
  262.   # ● Create Meter
  263.   #--------------------------------------------------------------------------         
  264.   def create_meter
  265.       return if @meter_image != nil
  266.       hp_setup
  267.       @meter_image = $game_temp.cache_boss_hp[1]
  268.       @meter_cw = @meter_image.width / 3
  269.       @meter_ch = @meter_image.height / 2
  270.       [url=home.php?mod=space&uid=1330256]@meter[/url] = Sprite.new
  271.       @meter.bitmap = Bitmap.new(@meter_cw,@meter_ch)
  272.       @meter.z = @layout.z + 1
  273.       @meter.x = @layout.x + METER_POSITION[0]
  274.       @meter.y = @layout.y + METER_POSITION[1]
  275.       @meter.viewport = @hp_vieport
  276.       @hp_flow = 0
  277.       @hp_flow_max = @meter_cw * 2
  278.       update_hp_meter
  279.   end

  280.   #--------------------------------------------------------------------------
  281.   # ● Create Name
  282.   #--------------------------------------------------------------------------            
  283.   def create_name
  284.       @name_sprite = Sprite.new
  285.       @name_sprite.bitmap = Bitmap.new(200,32)
  286.       @name_sprite.z = @layout.z + 2
  287.       @name_sprite.x = @layout.x + NAME_POSITION[0]
  288.       @name_sprite.y = @layout.y + NAME_POSITION[1]
  289.       @name_sprite.bitmap.font.name = FONT_NAME
  290.       @name_sprite.bitmap.font.size = FONT_SIZE
  291.       @name_sprite.bitmap.font.bold = FONT_BOLD
  292.       @name_sprite.bitmap.font.italic = FONT_ITALIC
  293.       @name_sprite.bitmap.font.color = FONT_COLOR
  294.       @name_sprite.viewport = @hp_vieport
  295.       refresh_name
  296.   end
  297.   
  298.   #--------------------------------------------------------------------------
  299.   # ● Create Face
  300.   #--------------------------------------------------------------------------
  301.   def create_face
  302.       @face_sprite = Sprite.new
  303.       @face_sprite.x = @layout.x + FACE_POSITION[0]
  304.       @face_sprite.y = @layout.y + FACE_POSITION[1]
  305.       @face_sprite.z = @layout.z + 2
  306.       @face_sprite.viewport = @hp_vieport
  307.       refresh_face
  308.   end

  309.   #--------------------------------------------------------------------------
  310.   # ● Create Level
  311.   #--------------------------------------------------------------------------  
  312.   def create_level
  313.       @level_sprite = Sprite.new
  314.       @level_sprite.bitmap = Bitmap.new(120,32)
  315.       @level_sprite.z = @layout.z + 2
  316.       @level_sprite.x = @layout.x + LEVEL_POSITION[0]
  317.       @level_sprite.y = @layout.y + LEVEL_POSITION[1]
  318.       @level_sprite.bitmap.font.name = FONT_NAME
  319.       @level_sprite.bitmap.font.size = FONT_SIZE
  320.       @level_sprite.bitmap.font.bold = FONT_BOLD
  321.       @level_sprite.bitmap.font.italic = FONT_ITALIC
  322.       @level_sprite.bitmap.font.color = FONT_COLOR
  323.       @level_sprite.viewport = @hp_vieport
  324.       refresh_level
  325.   end
  326.   
  327.   #--------------------------------------------------------------------------
  328.   # ● Create HP Number
  329.   #--------------------------------------------------------------------------   
  330.   def create_hp_number
  331.       @hp2 = $game_system.boss_hp_meter[4]
  332.       @hp3 = @hp2
  333.       @hp_old2 = @hp2
  334.       @hp_ref = @hp_old2
  335.       @hp_refresh = false   
  336.       @hp_number_image = $game_temp.cache_boss_hp[2]
  337.       @hp_cw = @hp_number_image.width / 10
  338.       @hp_ch = @hp_number_image.height / 2
  339.       @hp_ch2 = 0
  340.       @hp_ch_range = HP_NUMBER_WAVE_EFFECT == true ? @hp_ch / 3 : 0
  341.       @hp_number_sprite = Sprite.new
  342.       @hp_number_sprite.bitmap = Bitmap.new(@hp_number_image.width, @hp_ch * 2)
  343.       @hp_number_sprite.z = @layout.z + 2
  344.       @hp_number_sprite.x = @layout.x + HP_NUMBER_POSITION[0]
  345.       @hp_number_sprite.y = @layout.y + HP_NUMBER_POSITION[1]
  346.       @hp_number_sprite.viewport = @hp_vieport
  347.       @hp_number_sprite.visible = $game_system.boss_hp_meter[9]
  348.       refresh_hp_number
  349.   end
  350.   
  351.   #--------------------------------------------------------------------------
  352.   # ● update_hp_number
  353.   #--------------------------------------------------------------------------
  354.   def update_hp_number
  355.       return if @hp_number_sprite == nil
  356.       @hp_number_sprite.visible = $game_system.boss_hp_meter[9]
  357.       if @hp_old2 < $game_system.boss_hp_meter[4]
  358.          number_refresh_speed
  359.          @hp2 += @hp_ref     
  360.          reset_hp_number  if @hp2 >= $game_system.boss_hp_meter[4]
  361.       elsif @hp_old2 > $game_system.boss_hp_meter[4]           
  362.          number_refresh_speed
  363.          @hp2 -= @hp_ref               
  364.          reset_hp_number if @hp2 <= $game_system.boss_hp_meter[4]
  365.       end  
  366.   end   
  367.   
  368.   #--------------------------------------------------------------------------
  369.   # ● Number Refresh Speed
  370.   #--------------------------------------------------------------------------
  371.   def number_refresh_speed
  372.       @hp_refresh = true  
  373.       @hp_ref = (3 * (@hp_old2 - $game_system.boss_hp_meter[4]).abs / 100) rescue nil
  374.       @hp_ref = 1 if @hp_ref == nil or @hp_ref < 1
  375.   end
  376.   
  377.   #--------------------------------------------------------------------------
  378.   # ● Refresh HP Number
  379.   #--------------------------------------------------------------------------      
  380.   def refresh_hp_number
  381.       return if @hp_number_sprite == nil
  382.       @hp_refresh = false
  383.       @hp_number_sprite.bitmap.clear
  384.       number = @hp2.abs.to_s.split(//)
  385.       @hp_ch2 = 0
  386.       for r in 0..number.size - 1
  387.           number_abs = number[r].to_i
  388.           nsrc_rect = Rect.new(@hp_cw * number_abs, 0, @hp_cw, @hp_ch)
  389.           @hp_ch2 = @hp_ch2 == @hp_ch_range ? 0 : @hp_ch_range
  390.           @hp_number_sprite.bitmap.blt(HP_STRING_SPACE + (@hp_cw *  r), @hp_ch2, @hp_number_image, nsrc_rect)        
  391.       end      
  392.       nsrc_rect = Rect.new(0, @hp_ch, @hp_number_image.width, @hp_ch)
  393.       @hp_number_sprite.bitmap.blt(0, 0, @hp_number_image, nsrc_rect)     
  394.   end
  395.   
  396.   #--------------------------------------------------------------------------
  397.   # ● Reset HP Number
  398.   #--------------------------------------------------------------------------        
  399.   def reset_hp_number
  400.       @hp_refresh = true
  401.       @hp_old2 = $game_system.boss_hp_meter[4]
  402.       @hp2 = $game_system.boss_hp_meter[4]
  403.       @hp_ref = 0
  404.       refresh_hp_number
  405.   end
  406.    
  407.   #--------------------------------------------------------------------------
  408.   # ● Refresh Level
  409.   #--------------------------------------------------------------------------   
  410.   def refresh_level
  411.       return if @level_sprite == nil
  412.       @level_sprite.bitmap.clear
  413.       @level = $game_system.boss_hp_meter[7]
  414.       return if @level == nil
  415.       level_text = LEVEL_WORD + @level.to_s
  416.       @level_sprite.bitmap.draw_text(0,0,120,32,level_text.to_s)
  417.   end
  418.   
  419.   #--------------------------------------------------------------------------
  420.   # ● Refresh Face
  421.   #--------------------------------------------------------------------------  
  422.   def refresh_face
  423.       return if @face_sprite == nil
  424.       dispose_bitmap_face
  425.       @face_sprite.bitmap = Cache.face(@name + "_f") rescue nil
  426.       @face_sprite.bitmap = Cache.face("") if @face_sprite.bitmap == nil
  427.   end
  428.   
  429.   #--------------------------------------------------------------------------
  430.   # ● Refresh Name
  431.   #--------------------------------------------------------------------------              
  432.   def refresh_name
  433.       return if @name_sprite == nil
  434.       @name = $game_system.boss_hp_meter[3]   
  435.       @name_sprite.bitmap.clear
  436.       @name_sprite.bitmap.draw_text(0,0,190,32,@name.to_s)
  437.       refresh_face
  438.       refresh_level
  439.       reset_hp_number
  440.       @hp_old = @meter_cw * @hp / @maxhp
  441.   end
  442.   
  443.   #--------------------------------------------------------------------------
  444.   # ● HP Setup
  445.   #--------------------------------------------------------------------------            
  446.   def hp_setup
  447.       @hp = $game_system.boss_hp_meter[4]
  448.       @maxhp = $game_system.boss_hp_meter[5]
  449.   end  
  450.   
  451.   #--------------------------------------------------------------------------
  452.   # ● Dispose
  453.   #--------------------------------------------------------------------------  
  454.   def dispose
  455.       dispose_layout
  456.       dispose_meter
  457.       dispose_name
  458.       dispose_face
  459.       dispose_level
  460.       dispose_hp_number
  461.       @hp_vieport.dispose
  462.   end

  463.   #--------------------------------------------------------------------------
  464.   # ● Dispose Name
  465.   #--------------------------------------------------------------------------              
  466.   def dispose_name
  467.       return if @name_sprite == nil
  468.       @name_sprite.bitmap.dispose
  469.       @name_sprite.dispose
  470.       @name_sprite = nil
  471.   end  
  472.   
  473.   #--------------------------------------------------------------------------
  474.   # ● Dispose Layout
  475.   #--------------------------------------------------------------------------   
  476.   def dispose_layout
  477.       return if @layout == nil
  478.       @layout.dispose
  479.       @layout = nil
  480.   end
  481.   
  482.   #--------------------------------------------------------------------------
  483.   # ● Dispose Meter
  484.   #--------------------------------------------------------------------------      
  485.   def dispose_meter
  486.       return if @meter == nil
  487.       @meter.bitmap.dispose
  488.       @meter.dispose
  489.       @meter = nil
  490.   end
  491.   
  492.   #--------------------------------------------------------------------------
  493.   # ● Dispose Face
  494.   #--------------------------------------------------------------------------  
  495.   def dispose_face
  496.       return if @face_sprite == nil
  497.       dispose_bitmap_face
  498.       @face_sprite.dispose
  499.       @face_sprite = nil
  500.   end
  501.   
  502.   #--------------------------------------------------------------------------
  503.   # ● Dispose Bitmap Face
  504.   #--------------------------------------------------------------------------   
  505.   def dispose_bitmap_face
  506.       return if @face_sprite == nil
  507.       return if @face_sprite.bitmap == nil
  508.       @face_sprite.bitmap.dispose rescue nil
  509.       @face_sprite.bitmap = nil
  510.   end  
  511.   
  512.   #--------------------------------------------------------------------------
  513.   # ● Dispose Level
  514.   #--------------------------------------------------------------------------   
  515.   def dispose_level
  516.       return if @level_sprite == nil
  517.       @level_sprite.bitmap.dispose
  518.       @level_sprite.dispose
  519.       @level_sprite = nil
  520.   end  
  521.   
  522.   #--------------------------------------------------------------------------
  523.   # ● Dispose HP Number
  524.   #--------------------------------------------------------------------------      
  525.   def dispose_hp_number
  526.       return if @hp_number_sprite == nil
  527.       @hp_number_sprite.bitmap.dispose
  528.       @hp_number_sprite.dispose
  529.   end   
  530.   
  531.   #--------------------------------------------------------------------------
  532.   # ● Update
  533.   #--------------------------------------------------------------------------  
  534.   def update
  535.       refresh_hp_meter
  536.       refresh_hp_number if @hp_refresh
  537.       update_hp_meter
  538.       update_hp_number
  539.       update_fade_end
  540.   end
  541.   
  542.   #--------------------------------------------------------------------------
  543.   # ● Update Fade End
  544.   #--------------------------------------------------------------------------   
  545.   def update_fade_end
  546.       return if !$game_temp.battle_end
  547.       return if @meter_image == nil
  548.       @layout.opacity -= 5
  549.       @meter.opacity -= 5
  550.       @name_sprite.opacity -= 5
  551.       @face_sprite.opacity -= 5
  552.       @level_sprite.opacity -= 5
  553.       @hp_number_sprite.opacity -= 5
  554.   end
  555.   
  556.   #--------------------------------------------------------------------------
  557.   # ● Refresh HP Meter
  558.   #--------------------------------------------------------------------------         
  559.   def refresh_hp_meter
  560.       return if !$game_system.boss_hp_meter[2]
  561.       $game_system.boss_hp_meter[2] = false
  562.       hp_setup
  563.       refresh_name if @name != $game_system.boss_hp_meter[3]
  564.   end
  565.   
  566.   #--------------------------------------------------------------------------
  567.   # ● Update HP Meter
  568.   #--------------------------------------------------------------------------            
  569.   def update_hp_meter
  570.       return if @meter_image == nil
  571.       @meter.bitmap.clear
  572.       hp_width = @meter_cw * @hp / @maxhp      
  573.       execute_damage_flow(hp_width)      
  574.       hp_src_rect = Rect.new(@hp_flow, 0,hp_width, @meter_ch)
  575.       @meter.bitmap.blt(0,0, @meter_image, hp_src_rect)  
  576.       @hp_flow += METER_ANIMATION_SPEED
  577.       @hp_flow = 0 if @hp_flow >= @hp_flow_max
  578.   end  
  579.    
  580.   #--------------------------------------------------------------------------
  581.   # ● Execute Damage Flow
  582.   #--------------------------------------------------------------------------
  583.   def execute_damage_flow(hp_width)
  584.       return if @hp_old == hp_width
  585.       n = (@hp_old - hp_width).abs * 3 / 100
  586.       damage_flow = [[n, 2].min,0.5].max
  587.       @hp_old -= damage_flow      
  588.       @hp_old = hp_width if @hp_old <= hp_width
  589.       src_rect_old = Rect.new(0,@meter_ch, @hp_old, @meter_ch)
  590.       @meter.bitmap.blt(0,0, @meter_image, src_rect_old)      
  591.   end   
  592.   
  593. end

  594. #==============================================================================
  595. # ■ Spriteset Battle
  596. #==============================================================================
  597. class Spriteset_Battle
  598.   
  599.   #--------------------------------------------------------------------------
  600.   # ● Initialize
  601.   #--------------------------------------------------------------------------  
  602.   alias mog_enemy_bhp_initialize initialize
  603.   def initialize
  604.       mog_enemy_bhp_initialize
  605.       create_boss_hp_meter
  606.   end
  607.   
  608.   #--------------------------------------------------------------------------
  609.   # ● Create Boss HP Meter
  610.   #--------------------------------------------------------------------------  
  611.   def create_boss_hp_meter
  612.       @boss_hp_meter = Boss_HP_Meter.new(@viewport1)
  613.   end
  614.   
  615.   #--------------------------------------------------------------------------
  616.   # ● Dispose
  617.   #--------------------------------------------------------------------------      
  618.   alias mog_enemy_bhp_dispose dispose
  619.   def dispose
  620.       dispose_boss_hp_meter   
  621.       mog_enemy_bhp_dispose
  622.   end  

  623.   #--------------------------------------------------------------------------
  624.   # ● Dispose Boss HP Meter
  625.   #--------------------------------------------------------------------------         
  626.   def dispose_boss_hp_meter
  627.       return if @boss_hp_meter == nil
  628.       @boss_hp_meter.dispose
  629.       @boss_hp_meter = nil
  630.   end
  631.   
  632.   #--------------------------------------------------------------------------
  633.   # ● Update
  634.   #--------------------------------------------------------------------------        
  635.   alias mog_enemy_bhp_update update
  636.   def update
  637.       mog_enemy_bhp_update
  638.       update_boss_hp_meter
  639.   end
  640.   
  641.   #--------------------------------------------------------------------------
  642.   # ● Update Boss HP Meter
  643.   #--------------------------------------------------------------------------            
  644.   def update_boss_hp_meter
  645.       return if @boss_hp_meter == nil
  646.       @boss_hp_meter.update
  647.   end
  648.    
  649. end

  650. #==============================================================================
  651. # ■ Game_Battler
  652. #==============================================================================
  653. class Game_Battler < Game_BattlerBase
  654.   
  655.   #--------------------------------------------------------------------------
  656.   # ● Item Apply
  657.   #--------------------------------------------------------------------------        
  658.   alias mog_boss_hp_item_apply item_apply
  659.   def item_apply(user, item)
  660.       check_boss_hp_before
  661.       mog_boss_hp_item_apply(user, item)
  662.       check_boss_hp_after
  663.   end
  664.   
  665.   #--------------------------------------------------------------------------
  666.   # ● Regenerate HP
  667.   #--------------------------------------------------------------------------
  668.   alias mog_boss_hp_regenerate_hp regenerate_hp
  669.   def regenerate_hp
  670.       check_boss_hp_before
  671.       mog_boss_hp_regenerate_hp
  672.       check_boss_hp_after
  673.   end  
  674.   
  675.   #--------------------------------------------------------------------------
  676.   # ● Check Boss HP Before
  677.   #--------------------------------------------------------------------------         
  678.   def check_boss_hp_before
  679.       return if self.is_a?(Game_Actor)
  680.       return if !self.boss_hp_meter
  681.       $game_system.boss_hp_meter[6] = self.hp
  682.   end
  683.   
  684.   #--------------------------------------------------------------------------
  685.   # ● Check Boss HP After
  686.   #--------------------------------------------------------------------------            
  687.   def check_boss_hp_after
  688.       return if self.is_a?(Game_Actor)
  689.       return if !self.boss_hp_meter
  690.       $game_system.boss_hp_meter[2] = true
  691.       $game_system.boss_hp_meter[3] = self.name
  692.       $game_system.boss_hp_meter[4] = self.hp
  693.       $game_system.boss_hp_meter[5] = self.mhp
  694.       $game_system.boss_hp_meter[7] = self.level rescue nil     
  695.       $game_system.boss_hp_meter[9] = self.boss_hp_number
  696.   end
  697.   
  698. end

  699. #==============================================================================
  700. # ■ Game_Interpreter
  701. #==============================================================================
  702. class Game_Interpreter

  703.   #--------------------------------------------------------------------------
  704.   # ● Check Boss Meter
  705.   #--------------------------------------------------------------------------   
  706.   def check_boss_meter
  707.       return if !SceneManager.scene_is?(Scene_Battle)
  708.       iterate_enemy_index(@params[0]) do |enemy|
  709.         if enemy.boss_hp_meter
  710.            $game_system.boss_hp_meter[2] = true
  711.            $game_system.boss_hp_meter[3] = enemy.name
  712.            $game_system.boss_hp_meter[4] = enemy.hp
  713.            $game_system.boss_hp_meter[5] = enemy.mhp
  714.            $game_system.boss_hp_meter[6] = enemy.hp   
  715.            $game_system.boss_hp_meter[7] = enemy.level rescue nil
  716.            $game_system.boss_hp_meter[9] = enemy.boss_hp_number
  717.         end
  718.      end
  719.   end

  720.   #--------------------------------------------------------------------------
  721.   # ● Command 331
  722.   #--------------------------------------------------------------------------  
  723.   alias mog_boss_meter_command_331 command_331
  724.   def command_331
  725.       mog_boss_meter_command_331
  726.       check_boss_meter
  727.   end
  728.   
  729.   #--------------------------------------------------------------------------
  730.   # ● Command 334
  731.   #--------------------------------------------------------------------------  
  732.   alias mog_boss_meter_command_334 command_334
  733.   def command_334
  734.       mog_boss_meter_command_334
  735.       check_boss_meter
  736.   end   
  737.   
  738. end

  739. #==============================================================================
  740. # ■ BattleManager
  741. #==============================================================================
  742. class << BattleManager
  743.   
  744.   #--------------------------------------------------------------------------
  745.   # ● Init Members
  746.   #--------------------------------------------------------------------------         
  747.   alias mog_boss_meter_init_members init_members
  748.   def init_members
  749.       $game_temp.battle_end = false
  750.       mog_boss_meter_init_members
  751.   end  
  752.   
  753.   #--------------------------------------------------------------------------
  754.   # ● Process Victory
  755.   #--------------------------------------------------------------------------            
  756.   alias mog_boss_meter_process_victory process_victory
  757.   def process_victory
  758.       $game_temp.battle_end = true
  759.       mog_boss_meter_process_victory
  760.   end
  761.   
  762.   #--------------------------------------------------------------------------
  763.   # ● Process Abort
  764.   #--------------------------------------------------------------------------            
  765.   alias mog_boss_meter_process_abort process_abort
  766.   def process_abort
  767.       $game_temp.battle_end = true
  768.       mog_boss_meter_process_abort
  769.   end

  770.   #--------------------------------------------------------------------------
  771.   # ● Process Defeat
  772.   #--------------------------------------------------------------------------            
  773.   alias mog_boss_meter_process_defeat process_defeat
  774.   def process_defeat
  775.       $game_temp.battle_end = true
  776.       mog_boss_meter_process_defeat
  777.   end
  778.   
  779. end

  780. $mog_rgss3_boss_hp_meter = true
复制代码
360截图20170627151503655.jpg
------落尽红樱君不见,轻绘梨花泪沾衣。~~~
回复

使用道具 举报

梦石
0
星屑
878
在线时间
576 小时
注册时间
2010-6-26
回帖
709
发表于 2017-6-27 21:22:33 | 显示全部楼层
本帖最后由 sq333333 于 2017-6-27 21:31 编辑

我错了,大佬息怒

点评

没有对错 只是这就是求学的知识 你学可不学也可  发表于 2017-6-27 22:12
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部