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

Project1

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

[已经过期] 求助关于“数据破限”脚本

[复制链接]

Lv3.寻梦者

梦石
0
星屑
1024
在线时间
76 小时
注册时间
2020-12-11
帖子
92
跳转到指定楼层
1
发表于 2021-2-20 23:17:24 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 未来灬future 于 2021-2-20 23:19 编辑

RT,我在一个重装机兵的游戏里套用的一个数据破限脚本,类似2R的那种,最高上限还是99级,需要吃突破因子才能继续增加等级,怎么直接变成上限9999的
RUBY 代码复制
  1. # ▼ Yanfly Engine Ace - Adjust Limits v1.00
  2. # -- Last Updated: 2011.12.03
  3. # -- Level: Normal
  4. # -- Requires: n/a
  5. #
  6. #==============================================================================
  7.  
  8. $imported = {} if $imported.nil?
  9. $imported["YEA-AdjustLimits"] = true
  10.  
  11. #==============================================================================
  12. # ▼ Updates
  13. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  14. # 2011.12.03 - Finished Script.
  15. # 2011.12.02 - Started Script.
  16. #
  17. #==============================================================================
  18. # ▼ Introduction
  19. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  20. # There exists some limitations in RPG Maker VX Ace that not everybody's fond
  21. # of. With this script, you can easily adjust the limits of each limitation.
  22. # Here's the list of various limits that can be changed:
  23. #
  24. # - Gold Max  - Have more than 99,999,999 gold.
  25. # - Item Max  - Have more than 99 items. Customizable per item, too.
  26. # - Level Max - Exceed 99 levels. Parameters are automatically calculated based
  27. #               on the level 99 and level 98 stats in the class parameters.
  28. # - Stat Max  - Stats can exceed 999. Does not adjust for current formulas.
  29. #
  30. #==============================================================================
  31. # ▼ Instructions
  32. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  33. # To install this script, open up your script editor and copy/paste this script
  34. # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
  35. #
  36. # -----------------------------------------------------------------------------
  37. # 角色备注栏 - These notetags go in the actors notebox in the database.
  38. # -----------------------------------------------------------------------------
  39. # <initial level: x>   设置角色的初始等级,可超过99.
  40.  
  41. # <max level: x>       设置角色的最高等级,可超过99.
  42.  
  43. # -----------------------------------------------------------------------------
  44. # 职业备注栏 - These notetags go in the class notebox in the database.
  45. # -----------------------------------------------------------------------------
  46. # <learn at level: x>  在职业的技能备注栏里设置,等级可超过99.
  47.  
  48. # -----------------------------------------------------------------------------
  49. # 物品备注栏 - These notetags go in the items notebox in the database.
  50. # -----------------------------------------------------------------------------
  51. # <max limit: x>       设置该物品的可持有上限,比如50.
  52.  
  53. # <price: x>           设置物品的价格,可打破数据库限制的999999。
  54.  
  55. # -----------------------------------------------------------------------------
  56. # 武器备注栏 - These notetags go in the weapons notebox in the database.
  57. # -----------------------------------------------------------------------------
  58. # <max limit: x>       设置该物品的可持有上限,比如50.
  59.  
  60. # <price: x>           设置物品的价格,可打破数据库限制的999999。
  61.  
  62. # <stat: +x>           设置武器的能力值变化量,例:<ATK: +500>
  63. # <stat: -x>
  64.  
  65. # -----------------------------------------------------------------------------
  66. # 防具备注栏 - These notetags go in the armours notebox in the database.
  67. # -----------------------------------------------------------------------------
  68. # <max limit: x>       同上
  69. #
  70. # <price: x>
  71.  
  72. # <stat: +x>
  73. # <stat: -x>
  74. #
  75. # -----------------------------------------------------------------------------
  76. # 敌人备注栏 - These notetags go in the enemy notebox in the database.
  77. # -----------------------------------------------------------------------------
  78. # <stat: x>            设置敌人属性值,可破限。例:<EXP: 6666666>
  79. # MAXHP, MAXMP, ATK, DEF, MAT, MDF, AGI, LUK, EXP, GOLD
  80.  
  81. # -----------------------------------------------------------------------------
  82. # 脚本呼出语句 - These commands are used with script calls.
  83. # -----------------------------------------------------------------------------
  84. # gain_gold(x)         设置增减金币,可破限。
  85. # lose_gold(x)
  86. #
  87. # gain_item(x, y)      设置增减X物品Y数目,可破限。
  88. # lose_item(x, y)
  89. # gain_weapon(x, y)
  90. # lose_weapon(x, y)
  91. # gain_armour(x, y)
  92. # lose_armour(x, y)
  93.  
  94. #==============================================================================
  95. # ▼ Compatibility
  96. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  97. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  98. # it will run with RPG Maker VX without adjusting.
  99. #
  100. #==============================================================================
  101.  
  102. module YEA
  103.   module LIMIT
  104.  
  105.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  106.     # - Gold Settings -
  107.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  108.     # Adjust gold settings here. You can change the maximum amount of gold to
  109.     # whatever you want. In addition to that, you can also adjust whether or
  110.     # not you wish for your gold display to show an icon instead, (and change
  111.     # the font size if needed). If there's too much gold that's to be displayed
  112.     # then you can change the text shown in place of that.
  113.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  114.     GOLD_MAX  = 999999999  # Maximum gold.
  115.     GOLD_ICON = 361              # Icon used for gold. Use 0 for text currency.
  116.     GOLD_FONT = 20               # Font size used to display gold.
  117.     TOO_MUCH_GOLD = "A lotta gold!"   # Text used when gold cannot fit.
  118.  
  119.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  120.     # - Item Settings -
  121.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  122.     # Adjust item settings here. You can change the maximum number of items
  123.     # held from 99 to whatever you want. In addition to that, change the prefix
  124.     # used for items when shown in the item display menu (and the font size if
  125.     # needed). Items can have individual maximums through usage of the
  126.     # <max limit: x> notetag.
  127.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  128.     ITEM_MAX  = 9999999  # The default maximum number of items held each.
  129.     ITEM_FONT = 20       # Font size used to display item quantity.
  130.     SHOP_FONT = 20       # Font size used for shop item costs.
  131.     ITEM_PREFIX = "×%s" # Prefix used for item quantity in item lists.
  132.  
  133.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  134.     # - Parameter Settings -
  135.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  136.     # Adjust the limits for each of the various stats (for MaxHP, MaxMP, ATK,
  137.     # DEF, MAT, and more). Adjust them as you see fit.
  138.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  139.     LEVEL_MAX = 9999 # Sets max level to x for those with 99 level limit.
  140.     MAXHP_MAX = 9999999999 # Sets MaxHP to something higher than 9999.
  141.     MAXMP_MAX = 9999999999 # Sets MaxMP to something higher than 9999.
  142.     PARAM_MAX = 9999999999 # Sets stat max for something higher than 999.
  143.     EQUIP_FONT = 20     # Changes the default equip window font size.
  144.  
  145.   end # LIMIT
  146. end # YEA
  147.  
  148. #==============================================================================
  149. # ▼ Editting anything past this point may potentially result in causing
  150. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  151. # halitosis so edit at your own risk.
  152. #==============================================================================
  153.  
  154. module YEA
  155.   module REGEXP
  156.   module ACTOR
  157.  
  158.     MAX_LEVEL = /<(?:MAX_LEVEL|max level):[ ](\d+)>/i
  159.     INI_LEVEL = /<(?:INITIAL_LEVEL|initial level):[ ](\d+)>/i
  160.  
  161.   end # ACTOR
  162.   module CLASS
  163.  
  164.     LEARN_AT_LV = /<(?:LEARN_AT_LEVEL|learn at level):[ ](\d+)>/i
  165.  
  166.   end # CLASS
  167.   module BASEITEM
  168.  
  169.     PRICE     = /<(?:GOLD|price|COST):[ ](\d+)>/i
  170.     MAX_LIMIT = /<(?:MAX_LIMIT|max limit):[ ](\d+)>/i
  171.     STAT_SET  = /<(.*):[ ]*([\+\-]\d+)>/i
  172.  
  173.   end # BASEITEM
  174.   module ENEMY
  175.  
  176.     STAT_SET  = /<(.*):[ ]*(\d+)>/i
  177.  
  178.   end # ENEMY
  179.   end # REGEXP
  180. end # YEA
  181.  
  182. #==============================================================================
  183. # ■ Icon
  184. #==============================================================================
  185.  
  186. module Icon
  187.  
  188.   #--------------------------------------------------------------------------
  189.   # self.gold
  190.   #--------------------------------------------------------------------------
  191.   def self.gold; return YEA::LIMIT::GOLD_ICON; end
  192.  
  193. end # Icon
  194.  
  195. #==============================================================================
  196. # ■ Numeric
  197. #==============================================================================
  198.  
  199. class Numeric
  200.  
  201.   #--------------------------------------------------------------------------
  202.   # new method: group_digits
  203.   #--------------------------------------------------------------------------
  204.   unless $imported["YEA-CoreEngine"]
  205.   def group; return self.to_s; end
  206.   end # $imported["YEA-CoreEngine"]
  207.  
  208. end # Numeric
  209.  
  210. #==============================================================================
  211. # ■ DataManager
  212. #==============================================================================
  213.  
  214. module DataManager
  215.  
  216.   #--------------------------------------------------------------------------
  217.   # alias method: load_database
  218.   #--------------------------------------------------------------------------
  219.   class <<self; alias load_database_al load_database; end
  220.   def self.load_database
  221.     load_database_al
  222.     load_notetags_al
  223.   end
  224.  
  225.   #--------------------------------------------------------------------------
  226.   # new method: load_notetags_al
  227.   #--------------------------------------------------------------------------
  228.   def self.load_notetags_al
  229.     groups = [$data_actors, $data_items, $data_weapons, $data_armors,
  230.       $data_enemies, $data_classes]
  231.     for group in groups
  232.       for obj in group
  233.         next if obj.nil?
  234.         obj.load_notetags_al
  235.       end
  236.     end
  237.   end
  238.  
  239. end # DataManager
  240.  
  241. #==============================================================================
  242. # ■ RPG::Actor
  243. #==============================================================================
  244.  
  245. class RPG::Actor < RPG::BaseItem
  246.  
  247.   #--------------------------------------------------------------------------
  248.   # common cache: load_notetags_al
  249.   #--------------------------------------------------------------------------
  250.   def load_notetags_al
  251.     @max_level = YEA::LIMIT::LEVEL_MAX if @max_level == 99
  252.     #---
  253.     self.note.split(/[\r\n]+/).each { |line|
  254.       case line
  255.       #---
  256.       when YEA::REGEXP::ACTOR::MAX_LEVEL
  257.         @max_level = [[$1.to_i, 1].max, YEA::LIMIT::LEVEL_MAX].min
  258.         @ini_level = [@ini_level, @max_level].min
  259.       when YEA::REGEXP::ACTOR::INI_LEVEL
  260.         @ini_level = [[$1.to_i, 1].max, @max_level].min
  261.       #---
  262.       end
  263.     } # self.note.split
  264.     #---
  265.   end
  266.  
  267. end # RPG::Actor
  268.  
  269. #==============================================================================
  270. # ■ RPG::Class
  271. #==============================================================================
  272.  
  273. class RPG::Class < RPG::BaseItem
  274.  
  275.   #--------------------------------------------------------------------------
  276.   # new method: above_lv99_params
  277.   #--------------------------------------------------------------------------
  278.   def above_lv99_params(param_id, level)
  279.     return @params[param_id, level] if level <= 99
  280.     n = @params[param_id, 99]
  281.     multiplier = [level - 99, 1].max
  282.     change = (@params[param_id, 99] - @params[param_id, 98]) + 1
  283.     n += change * multiplier
  284.     return n
  285.   end
  286.  
  287.   #--------------------------------------------------------------------------
  288.   # new method: load_notetags_al
  289.   #--------------------------------------------------------------------------
  290.   def load_notetags_al
  291.     for item in @learnings; item.load_notetags_al; end
  292.   end
  293.  
  294. end # RPG::Class
  295.  
  296. #==============================================================================
  297. # ■ RPG::Class::Learning
  298. #==============================================================================
  299.  
  300. class RPG::Class::Learning
  301.  
  302.   #--------------------------------------------------------------------------
  303.   # common cache: load_notetags_al
  304.   #--------------------------------------------------------------------------
  305.   def load_notetags_al
  306.     #---
  307.     self.note.split(/[\r\n]+/).each { |line|
  308.       case line
  309.       #---
  310.       when YEA::REGEXP::CLASS::LEARN_AT_LV
  311.         @level = [[$1.to_i, 1].max, YEA::LIMIT::LEVEL_MAX].min
  312.       #---
  313.       end
  314.     } # self.note.split
  315.     #---
  316.   end
  317.  
  318. end # RPG::Class::Learning
  319.  
  320. #==============================================================================
  321. # ■ RPG::BaseItem
  322. #==============================================================================
  323.  
  324. class RPG::BaseItem
  325.  
  326.   #--------------------------------------------------------------------------
  327.   # public instance variables
  328.   #--------------------------------------------------------------------------
  329.   attr_accessor :max_limit
  330.  
  331.   #--------------------------------------------------------------------------
  332.   # common cache: load_notetags_al
  333.   #--------------------------------------------------------------------------
  334.   def load_notetags_al
  335.     @max_limit = YEA::LIMIT::ITEM_MAX
  336.     #---
  337.     self.note.split(/[\r\n]+/).each { |line|
  338.       case line
  339.       #---
  340.       when YEA::REGEXP::BASEITEM::PRICE
  341.         @price = [$1.to_i, YEA::LIMIT::GOLD_MAX].min
  342.       when YEA::REGEXP::BASEITEM::MAX_LIMIT
  343.         @max_limit = [$1.to_i, 1].max
  344.       when YEA::REGEXP::BASEITEM::STAT_SET
  345.         case $1.upcase
  346.         when "HP", "MAXHP", "MHP"
  347.           @params[0] = $2.to_i
  348.         when "MP", "MAXMP", "MMP", "SP", "MAXSP", "MSP"
  349.           @params[1] = $2.to_i
  350.         when "ATK"
  351.           @params[2] = $2.to_i
  352.         when "DEF"
  353.           @params[3] = $2.to_i
  354.         when "MAT", "INT", "SPI"
  355.           @params[4] = $2.to_i
  356.         when "MDF", "RES"
  357.           @params[5] = $2.to_i
  358.         when "AGI", "SPD"
  359.           @params[6] = $2.to_i
  360.         when "LUK", "LUCK"
  361.           @params[7] = $2.to_i
  362.         end
  363.       #---
  364.       end
  365.     } # self.note.split
  366.     #---
  367.   end
  368.  
  369.   #--------------------------------------------------------------------------
  370.   # new method: max_limit
  371.   #--------------------------------------------------------------------------
  372.   def max_limit; return @max_limit; end
  373.  
  374. end # RPG::BaseItem
  375.  
  376. #==============================================================================
  377. # ■ RPG::Enemy
  378. #==============================================================================
  379.  
  380. class RPG::Enemy < RPG::BaseItem
  381.  
  382.   #--------------------------------------------------------------------------
  383.   # common cache: load_notetags_al
  384.   #--------------------------------------------------------------------------
  385.   def load_notetags_al
  386.     #---
  387.     self.note.split(/[\r\n]+/).each { |line|
  388.       case line
  389.       #---
  390.       when YEA::REGEXP::ENEMY::STAT_SET
  391.         case $1.upcase
  392.         when "HP", "MAXHP", "MHP"
  393.           @params[0] = $2.to_i
  394.         when "MP", "MAXMP", "MMP", "SP", "MAXSP", "MSP"
  395.           @params[1] = $2.to_i
  396.         when "ATK"
  397.           @params[2] = $2.to_i
  398.         when "DEF"
  399.           @params[3] = $2.to_i
  400.         when "MAT", "INT", "SPI"
  401.           @params[4] = $2.to_i
  402.         when "MDF", "RES"
  403.           @params[5] = $2.to_i
  404.         when "AGI", "SPD"
  405.           @params[6] = $2.to_i
  406.         when "LUK", "LUCK"
  407.           @params[7] = $2.to_i
  408.         when "EXP", "XP"
  409.           @exp = $2.to_i
  410.         when "GOLD", "GP"
  411.           @gold = $2.to_i
  412.         end
  413.       #---
  414.       end
  415.     } # self.note.split
  416.     #---
  417.   end
  418.  
  419. end # RPG::Enemy
  420.  
  421. #==============================================================================
  422. # ■ Game_BattlerBase
  423. #==============================================================================
  424.  
  425. class Game_BattlerBase
  426.  
  427.   #--------------------------------------------------------------------------
  428.   # overwrite method: param_max
  429.   #--------------------------------------------------------------------------
  430.   def param_max(param_id)
  431.     return YEA::LIMIT::MAXHP_MAX if param_id == 0
  432.     return YEA::LIMIT::MAXMP_MAX if param_id == 1
  433.     return YEA::LIMIT::PARAM_MAX
  434.   end
  435.  
  436. end # Game_BattlerBase
  437.  
  438. #==============================================================================
  439. # ■ Game_Actor
  440. #==============================================================================
  441.  
  442. class Game_Actor < Game_Battler
  443.  
  444.   #--------------------------------------------------------------------------
  445.   # overwrite method: param_max
  446.   #--------------------------------------------------------------------------
  447.   def param_max(param_id)
  448.     return super
  449.   end
  450.  
  451.   #--------------------------------------------------------------------------
  452.   # overwrite method: param_base
  453.   #--------------------------------------------------------------------------
  454.   def param_base(param_id)
  455.     return self.class.params[param_id, @level] if @level <= 99
  456.     return self.class.above_lv99_params(param_id, @level)
  457.   end
  458.  
  459.   #--------------------------------------------------------------------------
  460.   # new method: check_levels
  461.   #--------------------------------------------------------------------------
  462.   def check_levels
  463.     last_level = @level
  464.     @level = [[@level, max_level].min, 1].max
  465.     return if @level == last_level
  466.     change_exp(exp_for_level(@level), false)
  467.   end
  468.  
  469. end # Game_Actor
  470.  
  471. #==============================================================================
  472. # ■ Game_Party
  473. #==============================================================================
  474.  
  475. class Game_Party < Game_Unit
  476.  
  477.   #--------------------------------------------------------------------------
  478.   # overwrite method: max_gold
  479.   #--------------------------------------------------------------------------
  480.   def max_gold; return YEA::LIMIT::GOLD_MAX; end
  481.  
  482.   #--------------------------------------------------------------------------
  483.   # overwrite method: max_item_number
  484.   #--------------------------------------------------------------------------
  485.   def max_item_number(item); return item.max_limit; end
  486.  
  487. end # Game_Party
  488.  
  489. #==============================================================================
  490. # ■ Game_Interpreter
  491. #==============================================================================
  492.  
  493. class Game_Interpreter
  494.  
  495.   #--------------------------------------------------------------------------
  496.   # new method: gain_gold
  497.   #--------------------------------------------------------------------------
  498.   def gain_gold(value); $game_party.gain_gold(value); end
  499.  
  500.   #--------------------------------------------------------------------------
  501.   # new method: lose_gold
  502.   #--------------------------------------------------------------------------
  503.   def lose_gold(value); $game_party.lose_gold(value); end
  504.  
  505.   #--------------------------------------------------------------------------
  506.   # new method: gain_item
  507.   #--------------------------------------------------------------------------
  508.   def gain_item(id, amount)
  509.     return if $data_items[id].nil?
  510.     $game_party.gain_item($data_items[id], amount)
  511.   end
  512.  
  513.   #--------------------------------------------------------------------------
  514.   # new method: lose_item
  515.   #--------------------------------------------------------------------------
  516.   def lose_item(id, amount)
  517.     return if $data_items[id].nil?
  518.     $game_party.lose_item($data_items[id], amount)
  519.   end
  520.  
  521.   #--------------------------------------------------------------------------
  522.   # new method: gain_weapon
  523.   #--------------------------------------------------------------------------
  524.   def gain_weapon(id, amount)
  525.     return if $data_weapons[id].nil?
  526.     $game_party.gain_item($data_weapons[id], amount)
  527.   end
  528.  
  529.   #--------------------------------------------------------------------------
  530.   # new method: lose_weapon
  531.   #--------------------------------------------------------------------------
  532.   def lose_weapon(id, amount)
  533.     return if $data_weapons[id].nil?
  534.     $game_party.lose_item($data_weapons[id], amount)
  535.   end
  536.  
  537.   #--------------------------------------------------------------------------
  538.   # new method: gain_armour
  539.   #--------------------------------------------------------------------------
  540.   def gain_armour(id, amount)
  541.     return if $data_armors[id].nil?
  542.     $game_party.gain_item($data_armors[id], amount)
  543.   end
  544.  
  545.   #--------------------------------------------------------------------------
  546.   # new method: lose_armour
  547.   #--------------------------------------------------------------------------
  548.   def lose_armour(id, amount)
  549.     return if $data_armors[id].nil?
  550.     $game_party.lose_item($data_armors[id], amount)
  551.   end
  552.  
  553.   #--------------------------------------------------------------------------
  554.   # new method: gain_armor
  555.   #--------------------------------------------------------------------------
  556.   def gain_armor(id, amount)
  557.     return if $data_armors[id].nil?
  558.     $game_party.gain_item($data_armors[id], amount)
  559.   end
  560.  
  561.   #--------------------------------------------------------------------------
  562.   # new method: lose_armor
  563.   #--------------------------------------------------------------------------
  564.   def lose_armor(id, amount)
  565.     return if $data_armors[id].nil?
  566.     $game_party.lose_item($data_armors[id], amount)
  567.   end
  568.  
  569. end # Game_Interpreter
  570.  
  571. #==============================================================================
  572. # ■ Window_Base
  573. #==============================================================================
  574.  
  575. class Window_Base < Window
  576.  
  577.   #--------------------------------------------------------------------------
  578.   # overwrite method: draw_actor_level
  579.   #--------------------------------------------------------------------------
  580.   def draw_actor_level(actor, dx, dy)
  581.     dw = text_size(Vocab::level_a + YEA::LIMIT::LEVEL_MAX.to_s).width
  582.     change_color(system_color)
  583.     draw_text(dx, dy, dw, line_height, Vocab::level_a)
  584.     change_color(normal_color)
  585.     cx = text_size(Vocab::level_a).width
  586.     draw_text(dx + cx, dy, dw, line_height, actor.level.group, 2)
  587.   end
  588.  
  589.   #--------------------------------------------------------------------------
  590.   # overwrite method: draw_actor_param
  591.   #--------------------------------------------------------------------------
  592.   def draw_actor_param(actor, dx, dy, param_id)
  593.     change_color(system_color)
  594.     draw_text(dx, dy, 120, line_height, Vocab::param(param_id))
  595.     change_color(normal_color)
  596.     draw_text(dx, dy, 156, line_height, actor.param(param_id).group, 2)
  597.   end
  598.  
  599.   #--------------------------------------------------------------------------
  600.   # draw_currency_value
  601.   #--------------------------------------------------------------------------
  602.   def draw_currency_value(value, unit, dx, dy, dw)
  603.     contents.font.size = YEA::LIMIT::GOLD_FONT
  604.     cx = gold_icon?(unit) ? 24 : text_size(unit).width
  605.     change_color(normal_color)
  606.     text = value.group
  607.     text = YEA::LIMIT::TOO_MUCH_GOLD if contents.text_size(text).width > dw-cx
  608.     draw_text(dx, dy, dw - cx - 2, line_height, text, 2)
  609.     change_color(system_color)
  610.     draw_icon(Icon.gold, dx+dw-24, dy) if gold_icon?(unit)
  611.     draw_text(dx, dy, dw, line_height, unit, 2) unless gold_icon?(unit)
  612.     reset_font_settings
  613.   end
  614.  
  615.   #--------------------------------------------------------------------------
  616.   # new method: gold_icon?
  617.   #--------------------------------------------------------------------------
  618.   def gold_icon?(unit)
  619.     return false if unit != Vocab.currency_unit
  620.     return YEA::LIMIT::GOLD_ICON > 0
  621.   end
  622.  
  623. end # Window_Base
  624.  
  625. #==============================================================================
  626. # ■ Window_ItemList
  627. #==============================================================================
  628.  
  629. class Window_ItemList < Window_Selectable
  630.  
  631.   #--------------------------------------------------------------------------
  632.   # overwrite method: draw_item_number
  633.   #--------------------------------------------------------------------------
  634.   def draw_item_number(rect, item)
  635.     contents.font.size = YEA::LIMIT::ITEM_FONT
  636.     quantity = $game_party.item_number(item).group
  637.     text = sprintf(YEA::LIMIT::ITEM_PREFIX, quantity)
  638.     draw_text(rect, text, 2)
  639.     reset_font_settings
  640.   end
  641.  
  642. end # Window_ItemList
  643.  
  644. #==============================================================================
  645. # ■ Window_EquipStatus
  646. #==============================================================================
  647.  
  648. class Window_EquipStatus < Window_Base
  649.  
  650.   #--------------------------------------------------------------------------
  651.   # overwrite method: draw_item
  652.   #--------------------------------------------------------------------------
  653.   def draw_item(dx, dy, param_id)
  654.     draw_param_name(dx + 4, dy, param_id)
  655.     draw_current_param(dx + 64, dy, param_id) if @actor
  656.     draw_right_arrow(dx + 110, dy)
  657.     draw_new_param(dx + 132, dy, param_id) if @temp_actor
  658.     reset_font_settings
  659.   end
  660.  
  661.   #--------------------------------------------------------------------------
  662.   # overwrite method: draw_param_name
  663.   #--------------------------------------------------------------------------
  664.   def draw_param_name(dx, dy, param_id)
  665.     contents.font.size = YEA::LIMIT::EQUIP_FONT
  666.     change_color(system_color)
  667.     draw_text(dx, dy, contents.width, line_height, Vocab::param(param_id))
  668.   end
  669.  
  670.   #--------------------------------------------------------------------------
  671.   # overwrite method: draw_current_param
  672.   #--------------------------------------------------------------------------
  673.   def draw_current_param(dx, dy, param_id)
  674.     change_color(normal_color)
  675.     draw_text(0, dy, dx+48, line_height, @actor.param(param_id).group, 2)
  676.     reset_font_settings
  677.   end
  678.  
  679.   #--------------------------------------------------------------------------
  680.   # overwrite method: draw_new_param
  681.   #--------------------------------------------------------------------------
  682.   def draw_new_param(dx, dy, param_id)
  683.     contents.font.size = YEA::LIMIT::EQUIP_FONT
  684.     new_value = @temp_actor.param(param_id)
  685.     change_color(param_change_color(new_value - @actor.param(param_id)))
  686.     draw_text(0, dy, contents.width-4, line_height, new_value.group, 2)
  687.     reset_font_settings
  688.   end
  689.  
  690. end # Window_EquipStatus
  691.  
  692. #==============================================================================
  693. # ■ Window_ShopBuy
  694. #==============================================================================
  695.  
  696. class Window_ShopBuy < Window_Selectable
  697.  
  698.   #--------------------------------------------------------------------------
  699.   # overwrite method: draw_item
  700.   #--------------------------------------------------------------------------
  701.   def draw_item(index)
  702.     item = @data[index]
  703.     rect = item_rect(index)
  704.     draw_item_name(item, rect.x, rect.y, enable?(item))
  705.     rect.width -= 4
  706.     contents.font.size = YEA::LIMIT::SHOP_FONT
  707.     draw_text(rect, price(item).group, 2)
  708.     reset_font_settings
  709.   end
  710.  
  711. end # Window_ShopBuy
  712.  
  713. #==============================================================================
  714. # ■ Scene_Load
  715. #==============================================================================
  716.  
  717. class Scene_Load < Scene_File
  718.  
  719.   #--------------------------------------------------------------------------
  720.   # alias method: on_load_success
  721.   #--------------------------------------------------------------------------
  722.   alias on_load_success_al on_load_success
  723.   def on_load_success
  724.     on_load_success_al
  725.     perform_level_check
  726.   end
  727.  
  728.   #--------------------------------------------------------------------------
  729.   # new method: perform_level_check
  730.   #--------------------------------------------------------------------------
  731.   def perform_level_check
  732.     for i in 1..$data_actors.size
  733.       next if $game_actors[i].nil?
  734.       $game_actors[i].check_levels
  735.     end
  736.   end
  737.  
  738. end # Scene_Load
  739.  
  740. #==============================================================================
  741. #
  742. # ▼ End of File
  743. #
  744. #==============================================================================

