YEP.47 – Extra Enemy Drops

Yanfly Engine Plugins is a plugin library made for RPG Maker MV, a wonderful piece of software to help you make that role playing game of your dreams. You can find out more about RPG Maker MV here.

You can grab the plugin here:

English Mirror

By default, RPG Maker MV limits enemies to only drop up to 3 items max and at very limited drop rates. This plugin allows you to add more than 3 items at drop. In addition to having more than 3 drops, this plugin also allows you to expand the enemy drops to have conditional drops, drops that will only appear before the player if certain conditions are met.

Extension Plugin – Made by Nekoyoubi – Extra Enemy Drops – Quantities

This extension plugin adds the ability to specify a quantity of a particular item drop within YEP-EED’s standard notetags. This allows you to consolidate loot notes, as well as ensure blocks of items are actually delivered.

Before, if you were to have three notetags that all gave an item, unless each of the notetags for that item was at a 100% rate, you were not guaranteed to receive any number of them when one condition was met. I’ve illustrated this concept with the Daggers below. The two checks were ran independently, so you may have gotten one, both, or neither of the Daggers.


Introduction


Please wait while you are redirected...or Click Here if you do not want to wait.

By default, RPG Maker MV limits enemies to only drop up to 3 items max and at very limited drop rates. This plugin allows you to add more than 3 items at drop. In addition to having more than 3 drops, this plugin also allows you to expand the enemy drops to have conditional drops, drops that will only appear before the player if certain conditions are met.


Generic Drop – Notetags


Use the following notetags to determine extra enemy drops. These drops will drop normally without any special conditions other than having to go through and pass a random number generator.

Enemy Notetags:

<Item x: y%>
<Weapon x: y%>
<Armor x: y%>
Adds item, weapon, or armor ID of x to the enemy’s drop pool with a y% chance of dropping the item. Insert multiples of this notetag to add more drop items for the enemy drop pool.

<Enemy Drops>
Item x: y%
Weapon x: y%
Armor x: y%
</Enemy Drops>
Alternatively, using the above notetag format will allow you to group a large number of enemy drops together. Replace x with the item, weapon, or armor ID to give the item a drop rate of y%.

<Drop Potion: x%>
<Drop Short Sword: x%>
<Drop Feather Cap: x%>
If you prefer to use names instead, you can use the above format for the notetags. This will make the named item have a drop rate of x%. If you have multiple items in your database with the same name, priority will be given to the item with the highest ID in the order of item, weapons, then armors. Insert multiple multiples of this notetag to add more drop items for the enemy drop pool.

<Enemy Drops>
Potion: x%
Short Sword: x%
Feather Cap: x%
</Enemy Drops>
Alternatively, you can write your notetag like such to group together a list of named items. This will make the named item have a drop rate of x%. If you have multiple items in your database with the same name, priority will be given to the item with the highest ID in the order of item, weapons, then armors. Insert multiple multiples of this notetag to add more drop items for the enemy drop pool.


Conditional Drop – Notetags


Sometimes, you want certain conditions to be met before enemies will drop a specific item. These conditional drops would have a 0% chance otherwise. For each condition met, you can increase or decrease the drop rate. Use the below format to create a conditional drop.

Enemy Notetags:

<Conditional Item x Drop>
condition: +y%
condition: -y%
</Conditional Item x Drop>

<Conditional Weapon x Drop>
condition: +y%
condition: -y%
</Conditional Weapon x Drop>

<Conditional Armor x Drop>
condition: +y%
condition: -y%
</Conditional Armor x Drop>
The above notetags will create the conditions for item, weapon, or armor x to drop. Insert various conditions in between the notetags to produce the conditional rate increases or decreases of y% for the drop.

<Conditional Named Drop>
condition: +y%
condition: -y%
</Conditional Named Drop>
If you prefer to name your drop, use the above format. If database entries have matching names, priority will be given to the item with the highest ID in the order of items, weapons, then armor. Insert various conditions in between the notetags to produce the conditional rate increases or decreases for y% for the drop.

The following are various conditions you may use:


ALIVE MEMBERS EVAL
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
This checks the number of alive party members the player has when the drops are being calculated and made and runs it against an eval check.
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Example: Alive Members > 1: +20%
Alive Members === 2: +25%
Alive Members <= 3: -30%


ALWAYS
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
This condition will always pass. This can be used as setting a base rate for the item drop.
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Example: Always: +50%


item x COUNT EVAL
weapon x COUNT EVAL
armor x COUNT EVAL
named item COUNT EVAL
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
This checks the quantity of specific items, weapons, armors, and/or named items you have. If you choose a named item and multiple database entries share the name of that named item, priority will be given to the highest ID in the order of items, weapons, and then armor.
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Example: Item 1 Count > 1: +20%
Weapon 2 Count === 2: +25%
Armor 3 Count <= 3: -30%
Potion Count >= 4: +35%


