STB Battle System initiative\agi issue

The issue is simple, really.
I'm using YEP STB plugin.
http://www.yanfly.moe/wiki/Battle_System_-_STB_(YEP)

I have my agi between 1 and 10, and similar for actor and enemy. So, for example, the first turn would be agi 10 Enemy Leader and agi 10 Hero leader. Then agi 8 sidekick and so on. But if characters have equal agi, then actors always made their turn first.
I made my action speed parameter "agi + Math.randomInt(2)"
So I want to make a small difference - so that it may be first actor or first enemy - and different from turn to turn.

And it should work great. But for some reason, it cheks agi EVERY action, not turn.

For example, I have turn:

Enemy
Hero
Hero Sidekick
Enemy Sidekick

The enemy makes his move, and somehow turn changes.
Hero
Enemy Sidekick
Hero Sidekick

Another action - and another change.
Hero Sidekick
Enemy Sidekick
So it rolls initiative not for once for the turn, but after EVERY action. And it kills all possible tactics at once. How could somebody plan something if you don't know whose turn now?

Maybe somebody knew, what's going on?
Sounds like this issue? https://steamcommunity.com/app/363890/discussions/0/1642042464748783300/ 🙂


Yes! It is!
You are the lifesaver! 🙂))
Great! Happy RPG Making~ 😂

Original thread: https://forums.rpgmakerweb.com/threads/stb-battle-system-initiative-agi-issue.112469/