Temporarily Disable Turn Order Randomness [RMMZ]

Hello All!

I am currently bashing my head against a wall trying to event together a tutorial battle for my players since I am using what I consider to be a fairly complex battle system.

A significant issue I keep running into is that, in order for my turn based events to work properly, the timing of everything needs to be very precise. The player character NEEDS to act first, but the enemy character needs to be at a similar AGI in order for everything to line up.

I saw there was a way to remove the turn order randomization element by modifying the engines original plugin, but I want the randomization during the main game. Is there a way that I can remove the turn order randomization element temporarily for this tutorial battle only?

Thanks,
Lostsouls46
untested, but try this as a plugin
Code:
Game_Action.prototype.speed = function() {
    const agi = this.subject().agi;
    let speed = agi;
    if (!$gameSwitches.value(42))
      speed += Math.randomInt(Math.floor(5 + agi / 4));
    if (this.item()) {
        speed += this.item().speed;
    }
    if (this.isAttack()) {
        speed += this.subject().attackSpeed();
    }
    return speed;
};
While switch 42 is active, turn order should no longer have the randomization. turn the switch off to get it back
Thank you! I will try this when I am next able and report back results!
Hey, so I don't know if I did something incorrectly or if the plugin isn't working, but it doesn't appear to do anything no matter what I try.

Things I tried:
1. Creating a plugin using the above, enabling switch 42 during the battle in the battle event panel.
2. Using the above as a script, enabling switch 42 during the battle in the battle event panel.
3. Creating a plugin using the above, enabling switch 42 using an autorun event in parallel before the battle starts.
4. Using the above as a script, enabling switch 42 using an autorun event in parallel before the battle starts.

If I am doing something wrong, please let me know. If anyone has another solution for me, also let me know!
just making sure. when you tried the plugin, you saved your project before testing it, right?
changes made to your plugins do not register until the project is saved.
just making sure. when you tried the plugin, you saved your project before testing it, right?
changes made to your plugins do not register until the project is saved.
Yes, I did
Can you show your list of plugins?
Sure thing! I am using:


Screenshot (1).png


I'm pretty early on in the development process, just wanted to nail in the mechanical elements of the game before I really got into additional features!
Try placing the new plugin at the bottom of the list. VS BATTLE CORE changes a lot of things so it might be overwriting the new plugin.
Looks like you are using ATB. Why not just freeze the enemies ATB bar or start the battle as a surprise battle? Starting it as a surprise should give you a full bar and they have none so you should go first.
Both of these are excellent ideas. Thank you both, I will try them now.

Try placing the new plugin at the bottom of the list. VS BATTLE CORE changes a lot of things so it might be overwriting the new plugin.
Moving the plugin did not change anything. I still could not enable it despite my best efforts. I suspect VS Battle Core likely changes this parameter in some way.
Looks like you are using ATB. Why not just freeze the enemies ATB bar or start the battle as a surprise battle? Starting it as a surprise should give you a full bar and they have none so you should go first.
Per this recommendation, I gave my enemy a state which pauses their ATB progression until damaged which for my purposes seems to work out just fine. Thank you for the suggestion!
Moving the plugin did not change anything. I still could not enable it despite my best efforts. I suspect VS Battle Core likely changes this parameter in some way.
Yes, this is often the case with the bigger VS plugins (recently the same has been observed for plugins tweaking the HP and MP gauges). As Battle Core has customizable combat system stuff in the plugin parameters, it might be that you can sneak it in there.

But in your case I suppose @bgillisp 's solution works!

Original thread: https://forums.rpgmakerweb.com/threads/temporarily-disable-turn-order-randomness-rmmz.175259/