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.
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:
- You can specify more drops
- 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!
Plugin: download here (right click, save as)
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.
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:
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
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.
<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.