QQ截图20210220231443.png (298.79 KB, 下载次数: 28)

QQ截图20210220231443.png
忍一时越想越气,退一步越想越亏~~~

Lv5.捕梦者

梦石
0
星屑
24277
在线时间
5046 小时
注册时间
2016-3-8
帖子
1618
2
发表于 2021-2-20 23:44:08 | 只看该作者
本帖最后由 alexncf125 于 2021-2-21 11:46 编辑

表示没看懂你在问什么...
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1024
在线时间
76 小时
注册时间
2020-12-11
帖子
92
3
 楼主| 发表于 2021-2-21 10:18:25 | 只看该作者
alexncf125 发表于 2021-2-20 23:44
表示没看懂你在问什么...
不过事件中的那两个$game_actors[x].max_level >= 9999
应该是用 level 才对吧... ...

现在的问题就是用了破限脚本,数据库里备注了人物上限等级是9999,升到99级以后就不能再升级了,得用我截图里面的那个药剂,吃一个加一百级上限
忍一时越想越气,退一步越想越亏~~~
回复 支持 反对

使用道具 举报

Lv5.捕梦者

梦石
0
星屑
24277
在线时间
5046 小时
注册时间
2016-3-8
帖子
1618
4
发表于 2021-2-21 11:04:00 | 只看该作者
本帖最后由 alexncf125 于 2021-2-21 12:19 编辑

