The thing is that everything that you just mentioned (including the initiative thing) all kind of hinge on that one function that I just posted. So it makes most since to deal with it all at the same time. So if you could give us detailed specifics, we could tell you how to implement it. For example, exactly what random numbers are you wanting to roll? Is it based on some game variables or something? Exactly how does it work? And what order do you want the members (within each party) to move? I mean I get that you want the player party to go first, but what order do you want the members of that party to move in? Just from member 1 to member X, in sequential order? Random? Still based on agility? Based on some other stat? And do you still want surprise attacks and preemptive attacks to be a thing? If you can lay out the exact logic that you're wanting to use, it'd be a simple matter to tell you how to implement it.
If you insist on implementing the initiative thing separately through some other plugin or something, that's fine, but we'd still need the rest of those questions answered before we can tell you how to do what you're asking.
Ok, I'll answer in order.
- I'm basing it kinda off of how most TTRPG's do it, so I'm planning on having 2 in-game variables randomly roll 1-20. If the variable representing the party is equal to or higher than the enemy party's, the fight would play as normal, but if its lower, everyone on the main party will be immobile for that first turn (Essentially delaying their movement).
- I kinda just plan on the turn order being in sequential Member A to Member Z order. Not using any of the existing RM stats (I've repurposed all 6 into completely different stats (Again, based on how most TTRPG's do it. I'm taking a lot of inspiration from them lately). There isn't an Agility stat or any equivalent of one). Only exceptions would be if a skill or whatever has priority.
- I'd like to keep surprise/pre-emptive attacks intact for scenarios like the party ambushing an enemy or being ambushed (With how this prototype is planned to function, all encounters would be triggered by an event, so I could just force them with one of Yanfly's plugins if the player is in the right conditions).
Hopefully that helps some? Sorry for not giving enough information to begin with.