Extra Enemy Drops

Hi, my question is if you can do the following with Yanfly's Extra Enemy Drops


It is posible to set the item drops acording to the player’s lvl?


Example: if player is lvl 20 < you get item X


But if player is lvl 21 > you get item Y


Also, It is possible to set a "loot table"? Lets say that an enemy can drop a certain amount of items. What I'm trying to do is that the maximun you can get is one of each.


Example: if an enemy loot table have 10 items, which includes several armors and weapons, you can get only 1 armor and 1 weapon, so the probabilities doesn't calculate for each item.
Maximum 1 of each item type, replace Item with Weapon, Armor for the others. You'll also have to replace the 1 with each item number from the drop table.


Unfortunately the only way to do this is to read the count from your inventory, not from the battle drops. So if you own 1 of any of these items, they'll never drop again until you get rid of one. I can't see another way around it with just note tags.

Code:
<Conditional Item 1 Drop>
Item 1 Count === 1: -100%
</Conditional Item 1 Drop>



Level requirement, not sure if this one will work, but if it does, it will cause Item X to never drop when you're level 21 or over.


You'll have to replace the [id] tag with the player's ID. For an entire team you'd have to find a way to add up all their levels then average it in a variable and pull that. Good luck!

Code:
<Conditional Item x Drop>
Eval $game_actors[id].level > 20: -100%
</Conditional Item x Drop>
Maximum 1 of each item type, replace Item with Weapon, Armor for the others. You'll also have to replace the 1 with each item number from the drop table.


Unfortunately the only way to do this is to read the count from your inventory, not from the battle drops. So if you own 1 of any of these items, they'll never drop again until you get rid of one. I can't see another way around it with just note tags.

Code:
<Conditional Item 1 Drop>
Item 1 Count === 1: -100%
</Conditional Item 1 Drop>



Level requirement, not sure if this one will work, but if it does, it will cause Item X to never drop when you're level 21 or over.


You'll have to replace the [id] tag with the player's ID. For an entire team you'd have to find a way to add up all their levels then average it in a variable and pull that. Good luck!

Code:
<Conditional Item x Drop>
Eval $game_actors[id].level > 20: -100%
</Conditional Item x Drop>

Hi, Thanks for your answer, but unfortunately it isn't what i'm looking for, I'll try to put a better example:


In MMOs (Like WoW) when you kill a Boss, that boss has an amount of items that can be droped, lets say 10, but from those 10 items, only 2 will drop for each kill. I'm trying to do something like this.


As for the lvl requirements, I doesn't work for me, I'm having this error

Captura_de_pantalla_2016-08-02_18.12.38.png
Did you define $game.Actors? You have to replace the [ID] with something like [1] or [2] depending on which actor you want.


If that doesn't work I might have given you the wrong script call, I'm fairly new to javascript myself. 🙂
I think what you're going to want to do for a raid boss style drop table is make a common event you can call after the battle that goes through the drop chances one by one.

Code:
If Variable "ItemsDropped" == 2: (leave blank, kill script)
	Else:
	Set Variable "DropChance" to random number between 1 and 100.
	If "DropChance" > 90
    	add Item x1 to inventory
        add +1 to Variable "ItemsDropped".
    Else: continue to next item.



This would give you an item with a 10% drop chance. To raise or lower it, just change that 90 around. This way you can go through the entire drop table, and if two items have been dropped, it'll kill the script. Put the rarer items later in the script with the more common ones first.
I recommend this plugin for automation of these types of drops: http://sumrndm.site/enemy-bulk-drops/


It works very well, and is extremely flexible.

Original thread: https://forums.rpgmakerweb.com/threads/extra-enemy-drops.66211/