In battles, is it possible to remove a status effect if the character changes equipment?
Remove status effect with equipment change
RPG Maker MV SupportBump, still need help 🙂
The question is a bit vague. Do you want all status effects to go away anytime a character removes any piece of equipment? Do you want something more specific, like a certain helmet that prevents blindness? You need to give as many details as you can for someone to help you.
The answer is probably yes, with Yanfly's Passive States.
The answer is probably yes, with Yanfly's Passive States.
Yes
How does it work? I checked the page, it says Passive States plugin can add a status effect but it doesn't mention anything about removing it.
To remove a status effect from someone, you just give them a state that grants resistance to whatever other states you want. Look at the default state Immortal for an example.
That would make it very easy to make equipment that gives immunity to whatever states you want. The trickier part would be to do the first thing you said, make all states disappear when you change any equipment (why on earth do you want to do that, anyway?).
I'm not sure of a simple way to approach that off the top of my head. I think you'd have to modify the code in equipping items so that every time it's run, it checks the actor for any states and removes them.
That would make it very easy to make equipment that gives immunity to whatever states you want. The trickier part would be to do the first thing you said, make all states disappear when you change any equipment (why on earth do you want to do that, anyway?).
I'm not sure of a simple way to approach that off the top of my head. I think you'd have to modify the code in equipping items so that every time it's run, it checks the actor for any states and removes them.
Original thread: https://forums.rpgmakerweb.com/threads/remove-status-effect-with-equipment-change.130499/