Drop Items Conditions

Musashi

Veteran
Veteran
Joined
Oct 30, 2012
Messages
137
Reaction score
210
First Language
Portuguese
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>
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,230
Reaction score
3,079
First Language
English
Might be wrong pastebin link
 

Sombracier

Villager
Member
Joined
Oct 2, 2015
Messages
6
Reaction score
1
First Language
French
Primarily Uses
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 ?
 

Musashi

Veteran
Veteran
Joined
Oct 30, 2012
Messages
137
Reaction score
210
First Language
Portuguese
@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
 

Sombracier

Villager
Member
Joined
Oct 2, 2015
Messages
6
Reaction score
1
First Language
French
Primarily Uses
@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 ?
 

Musashi

Veteran
Veteran
Joined
Oct 30, 2012
Messages
137
Reaction score
210
First Language
Portuguese
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
 
Last edited by a moderator:

Joronjo

Veteran
Veteran
Joined
Sep 17, 2015
Messages
155
Reaction score
29
First Language
English Spanish
Primarily Uses
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?
 

Musashi

Veteran
Veteran
Joined
Oct 30, 2012
Messages
137
Reaction score
210
First Language
Portuguese
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
 

Joronjo

Veteran
Veteran
Joined
Sep 17, 2015
Messages
155
Reaction score
29
First Language
English Spanish
Primarily Uses
Wow! You're awesome!
 

kodysun17

Villager
Member
Joined
Apr 8, 2015
Messages
6
Reaction score
0
First Language
Portuguese
Primarily Uses
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.
 

Musashi

Veteran
Veteran
Joined
Oct 30, 2012
Messages
137
Reaction score
210
First Language
Portuguese
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
 

RK DracoRoy

Fire Emblem RPG Gamer
Veteran
Joined
Jun 29, 2017
Messages
161
Reaction score
20
First Language
English
Primarily Uses
RMMV
@Musashi Are you taking plug-in suggestions at the moment?
 

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

Latest Threads

Latest Profile Posts

Who shares/sells their scripts/plugins on itch.io? Can I pick your brain?
If you ever need fantasy names and you're bored, make a fictional alphabet. Switch around the letters and see what you get :p
I JUST GOT PROMOTED TO 9TH GRADE BOIS!
On a scale of one to I just drew a pineapple with hairy legs how bored are you today?

Forum statistics

Threads
98,168
Messages
949,905
Members
129,453
Latest member
tanzx
Top