你那事件中的max_level_promote是来自怎样子的脚本??
要是那个脚本与我这脚本是相同的用途的话,
就不需要用我这脚本了, 以下二选一
1. "把 YEA 的 LEVEL_MAX 由 9999 改成 99 " 和 " 不要在数据库人物备注加 <max level: 9999> " 就可以了吧...
2. " YEA 的 LEVEL_MAX 依旧是 9999 " 和 "在数据库人物备注加 <max level: 99> " 就可以了吧...

LEVEL_MAX = 99 # Sets max level to x for those with 99 level limit.
RUBY 代码复制
  1. =begin
  2.   脚本名称: 角色最高等级调整
  3.   使用方法: 事件脚本调用 add_max_level_limit(actor_id , add_limit)
  4.            actor_id: 角色ID
  5.            add_limit: 角色的最高等级要增加多少, 不填为100
  6.   例子: 使用一次add_max_level_limit(1, 234)
  7.        那么1号角色的最高等级会变成333
  8.        再使用一次add_max_level_limit(1, 666)
  9.        那么1号角色的最高等级会变成999
  10. =end
  11.  
  12. class Game_Actor < Game_Battler
  13.   alias old_max_level_limit max_level
  14.   def max_level
  15.     $game_actors.maxLevel = {} unless $game_actors.maxLevel
  16.     unless $game_actors.maxLevel[actor.id]
  17.       old_max_level_limit
  18.     else
  19.       $game_actors.maxLevel[actor.id]
  20.     end
  21.   end
  22. end
  23.  
  24. class Game_Actors
  25.   attr_accessor :maxLevel
  26.   def add_max_level_limit(actor_id , add_limit)
  27.     @maxLevel = {}  unless @maxLevel
  28.     @maxLevel[actor_id] = (@maxLevel[actor_id] || YEA::LIMIT::LEVEL_MAX) + add_limit
  29.   end
  30. end
  31.  
  32. class Game_Interpreter
  33.   def add_max_level_limit(actor_id , add_limit = 100)
  34.     $game_actors.add_max_level_limit(actor_id , add_limit)
  35.   end
  36. end
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1024
在线时间
76 小时
注册时间
2020-12-11
帖子
92
5
 楼主| 发表于 2021-2-21 11:25:30 | 只看该作者
