Enemy Levels

coreEnemyLevels

This script allows you to assign levels to enemies. The level of an enemy is determined when you encounter the enemy.

The level is specified as a formula, which means you can define two types of levels:

  1. Static level. This means the enemy’s level never changes throughout the game. For example, a slime might always be level 1 no matter what.
  2. Dynamic level. This means the enemy’s level relies on data that may change throughout the game. For example, you can bind an enemy’s level to a game variable so that its level changes whenever you change the variable.

This plugin adds levels to enemies, which is a property that you access through damage formulas or other script calls. You can customize enemy parameters for each level using the enemy classes plugin, allowing you to assign classes to enemies and managing them the same way you would manage your actors.

In addition to setting enemy levels, this script provides a number of other enemy level related functionality, such as changing levels during battle and setting max/min enemy levels.

Download

Script: download here

Installation

Place this script below Materials and above Main

Usage

Setting Enemy Levels

To set an enemy’s level, note-tag it with

<enemy level: FORMULA>

You can use the extended note-tag if you need to write your formula on
multiple lines

<enemy level>
FORMULA
</enemy level>

The formula can be any valid ruby formula that evaluates to a number.
The following formula variables are available:

e - the enemy itself (Game_Enemy object)
p - game party
t - game troop
s - game switches
v - game variables

By default, if no level is specified, then the enemy is assumed to be level 1.

Accessing the level

If you ever need to reference the enemy’s level in your scripts or script calls, assuming you have a Game_Enemy object enemy, you can access it using

enemy.level

Setting Level Limits

You can set maximum and minimum levels for enemies using note-tags.

<max enemy level: FORMULA>
<min enemy level: FORMULA>

By default, the min level is 1 and max level is 99.

Adjusting Levels

If you want to adjust levels during battle, you can use script calls. All script calls require an “enemy index”, which is the index of the enemy in the current troop. You can get that index by looking at some battle event commands and looking at the number beside each enemy.

This call sets the level of the specified enemy.

set_enemy_level(index, level)

This call changes the level of the specified enemy. A positive number will increase its level, while a negative number will decrease its level. The change cannot go past the limits.

change_enemy_level(index, level)

Level Display

In the configuration, you can choose to display the enemy’s level in their name. If you choose to enable this feature, you can customize the display format. If you don’t want this feature you can turn it off by setting the Display_Level option to false.

Examples

A few simple examples to get you started.

Level based on game variable 5

v[5]

If enemy is the “leader” of the troop, then level 10, otherwise level 1

e.index == 0 ? 10 : 1

Random level between 1 and 10 (note that rand returns a number between 0 and n)

rand(10) + 1

Based on highest actor level

 
p.members.max {|actor| actor.level}.level

You may also like...

