Enemy Levels MV

Do you want your enemies to have levels like actors?

You could use levels as a way to determine their difficulty level compared to the actor’s current level. For example, if your actor is currently level 10 and the enemy is level 20, you might use a red font to draw the enemy’s name to indicate that it is dangerous.

Levels themselves do not mean much on their, for they are just a number. They become more powerful once you use other plugins that make use of them. For example, a plugin that you can use is Enemy Classes, which allows you to assign classes to enemies. Using both plugins, you can now set up parameters curves based on the enemy’s level, as well as the skills they can use based on the level.

Download

Plugin: download here (right-click, save as)

Related Plugins

Installation

Download ths plugin and place it in the “plugins” folder in your project’s “js” folder. Then open your Plugin Manager (F10), double-click an empty row, and select the HIME_EnemyLevels plugin.

Once it is in your list of plugins, turn the plugin on.

Usage

Initializing Levels

enemyLevels2

To initialize enemies with a particular level, note-tag enemies with

<enemy level: FORMULA />

Where the formula is any valid javascript formula that evaluates to a number.

For example, you could write numbers

<enemy level: 23 />

Or you could include the game variables, using the formula variable `v`:

<enemy level: 5 + v.value(3) * 4 />

Which means the enemy’s level is equal to 5 plus the value of variable 3 multiplied by 4. This can be used to set up dynamic levels based on things like difficulty.

Display Level

If you would like to display the enemy’s level in their name, in the plugin manager you can set the “Name Format” which is a formatted string that takes two pieces of info

1. Enemy name
2. Enemy level

enemyLevels4

So for example, if you write

%1 Level %2

And you encounter a level 5 slime in-game, it will read

Slime Level 5

Changing Levels

If you would like to change levels, there are two ways to do it

enemyLevels3

1. Using plugin commands

For simple level management, you can use the following commands during battle:

set_enemy_level member MEMBER_ID to level LEVEL

Where the MEMBER_ID is the position of the enemy in the troop and the LEVEL is the number of the new level. For example, to change the second enemy in battle to level 10, you can write

set_enemy_level member 2 to level 10

You can also add or substract levels, using this plugin command

add_enemy_level LEVEL levels to member MEMDER_ID

If you specify a negative number, it will subtract the level.
For example, to add 5 levels to the third enemy, you would write

add_enemy_level 5 levels to member 3

To remove 10 levels from that enemy, you would write

add_enemy_level -10 levels to member 3

2. Script calls

If you would like more advanced ways to control enemy levels, you can use script calls directly. Say you wanted to modify the second enemy

First, access the enemy object. Remember that javascript indexing is zero-based, so the first enemy is at index 0.

$gameTroop.members()[1]

Then you can use the following methods

$gameTroop.members()[1].setLevel( NEW_LEVEL )
$gameTroop.members()[1].addLevel( NEW_LEVEL )

Where the NEW_LEVEL is a javascript formula that evaluates to a number.

You may also like...

