Enemy Levels

Last Updated: 2012.01.26
Download Link
Github Link

RPG’s with enemies that level up with the party enforces the player to stay on their toes the whole time. This is both a good and bad thing as it can cause the player to stay alert, but can also cause the player to meet some roadblocks. This script will not only provide enemies the ability to level up but also allow the script’s user to go around these roadblocks using various tags to limit or slow down the rate of growth across all enemies.


Enemies will level up relative to the party’s levels based on various settings. You can also set up the minimum and maximum levels per enemy type.

<min level: x>
<max level: x>

This will adjust the minimum and maximum levels for the enemy. By default, the minimum level is 1 and the maximum level is whatever is set in the module as MAX_LEVEL.

<set level: x>

This will set the enemy’s level to exactly x. It a sense, this is just the usage of both the min and max level tags together as the same value.

<level type: x>

Choosing a value from 0 to 4, you can adjust the different leveling rulesets for the enemy. See the list below.
Type 0 – Lowest level of all actors that have joined.
Type 1 – Lowest level in the battle party.
Type 2 – Average level of the battle party.
Type 3 – Highest level of the battle party.
Type 4 – Highest level of all actors that have joined.

<level random: x>

This will give the level a random flunctuation in either direction. Set this value to 0 if you don’t wish to use it. Adjust RANDOM_FLUCTUATION inside the module to change the default fluctuation value.

You may control the growth rate for each individual stat per level for an enemy. Have it grow in set amounts, percentile amounts, or even both.

<stat: +x per level>
<stat: -x per level>
<stat: +x% per level>
<stat: -x% per level>

This will raise or lower the stat by x or x% per level (depending on the tag used). This will override the default growth settings found inside the module hash called DEFAULT_GROWTH. You may replace stat with: MAXHP, MAXMP, ATK, DEF, MAT, MDF, AGI, LUK, GOLD, EXP

Skills or items, when used on enemies, may increase or decrease that enemy’s level. You may even reset the enemy’s level if desired. Note that if you decide to use a reset notetag and a level change notetag, the reset will occur before the level change.

<enemy level: +x>
<enemy level: -x>

This causes the enemy to raise or drop x levels depending on the tag used. The new level will readjust the enemy’s stats (including HP and MP).

<enemy level reset>

This resets the enemy’s level back to the typical range it should be plus or minus any level fluctuations it was given. This occurs before enemy level + and enemy level – tags.

You can choose to change the Party Level requirement in the Action Conditions window to become a level condition for the enemy. The enemy cannot use the skill unless they are that level or higher.

And that’s all, folks!

