I’m currently hard at work on my title Estheria: A Realm Divided. While developing the combat system (turn-based RPG style ala FF/DQ), I openly admit that I’m not an engineer or coder, and have run into a bit of a mental snag/snafu.
In the title, the total party size is 4 (player + 3 party members). Currently, dexterity assists with determining the turn order (higher dex would mean that they’d go sooner than others). My issue comes both in having troubles building out/conceptualizing a system for determining, executing, and updating the turn order.
I can envision the first subroutine for determining partially. In this situation, the system would run through and scan (via multiple if/else statements (which I know is probably the poor way to code it), each party member and based on their dex assign them to a variable. As for how that assignment could be specific to a character, I’m at a bit of a loss.
From there, I’ve tried to skip ahead and conceptualize even executing upon the turn order, which should be the easy part. Ideally, should the first part (determination) be figured out, it should be as simple as having whatever variables go first and run through, though that also could be tricky as it has to be tied to specific people, again. (Same with enemies in encounters)
Lastly, my final issue would be updating this. Status-effects striking down dex might not be a big issue, but I would imagine running the first subroutine isn’t going to work again as that’s to determine the initial turn order. Say an enemy dies so there’s less people in combat, then the turn order wouldn’t be the initial one anymore.
I’m aware it’s complex, and is a conundrum. I was advised to come here and see if anyone from the community could assist before I seek outside help. If not, I fully understand and thank all of you for the time in looking over my post nonetheless.