Passive Items

Looking for a way to have an item that has a passive effect when picked up (NOT WHEN USED, ONLY PICKED UP). I have a plugin called ABS Z that has enemies drop loot when destroyed on the map, and I want it such that when you pick up that loot, you get a passive (think of a powerup in pac-man).

The only hits I'm getting on Google are for yanfly's "Skill & States Core" plugin, which is NOT able to produce the effect I want. Many of the powerups I want change variables (which means calling a common event), but no passive state is able to launch a common event.

How would I go about doing this?
if you are using evented enemies, that i as easy as giving the enemy an alternate page that drops the loot but is conditioned to that item.

if you want the effect in random enemies it will be much more difficult to achieve, probably by some troop event checing for the existance of that item.
What about this notetag from VisuStella Skills & States Core?

<JS Passive Condition> condition = $gameParty.numItems($dataItems[123]) > 0; </JS Passive Condition>
I.e. "the passive state is active iff the party has at more than 0 of Item ID 123 in the inventory".
Just to clarify a few of your points:
The only hits I'm getting on Google are for yanfly's "Skill & States Core" plugin, which is NOT able to produce the effect I want.
Even if it were, that's an MV plugin. You want to be careful when researching things because most MV plugins of any complexity aren't compatible with MZ. (some are, and some will work via Project FOSSIL, but then you need to be researching the individual plugin) As caethyril said, VisuStella makes equivalents to many of the Yanfly plugins.

Many of the powerups I want change variables (which means calling a common event), but no passive state is able to launch a common event.
That's not really the case. For one thing, you can absolutely call a common event from anyplace that executes code. For another, you can directly change variables anyplace that you're executing code, so a common event may not be necessary (depending on what else you have going on in there).
if you are using evented enemies, that i as easy as giving the enemy an alternate page that drops the loot but is conditioned to that item.

if you want the effect in random enemies it will be much more difficult to achieve, probably by some troop event checing for the existance of that item.

Interesting. So something like using $gameParty.gainItem and then using conditions to increase the variable? Could you give an example of what that would look like?

I'm not really sure how the item would "drop" though, since it would put it directly into the inventory.

What about this notetag from VisuStella Skills & States Core?

<JS Passive Condition> condition = $gameParty.numItems($dataItems[123]) > 0; </JS Passive Condition>

I.e. "the passive state is active iff the party has at more than 0 of Item ID 123 in the inventory".

I end up doing this, but by using a parallel event that checks every second instead. It's not super-efficient (since it's a parallel event running pretty much at all times) but it's good enough for now I guess. No need for a plugin I suppose.

Those passive conditions do not work when used on items (being held) in the Skills & States Core plugin, sadly.

Just to clarify a few of your points:

Even if it were, that's an MV plugin. You want to be careful when researching things because most MV plugins of any complexity aren't compatible with MZ. (some are, and some will work via Project FOSSIL, but then you need to be researching the individual plugin) As caethyril said, VisuStella makes equivalents to many of the Yanfly plugins.


That's not really the case. For one thing, you can absolutely call a common event from anyplace that executes code. For another, you can directly change variables anyplace that you're executing code, so a common event may not be necessary (depending on what else you have going on in there).

It is not an MV plugin. Source
Probably should have said Visustella instead of Yanfly. I thought they were the same people.

You cannot call a common event from an item being held, as it only has a note tag. The effects only apply on use.



Thank you for the feedback
Those passive conditions do not work when used on items (being held) in the Skills & States Core plugin, sadly.
You don't put them on the item. You put them on the state and then add the state to an actor. When the required item goes into your inventory, the state takes effect. That notetag should solve your issues.
So something like using $gameParty.gainItem and then using conditions to increase the variable? Could you give an example of what that would look like?
no, both of my suggestions were completely without any script or plugin, using only pure eventing.

check the conditions for map event: there is one called "item".
That actually means "item in inventory", which means that this condition triggers as soon as the item is in inventory.

then you make your evented enemy with two almost identical pages: one page with the battle processing but no drop (add item command) after that, and a second page conditioned to that item that has an add item command to simulate the drop after the battle is won.
You cannot call a common event from an item being held, as it only has a note tag. The effects only apply on use.
It depends 100% on when you want the common event to trigger. Across the VisuStella plugins there are many notetags available for states with various triggers. As I said, you can call a common event anyplace you can evaluate code, it has nothing to do with the Effects attached to an item in the database.

You can also pretty easily use passive states in conjunction with parallel events to do this. For example, use the code caethyril provided for the condition for the passive state to be on, then have a parallel event that checks every 30 frames or so for the presence of that passive state and calls the appropriate common event when it's found.

And there's the purely event-driven solution offered by Andar. I think you have a number of good possibilities here.

Original thread: https://forums.rpgmakerweb.com/threads/passive-items.152949/