查看: 4944|回复: 9

[已经过期] 有没有敌人等级随动的脚本没各位大佬。

[复制链接]
梦石
0
星屑
1239
在线时间
98 小时
注册时间
2020-12-11
回帖
80
发表于 2021-2-8 11:15:59 | 显示全部楼层 |阅读模式

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

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

×
RT,我自己设置的敌人之后发现游戏怪物平衡太难了,所以就想把所有怪物设置成统一属性的,然后弄一个敌人的属性是根据自己伙伴的等级或是属性增长的。这样可以吗??
忍一时越想越气,退一步越想越亏~~~
梦石
0
星屑
1239
在线时间
98 小时
注册时间
2020-12-11
回帖
80
 楼主| 发表于 2021-2-8 11:17:30 | 显示全部楼层
搜索过论坛里面的“敌人等级”脚本,好像和我需要的不大一样,那个是自己设置等级的吧~~~~
忍一时越想越气,退一步越想越亏~~~
回复

使用道具 举报

梦石
0
星屑
30103
在线时间
5741 小时
注册时间
2016-3-8
回帖
1662
发表于 2021-2-8 13:31:08 | 显示全部楼层
你都搜到的哪个
回复

使用道具 举报

梦石
0
星屑
1239
在线时间
98 小时
注册时间
2020-12-11
回帖
80
 楼主| 发表于 2021-2-8 15:41:05 | 显示全部楼层


就是这几个  VA区的  我看也有问这个类似的问题的,但是没有解决方案
QQ截图20210208153932.jpg
忍一时越想越气,退一步越想越亏~~~
回复

使用道具 举报

梦石
0
星屑
30103
在线时间
5741 小时
注册时间
2016-3-8
回帖
1662
发表于 2021-2-8 16:30:12 | 显示全部楼层
那个YEA的敌人等级不就是么
回复

使用道具 举报

梦石
0
星屑
1239
在线时间
98 小时
注册时间
2020-12-11
回帖
80
 楼主| 发表于 2021-2-8 20:06:10 | 显示全部楼层
alexncf125 发表于 2021-2-8 16:30
那个YEA的敌人等级不就是么

