Is there a way to force state cooldowns to tick by 1?

What I mean is, I'm using an ATB script in my game and this has led to a few issues, one of which has been solved but the state cooldowns aren't updating. Well sometimes they do but its random and I can't have states lasting forever. Is there a script snippet or something I can do so that once a character takes ANY ACTION all their state cooldowns tick down by one?
Are you using "action" auto-removal timing?
Yes, due to the nature of the atb script, i thought it more useful than turn based but that doesn't even work.
You can call the "update_state_turns" method for a battler to reduce the remaining turns for all of a battler's states by 1.  Call it with the script command: (battler reference).update_state_turns

This will call the following method:

  #--------------------------------------------------------------------------  # * Update State Turn Count  #--------------------------------------------------------------------------  def update_state_turns    states.each do |state|      @state_turns[state.id] -= 1 if @state_turns[state.id] > 0    end  endIf you need to only reduce a certain state's length by one turn, I think you would use (battler reference).state_turns[state ID number] -= 1 but I'm not sure whether you'd need to add an attr_accessor to Game_BattlerBase for the state_turns property.

It's possible that this won't work because the script overwrote some method made for stats turns.  You should post a link to the script here if it's publicly available, and if not, at least show us what it's doing in the Game_Battler class.
I've moved this thread to RGSSx Script support. Please be sure to post your threads in the correct forum next time. Thank you.


Please post a link to the script(s) you are using. We can't guess at how they've implemented them.

Original thread: https://forums.rpgmakerweb.com/threads/is-there-a-way-to-force-state-cooldowns-to-tick-by-1.35436/