YEP_ExtraEnemyDrops - OR

Hello maker !


I have a question for you.

Is it possible with this plugin to come with an OR system ?

I have a boss, and I want my player to loot one of 3 weapons (1, 2, 3 for exemple). I want to be sure he will drop one, and only one of them.

If I do that :
<Enemy Drops>
Weapon 1: 100%
Weapon 2: 100%
Weapon 3: 100%
<\Enemy Drops>

He will drop the 3 of them.

And If I do that :

<Enemy Drops>
Weapon 1: 33%
Weapon 2: 33%
Weapon 3: 33%
<\Enemy Drops>

He may loot 0, 1, 2 or 3 Weapons.

I there a way to write somethings like :

<Enemy Drops>
Weapon 1 or 2 or 3: 100%
<\Enemy Drops>

And maybe somethings more tricky (a bonus 😉) like :

<Enemy Drops>
Weapon 1 (50%) or 2 (25%) or 3 25%): 100%
<\Enemy Drops>

Anyways, thanks a lot and have a great Making !
I'm guessing this could work :

When battle start, set a variable to a random value between 1, 2 or 3. In the following code I assume variable 1 is set this way. You can set this variable in the troop editor.

Below notetags to parse in the enemy notebox.
Code:
<Conditional Weapon 1 Drop>
   Variable 1 === 1 : +100%
</Conditional Weapon 1 Drop>

<Conditional Weapon 2 Drop>
   Variable 1 === 2: +100%
</Conditional Weapon 2 Drop>

<Conditional Weapon 3 Drop>
   Variable 1 === 3: +100%
</Conditional Weapon 3 Drop>

here you may have 33% chance to drop each.
Adjust weapon ID and variable ID to fit your game.

tell me if it works

Best,

Lay.

Edit : forget to specify that the eval condition give 100%. I've update the code in consequence.
I'm guessing this could work :

When battle start, set a variable to a random value between 1, 2 or 3. In the following code I assume variable 1 is set this way. You can set this variable in the troop editor.

Below notetags to parse in the enemy notebox.
Code:
<Conditional Weapon 1 Drop>
   Variable 1 === 1 : +100%
</Conditional Weapon 1 Drop>

<Conditional Weapon 2 Drop>
   Variable 1 === 2: +100%
</Conditional Weapon 2 Drop>

<Conditional Weapon 3 Drop>
   Variable 1 === 3: +100%
</Conditional Weapon 3 Drop>

here you may have 33% chance to drop each.
Adjust weapon ID and variable ID to fit your game.

tell me if it works

Best,

Lay.

Edit : forget to specify that the eval condition give 100%. I've update the code in consequence.
Hey,

It's odd cause it doesn't work :

Code:
<Enemy Drops>
Weapon 1: 1%
Weapon 2: 1%
Weapon 3: 1%
<\Enemy Drops>

<Conditional Weapon 1 Drop>
   Variable 3 === 1 : +100%
</Conditional Weapon 1 Drop>
<Conditional Weapon 2 Drop>
   Variable 3 === 2 : +100%
</Conditional Weapon 2 Drop>
<Conditional Weapon 3 Drop>
   Variable 3 === 3 : +100%
</Conditional Weapon 3 Drop>

Even if I force the variable to be at 2, nothing happen...
After few trials it seems that the notetag <Enemy Drops> get priority on <Conditional Weapon 1 Drop>.

Just use the notetags as I've proposed in my previous post. I've just tested it in a new rmmv project and it works.

The only issue I have occurs when many of the same monster are in the battle. After victory, they all loot the same item. While it's consistent with code, it's not something we would expect and I hope you just have one monster with random loot in battle.
@Lay

You are right ! It works now. I don't know why, I thought that +100% was an addition to an existing Enemy drop.

I plan to use this system on Unique mob so yeah it will work fine with my project !

Thank you very much for your help !

Original thread: https://forums.rpgmakerweb.com/threads/yep_extraenemydrops-or.120677/