呃,,,这个过期了  然后自己找了一下 不清楚他的原理是怎么,大佬帮我看下这玩意对不对
  1. #==============================================================================
  2. #
  3. # ▼ Yanfly Engine Ace - Enemy Levels v1.01
  4. # -- Last Updated: 2012.01.24
  5. # -- Level: Normal, Hard
  6. # -- Requires: n/a
  7. #
  8. #==============================================================================

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

  11. #==============================================================================
  12. # ▼ Updates
  13. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  14. # 2012.01.24 - Added <hide level> notetag for enemies.
  15. #            - Option to change Party Level function in Action Conditions to
  16. #              enemy level requirements.
  17. # 2011.12.30 - Started Script and Finished.
  18. #
  19. #==============================================================================
  20. # ▼ Introduction
  21. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  22. # RPG's with enemies that level up with the party enforces the player to stay
  23. # on their toes the whole time. This is both a good and bad thing as it can
  24. # cause the player to stay alert, but can also cause the player to meet some
  25. # roadblocks. This script will not only provide enemies the ability to level up
  26. # but also allow the script's user to go around these roadblocks using various
  27. # tags to limit or slow down the rate of growth across all enemies.
  28. #
  29. #==============================================================================
  30. # ▼ Instructions
  31. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  32. # To install this script, open up your script editor and copy/paste this script
  33. # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
  34. #
  35. # -----------------------------------------------------------------------------
  36. # Skill Notetags - These notetags go in the skill notebox in the database.
  37. # -----------------------------------------------------------------------------
  38. # <enemy level: +x>
  39. # <enemy level: -x>
  40. # This causes the enemy to raise or drop x levels depending on the tag used.
  41. # The new level will readjust the enemy's stats (including HP and MP).
  42. #
  43. # <enemy level reset>
  44. # This resets the enemy's level back to the typical range it should be plus or
  45. # minus any level fluctuations it was given. This occurs before enemy level +
  46. # and enemy level - tags.
  47. #
  48. # -----------------------------------------------------------------------------
  49. # Enemy Notetags - These notetags go in the enemies notebox in the database.
  50. # -----------------------------------------------------------------------------
  51. # <hide level>
  52. # This notetag will hide the level of the enemy. If YEA - Enemy Target Info is
  53. # installed, the level will be revealed upon a parameter scan.
  54. #
  55. # <min level: x>
  56. # <max level: x>
  57. # This will adjust the minimum and maximum levels for the enemy. By default,
  58. # the minimum level is 1 and the maximum level is whatever is set in the module
  59. # as MAX_LEVEL.
  60. #
  61. # <set level: x>
  62. # This will set the enemy's level to exactly x. It a sense, this is just the
  63. # usage of both the min and max level tags together as the same value.
  64. #
  65. # <level type: x>
  66. # Choosing a value from 0 to 4, you can adjust the different leveling rulesets
  67. # for the enemy. See the list below.
  68. # Type 0 - Lowest level of all actors that have joined.
  69. # Type 1 - Lowest level in the battle party.
  70. # Type 2 - Average level of the battle party.
  71. # Type 3 - Highest level of the battle party.
  72. # Type 4 - Highest level of all actors that have joined.
  73. #
  74. # <level random: x>
  75. # This will give the level a random flunctuation in either direction. Set this
  76. # value to 0 if you don't wish to use it. Adjust RANDOM_FLUCTUATION inside the
  77. # module to change the default fluctuation value.
  78. #
  79. # <stat: +x per level>
  80. # <stat: -x per level>
  81. # <stat: +x% per level>
  82. # <stat: -x% per level>
  83. # This will raise or lower the stat by x or x% per level (depending on the tag
  84. # used). This will override the default growth settings found inside the module
  85. # hash called DEFAULT_GROWTH. You may replace stat with:
  86. # MAXHP, MAXMP, ATK, DEF, MAT, MDF, AGI, LUK, GOLD, EXP
  87. #
  88. #==============================================================================
  89. # ▼ Compatibility
  90. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  91. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  92. # it will run with RPG Maker VX without adjusting.
  93. #
  94. #==============================================================================

  95. module YEA
  96.   module ENEMY_LEVEL
  97.    
  98.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  99.     # - General Level Settings -
  100.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  101.     # These settings adjust the general level setup for your enemies from the
  102.     # way levels appear in the game to the default maximum level for enemies,
  103.     # to the way their levels are calculated by default, and the random level
  104.     # fluctuation they have. If you want enemies to have different settings,
  105.     # use notetags to change the respective setting.
  106.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  107.     # This is how the level text will appear whenever enemy levels are shown.
  108.     #LEVEL_TEXT = "等级%s %s"
  109.     LEVEL_TEXT = "%s"
  110.     # This is the maximum level your enemies can achieve. They cannot go higher
  111.     # no exceptions. Adjust this accordingly to fit your game.
  112.     MAX_LEVEL = 255
  113.    
  114.     # Default level calculations for your enemies will be adjusted as such.
  115.     # Type 0 - Lowest level of all actors that have joined.
  116.     # Type 1 - Lowest level in the battle party.
  117.     # Type 2 - Average level of the battle party.
  118.     # Type 3 - Highest level of the battle party.
  119.     # Type 4 - Highest level of all actors that have joined.
  120.     DEFAULT_LEVEL_TYPE = 3
  121.    
  122.     # If you want your enemies to have random +/- levels of some degree, change
  123.     # this number to something other than 0. This is the default value.
  124.     RANDOM_FLUCTUATION = 5
  125.    
  126.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  127.     # - Parameter Growth Settings -
  128.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  129.     # Here, you adjust how much stats grow for enemies by default, including
  130.     # the formula used to calculate those stats. If you wish for enemies to
  131.     # have different growth settings, use notetags to change them.
  132.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  133.     # These settings adjust the default growth rates (not the base stat formula)
  134.     # for each stat. These are the values that will exist for each enemy unless
  135.     # defined otherwise by the tags inside their noteboxes.
  136.     DEFAULT_GROWTH ={
  137.     # ParamID => [:param, per%, +set],
  138.             #0 => [:maxhp, 0.50,   500],
  139.            # 1 => [:maxmp, 0.10,   10],
  140.           #  2 => [  :atk, 0.05,    5],
  141.           #  3 => [  :def, 0.05,    5],
  142.           #  4 => [  :mat, 0.05,    5],
  143.           #  5 => [  :mdf, 0.05,    5],
  144.           #  6 => [  :agi, 0.05,    5],
  145.           #  7 => [  :luk, 0.05,    5],
  146.           #  8 => [ :gold, 0.15,   10],
  147.           #  9 => [  :exp, 0.05,   10],
  148.             0 => [:maxhp, 0.5,   100],  #0.5, 200
  149.             1 => [:maxmp, 0.05,   10],
  150.             2 => [  :atk, 0.1,     0],  #0.07, 1
  151.             3 => [  :def, 0.05,  0.5],  #0.5
  152.             4 => [  :mat, 0.07,    1],
  153.             5 => [  :mdf, 0.05,  0.5],  #0.5
  154.             6 => [  :agi, 0.05,    0],
  155.             7 => [  :luk, 0.05,    1],
  156.             8 => [ :gold, 0.15,   2],
  157.             9 => [  :exp, 0.05,   2],
  158.     } # Do not remove this.
  159.    
  160.     # The following hash will adjust each of the formulas for each base stat.
  161.     # Adjust them as you see fit but only if you know what you're doing.
  162.     #   base  - The base stat from the enemy database.
  163.     #   per   - Growth rate which has not been yet converted to a percent.
  164.     #   set   - Set growth rate. Modified
  165.     # Default:   "base * (1.00 + (level-1) * per) + (set * (level-1))"
  166.     #STAT_FORMULA = "base + (1.00 + (level-1) * per) + (set + (level-1))"
  167.      STAT_FORMULA = "base + (1.00 + (level-1) * per) + (set * (level-1))"
  168.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  169.     # - Party Level to Enemy Level Action Conditions -
  170.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  171.     # Setting the below to true will cause the Party Level requirement under
  172.     # Action Conditions in the Action Patterns list to become an Enemy Level
  173.     # requirement. The enemy must be at least the level or else it cannot use
  174.     # the listed action.
  175.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  176.     PARTY_LEVEL_TO_ENEMY_LEVEL = true
  177.    
  178.   end # ENEMY_LEVEL
  179. end # YEA

  180. #==============================================================================
  181. # ▼ Editting anything past this point may potentially result in causing
  182. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  183. # halitosis so edit at your own risk.
  184. #==============================================================================

  185. module YEA
  186.   module REGEXP
  187.   module USABLEITEM
  188.    
  189.     LEVEL_CHANGE = /<(?:ENEMY LEVEL|enemy level):[ ]([\+\-]\d+)>/i
  190.     LEVEL_RESET  = /<(?:ENEMY LEVEL RESET|enemy level reset)>/i
  191.    
  192.   end # USABLEITEM
  193.   module ENEMY
  194.    
  195.     LEVEL_TYPE = /<(?:LEVEL_TYPE|level type):[ ](\d+)>/i
  196.     LEVEL_MIN = /<(?:MIN_LEVEL|min level|minimum level):[ ](\d+)>/i
  197.     LEVEL_MAX = /<(?:MAX_LEVEL|max level|maximum level):[ ](\d+)>/i
  198.     LEVEL_SET = /<(?:SET_LEVEL|set level|permanent level):[ ](\d+)>/i
  199.    
  200.     LEVEL_RAND = /<(?:LEVEL_RANDOM|level random):[ ](\d+)>/i
  201.     GROWTH_PER = /<(.*):[ ]([\+\-]\d+)([%%])[ ](?:PER_LEVEL|per level)>/i
  202.     GROWTH_SET = /<(.*):[ ]([\+\-]\d+)[ ](?:PER_LEVEL|per level)>/i
  203.    
  204.     HIDE_LEVEL = /<(?:HIDE_LEVEL|hide level)>/i
  205.       
  206.   end # ENEMY
  207.   end # REGEXP
  208. end # YEA

  209. #==============================================================================
  210. # ■ Numeric
  211. #==============================================================================

  212. class Numeric
  213.   
  214.   #--------------------------------------------------------------------------
  215.   # new method: group_digits
  216.   #--------------------------------------------------------------------------
  217.   unless $imported["YEA-CoreEngine"]
  218.   def group; return self.to_s; end
  219.   end # $imported["YEA-CoreEngine"]
  220.    
  221. end # Numeric

  222. #==============================================================================
  223. # ■ DataManager
  224. #==============================================================================

  225. module DataManager
  226.   
  227.   #--------------------------------------------------------------------------
  228.   # alias method: load_database
  229.   #--------------------------------------------------------------------------
  230.   class <<self; alias load_database_elv load_database; end
  231.   def self.load_database
  232.     load_database_elv
  233.     load_notetags_elv
  234.   end
  235.   
  236.   #--------------------------------------------------------------------------
  237.   # new method: load_notetags_elv
  238.   #--------------------------------------------------------------------------
  239.   def self.load_notetags_elv
  240.     groups = [$data_enemies, $data_skills, $data_items]
  241.     for group in groups
  242.       for obj in group
  243.         next if obj.nil?
  244.         obj.load_notetags_elv
  245.       end
  246.     end
  247.   end
  248.   
  249. end # DataManager

  250. #==============================================================================
  251. # ■ RPG::UsableItem
  252. #==============================================================================

  253. class RPG::UsableItem < RPG::BaseItem
  254.   
  255.   #--------------------------------------------------------------------------
  256.   # public instance variables
  257.   #--------------------------------------------------------------------------
  258.   attr_accessor :level_change
  259.   attr_accessor :level_reset
  260.   
  261.   #--------------------------------------------------------------------------
  262.   # common cache: load_notetags_elv
  263.   #--------------------------------------------------------------------------
  264.   def load_notetags_elv
  265.     @level_change = 0
  266.     @level_reset = false
  267.     #---
  268.     self.note.split(/[\r\n]+/).each { |line|
  269.       case line
  270.       #---
  271.       when YEA::REGEXP::USABLEITEM::LEVEL_CHANGE
  272.         @level_change = $1.to_i
  273.       when YEA::REGEXP::USABLEITEM::LEVEL_RESET
  274.         @level_reset = true
  275.       end
  276.     } # self.note.split
  277.     #---
  278.   end
  279.   
  280. end # RPG::UsableItem

  281. #==============================================================================
  282. # ■ RPG::Enemy
  283. #==============================================================================

  284. class RPG::Enemy < RPG::BaseItem
  285.   
  286.   #--------------------------------------------------------------------------
  287.   # public instance variables
  288.   #--------------------------------------------------------------------------
  289.   attr_accessor :hide_level
  290.   attr_accessor :level_type
  291.   attr_accessor :level_min
  292.   attr_accessor :level_max
  293.   attr_accessor :level_rand
  294.   attr_accessor :level_growth
  295.   
  296.   #--------------------------------------------------------------------------
  297.   # common cache: load_notetags_elv
  298.   #--------------------------------------------------------------------------
  299.   def load_notetags_elv
  300.     @hide_level = false
  301.     @level_type = YEA::ENEMY_LEVEL::DEFAULT_LEVEL_TYPE
  302.     @level_min = 1
  303.     @level_max = YEA::ENEMY_LEVEL::MAX_LEVEL
  304.     @level_rand = YEA::ENEMY_LEVEL::RANDOM_FLUCTUATION
  305.     @level_growth = YEA::ENEMY_LEVEL::DEFAULT_GROWTH.clone
  306.     #---
  307.     self.note.split(/[\r\n]+/).each { |line|
  308.       case line
  309.       #---
  310.       when YEA::REGEXP::ENEMY::HIDE_LEVEL
  311.         @hide_level = true
  312.       when YEA::REGEXP::ENEMY::LEVEL_TYPE
  313.         @level_type = $1.to_i
  314.       when YEA::REGEXP::ENEMY::LEVEL_MIN
  315.         @level_min = [$1.to_i, 1].max
  316.       when YEA::REGEXP::ENEMY::LEVEL_MAX
  317.         @level_max = [$1.to_i, YEA::ENEMY_LEVEL::MAX_LEVEL].min
  318.       when YEA::REGEXP::ENEMY::LEVEL_SET
  319.         @level_min = [[$1.to_i, 1].max, YEA::ENEMY_LEVEL::MAX_LEVEL].min
  320.         @level_max = [[$1.to_i, 1].max, YEA::ENEMY_LEVEL::MAX_LEVEL].min
  321.       when YEA::REGEXP::ENEMY::LEVEL_RAND
  322.         @level_rand = $1.to_i
  323.       #---
  324.       when YEA::REGEXP::ENEMY::GROWTH_PER
  325.         case $1.upcase
  326.         when "MAXHP", "MHP", "HP"
  327.           type = 0
  328.         when "MAXMP", "MMP", "MP", "MAXSP", "MSP", "SP"
  329.           type = 1
  330.         when "ATK", "ATTACK"
  331.           type = 2
  332.         when "DEF", "DEFENSE"
  333.           type = 3
  334.         when "MAT", "MAGIC ATTACK", "INT", "INTELLIGENCE", "SPI", "SPIRIT"
  335.           type = 4
  336.         when "MDF", "MAGIC DEFENSE", "RES", "RESISTANCE"
  337.           type = 5
  338.         when "AGI", "AGILITY"
  339.           type = 6
  340.         when "LUK", "LUCK"
  341.           type = 7
  342.         when "GOLD", "MONEY"
  343.           type = 8
  344.         when "EXP", "EXPERIENCE", "XP"
  345.           type = 9
  346.         else; next
  347.         end
  348.         @level_growth[type][1] = $2.to_i * 0.01
  349.       when YEA::REGEXP::ENEMY::GROWTH_SET
  350.         case $1.upcase
  351.         when "MAXHP", "MHP", "HP"
  352.           type = 0
  353.         when "MAXMP", "MMP", "MP", "MAXSP", "MSP", "SP"
  354.           type = 1
  355.         when "ATK", "ATTACK"
  356.           type = 2
  357.         when "DEF", "DEFENSE"
  358.           type = 3
  359.         when "MAT", "MAGIC ATTACK", "INT", "INTELLIGENCE", "SPI", "SPIRIT"
  360.           type = 4
  361.         when "MDF", "MAGIC DEFENSE", "RES", "RESISTANCE"
  362.           type = 5
  363.         when "AGI", "AGILITY"
  364.           type = 6
  365.         when "LUK", "LUCK"
  366.           type = 7
  367.         when "GOLD", "MONEY"
  368.           type = 8
  369.         when "EXP", "EXPERIENCE", "XP"
  370.           type = 9
  371.         else; next
  372.         end
  373.         @level_growth[type][2] = $2.to_i
  374.       end
  375.     } # self.note.split
  376.     #---
  377.   end
  378.   
  379. end # RPG::Enemy

  380. #==============================================================================
  381. # ■ Game_Battler
  382. #==============================================================================

  383. class Game_Battler < Game_BattlerBase
  384.   
  385.   #--------------------------------------------------------------------------
  386.   # alias method: item_user_effect
  387.   #--------------------------------------------------------------------------
  388.   alias game_battler_item_user_effect_elv item_user_effect
  389.   def item_user_effect(user, item)
  390.     game_battler_item_user_effect_elv(user, item)
  391.     apply_level_changes(item) if self.is_a?(Game_Enemy)
  392.   end
  393.   
  394. end # Game_Battler

  395. #==============================================================================
  396. # ■ Game_Enemy
  397. #==============================================================================

  398. class Game_Enemy < Game_Battler
  399.   
  400.   #--------------------------------------------------------------------------
  401.   # alias method: initialize
  402.   #--------------------------------------------------------------------------
  403.   alias game_enemy_initialize_elv initialize
  404.   def initialize(index, enemy_id)
  405.     game_enemy_initialize_elv(index, enemy_id)
  406.     create_init_level
  407.   end
  408.   
  409.   #--------------------------------------------------------------------------
  410.   # new method: level
  411.   #--------------------------------------------------------------------------
  412.   def level
  413.     create_init_level if @level.nil?
  414.     return @level
  415.   end
  416.   
  417.   #--------------------------------------------------------------------------
  418.   # new method: level=
  419.   #--------------------------------------------------------------------------
  420.   def level=(value)
  421.     create_init_level if @level.nil?
  422.     return if @level == value
  423.     hp_rate = self.hp.to_f / self.mhp.to_f
  424.     mp_rate = self.mp.to_f / [self.mmp, 1].max.to_f
  425.     @level = [[value, 1].max, YEA::ENEMY_LEVEL::MAX_LEVEL].min
  426.     self.hp = (self.mhp * hp_rate).to_i
  427.     self.mp = (self.mmp * mp_rate).to_i
  428.   end
  429.   
  430.   #--------------------------------------------------------------------------
  431.   # new method: create_init_level
  432.   #--------------------------------------------------------------------------
  433.   def create_init_level
  434.     set_level_type
  435.     @hp = mhp
  436.     @mp = mmp
  437.   end
  438.   
  439.   #--------------------------------------------------------------------------
  440.   # new method: set_level_type
  441.   #--------------------------------------------------------------------------
  442.   def set_level_type
  443.     @level = $game_party.match_party_level(enemy.level_type)
  444.     @level += rand(enemy.level_rand+1)
  445.     @level -= rand(enemy.level_rand+1)
  446.     @level = [[@level, enemy.level_max].min, enemy.level_min].max
  447.   end
  448.   
  449.   #--------------------------------------------------------------------------
  450.   # alias method: transform
  451.   #--------------------------------------------------------------------------
  452.   alias game_enemy_transform_elv transform
  453.   def transform(enemy_id)
  454.     game_enemy_transform_elv(enemy_id)
  455.     create_init_level
  456.   end
  457.   
  458.   #--------------------------------------------------------------------------
  459.   # new method: apply_level_changes
  460.   #--------------------------------------------------------------------------
  461.   def apply_level_changes(item)
  462.     create_init_level if item.level_reset
  463.     self.level += item.level_change
  464.   end
  465.   
  466.   #--------------------------------------------------------------------------
  467.   # alias method: param_base
  468.   #--------------------------------------------------------------------------
  469.   alias game_enemy_param_base_elv param_base
  470.   def param_base(param_id)
  471.     base = game_enemy_param_base_elv(param_id)
  472.     per = enemy.level_growth[param_id][1]
  473.     set = enemy.level_growth[param_id][2]
  474.     total = eval(YEA::ENEMY_LEVEL::STAT_FORMULA)
  475.     return total.to_i
  476.   end
  477.   
  478.   #--------------------------------------------------------------------------
  479.   # alias method: exp
  480.   #--------------------------------------------------------------------------
  481.   alias game_enemy_exp_elv exp
  482.   def exp
  483.     base = game_enemy_exp_elv
  484.     per = enemy.level_growth[8][1]
  485.     set = enemy.level_growth[8][2]
  486.     total = eval(YEA::ENEMY_LEVEL::STAT_FORMULA)
  487.     return total.to_i
  488.   end
  489.   
  490.   #--------------------------------------------------------------------------
  491.   # alias method: gold
  492.   #--------------------------------------------------------------------------
  493.   alias game_enemy_gold_elv gold
  494.   def gold
  495.     base = game_enemy_gold_elv
  496.     per = enemy.level_growth[9][1]
  497.     set = enemy.level_growth[9][2]
  498.     total = eval(YEA::ENEMY_LEVEL::STAT_FORMULA)
  499.     return total.to_i
  500.   end
  501.   
  502.   #--------------------------------------------------------------------------
  503.   # alias method: name
  504.   #--------------------------------------------------------------------------
  505.   alias game_enemy_name_elv name
  506.   def name
  507.     text = game_enemy_name_elv
  508.     if add_level_name?
  509.       fmt = YEA::ENEMY_LEVEL::LEVEL_TEXT
  510.       #text = sprintf(fmt, @level.group, text)
  511.       text = sprintf(fmt, text)
  512.     end
  513.     return text
  514.   end
  515.   
  516.   #--------------------------------------------------------------------------
  517.   # new method: add_level_name?
  518.   #--------------------------------------------------------------------------
  519.   def add_level_name?
  520.     if $imported["YEA-EnemyTargetInfo"] && show_info_param?
  521.       return true
  522.     end
  523.     return false if enemy.hide_level
  524.     return true
  525.   end
  526.   
  527.   #--------------------------------------------------------------------------
  528.   # overwrite method: conditions_met_party_level?
  529.   #--------------------------------------------------------------------------
  530.   if YEA::ENEMY_LEVEL::PARTY_LEVEL_TO_ENEMY_LEVEL
  531.   def conditions_met_party_level?(param1, param2)
  532.     return @level >= param1
  533.   end
  534.   end
  535.   
  536. end # Game_Enemy

  537. #==============================================================================
  538. # ■ Game_Party
  539. #==============================================================================

  540. class Game_Party < Game_Unit
  541.   
  542.   #--------------------------------------------------------------------------
  543.   # new method: match_party_level
  544.   #--------------------------------------------------------------------------
  545.   def match_party_level(level_type)
  546.     case level_type
  547.     when 0; return all_lowest_level
  548.     when 1; return lowest_level
  549.     when 2; return average_level
  550.     when 3; return highest_level
  551.     else;   return all_highest_level
  552.     end
  553.   end
  554.   
  555.   #--------------------------------------------------------------------------
  556.   # new method: all_lowest_level
  557.   #--------------------------------------------------------------------------
  558.   def all_lowest_level
  559.     lv = all_members.collect {|actor| actor.level }.min
  560.     return lv
  561.   end
  562.   
  563.   #--------------------------------------------------------------------------
  564.   # new method: lowest_level
  565.   #--------------------------------------------------------------------------
  566.   def lowest_level
  567.     lv = members.collect {|actor| actor.level }.min
  568.     return lv
  569.   end
  570.   
  571.   #--------------------------------------------------------------------------
  572.   # new method: average_level
  573.   #--------------------------------------------------------------------------
  574.   def average_level
  575.     lv = 0
  576.     for member in all_members; lv += member.level; end
  577.     lv /= all_members.size
  578.     return lv
  579.   end
  580.   
  581.   #--------------------------------------------------------------------------
  582.   # overwrite method: highest_level
  583.   #--------------------------------------------------------------------------
  584.   def highest_level
  585.     lv = members.collect {|actor| actor.level }.max
  586.     return lv
  587.   end
  588.   
  589.   #--------------------------------------------------------------------------
  590.   # all method: all_highest_level
  591.   #--------------------------------------------------------------------------
  592.   def all_highest_level
  593.     lv = all_members.collect {|actor| actor.level }.max
  594.     return lv
  595.   end
  596.   
  597. end # Game_Party

  598. #==============================================================================
  599. #
  600. # ▼ End of File
  601. #
  602. #==============================================================================


