Fighting game like Stun rates...

I, unfortunately, have no idea where this should go exactly. If it needs to be moved and whatnot, someone please let me know! Basically though, I was wondering if it were at all possible to give everyone (your party and enemies) a hidden "stun rate" stat of sorts. like if they were hit enough, it would cause a dizzy state. I thought about hidden variables, but that would require giving everyone a number. I could see that becoming an issue as far as how attacks get each enemy to that number, mainly because I don't know how to hit check. I had that problem when I was trying to make a combo system of sorts. I couldn't figure out how to get it to check if the hits landed. I could see this being an issue here too.

If anyone is confused about how this would work (who doesn't play fighting games), then think the Final Fantasy 13 break system. If anyone can offer any suggestions, that'd be greatly appreciated. And again, sorry if this is in the wrong place!
When I release my Health plugin, there's a very good chance that this will be able to do the trick. This plugin will allow you to create an unlimited number of extra HP stats for your characters and enemies and apply states to anyone who falls with a certain range of HP.

Seems like having a Stun HP bar that fills up or drains when hit and then applies a Stun state for a round or two would be a perfect use case for my newest plugin when it's released.
Hello there!

I think I got what you want. You'll need Yanfly's Buff and State core as well as the Auto Passive states plugin. Basically you'll need to create a new state and paste this on its notetag:

<Custom React Effect>

if (value > 0 && this.isPhysical() && user.enemy()) {

target.addStateCounter(stateID, 25);

target.clampStateCounter(stateID, 0, Your threshold);

}

</Custom React Effect>

<Custom React Effect>

if (value > 0 && this.isMagical() && user.enemy()) {

target.addStateCounter(stateID, 25);

target.clampStateCounter(stateID, 0, Your threshold);

}

</Custom React Effect>



<Custom Deselect Effect>

if (target.getStateCounter(stateID) >= Your threshold) {

target.removeStateCounter(stateID);

target.addState(Your stun state id);

}

</Custom Deselect Effect>

So the Red number is the stun state you want to apply when actor's "hit meter" hits 100. The Green number shows how much will each damage tick fill the "hit meter", and when it reaches the Purple number, your stun state will be applied to the actor. If you want it to be filled in four hits, Green should be 25 and Purple 100. The stateID should be the same as the one you pasted this notetag in. To finish, the last you think you need to make this work is to give the notetag <Passive State: stateID> to each actor you want to have this feature.

There is probably a cleaner way to write those conditionals but it's my best shot at it 😅. I hope it works for you and you can davance with your project. Any problem contact me, i'll try my best to fix it :ahappy:.
Oh wow thanks! I'm going to set this up as soon as I can. I can't believe I forgot about just making these passive states. That actually makes a lot of sense. As I said, I'll try to set this up as soon as I can to see how it plays out. Thanks again!

Original thread: https://forums.rpgmakerweb.com/threads/fighting-game-like-stun-rates.94177/