DEAD MEMBERS EVAL
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
This checks the number of dead party members the player has when the drops are being calculated and made and runs it against an eval check.
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Example: Dead Members > 1: +20%
Dead Members === 2: +25%
Dead Members <= 3: -30%


DEATH TURN EVAL
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
This will run an eval check to compare the turn number the enemy has died. This plugin requires the Battle Engine Core.
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Example: Death Turn > 5: +10%
Death Turn === 5: +20%
Death Turn <= 4: +30%


EVAL code
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
This will run an eval check for the code you’ve inserted. If it returns true then the condition is met.
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Example: Eval user.name() === ‘Bat A’: +30%


LAST STRIKE SKILL X
LAST STRIKE ITEM X
LAST STRIKE named
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
This checks to see if the last strike on the enemy is item x, skill x, or a named action. If a named action is used and multiple database entries share the name of the action, priority will be given to the highest ID in the order of skills then items.
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Example: Last Strike Skill 40: +20%
Last Strike Item 50: -30%
Last Strike Firaga: +40%
Last Strike Ice Bomb: -50%


PARTY MEMBERS EVAL
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
This checks the number of party members (dead or alive) the player has when the drops are being calculated and made and runs it against an eval check.
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Example: Party Members > 1: +20%
Party Members === 2: +25%
Party Members <= 3: -30%


RANDOM X%
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
This condition has a random x% chance to pass.
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Example: Random 20%: +40%
Random 30%: -60%


TIMES ELEMENT X STRUCK EVAL
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
This compares the number of times the enemy has been struck by element x. You can also replace x with the name of the item.
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Example: Times Element Fire Struck > 6: +10%
Times Element 3 Struck === 5: -10%
Times Element Thunder <= 4: +20%


TIMES ITEM X STRUCK EVAL
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
This compares the number of times the enemy has been struck by item x. You can also replace x with the name of the item.
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Example: Times Item Bomb Struck > 6: +10%
Times Item 42 Struck === 5: -10%
Times Item Uni Struck <= 4: +20%


TIMES SKILL X STRUCK EVAL
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
This compares the number of times the enemy has been struck by skill x. You can also replace x with the name of the skill.
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Example: Times Skill Firaga Struck > 6: +10%
Times Skill 40 Struck === 5: -10%
Times Skill Thundaga Struck <= 4: +20%


TIMES STATE X STRUCK EVAL
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
This compares the number of times the enemy has been struck by state x. You can also replace x with the name of the state.
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Example: Times State 4 Struck > 6: +10%
Times State Blind Struck === 5: -10%
Times State Silence Struck <= 4: +20%


TIMES STYPE X STRUCK EVAL
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
This compares the number of times the enemy has been struck by skill type x. You can also replace x with the name of the skill type.
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Example: Times SType 1 Struck > 6: +10%
Times SType Magic Struck === 5: -10%
Times SType Special Struck <= 4: +20%


SWITCH X ON
SWITCH X OFF
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Replace X with a switch ID. If switch X is ON or OFF, the condition is met.
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Example: Switch 5 ON: +10%
Switch 6 OFF: -10%


TURN EVAL
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
This will run an eval check to compare the number of turns the battle has gone on for until the time the drops have been made.
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Example: Turn > 5: +10%
Turn === 5: +20%
Turn <= 4: +30%


VARIABLE X EVAL
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Replace X with a variable ID. This will run an eval check to compare the variable’s value to see if it meets the conditions.
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Example: Variable 5 > 10: +20%
Variable 6 === 11: +25%
Variable 7 <= 12: -30%


Lunatic Mode – New JavaScript Functions~


For those with JavaScript proficiency, you can make use of some of these newly added functions when you do an eval check for the enemy:

enemy.deathTurn()
This will return the turn the enemy died as an integer.

enemy.killer()
This will return the enemy’s killer. If you would like to reference the killer’s HP, it’d be enemy.killer().hp

enemy.lastStruckAction()
This will return either a skill or item that the enemy was last struck with.

enemy.timesStruckSkill(skill ID)
This will return a number value for the number of times it was struck by the skill referenced by the skill ID.

enemy.timesStruckItem(item ID)
This will return a number value for the number of times it was struck by the item referenced by the item ID.

enemy.timesStruckSType(skill type ID)
This will return a number value for the number of times it was struck by skills of the skill type ID.

enemy.timesStruckState(state ID)
This will return a number value for the number of times it was struck by the state referenced by the state ID.

enemy.timesStruckElement(element ID)
This will return a number value for the number of times it was struck by the element referenced by the element ID.


Happy RPG Making!