104 comments on “Enemy Levels

    • You are argument is invalid, this belong to this section because enemy levels are somethin affecting the general gameplay difficulty not the way in which the battle system works

  1. Questions –

    Is it possible to disable the display of Level Text for situations such as bosses? (Like a switch or something?) So that that way it could be set up so players can’t instantly tell the difficulty of the enemy without the scan-related stuff.

    Another thing, is there a way to set it up so that an enemy would only know a skill when it reaches a certain level? Not much of a priority of need for this though as the other although it would be nice to have.

  2. Unfortunately, I found a bug, most likely. In a project with only Yanfly’s Ace scripts, when I create the note in an enemy’s notebox for something like , it will remember that for all the following enemies until it comes across an enemy with another such notetag, in which case the following enemies will have that growth.

    It’s pretty strange. I don’t see what’s linking the enemy types with each other in the notetag loading loop.

    • Hee hee, sorry. Still new to WordPress. Anyway, the note I posted was [maxhp: +60% per level]. Also, I found a solution in the meantime. The way you cloned the DEFAULT_GROWTH in the method ‘load_notetags_elv’ would result in the variable still being linked to the original DEFAULT_GROWTH one. I found that using a deep copy, using Marshal::load(Marshal::dump(YEA::ENEMY_LEVEL::DEFAULT_GROWTH)) would make the clone as intended.

      I don’t know if this is clean code, however.

      Also, WordPress needs a preview button.

      • Ah, I see the problem. And yeah, that’s how it would be fixed. Nice find and thanks!

        v1.02 – Bug Fixed: Duplication of stat growth rates per enemy.

  3. Your scripts are amazing Yanfly! I can’t imagine how long it took you to learn the coding language. You always have the best scripts and they are SO useful!
    Thank you very much!

  4. Pingback: Avances « Imagina y Programa

  5. Does the level type part edit the level of the creature? For example, if my strongest guy in the party was level 23 and i wanted a slime to be level 23 then do i type in level type: 3?

  6. Hey, just wanted to drop by and say that this is an awesome script! Thank you :)
    I do belive I found a small bug though.
    The gold and exp growths are reversed. The stat I type in for the EXP to grow with, is used for the Gold and vice versa. It’s not a big deal and there’s an easy work around, obviously, but I just thought you might want to know either way.
    Still, it’s an amazing script and I couldn’t do without it, so thanks again =D!

  7. is there a way that this script can work with victor sants scripts (his basic module disables the enemy stat increase function but the levels still are shown

  8. hello

    I’m all for affordable re thank you you’ve done some great script, good job.
    I would like to know how to do thanks to a “skill” launched at an enemy, copy the targt “level”, “str”, “max hp”, “MP” ect … in variables
    exemple :
    $game_variables[001] = target.ennemi.level
    $game_variables[002] = target.ennemi.str

    thank you

    ps: sorry for my english I’m just French

  9. would it be possible to ensure that the level of the enemy was chosen based on a variables
    min level = $ game_variable [1]
    Max level = $ game_variable [2]

    because in my game the level of its enemies defined by the area of combat, and this level is stored in its variables

    thank you

  10. hello
    I do not want to use the ,
    but regardless of the choices I make (0 to 4) the enemies of his tojour same level,

    I end up either with a group of 8monster level 8 , a group of 8monster level 12 .
    there is no fuctuation between enemies.

  11. Any chance you could make it so two note tags can be used and all the note tags between them would only apply if the enemy was of a certain level? “JP Manager” and “Steal Item” are just two scripts that come to mind which would benefit from this.

  12. i think i found a bug. i even reloaded the script and didn’t change anything and i keep getting it.
    What happens is the game will register the enemies LV but not parameter changes. and when i attack the enemy with anything its LV drops straight to LV1. whats wrong?

  13. Is there any way to make it so the levels become activated in NG+?
    I want the first cycle to be focused on storyline, with the battle being stat based. The second round could be level based. Get what I’m saying? Beat the game, switch “X” activates, NG+ starts and enemies become stronger based on Party Level.

  14. If you want this script to be compatible with Victor Engine, just go to line 777 of “Victor Engine – Basic Module” and comment the method “level”.
    This method always return 1, and if the script is placed under “YEA-Enemy Levels”, it will rewrite the method and desactivate the leveling of enemies.

  15. Hello, I tried to use “a.level” in damage formulas along with this script but it doesn’t work, I used the and tags for the enemy and also tried the to no avail. No matter what level I put them as, they’re counted as Level 1 for the formula.

  16. Small problem that i picked up on today. When I change values for how the monsters gold and experience are calculated at different levels, it turns out that the two are switched around. So when i change something to edit how much gold is dropped, it edits how much experience is earned instead, and changing the experience modifier changes how much gold is dropped.

    8 => [ :gold, 0.15, 10], This line seems to change exp.
    9 => [ :exp, 0.05, 10], This line seems to change gold.

    So just switching the two would fix it I guess? (I’m super new to this)

    • 486 – 508

      # alias method: exp
      alias game_enemy_exp_elv exp
      def exp
      base = game_enemy_exp_elv
      per = enemy.level_growth[8][1] <—- here must be 9 not 8
      set = enemy.level_growth[8][2] <—- here must be 9 not 8
      total = eval(YEA::ENEMY_LEVEL::STAT_FORMULA)
      return total.to_i

      # alias method: gold
      alias game_enemy_gold_elv gold
      def gold
      base = game_enemy_gold_elv
      per = enemy.level_growth[9][1] <—- here must be 8 not 9
      set = enemy.level_growth[9][2] <—- here must be 8 not 9
      total = eval(YEA::ENEMY_LEVEL::STAT_FORMULA)
      return total.to_i

      If you change this , it works perfect

  17. I do not know if anyone has had an issue like this in the past, in my encounters that should be 2-3 mobs I get 4 or 6. example:

    level 1 a
    level 1 b
    level 2 c
    level 1 rat a
    level 1 rat b
    level 2 rat c

  18. Pingback: My First Introduction To RPG MAKER VX ACE | RPG Maker VX ACE Information

  19. Pingback: My Introduction to RPG Maker VX ACE | RPG Maker VX ACE Information

  20. Hello!

    Is it Possible … or rather “how” it is possible … to change the “Enemy Notetags” to “Map Notetags” in Order to link the , and Notetags to a map, instead of an enemy?

    • You mean, like Instead of chaning stats of a Singular enemy, All enemies on the same Region or Map? I don’t know. But That’d make some badass Superboss areas. Like, Slimes with 10x stats Etc.

  21. is it possible just to have them level without showing the level or stats of the enemies?
    I wanted to use this script since my game has some non-linear dungeons that don’t need to be fought in any order, but then the enemies need to get tougher regardless. But I didn’t want to have the player know how strong they are, which adds some difficulty.

  22. Help. I have a strange bug(?)
    When the batter starts, the level of the enemy is shown correctly. but checking it’s stats show it’s still at Level 1. and when I attack, it will say it’s level 1 after the attack. does anyone else have this problem?

  23. Well, I was using the script for a week now together with Victor Engine and Victor’s Limit Script, I deleted them yesterday and now the script is crashing my game all the times a battle occur, error in line 482, ‘-” for nil:NilClass… What is causing this?

  24. I was just wondering if there was a script call to toggle this script on and off. That way you can have monsters in certain locations their default levels and other monsters level with your party.

  25. How can i make it so that the stats i input in the enemy stat boxes correspond to the minimum set level rather than level 1

  26. The custom stat modifier doesn’t seem to be working for me. No matter what percent I put in the tag, the stat always goes up by a fixed amount, for example, with every level, exp always goes up by 10 rather than the percent I put in the notes section. I tested this with a 1% and a 100%, both times it went up by 10.
    I know I could change the values in the DEFAULT_GROWTH section of the code, but then that limits me from adding different values to to different enemies.

    Here’s is the note I’m using:

    Any idea what is going wrong here?

  27. Um, for some reason, when I hit an enemy with any attack(for instance just a normal attack) the enemy’s level drops to 1 even if the minimum is above 1. Anyone else have this problem or a solution?

  28. I was wondering if there was a chance that I could tie enemy levels to a variable? I’d like to use your System Options script to add in a Difficulty slider, so players can adjust said variable to influence monster levels.

  29. So to use this most effectively after installing I should lower the Database values for Enemies down to what I would want level 1 to be?
    It seems like that would be the case but just want to be sure before i start heavily modifiying the database.

  30. I’ve found a little bug. In line 492 and line 493 you should replace the [8] with a [9] and in lines 504 and 505 the [9] with a [8], otherwise you’ll have money and EXP growth exchanged. However it’s an awesome script, thanks.

  31. For some reason, the script doesn’t seem to work for me. I can see the enemies are higher levels and all, but the problem is that they don’t gain any stats even though I put either flat or %.

  32. Experience tag doesn’t seem to work. I had a monster set to give 30EXP and it still keeps giving out 44EXP instead. I tried setting the tag to +0 per level and even +1 per level but nothing changes. All the other tags seem to work though. Anyone know what the deal is?

  33. Hey Yanfly, I just wanted to tell you that you Dropbox has been disabled or something like that because of too much traffic, so I can’t download some of your awesome scripts. just wanted you to know so that you can either create a new Download link or what have you. It would really be helpful ^^

    • Hey this is Rataius I just wanted to say don’t worry about it figured out where I can get your scripts. Didn’t know you had an entry stating the problem… Now about the script… um I am having issues with the algorithm. Like I have it so that the enemy level averages out but the issue is the monsters blow my party to smithereens. I can barely escape with my life in game so I was wondering what is the best way to set up the algorithm so that the monsters provide challenge but give the players no chance. couple level 20-ish Skeletons blow my two party members away with no problem. Any ideas for a good low to medium growth rate cause The default is WAY too overpowering.

  34. I thinmk tha everything published was actually very logical.

    But, what about this? what if you composed a catchier title?
    I mean, I don’t want to tell you how to run your blog,
    but suppose you added a post title thaat grabbed folk’sattention?
    I mean Enemy Levels | Yanfly Channel is a little boring.Youu should peek at Yahoo’s home page and ssee how they create arficle headlines to grtab people
    to click. You miught add a video or a related picture
    or two to grab readers excited about what you’ve got to say.
    In my opinion, it could make your posts a litttle bit more interesting.

  35. The link is broken. I’ve tried to download the cript for two days now and I still get Error 509. Is there any other website where I can download it?

  36. hey there and thank you for your information – I’ve definitely picked up
    anything new from right here. I did however expertise several technical points
    using this site, since I experienced to reload the web site a lot of times
    previous to I could get it to load properly. I had been wondering
    if your hosting is OK? Not that I’m complaining, but sluggish loading instances times will sometimes affect your placement in google and
    can damage your high quality score if advertising
    and marketing with Adwords. Anyway I am adding this RSS to my email and could
    look out for a lot more of your respective intriguing content.
    Make sure you update this again soon.

  37. wow! very useful script and i don’t need to change my enemy’s param setting. thanks for your great works :).

    but i have a question to this script. i use this script with MOG’s Boss HP meter.
    at first, i place Boss HP meter under enemy level script, an error occurred.

    Script ‘Enemy Levels’ line 483: NoMethodError occurred.
    undefined method ‘-‘ for nil:NillClass.

    so, i placed enemy level script under Boss HP meter,
    after then, battle test was perfectly working. but, boss’s face(MOG’s Boss HP Meter option.) was not appeared.
    but when i tried disabled enemy level script and battle tested, it appears perfectly.

    is there any solution to solve this problem? i guessed it might be discussed on level part in two scripts..

    and sorry for my bad english.. :(

  38. Error (509)
    This account’s public links are generating too much traffic and have been temporarily disabled!
    When will it be available in your account again?

  39. is there any way that some enemies are not affected by the script,
    but is that the heads will become invincible

    • Thank you, a variable is what I needed. But how do I set what variable the script looks for and how it responds?

  40. For the stats is possible use formulas based on level?
    something like:
    hp: 3 * level**2 + 60 * level + 600
    str: ((level * 45) / 10) + (level / 5 * ((level**2 / 2) / 130) + 27)) / 4
    And so on differents formulas for different stats for different enemies

  41. I was wondering, is there is a way to make sure certain enemies won’t drop gold at all by writing something in the note box…?

    • I believe you can do that without the notetags.

      You only need to go to Database > Enemies.
      Then you look below the enemy Graphic, there`s a Reward box.
      There you can set Gold to 0 and they won’t drop any.

      • I have tried that and I still get the drop. For instance: a lvl 20 enemy drops 190 gold even though I have put 0 in the gold reward. :/

    • I took a look at the script, and I found this:

      8 => [ :gold, 0.15, 10],

      This is the default gold growth. I’m guessing if you change “10” to “0” it will prevent them from dropping gold. Try that, and let me know if it works.

      Oh, there’s also this that you can put in the notetag:

      Just replace “stat” by “GOLD”, then change the % to 100. So that may lower the Gold gain by 100%, giving you 0 Gold.

  42. didn’t work adding in the notebox.

    But by changing:

    8 => [ :gold, 0.15, 10] to 8 => [ :gold, 0.15, 0]

    in the script did work, and the enemy won’t drop gold if 0 gold in reward.

    I played around with adding gold reward on the enemy in the database, wich did still increase gold drop if 1 and above (not much, but still better than nothing)

    Thanks alot keikuina! :D

  43. I hope someone will see this^^

    i have the problem that the battles wont start…

    Script EnemyLevel” line 2: NameError occurred.
    undefined local variable or method “ for main:Object

    I´m using this script but i cant find the problem -.-
    sry im not a genius with this xD

  44. I have some troubles with the script.
    I think i wrote every command right, but all the time and no matter what values i choose the mob will get all the time a fixed amount of stats.
    Didn´t know where the problem is i hope anyone here can help me.

    The link below show a picture of my notetag maybe i wrote the commands flase but i think not.

  45. i am having trouble installing this script. i only use this script, and i am sure i am using the note tags right, i just want a monster to scale with my party, but it seems no matter what i try, the monster is always level 1. do i need to call the script some how? note: i am a noob.

  46. This is great! I’m basing my game off of a table-top game I made, and I have formulas for each enemy’s stats. When I got RPMVA, I was dismayed to find that enemy stats were set. You’ve solved this problem, thanks!

  47. Not sure if this is a bug or not either but this is what I’ve noticed.
    My game only has humanoid mobs dropping gold. I’ve set all parameters in the script to show 0 for gold rate per lvl. Also my creatures dont drop gold in their info panel in the database, but after each battle and even with all settings set to 0, the monsters still drop gold. How can I get this to stop or is it a bug in the script?
    I would love to use this script in my current project but it would mess with the economy of my game if I used it as is.

    Any help would be appreciated.

    • keikuina
      October 30, 2014 @ 10:29 PM

      I took a look at the script, and I found this:

      8 => [ :gold, 0.15, 10],

      This is the default gold growth. I’m guessing if you change “10” to “0” it will prevent them from dropping gold. Try that, and let me know if it works.

      Oh, there’s also this that you can put in the notetag:

      Just replace “stat” by “GOLD”, then change the % to 100. So that may lower the Gold gain by 100%, giving you 0 Gold.

      October 30, 2014 @ 10:59 PM

      didn’t work adding in the notebox.

      But by changing:

      8 => [ :gold, 0.15, 10] to 8 => [ :gold, 0.15, 0]

      in the script did work, and the enemy won’t drop gold if 0 gold in reward.

      I played around with adding gold reward on the enemy in the database, wich did still increase gold drop if 1 and above (not much, but still better than nothing)

      Thanks alot keikuina! :D

      October 30, 2014 @ 11:06 PM

      You’re very welcome, glad I could be of assistance c:

      OOPS looks like this had been addressed already, sry for repost. :)

  48. Just as a heads up, around line 131 there is a chart about the default parameter growth enemies receive during level up. These changes are IN ADDITION to any stat ups you add in the notes of an enemy.
    I make note of this as this blog post said nothing about it, and i didn’t go digging through the script initially, since I didn’t think it would do that, but couldn’t figure out why my enemies where hitting 6,000 hp when they should have been only able to reach 400. (smaller number system…) It was because in these default methods they were gaining a percentage of hp (and everything else) at every level… which in a small numbers system is bad.

  49. I’m getting an error on line 438:
    Script ‘enemy levels’ line 438: NoMethodError occurred.
    undefined method `enemy_level’ for #
    I tried the script on a clean project but it did nothing(no effect on the enemies)
    Even after I removed the script(just line 438, pieces or the whole thing) it still gave me that error, so I’m very confused.
    Note: the error happens when i try to enter a battle with any enemy that’s not an actor.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s