[SOLVED] Adding/Removing states based on TP

Folks,

I'm working on a mechanic that manages a state (states) depending on the current TP.

It's like a Limit Breaker that adds buffs/debuffs, hence the states, as it goes up.

So I need constant checks whenever TP is altered (action, damage, items etc.) and for the state to replace the previous one, as they're "same" state but getting better (at 25% the buff is X, at 50% the buff is Y, etc.).

It kinda looks like this:

0-24% = no States, removes States 1-4
25-49% = add State 1, removes States 2-4
50-74% = add State 2, removes States 1, 3, 4
75-99% = add State 3, removes States 1, 2, 4
100% = add State 4, removes States 1-3

The states should be applied instantly as soon as there's any TP alteration.

What's the best way to go about this?
Using a plugin would be easier than battle events IMO, but as I'm not familiar with the VS buffs/states plugin, I'll suggest you wait for someone familiar with it to answer.

If no one does, I could probably throw something together.

And note that doing this with engine defined buffs vs states will be harder.
If you just use states, it should be easy.
Just noting that since you used both terms here.
alternatively, if youre using VS plugins then you could possibly give your actor 4 passive states and set their requirements to their TP being below 25, between 25 and 50, etc
Solved!

alternatively, if youre using VS plugins then you could possibly give your actor 4 passive states and set their requirements to their TP being below 25, between 25 and 50, etc

Yup, that pretty much did the trick. The states automatically replaces themselves since the requirements are all different ranges.

Thank you all very much!
This thread is closed due to being marked solved. Report the next one so we can find it! If you need this one reopened, report it to let us know. Thank you!

Original thread: https://forums.rpgmakerweb.com/threads/solved-adding-removing-states-based-on-tp.175209/