oriongates

Veteran
Veteran
Joined
Dec 26, 2019
Messages
204
Reaction score
55
First Language
english
Primarily Uses
RMMV
Is there any plugin for MZ that can run a common event when a piece of gear is added or removed? Sort of like Hime's plugin for MV?

I'm trying to set up a persistent ammunition system for my game and unfortunately I can't think of any way to get it to work without calling a common event when a weapon is added/removed.
 

oriongates

Veteran
Veteran
Joined
Dec 26, 2019
Messages
204
Reaction score
55
First Language
english
Primarily Uses
RMMV
Hmm...sadly I don't think that'll work.

This system would involve replacing MP with an ammo counter and using the common event to adjust the player's MP to match the new weapon. If it doesn't change until after the menu closes that could screw things up if the player tries to change weapons more than once or reload.
 

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
872
Reaction score
554
First Language
English
Primarily Uses
RMMV
Hmm...sadly I don't think that'll work.

This system would involve replacing MP with an ammo counter and using the common event to adjust the player's MP to match the new weapon. If it doesn't change until after the menu closes that could screw things up if the player tries to change weapons more than once or reload.
Common events cannot play in the menu. Any plugin that calls a common event needs to close the menu to do so. You can see this when you use an item that has a common event on it, the menu closes to play the common event. I'm not sure if the act of the menu closing to run the event is default functionality, or if it was added by YEP_ItemCore, but in either case, the common event doesn't happen unless the menu is closed.

What you're looking for is something like @waynee95 's custom on equip eval plugin., which allows you to run a script when an item is equipped.
 

oriongates

Veteran
Veteran
Joined
Dec 26, 2019
Messages
204
Reaction score
55
First Language
english
Primarily Uses
RMMV
That's odd, I've found a few MV-era plugins that claim they work in the menu. But I'm fine with whatever method works, so I'd be fine with the second option, if there was a version available for MZ.
 

Latest Threads

Latest Profile Posts

I once thought about a boss gauntled game. I actually did it.
Stream will be live shortly with some Gex 3! Feel free to drop by!
Snippet from a game I'm working on. Not much happening here. Mostly look at atmosphere. May upload a longer version. Still need to make up some enemy arts.
Been slightly struggling with developing the latest chapter, I think I will downscale my ambitions and make it more linear.

Forum statistics

Threads
109,057
Messages
1,041,689
Members
141,544
Latest member
spacewaxamerica
Top