More Enemy Drops

RPG Maker MV allows you to create up to three item drops for an enemy. When the battle is over, the player may receive up to any of these 3 items.

When you specify drops, you use something called a “denominator” probability, which is basically you specifying the chances of the item dropping as a fraction of 1.

moreEnemyDrops2

For example, if an item had a 1/2 chance to drop, then it has a 50% chance to drop. If an item had a 1/3 chance to drop, then it has a 33.33% chance to drop.

Unfortunately, with this system, you could never have any probabilities in between.

This plugin addresses two issues:

  1. You can specify more drops
  2. You can specify probability using percentages

This should give you more flexibility when designing your enemies.
Want more freedom when it comes to enemy drops? Give this plugin a try!

Download

Plugin: download here (right click, save as)

Installation

Download the 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 MoreEnemyDrops plugin. Please do not change the name.

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

Usage

Understanding Item Codes

Before we begin, you must first understand a concept that I call “Item Codes”. The item code is a way for you to quickly specify what kind of item you want, and the ID of the item.

If you already understand item codes you can just skip this part. Here is a quick summary:

itemCodes1

This is how item codes looks like:

a11
w23
i42

The first letter represents the item kind.

a - armor
w - weapon
i - item

The number after is the database ID. So if you write

w23

That means the enemy will drop weapon 23.

Adding More Drops to Enemies

To create enemy drops, you would use a note-tag that looks like this:

<enemy drop>
  item_code: "ID",
  amount: number,
  chance: "FORMULA"
</enemy drop>

Take note of those commas: if you have additional options, you must include a comma.

Choosing which Item to Drop

`item_code` is the code that was described above. This indicates which item will be dropped.
The simplest note-tag you can write is

<enemy drop>
  item_code: "i4"
</enemy drop>

Which will drop item 4 with 100% chance.

Setting up Drop Chance

`chance` is a formula that evaluates to a number as a percentage. So for example, you could write numbers

<enemy drop>
  item_code: "w3",
  chance: "25"
</enemy drop>

Which means there’s a 25% chance to drop weapon 3.

Alternatively, you can use javascript code if you know how to write them. For example, this plugin gives you a special formula variable called `v` which gives you access to the game variables.

<enemy drop>
  item_code: "w3",
  chance: "v.value(3) * 10"
</enemy drop>

Which results in a chance equal to 10 times the value of variable 3. If variable 3 was 0, then you have no chance. If the variable was 10, then 10 times 10 equals 100, so you have 100% chance.

You can also use the formula variable “s” to give you access to switches.So for example,

<enemy drop>
  item_code: "a5",
  chance: "s.value(2) === false ? 0 : 100"
</enemy drop>

Which means if switch 2 is OFF, it drops armor 5 with 0% chance, but if that switch is ON, then you get it 100%.

Chance is not necessary, so f you don’t specify a chance, then it is assumed to drop at 100%.

Setting up Drop Amounts

The `amount` option tells the game how much of that item should drop. For example, if you write

<enemy drop>
 item_code: "w3",
 amount: 2
 </enemy drop>

Then it will drop two of weapon 3 if you receive this drop.

If you don’t specify an amount, then the game assumes you will only get 1.

You may also like...

59 Responses

  1. Seshua says:

    Hi

    So i’m trying to set up an enemy with drops I’ve just about tried every variation I can think of but I can’t seem to figure out a configuration that works
    I’ve tried it alot of ways but can’t get it to work, here are some examples.

    **with quotations and a comma separating them**
    <enemy drop>
    item_code: "w501", "w502"
    chance: "50", "50"
    </enemy drop>

    **same as previous except comma's at the end.**
    <enemy drop>
    item_code: "w501", "w502",
    chance: "50", "50",
    </enemy drop>

    **item code and chance without quotes**
    <enemy drop>
    item_code: w501, w502
    chance: 50, 50
    </enemy drop>

    **with out quotes and comma's at the end**
    <enemy drop>
    item_code: w501, w502,
    chance: 50, 50,
    </enemy drop>
    **I've tried it other ways as well...**

    Needless to say i’m at a loss, unless someone replies to this.
    If your still open to suggestions, maybe clarify a bit more in the help file, on how to set up a least 2 items. As of today august 2021, you only have single item drop examples.
    and one final suggestion, I can’t remember which plugin it is, but another I used in the note tag you could specify a range of items I.E. a14-25 would be the enemy could drop any of those items in-between those database ID’s.

    • Anonymous says:

      2 years later …
      To set up more than one drop you must list each drop separately ie
      item_code: “w501”, chance: “50”, </enemy drop>
      item_code: “w502”, chance: “50”, </enemy drop>
      (You can list them like this to save notebox space)

      • Anonymous says:

        rather*

        <enemy drop>item_code: "w501", chance: "50", </enemy drop>
        <enemy drop>item_code: "w502", chance: "50", </enemy drop>

  2. Anonymous says:

    Hello! 🙂

    Just wondering if this plugin has support for variables drop? or this is only for Armor, Weapon & items?
    Trying to make something like “Dark Soul” system, but not exactly the same. Just need “soul” drop for each enemy.

  3. Sundricat says:

    Would it be possible to have conditions for the item drop? For example, you only want to have Slimes drop a Dungeon Key if you either don’t have the key or the prisoner is freed.

  4. Paul says:

    Hi,
    can I use this plugin to control the random dropping out of enemies of GOLD or EXP?
    And how to be with a random amount items? For example I need to get from one enemy dropped out from 20 to 100 identical items in 100% of cases.

  5. wsensor says:

    Sorry this is long T_T

    It would be cool if you could specify drops based on skill/weapon/armor/accessory/class/herochar/element/attacktype used and such. Also a way to effect experience/gold drops too.

    IE: Hunting a monster while using the skill Hunt/Harvest/Poach would give you a chance at the item or a higher chance if it was already a drop
    IE: Using the skill Poach would give a higher chance to get items from the monster but lowers experience

    Also items could increase the chance of something.
    IE: Using a bladed weapon could give you a chance to get more meat but lower the chance to get leather from monsters.
    IE: Being a thief while wearing thief glvoes might get you more gold/items when defeating certain mobs.

    Using a fire spell on a plant monster such as a tree could be set up to give you charcoal at the end of the battle if it is in a burned state or dies to the fire attack.

    Different things like this would be cool to use.

    • Hime says:

      Those are good ideas. I will look into ways to provide drop conditions, as well as ways to change drop rates for specific drops.

Leave a Reply to wsensor Cancel reply

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