MV YEP ATB (or CTB) and stat remove

Hi, I'm using Yanfly ATB's tick-based combat system, and I had a question about updating statuses :

It's a well-known problem, but when you use the ATB system, you always have to add +1 turn for your character to benefit from the buff for the duration you're really interested in. For example, you need to set the Guard to 2 turns, otherwise it won't protect you.

No worries there.

However, it's the moment when the status is updated that bothers me a little more: the guard is removed AFTER your action and not before.

So in chronological order:

- it's your turn
- you cast guard
- it's other battlers turn
- your ATB recharges and reaches full
(here, the guard should stop) <==
- you cast a new skill (it doesn't matter which one)
And then, garde is removed after using your skill... but before recharging the ATB.
So in combat, it's not “big problem” in the sense that you don't take damage DURING your action (although you could imagine special skills) but it's not consistent...

I tried with tags based on <custom turn start> or other with the few elements I found on the forum, but no answer, nothing works and the status always remains until the end of execution of the new command, not before.
if anyone has solved the problem (either on Yanfly's CTB or ATB ), please don't hesitate to come and help me.

Thank you !
I tried with tags based on <custom turn start> or other with the few elements I found on the forum, but no answer, nothing works and the status always remains until the end of execution of the new command, not before.
try this
Code:
<Custom Action Start Effect>
user.removeState(stateId);
</Custom Action Start Effect>
try this
Code:
<Custom Action Start Effect>
user.removeState(stateId);
</Custom Action Start Effect>
Hi @Robro33

it worked, the guard ends before the character action (but after the command choice)

Thanks for your help !

I have the same problem with turn actualisation, but with YEP Absorption barrier plugin:

On my mage, I use Weapon Unleash on his staff to replace the guard with a barrier that absorbs a certain amount of damage. I make it last one turn so that it deactivates right after, but the barrier ends AFTER my action, so that if I do another barrier right after, for a few frames it has 2x the barrier. So once again, it doesn't change the combat itself, but aesthetically it's weird to have the double barrière for 0.5 seconds.

EDIT :
to get around this problem, for each different shield, I've created a state that will delete the shield of that same value with a tag
<Custom Action Start Effect>
user.loseBarrier(user.level * user.mdf / 4)
</Custom Action Start Effect>


skill note :

1726302580579.png


stat note (linked to this skill)

1726302859220.png


but, the game plays an animation like I'm taking damage on the barrier, I just want it to dissipate
(= I would just like to remove the barrier, by applying the formula but without displaying the value on the character).
I couldn't do it with a more elaborate formula, maybe.
1726303801429.png
i havent used the plugin, but after looking inside it, it seems that theres no way to deplete the barrier and not play the animation without modifying the plugin.

something you can try is to remove the animation from the plugin parameters and give the barrier state a remove effect to play the animation instead. from there, you can have your barrier removal state put a property on the battler before removing the barrier and make the barrier animation play only if they dont have that property

Original thread: https://forums.rpgmakerweb.com/threads/yep-atb-or-ctb-and-stat-remove.171872/