alexncf125 发表于 2021-2-21 11:04
LEVEL_MAX = 99 # Sets max level to x for those with 99 level limit.

是这样吗大佬,脚本复制进去,然后公共事件正常执行,写上人物ID和增加等级

QQ截图20210221112204.png (120.87 KB, 下载次数: 27)

QQ截图20210221112204.png

QQ截图20210221112227.png (280.38 KB, 下载次数: 19)

QQ截图20210221112227.png

点评

话说...你那事件中的max_level_promote是来自怎样子的脚本...  发表于 2021-2-21 11:38
唉...脚本注释添加了例子...  发表于 2021-2-21 11:38
忍一时越想越气,退一步越想越亏~~~
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1024
在线时间
76 小时
注册时间
2020-12-11
帖子
92
6
 楼主| 发表于 2021-2-21 11:48:09 | 只看该作者
未来灬future 发表于 2021-2-21 11:25
是这样吗大佬,脚本复制进去,然后公共事件正常执行,写上人物ID和增加等级 ...

一点不会脚本,我比较蠢,我晚上下班研究研究 要去上班了
忍一时越想越气,退一步越想越亏~~~
回复 支持 反对

使用道具 举报

Lv5.捕梦者

梦石
0
星屑
24277
在线时间
5046 小时
注册时间
2016-3-8
帖子
1618
7
发表于 2021-2-21 12:05:29 | 只看该作者
本帖最后由 alexncf125 于 2021-2-21 16:32 编辑
未来灬future 发表于 2021-2-21 11:48
一点不会脚本,我比较蠢,我晚上下班研究研究 要去上班了


別yygp好不, 不会脚本一是认真去学一下基拙, 一是別搞这些不会弄的功能,
說著"我是小白" "我是萌新" "不会脚本" "看不懂" 是没有意义的...
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1024
在线时间
76 小时
注册时间
2020-12-11
帖子
92
8
 楼主| 发表于 2021-2-21 18:51:45 | 只看该作者
alexncf125 发表于 2021-2-21 12:05
別yygp好不, 不会脚本一是认真去学一下基拙, 一是別搞这些不会弄的功能,
說著"我是小白" "我是萌新" "不 ...

好的,不搞了,谢谢大佬,我是得学习一下脚本基础的知识了
忍一时越想越气,退一步越想越亏~~~
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-4-26 00:07

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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