MV Temporarily disable damage pop ups while under a state

Hi all,

I’m trying to make a state with yanfly buffs and states core that would work like this: while a character is invisible they regenerate a little health. I have this all working correctly but the only thing I’d like to do, is not show the healing pop up numbers on the invisible character. Is there some sort of script I can apply to the “custom regenerate effect” to disable damage pop ups?

An additional note is that if I change hp through the troop commands it works how I’d like it to. But to have to set up a whole regen effect in every single troop in my game would be a really cumbersome work around. As well as yanflys action sequences has an option to display or not display pop ups on how changes. So I would imagine there has got to be a way. As always any help is greatly appreciated.
Unfortunately for you the Yanfly's buffs and states core has the starting of the damage popup hardcoded for regenerate effects. You could try modifying it though.
Open the plugin with a text editor and find the Game_Battler.prototype.regenerateStateEffects function. In the last line of the function, add something to the if condition:
Code:
//This part is already there
//                      | insert this
//                      | |
if ($gameParty.inBattle() && stateId != invisibleStateId) //do stuff; don't change that
Replace invisibleStateId with the ID of your invisible state.

Edit: As a side note, if you ever find yourself wishing there would be an easy way to add an event to every troop, well there is:
Unfortunately for you the Yanfly's buffs and states core has the starting of the damage popup hardcoded for regenerate effects. You could try modifying it though.
Open the plugin with a text editor and find the Game_Battler.prototype.regenerateStateEffects function. In the last line of the function, add something to the if condition:
Code:
//This part is already there
//                      | insert this
//                      | |
if ($gameParty.inBattle() && stateId != invisibleStateId) //do stuff; don't change that
Replace invisibleStateId with the ID of your invisible state.

Edit: As a side note, if you ever find yourself wishing there would be an easy way to add an event to every troop, well there is:
Thank you so much, this worked perfectly.

Original thread: https://forums.rpgmakerweb.com/threads/temporarily-disable-damage-pop-ups-while-under-a-state.150941/