复制代码
QQ截图20210208200155.png
忍一时越想越气,退一步越想越亏~~~
回复

使用道具 举报

梦石
0
星屑
30103
在线时间
5741 小时
注册时间
2016-3-8
回帖
1662
发表于 2021-2-8 20:24:38 | 显示全部楼层
本帖最后由 alexncf125 于 2021-2-8 20:30 编辑

不用管什么过期不过期的...

原理??你是想要懂什么原理...
看不懂那些英文说明的话, 烦请自行去机翻...

不过我看了一下, 好像是即插即用的,
可以在设定部分(module)改一下参数达致不同效果

要在技能公式获取敌人等级的话, 应该也可以用 a.level / b.level 来获取
回复

使用道具 举报

梦石
0
星屑
1239
在线时间
98 小时
注册时间
2020-12-11
回帖
80
 楼主| 发表于 2021-2-8 21:31:50 | 显示全部楼层
alexncf125 发表于 2021-2-8 20:24
不用管什么过期不过期的...

原理??你是想要懂什么原理...

根据脚本第67行至第74行的提示,我在数据中把敌人备注加上<level type:3>  是不是就代表着怪物属性会随着我人物队伍最高角色来定义属性?是不是这样解释的大佬?
忍一时越想越气,退一步越想越亏~~~
回复

使用道具 举报

梦石
0
星屑
30103
在线时间
5741 小时
注册时间
2016-3-8
回帖
1662
发表于 2021-2-8 21:53:44 | 显示全部楼层
不太正确...
应该说...敌人的等级会随着 "我人物队伍最高角色 & RANDOM_FLUCTUATION" 来定义...
敌人的属性再随 "敌人等级 & DEFAULT_GROWTH & STAT_FORMULA" 来定义

另外...根据脚本第123行显示, level type的预设值经已是3了
所以除非你改了预设值, 否则你这个<level type:3>加不加也一样
回复

使用道具 举报

梦石
0
星屑
1239
在线时间
98 小时
注册时间
2020-12-11
回帖
80
 楼主| 发表于 2021-2-8 23:15:47 | 显示全部楼层
alexncf125 发表于 2021-2-8 21:53
不太正确...
应该说...敌人的等级会随着 "我人物队伍最高角色 & RANDOM_FLUCTUATION" 来定义...
敌人的属性 ...

我不明白脚本,我就直接把这个复制到脚本里 随便插个地方就行了吧,数据库不用写备注
忍一时越想越气,退一步越想越亏~~~
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部