Messin' with turn orders with YEP Battle System STB

I like this battle system a lot more than the default, but one thing I can't get working right is randomness in the turn order.

What I'm trying to get is either:

1) There is a random determination of turn order at the beginning of the fight, which then remains constant throughout the battle.
or
2) There is a random determination of turn order at the beginning of each turn, that lasts until the next turn starts.

What is actually happening is that the turn order changes randomly after each action.*

Here is the formula I'm using in the plugin's "Action Speed":

Math.floor((user.agi-10)/2) + Math.randomInt(20) + 1

That's the formula I want (unless the last part isn't actually giving me a number between 1-20 inclusive, in which case that's what I'd like it to do), and tests based on the initial random order indicate it is functioning correctly. It's just that it shouldn't be functioning every time an action happens or more.

Does anyone know how to fix this?

* Sometimes it happens when a character selects a target, in addition to the normal change for their action!
Because that's how the plugin is built.
After every person action,the formula will update it self. So let's say at the begin of turn 1 the order is:
Enemy A
Battler B
Battler A
Enemy B

Depending on what Enemy A does to anyone after them, it can change their position, like say raising Enemy B agility up and thus make them faster. On top of that, the formula you have will just update after every action taken.
Thanks.

Yeah, I don't see any way to change that behavior inside the plugin itself. What *might* work is if I setup the formula to use a value (instead of the random factor) that each actor or enemy has a unique one of, but can be called on with a single formula. Since I'm not using the Guard functionality, I can probably use that ex-parameter for this purpose (including it in the Action Speed formula in the plugin), unless I run into some unforeseen side-effect. If I set up an event that runs at the beginning of a battle (or at the beginning of each turn) I can cause that event to determine a random number and assign it to the guard ex-parameter for each actor. I'm not quite sure how to do that for each enemy, but that will need to be done also (or at least one random number that all the enemies can share).

I've moved this thread to Plug-in Support. Thank you.



The easiest fix is to remove the random variable, because with that the turn order will be random as you told it to be well, random. There's no other good fix for it.
Let me give a better description of what I'm trying to do, because I really think it can work.

I want each participant in the battle to add the random factor to their place in the turn order once at the beginning of battle. From that point forward there is a set sequence in which they act that repeats every turn. Because I use the plugin that lets you visually see what that order is with icons, you can plan actions around it and such.

It sounds like I wasn't missing any setting in the plugin itself that would make it work, but I was hoping an event plus the plugin would work.

Here is my current idea. I have freed up the grd sp-parameter for use. So I can make the formula look something like:

Code:
Math.floor((user.agi-10)/2) + user.grd

Then, at the beginning of each battle, I have a troop event run that sets the individual values of each participant's grd to "Math.randomInt(20) + 1".

Now the random number that the plugin (and hence the battle system in general) is referring to is a number that is static throughout the battle, but that is randomly determined anew for each battle.

That has to be doable, and it seems like it would be easy. But then I discovered that events don't let you assign values to sp-parameters. Even once that is doable, I'm still not sure how to apply a random number to each enemy in the battle.

So I guess I'd need some sort of script to pull this off that is probably really easy but exceeds my capabilities.

Original thread: https://forums.rpgmakerweb.com/threads/messin-with-turn-orders-with-yep-battle-system-stb.105821/