MV Random Action Speed Fix at Yanfly Battle Engine Core

Hello,
i've trying to set a custom action speed by formula [agi + Math.randomInt(agi)]. Thoughs that will be boost any character up to 100%, letting slow characters a chance to act first. But this formula has a glitch...
When i added turn order display, i've noticed this order is shuffling each time when i selecting each actor's action or turning back to previous. How to fix it?
I originally wrote a plugin for this issue in Yanfly's STB system, but even if you're not using a different battle system it might work for you:

Basically it just tries to prevent the turn order from calculating more than once per turn~ 😮‍💨
I originally wrote a plugin for this issue in Yanfly's STB system, but even if you're not using a different battle system it might work for you:

Basically it just tries to prevent the turn order from calculating more than once per turn~ 😮‍💨

Yes, i've forgot to meant i using DTB. When plugin installed, turn order will always be forced like this: Actors from first to last, then enemies from first to last.

Original thread: https://forums.rpgmakerweb.com/threads/random-action-speed-fix-at-yanfly-battle-engine-core.129206/