Musashi

Veteran
Veteran
Joined
Oct 30, 2012
Messages
150
Reaction score
261
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,564
Reaction score
3,893
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
150
Reaction score
261
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
150
Reaction score
261
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
30
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
150
Reaction score
261
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
30
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
150
Reaction score
261
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
331
Reaction score
115
First Language
English
Primarily Uses
RMMV
@Musashi Are you taking plug-in suggestions at the moment?
 

Latest Threads

Latest Profile Posts

I just successfully tested having events check if specific actors are in a particular party slot and then changing image to match. This will let me make scenes take into account who is in the party at the time and arrange them accordingly - this is important since I'll have extra actors beyond current party. The script used is the same from MV and is compatible with my current core plugin setup in MZ. Thank goodness.
That awkward moment when you're talking about thinking about writing a limited shop stock plugin for MZ and then find out you already wrote one...last May. My memory is so bad.
When I open my project and I'm like, hell yeah.
Some drawings I made in Lapis, one day I intend to involve them in some RPG Maker project.
* maybe two wall frames
*or some sprite flower tiara, or maybe it inspires someone to do something.
bdd19b62e539d17b3b00cc3d63034f7d.jpg

fcca5c8471b34483da8e032cfe579275.jpg
Step by step, I am coming back.

memorial.png

Forum statistics

Threads
118,422
Messages
1,115,839
Members
155,375
Latest member
CrazyCream
Top