Yanfly's CTB engine with States with "Cannot move" restriction

So I just realized there's an issue with using CTB, and that's with states that are meant to stay active as long as a character has a status. I may need to retool how it's handled but...effectively, I have a character that uses a Song, and as long as she's under the Singing status, the effect of the abilities will stay active. If she's unable to Sing, then the effects are gone. This works...except that because I'm using CTB, if I use Turn End, it makes the status wear off way faster than it should, meaning the Sing status for the Singer ends way too early compared to the effects it gives (so instead of lasting 5 turns, it ends in like 2-3 turns despite it being set to 5 turns), and if I have it set to Action End, it doesn't move at all (because the Singer can't move). What's the workaround for this?

If I need to do quick vids, I can to show what I mean.
Have you tried playing with the Timed States parameter in the Battle Engine Core, making state turns count down per so many ticks rather than from the actual turn? And changing the number of ticks in the Turn Time parameter?
Moved to Plugin Support
I have, but it seems to not work with that. In fact, it never goes down if I set it to be based on Ticks for the Singer. And changing the number of ticks in Turn Time from 100 to 1, just to see what would happen, didn't seem to do much at all.

I'll show some of what I'm doing. First vid is me using Timed States and Buffs at False:



Having it with Ticks seems to actually make it worse in that it wears off even faster than usual. I also don't know how this would affect any of the other states in the game since I'm trying to fix this one. I tested with 1 tick, 60 ticks, and 100 ticks, and they all seem to have the same issue.
You can see from the video what I'm trying to do (regardless of my methods, it seems like that the Sing status wears off of the Singer (Irys in this video) which causes the effects to either not wear off properly from the rest of the party/enemies, or skips parts of the turns and messes up the effects).

The Singing state is set to "Cannot move" restriction with 5 turns and Turn End. All other states that require the Singing state are set to No restriction, 5 turns and Turn End. Once the Singing state wears off, all other states related to it are meant to be immediately dispelled (Turns 1*x battle event set to Turn, with a common event is meant to remove all of these), which it's not doing properly it seems too on top of turns going by way to fast regardless of what I'm doing.
This is a math problem. Let's assume you're using default settings.

One turn is defined as 200 tick or the lowest agility times 8, whichever is smallest.

Per tick, each battler gains the number of points equal to their agility.

One tick is equal to one animation frame while the CTB system runs to get the next active battler.

Each battler requires 7000 points or the highest agility on the battlefield times 120, whichever is highest.

If you're in a battle with a 30 agi slime versus a 60 agi battler, one turn is defined to be 200 ticks. Each character requires 7200 points to act once. Per 200 ticks or "one turn". Your character gets 1.66666 actions. For five turns, your character gets 8.33333 actions.

EDIT: Fixed my math. I hope this gives a lead
For most characters, at level 1 they start with between 20-25 SPD, and at level 99, around 150-200, without any equipment bonuses. Enemies also don't go above 255 SPD normally (with buffs, might be possible). I was using default setting (Turn Based, so both were turned to False, in the Battle Engine Core, never touched the Full Gauge at all in the CTB settings).

It's weird because it's only with this specific thing that I'm having issues with. All of her Songs don't work properly, everything else in the game I think works fine.

Here's another vid to showcase this. I tried setting the Singing state to 2 and leave the Songs at 5 to see if it'd remove it. It DOES...but in a weird way. Also checked with inflicting Instant Death on Irys, and it will remove everything as it should (because I have a Battle Event specifically for if her HP is 0, it'll do all that). The method for when the Sing state is gone can't be done that way in Troops.

For the record, test enemy's speed is 200, Irys' is I think 135. So would the speed be the issue here (or in this case, the Full Gauge or whatever)?




EDIT - Ok, so since I couldn't get this to work, I decided to go with Cooldowns instead for the Songs. Meaning the player will only be able to activate one of the Songs for X turns, but Irys will still be able to act now instead of being frozen during that time (I don't know if that'll make it unbalanced or not???).
So would the speed be the issue here
The issue here is that "one turn" is defined in Yanfly's CTB plugin in a way that it exists independently from the number of turns your battlers perform. If you want your states to behave differently, this plugin is not for you, unless you're willing to completely rewrite its code
Yeah, I'll just do the workaround I have and put these Sing skills into a sublist, and have them all affected by a Cooldown. Thanks for you help though! This was the only real issue I was having so far (and by that extension, I have a feeling that Yanfly's CTB also doesn't allow for multiple actions for enemies, since I tried Action Times +100%, since I was aiming to make bosses start having multiple turns later on. So I guess I'll have to find a workaround for that, IF there is one hue. Maybe it was a bad idea to go CTB?? But I didn't want to go ATB so...guess gotta work with what I got!)
IMO it's one of the best turn systems but the publically-available plugins have many issues and I'm not surprised support was dropped. If devs are not prepared with strong math and programming skills they're in for a lot of headaches
Yeah, it was either go with the ATB plugin (which I already did a ATB game in 2k3), the default (which I heavily considered at first, but wanted more customization with the engine), or CTB (which I decided on since it felt more...unique and tactical, to say the least). So far I haven't had TOO many issues with the CTB engine, just this one and the Action Times + not working (but I hear that thing was finnicky anyways). Maybe a script can be used to do the dual action?? It is moving a bit from the original topic of the thread but...
Yeah, it was either go with the ATB plugin (which I already did a ATB game in 2k3), the default (which I heavily considered at first, but wanted more customization with the engine), or CTB (which I decided on since it felt more...unique and tactical, to say the least). So far I haven't had TOO many issues with the CTB engine, just this one and the Action Times + not working (but I hear that thing was finnicky anyways). Maybe a script can be used to do the dual action?? It is moving a bit from the original topic of the thread but...
Action times+ clashes with CTB because every time an actor uses a skill, their CTB bar is supposed to reset so the battler goes into cooldown before they act again. For bosses that act twice, do they take the cooldown of both skills at once? Still I think it's possible to restore functionality of action times+ if you're willing to accept the double-cooldown I just mentioned, but someone has to be the one to step up and code it into the game, and that someone won't be Yanfly
Yeah, I was only trying it with bosses. I THINK the best way to handle it might be to use the Instant Cast plugin, and see if that works. Or something similar to it.
I think it's a good idea to instead just give bosses a high agility so they act more often. That way bosses aren't given special treatment and they'll be less likely to be perceived as 'cheating'
That is true, yeah. For this boss, I gave it a skill that gave it Protect/Shell/Haste that it uses once every X turns, but for future bosses, will just have to adjust their SPD accordingly.

Original thread: https://forums.rpgmakerweb.com/threads/yanflys-ctb-engine-with-states-with-cannot-move-restriction.165204/