Yanfly Battle Engine STB - what user variable options do I have for action speed?

Hi all,

I'm using Yanfly Battle System STB which allows me to define a formula used for action speed. By default they use AGI, but I need to do something different with it.

I think I may have finally figured out how to get it to do what I want (run a script to randomly set the value of a certain Parameter separately for each actor at the start of a battle, and then have that plugin use that value for the action speed), but I've hit a problem.

I want to use CRI for that value (since it's been freed up for my use via plugins and isn't actually affecting my critical chance), but for some reason if I set an Ex-Parameter as the action speed value, it makes the battle lag like crazy. (I've tried it on Sp-Parameters and they have the same problem.) I don't know why the plugin can access Parameters just fine, but huff and puffs getting those Ex-Parameters to go, but I don't know that there's anything I can do about that. Setting the action speed to a variable (such as $gameVariables.value(1)) doesn't slow down the performance like an Ex-Parameter, but it is also completely useless since the value will be the same for everyone. I need some way to reference X in that action speed formula, where X will be different for each battler.

So, as an alternative, does anyone know of any other way (standard function, plugin that exists, couple lines of code, etc) to have some sort of value that functions like a Parameter--ie, every actor and enemy possesses their own value for it? Hopefully there is some other way to get access to that sort of functionality so I can see if the plugin will accept it for action speed.

Thanks all!
Try multiplying the x/sp param by 100 first before using them instead of as-is..

x/sp sp params are percentages so they are between 0.00 and 1.00 which means the intervals for the speed will be super small which could mean that the battle system is trying to handle things way too fast which in turn causes the lag.

Like for example, a value of 10 for Agi is 10, while a value of 10 for Cri is actually just 0.10
I actually had a similar thought and tried that one and thought it worked at first...then I realized I had just forgotten to save before running a battle test (I run regular playtests too), so it wasn't using the setting. After I saved it had the same problem.
Try it in game not battletest. The way battletest does things does not properly handle plugins
It doesn't work in game either. I try both.
If multiplying the value by 100 doesn't solve it, the only other possible thing is that your game somehow has a lot of processing done when caling x/sp params which causes the lag when you use them, though I kinda doubt it...

Anyway, out of curiosity, what was the formulas that you've tried so far?
I'm not really sure what would be causing it. I'm wanting to use CRIT, because that Ex-Parameter isn't doing anything else (I've removed it from the critical formulas in Yanfly Critical Control, and verified by adding CRIT+ Traits and seeing that they have no effect on my critical rate.)

The base formula for CRIT is just the default one in Yanfly Ex-Parameter Formula (which means there is no change from default unless you specifically make changes).

What I've tried in the Action Speed formula includes:
cri
cri * 100
(cri * 100)

I also tried it with CEV (which I'm likewise not using for anything), as well as GRD and got the exact same issues.

I can put in any Base Parameter and it works just fine. The default in the field is:
agi

So, I'm not sure what I could be doing that would be causing problems in evaluating Ex-Parameters/Sp-Parameters.
Whats the value of your cri and agi as well? It can still be a case of the cri value being too low compared to what you've tried with your agi.. You can maybe try to scale your cri based speed to have about the same value as when you are using Agi and see if the lags still happen
The baseline value I use for agi in testing is 10-20. Setting the cri value to it's max of 1000% doesn't do anything to fix it. 😕
Wait... hmmm.. can you actually try to use a direct decimal value and see if it also lags? Like put 100.0 in the plugin instead of agi or crit.
Nope, no problems with a flat value with a decimal in it.
So the problem is really somewhere during the call to the x/sp params, not because they are decimals... You'd probably need to run a trace to the x/sp param call sequence to determine the problem..

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-battle-engine-stb-what-user-variable-options-do-i-have-for-action-speed.107254/