Extra Enemy Drops

Cyberfox

Villager
Member
Joined
May 23, 2015
Messages
9
Reaction score
0
First Language
Spanish
Primarily Uses
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.
 

Sketchward

Veteran
Veteran
Joined
Jul 26, 2016
Messages
111
Reaction score
8
First Language
English
Primarily Uses
RMMV
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>
 

Cyberfox

Villager
Member
Joined
May 23, 2015
Messages
9
Reaction score
0
First Language
Spanish
Primarily Uses
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
 

Sketchward

Veteran
Veteran
Joined
Jul 26, 2016
Messages
111
Reaction score
8
First Language
English
Primarily Uses
RMMV
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. :)
 

Sketchward

Veteran
Veteran
Joined
Jul 26, 2016
Messages
111
Reaction score
8
First Language
English
Primarily Uses
RMMV
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.
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.

Forum statistics

Threads
105,868
Messages
1,017,085
Members
137,584
Latest member
Faustus2501
Top