Drop Items Conditions

Drop Items Conditions v1.03​
Musashii​
Introduction:
Allows you to define conditions for certain items to drop using formulas.
 
How to Use:
Use the notetag <DropRestriction: formula> inside Items, Weapons or Armors notes.

You can also change/set/cancel drop conditions for determined enemies using the notetags:

<CancelRestriction: itemId> and <ChangeRestriction:itemId,NewFormula>

Here are some examples of what can be done:

<DropRestriction: $gameParty.isAnyMemberEquipped($dataWeapons[1])>Item can drop only if any party member have the first weapon in the database equipped.

<DropRestriction: 100 < $gameVariables.value(1)>Can drop if variable 1 is greater than 100. 

*Be aware that you can't use the "greater than" (>) comparison operator inside the notetag or it'll close it, use the "less than" (<) instead.



You can learn more about how to write your own codes here:

http://forums.rpgmakerweb.com/index.php?/topic/46456-rpg-maker-mv-script-call-list/

Plugin:
http://pastebin.com/5WQQvR4K
 
Terms of Use:
Free for commercial and non-commercial use.
 
Credit and Thanks:
- Musashii
- Not necessary but appreciated.

Changelog:

Version 1.03:

  - New 'killed by element' code to use in your conditions.

Version 1.02:

  - Enemies can now set/change item drop conditions for themselves.

Version 1.01:

  - Added option to cancel specified item drop restrictions for certain enemies using the notetag <CancelRestriction: itemId>
Might be wrong pastebin link
Fixed it, thanks Tsukihime  🙂
Use the notetag <DropRestriction: formula> inside Items, Weapons or Armors notes.
Not inside monsters notes ?

I mean, if I want a bat have a conditional drop for his bat fang but later in game a super bat have this fang to common drop, it's impossible ?
@Sombracier Done! Download the new version and use the  note <CancelRestriction: itemId> inside monsters to cancel item restrictions.

Drop Items Conditions v1.01

- Added option to cancel specified item drop restrictions for certain enemies using the notetag <CancelRestriction: itemId>

Plugin:

http://pastebin.com/5WQQvR4K
@Musashi

Thanks a lot, it will be very helpful for me.

I have an another question :

I have 3 bats (yeah, I'm very inspired for my example  🙂   ) :

- Fire bat (drop : bat fang (conditional drop : killed by ice skill))

- Ice bat (drop : bat fang (conditional drop : killed by fire skill))

- Super bat (drop bat fang (common drop))

It is possible ?
OK, now enemies can change formulas or add them using the notetag <ChangeRestriction:itemId,NewFormula>

For now you can't use this tag multiple times in the same enemy for items with the same ID (like using one to change formula for weapon(1) and another for item(1). I don't think this is necessary, but maybe I'll change this later. Glad it's being helpful Sombracier  🙂

Drop Items Conditions v1.02

- Enemies can now set/change item drop conditions for themselves.

Plugin:

http://pastebin.com/5WQQvR4K
Can this be used to check for things like last element/damage used. Like for example, if i wanted it so that if i kill a cockatrice with a Fire spell it will drop "fried chicken", would it be possible with this plugin?
It's possible now @Joronjo =D Download the new version and follow the instructions:

Drop Items Conditions v1.03

- Check if enemies were killed by specific elements using ElementId(id) inside formulas.

Plugin:

http://pastebin.com/5WQQvR4K
Wow! You're awesome!
Can I use this plugin to get a drop if the enemy is killed when it's under a certain state?

For example: I cast a skill that aplly the "Bônus item" state, and when the enemy is killed under this state, I get the item.

Is that possible?

Sorry, bad english.

I really like your plugin! Thank you.
You can check for a state using:

<DropRestriction: this.isStateAffected(id)>

The problem is that states are cleared on death, so the only state a enemy will have is 'Knockout'. You'll need a plugin to retain states on death for enemies, try this one:

http://pastebin.com/P3Ce7qJj
@Musashi Are you taking plug-in suggestions at the moment?

Original thread: https://forums.rpgmakerweb.com/threads/drop-items-conditions.49513/