125 Responses

  1. Benny B says:

    Unfortunately when I go to download this plug-in, the link just takes me to the text.
    Nothing is able to be downloaded. Is there a way to download this plug in on a Mac?

    • Anonymous says:

      Update: Got it to download properly. But the plug-in still doesn’t work as advertised. Placed all my data the exact same as in your example just for testing with no effect. Restarted already BTW. Any help?

  2. Nigi says:

    Hi, I’d like to use your plugin for commercial use, is there any way we could set this up?

  3. Yulevia says:

    Is there a way to set the minimum and maximum level of specific monsters

  4. Kevin says:

    can this plugin be used in VX ACE ? or just MV

    ty before

    • Zarsla says:

      There is an VXACE version but that’s on under the RGSS3 Scripts page. You’re on the one for MV. General rule of thumb for Himeworks plugins is to check under the plugin library list ie for VXACE go to RGSS3 Scripts or for MV go to MV Plugins.

      The List for VXACE scripts are here:

      http://himeworks.com/rmvxa-scripts/

  5. Hi, I think your site might be having browser compatibility issues.
    When I look at your blog site in Safari, it looks fine but when opening in Internet Explorer, it has some overlapping.
    I just wanted to give you a quick heads up! Other then that, amazing blog!

  6. James Ryan says:

    I have got a problem with this plugin.
    I set my enemy’s level based on my party leader’s level like this: $gameParty.leader().level + 5.
    It works fine until my leader is higher than 94. It means my enemy level is from 100 and above (more than 99 which is the maximum level by default)
    And after that, whenever processing battle, it won’t load and pop up this error: “RangeError Maximum call stack size exceeded
    What can i do with this?

  7. Anonymous says:

    Hey, i have a question ? Can we put a variance in the formula ? I want that the level can vari randomly more or less than the level i set !

    I want to say thank you for your work 😉

    (Sorry for my english)

  8. Anonymous says:

    Is it fine if I slightly modify the script to raise the enemy max level from 99 to 200?

  9. DutchPowerCreations says:

    Tyvm for the solution the name was different, I do not really get how that could have happened but it works again!

  10. DutchPowerCreations says:

    I am using your level and classes plugin but now the level plugin gives a error ‘format’ undefined. Could you pretty please update this plugin?

    • Hime says:

      The plugin works for me. Have you named the plugin file properly? In your plugin parameters, does it show a “Name Format” option?

  11. Anonymous says:

    I would like to make it so an enemy level varies without having to make 2 of the same Monster. Say in one encounter it’s level 2 and then it’s level 3 the nest time. The only way I can do that now is by making two of the same enemy as I said but when using Monster Book that also means I get two entries of the same Monster :/

    Anything I can do to add varying levels to one Monster?

    • Hime says:

      This depends on how the monster is encountered, but you can use a game variable to keep track of how many times the monster was encountered, and use that to change the enemy’s level when the battle begins.

      • Highlord90 says:

        It’s fine, I just decided to change the enemy levels at the beginning of battle and adjust stats accordingly, works how I need it too 🙂

  12. Richard says:

    i change the lv but the monster hp still the same

    • Hime says:

      Do you mean their current HP is the same, or their max HP? You will need to recover their HP since changing levels doesn’t restore your HP/MP.

  13. Richard says:

    I want to change enemy lv out of the battle, its possible?

    • Hime says:

      Enemies do not exist outside of battle by default. Do you have enemies outside of battle?

      • Richard says:

        so i want to make something like this in battle event

        $gameTroop.members()[1].setLevel( CURRENT MONSTER LEVEL + VARIABLE )

        • Hime says:

          You can do something like
          var e = $gameTroop.members()[0];
          e.setLevel(e.level + $gameVariables.value(2));

          To add variable 2 to the first enemy’s current level.

  14. flpsantoss says:

    can this plugin be made compatible with class parameters table? Because i wanted to give my enemys some class but they keep getting the base mv class stas

  15. Nigel says:

    The parameters and everything seem to all function as expected. But the enemy is not using the skills based on level, but instead relies on ones set on the enemy page. Deleting all moves on the enemy page just makes the enemy do nothing. Am I missing something? Please let me know ASAP!
    Thank you!!

    • Hime says:

      I’m assuming you are referring to enemy class. Currently I have not implemented logic for disabling actions based on class learnings. I will let you know when it is updated.

  16. ShadowfireOmega says:

    I seem to be having a problem getting this plugin to work, I’ve gone so far as to turn off all other plugins, and I can neither get it to call upon the enemy level for damage formulas or get it to show the enemy level in the name. I used in the notebox, I have the plugin on, above all other plugins, and no other plugin is on. Am I missing a core plugin or something?

  17. Zackington says:

    Anyway I can use the enemies level in a damage formula through a variable or a script call or something?

    I’m trying to replicate FF X-2 damage formula which increases damage based on the users level, but I’m not sure how to do this with enemy attacks.

    • Hime says:

      Yes. Accessing actor and enemy levels are the same in damage formulas.
      For example, if you want to increase the attacker’s damage by 250 for each level as a bonus to the attacker’s atk stat, you can say

      a.level * 250 + a.atk

  18. Anonymous says:

    How can I make the enemy level equal to the players level with a formula?

  19. Arrogant says:

    How would you create a skill similar to Level 5 Death/Goblin Punch (both skills using the enemy’s level as a means to determine the skill), or does your script not support using enemy levels in the formula?

    • Hime says:

      You can reference the level in your damage formula. For example, to check if the target’s level is a multiple of 5

      b.level % 5 === 0 ? “things that should happen” : 0

  20. Gabrielle says:

    I’m having issues getting the Enemy Levels and Class plugins to work. My battle formula is:
    (((((((2 * a.agi/5+2) * a.atk * 50) / b.def) / 50) +2) * a.luk / 10) * (Math.randomInt(39) + 200)) / 238
    and it’s not updating anything when I modify the level of the enemy. It’s also not increasing the def of the enemy when I increase the level. I am using Yanfly’s scripts, and I’ve tried it above and below Yanfly’s Battle Core.

    Any tips?

  21. SpellcraftQuill says:

    I wonder if you can get the level to display on Yanfly’s Battle Core.

    • Hime says:

      I have updated the plugin to support displaying enemy levels in the enemy’s name.
      There is a new plugin parameter, so you will need to double-click on the plugin to get it to show.

      See usage section for more info.

  22. SilverNeko says:

    Amazing plug-in~

    Wonder if you can make an add-on to change xp depending on the monster’s lvl tho

    • Hime says:

      If it does’t exist already, I will provide some plugins to set EXP based on some formula of your choice (eg: to include level). Or perhaps use a spreadsheet to manage EXP for each level… Not sure which one you would prefer.

      • SilverNeko says:

        I would prefer the first one but second one would be pretty awesome too

        • Hime says:

          I will explore some solutions for EXP tables.

          • hanzomon says:

            I was wondering if EXP in relation to enemy levels was still in the works? For example, a level 8 enemy would give no EXP to party members above level 8. I feel like I read somewhere that you had written something similar to this but had not released it yet. Thanks so much for your excellent work, Hime!

      • Richard says:

        a plugin to change Exp table and monster Drop

  23. Bearsmith says:

    I love you.

Leave a Reply to SpellcraftQuill Cancel reply

Your email address will not be published. Required fields are marked *