Drown State

I've created a Drown State which encases the actor in a water sphere. It causes damage over time and is dispelled by attacking the actor to burst the bubble.

It seemed to work, but I wanted to give it a bit of flavour buy adding a drowning sound effect every turn the state is active. I had the sound effect encased in encased in a <Custom Regeneration Effect> notetag in the State, advice I found online, but it doesn't seem to work. I put in a console.log in the notetag and it wasn't being called. Further digging seems to indicate <Custom Regeneration Effect> doesn't exist in my VisuStella MZ plugins.

What is the best way to run a piece of code each time a state is active, especially a slip damage one? I have the VisuStella 8-Waves collection if that helps.

1752370967353.png

1752370785780.png
I believe you'll want to use one of the following notetags from the VS Battle Core to achieve the effect you want.

<JS Pre-Regenerate>
code
code
code
</JS Pre-Regenerate>

<JS Post-Regenerate>
code
code
code
</JS Post-Regenerate>

Pre-Regenerate runs before your regen effect happens, while Post-Regenerate will run right after.
Jut to add in, <Custom Regeneration Effect> is the tag for Yanfly's buff and states core plugin on MV. When youre unsure of what you need to make a plugin work, always check its help file. visustella's battle core doesnt mention having that notetag and provides the ones mentioned above in its place.
I believe you'll want to use one of the following notetags from the VS Battle Core to achieve the effect you want.

<JS Pre-Regenerate>
code
code
code
</JS Pre-Regenerate>

<JS Post-Regenerate>
code
code
code
</JS Post-Regenerate>

Pre-Regenerate runs before your regen effect happens, while Post-Regenerate will run right after.
Thanks, that worked a treat
Jut to add in, <Custom Regeneration Effect> is the tag for Yanfly's buff and states core plugin on MV. When youre unsure of what you need to make a plugin work, always check its help file. visustella's battle core doesnt mention having that notetag and provides the ones mentioned above in its place.
I got my bad advice from Copilot. I actually did look up the documentation and found no mention of <Custom Regeneration Effect> in any MZ plugins, and told Copilot; it hallucinated a response saying it was a hidden feature of the RPG Maker MZ Engine itself 🙄
This is why we have forums 🙂
The A.I. gave you made up info? Oh no! Who would've thought!
This is why we have forums 🙂
No, this is why you don't use A.I..
:rtea:

Original thread: https://forums.rpgmakerweb.com/threads/drown-state.178882/