61 Responses

  1. Wow that was odd. I just wrote an really long comment but after I clicked submit my comment didn’t show up.
    Grrrr… well I’m not writing all that over again. Anyway,
    just wanted to say excellent blog!

    Feel free to surf to my webpage; vpn coupon code 2024

  2. Thank you a bunch for sharing this with all people you really recognise what you’re talking approximately!
    Bookmarked. Please additionally seek advice from
    my website =). We may have a hyperlink exchange arrangement between us

  3. vpn special says:

    This is a good tip particularly to those fresh to the
    blogosphere. Brief but very accurate info… Many thanks for sharing this one.
    A must read article!

    My site vpn special

  4. Oh my goodness! Awesome article dude! Thank you so much,
    However I am going through troubles with your RSS.
    I don’t understand why I cannot subscribe to it.
    Is there anybody having the same RSS issues? Anybody who knows the solution can you kindly respond?
    Thanks!!

  5. Hi there! Do you know if they make any plugins to help with SEO?

    I’m trying to get my website to rank for some targeted
    keywords but I’m not seeing very good success. If you know of any
    please share. Kudos! You can read similar blog here: Scrapebox List

  6. I have been surfing on-line more than 3 hours these days,
    yet I by no means found any attention-grabbing article like yours.
    It’s lovely value sufficient for me. Personally, if all website owners and bloggers made excellent content
    as you probably did, the net will be much more helpful than ever before.

  7. We’re a group of volunteers and starting a new scheme in our
    community. Your website provided us with valuable information to work on. You have
    done a formidable job and our whole community will be grateful to
    you.

    Feel free to surf to my site :: vpn special code

  8. ponstel en vente au Maroc
    Commander ponstel en toute sécurité
    mefenamic acid en vente en ligne Commandez votre mefenamic acid en ligne en toute confidentialité en Suisse
    Acheter mefenamic acid en ligne : guide étape par étape pour les débutants Acheter de
    la mefenamic acid en ligne : Conseils pratiques
    Où acheter de la mefenamic acid sans se faire arnaquer
    Témoignages sur l’achat de ponstel en ligne Comment obtenir
    de la mefenamic acid sans ordonnance médicale
    mefenamic acid en ligne : comment s’assurer de la qualité du
    produit Trouvez mefenamic acid en ligne en France
    mefenamic acid abordable et de qualité Pharmacie en ligne de confiance pour la mefenamic acid en Belgique
    Commandez votre ponstel en ligne avec une assistance clientèle dédiée ponstel à vendre
    sur Internet en Belgique
    Les alternatives à la mefenamic acid disponibles en ligne
    comment se procurer mefenamic acid légalement mefenamic acid en ligne :
    les critères à prendre en compte avant d’acheter
    mefenamic acid vente libre Suisse
    Meilleur site pour acheter ponstel en ligne en Belgique
    Informations complètes sur la mefenamic acid en ligne
    Pharmacie en ligne pour acheter de la mefenamic acid en Belgique
    Trouvez la mefenamic acid adaptée à votre budget
    Pharmacies en ligne réputées proposant mefenamic acid en France
    pharmacie en ligne en Espagne vendant ponstel
    achat ponstel de la marque Mylan Trouvez des alternatives à la mefenamic acid en ligne
    mefenamic acid disponible sans ordonnance en France Achat de
    mefenamic acid pour les traitements de longue durée
    mefenamic acid disponible en ligne au Luxembourg
    mefenamic acid disponible Maroc sans ordonnance
    vente libre de mefenamic acid en Suisse mefenamic acid en pharmacie avec
    livraison rapide
    acheter du mefenamic acid en Italie ponstel de confiance à acheter en ligne
    ponstel en vente libre en ligne en Luxembourg Guide complet pour acheter
    mefenamic acid en ligne en France
    mefenamic acid à prix abordable en France Commandez votre ponstel dès maintenant
    Trouvez facilement de la mefenamic acid en ligne Commandez votre traitement à la mefenamic acid en ligne
    Pharmacie en ligne pour acheter mefenamic acid en toute tranquillité en Belgique
    ponstel disponible en ligne en France Acheter mefenamic acid en toute sécurité en Belgique
    Pharmacies en ligne offrant ponstel en France
    ponstel sans ordonnance livrée en France
    Acheter de la mefenamic acid en ligne en quelques clics
    au Luxembourg
    Acheter ponstel en ligne en toute sécurité Options d’achat de
    mefenamic acid sans ordonnance en France
    ponstel pour une livraison rapide et fiable
    mefenamic acid : posologie adaptée à chaque cas
    ponstel Belgique sans problème
    Achat facile et sûr de mefenamic acid en ligne en France
    mefenamic acid Belgique sans ordonnance nécessaire
    mefenamic acid en vente en Espagne, livraison discrète mefenamic acid vente en ligne sécurisée
    Conseils pour commander mefenamic acid en ligne en toute sécurité mefenamic acid en Belgique: ce qu’il faut savoir avant d’acheter

  9. If some one needs to be updated with newest technologies therefore he must be visit
    this website and be up to date daily.

    Feel free to visit my site – vpn special coupon code 2024

  10. Write more, thats all I have to say. Literally, it seems as
    though you relied on the video to make your point. You obviously know
    what youre talking about, why throw away your intelligence on just posting videos to your blog when you could be giving us something
    informative to read?

    Here is my web-site; vpn coupon code 2024

  11. THE ONE CARGO คาร์โก้ นำเข้าสินค้าจากจีน ขนส่งนำเข้าสินค้าจากจีน ราคาถูก เรายินดีให้คำปรึกษาในทุกขั้นตอนการนำเข้าสินค้าจากจีน ติดต่อโรงงานผลิตสินค้า สร้างแบรนด์สินค้า ต่อรองราคากับทางโรงงาน สั่งซื้อสินค้าผ่านเว็บอีคอมเมิร์ซ บริการแลกเงินหยวน เดินเอกสารศุลกากร นำเข้าและจัดส่งสินค้าอย่างปลอดภัย บริการด้วยความซื่อสัตย์ รับประกันคุณภาพ

  12. sklep online says:

    Hello! Do you know if they make any plugins to help with Search Engine Optimization? I’m trying to get my
    blog to rank for some targeted keywords but I’m not
    seeing very good results. If you know of any please
    share. Many thanks! You can read similar article here: Ecommerce

  13. It’s very interesting! If you need help, look here: ARA Agency

  14. sklep online says:

    Good day! Do you know if they make any plugins to help with Search
    Engine Optimization? I’m trying to get my blog to rank
    for some targeted keywords but I’m not seeing
    very good success. If you know of any please share. Many thanks!
    You can read similar blog here: Dobry sklep

  15. Stephentom says:

    Why visitors still make use of to read news papers when in this technological world everything is available on web?

    https://toolbarqueries.google.com.af/url?sa=t&url=https://didvirtualnumbers.com/tr/

  16. sklep online says:

    I am curious to find out what blog system you happen to be using?
    I’m having some minor security issues with my latest blog and I’d like to find something more secure.
    Do you have any suggestions? I saw similar here: Sklep internetowy

  17. UFAAUTO789 says:

    ufa wallet 789 เว็บพนันครบวงจร แทงบอล บาคาร่า สล็อต ครบจบที่เดียว

  18. OLanesoodo says:

    Ваш надежный партнер Сдать металл в Алматы Наша компания предлагает высококачественные услуги по приему, сортировке и переработке металлических отходов. Мы гарантируем прозрачные условия сотрудничества, конкурентоспособные цены и оперативное обслуживание.

  19. Earnestjet says:

    Thank you for the good writeup. It in reality was once a leisure account it. Glance complex to far delivered agreeable from you! However, how could we communicate?
    online pokies payid deposit

  20. e-commerce says:

    If some one needs expert view regarding blogging after that i propose him/her to go to see this blog, Keep up
    the good work.!

  21. ecommerce says:

    Great site you’ve got here.. It’s hard to find high-quality writing like yours these days.
    I truly appreciate individuals like you! Take care!!

  22. Timsothyfen says:

    Cialis 5 Mg Para Q Sirve
    (Moderator)
    Cialis 5 mg prezzo cialis 5 mg prezzo cialis 5 mg prezzo

  23. Dims says:

    i like your script, but how to make a different stat for different level too?

  24. MDJ says:

    Hey Hime – i have a problem with a scriptcall set_enemy_level(index,level)
    i’m using abs patch so index will be taged as event id so set_enemy_level(@event_id,level) will work with the current event
    there is a not function to the note box says p.members.max {|actor| actor.level}.level – it works correctly but it won’t with a script call
    set_enemy_level(@event_id,p.members.max {|actor| actor.level}.level)
    Please Help me ^^

  25. watermark says:

    I like this plug-in much better than Yanfly’s enemy levels as it’s much easier to set the enemy stats based on actor curves instead of formulas.
    However is there an exp and gold growth addition to this (like Gold and Exp formula you had in VX Ace)? Right now I can’t seem to change enemy exp and gold drops, and that is very important.

  26. NovaK says:

    Hey, I sent a message through the contact form but haven’t received a response. No rush but was Just wondering on the commercial usage of this script?

  27. Applecrumble says:

    Hi!
    I’m trying to make a conditional branch in a troop event page that uses enemy level as
    a condition. For example, I want something like this:
    “if enemy.level > 10”
    but I’m not sure how to make it work.

  28. Anonymous says:

    Can skills reduce an enemy’s level and ensure they flee if the lowest actor level is 15 levels higher than them?

  29. Anonymous says:

    Will skills be able to reduce an enemy’s level in this script, because in one of my games, normal enemies flee battle when (party lowest level – enemy level) > 15.

    • Hime says:

      Yes, you can change enemy levels using script calls either in the skill’s formula or an effect on the skill. See the section on “Adjusting Levels”.

  30. Dugald says:

    Is there a way to have an enemy's experience and gold values vary based on their level? I imagine there would be some sort of formula you could set up for it.

  31. Kenji says:

    Can this be used in a damage formula?
    for example in the skills damage box:

    enemy’s level *10 = damage

  32. Marcos Luna says:

    Sorry to bother you Tsuki,it is possible to make a enemy level based in a current actor?
    Thanks you for this great script and greetings from Argentina.

  33. MikeB says:

    OK, I did update the script. I guess I had an older one.
    But I seem to still be getting the same error. I tried playing around with it a bit, but couldn’t anything to change.
    I just want to make sure…. this line does go inside the ‘script box’ that you can choose on the event editor screen, correct? I don’t need this directly inside the enemy or troop boxes?

  34. MikeB says:

    OK, kind of a nooby question here.
    I have both your enemy level and class installed. If I manually set the level inside the enemy’s note tag, I can get it to work. I tested it using a level 1 character and setting the enemy to 1 first then to 90 so I could the extreme differences.
    The problem now, is that I’m sure where/how to place the call to set the enemy’s level on the field.
    Let’s say I have a troop set up to have 2 of these enemies. Maybe for one encounter I want them to be level 2, but then later using the same troop I want them to be level 8.
    I’m not sure exactly what the proper format set up is to adjust that. I assume it goes as a script in the event box? Or is that wrong too?
    Thanks for any help.

    • Hime says:

      There was a typo in the script that I have fixed (set_level vs set_enemy_level), but basically you would make a script call in your event box like

      set_enemy_level(2, 15)
      

      This will set the second enemy’s level to 15, whichever the “second” enemy is. You would probably call this on turn 0 if you want to “initialize” their level at the beginning of the battle. Of course, you can make this script call anytime.

      • MikeB says:

        Hmm, ok tried it again.
        I’m getting the error that basically says, undefined method for ‘set_enemy_level’ in line 1411 of the Game Interpreter script.
        So I’m trying to figure out if I’m still not using it right.
        Right now in the event box I have the script for enemy level first, followed by the battle processing to call the specific troop.
        Is that right?

  35. RogueDeus says:

    Hime, I just wanted to mention that I think this latest string of tool based scripting is great, but the average user may fail to see how they all work together.

    For example: Core Levels, Enemy Class, Level Difference Exp, and Parameter Tables could be paired with Enemy Exp Formulas and Enemy Gold Formulas, and can thus completely replace catch all scripts like Yanfly’s Enemy Levels, which is very limited in comparison.

    • Hime says:

      Yes, I’ve been thinking of writing a tutorial at some point to show how you can customize enemies in your project. Of course, others are also free to write tutorials for any scripts I develop if they want to share some “dev tips and tricks” with others.

      Admittedly, I am not putting nearly enough effort into marketing the scripts.

  36. 9802 says:

    Would it be possible to get an example of how the multi-line tag is supposed to work?
    From my trial and error it only functions if there aren’t any line breaks in the formula.
    Also, correct me if I’m wrong, but doesn’t “p.members.max {|actor| actor.level}.level” get the last actor and use their level as opposed to the actor with the highest level?

    Thanks for all of your work.

    • Hime says:

      It was a bug. I forgot to tell the extended regex to read multiple lines. Should be fixed now.

      `p.members.max { … }` returns the member whose actor is the highest.

  37. desti says:

    i don’t get it

Leave a Reply to Hime Cancel reply

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