This weekend I've made a lot of changes to the default battle system clockworks, and I'm getting close to getting the exact system I've been dreaming of.
But the turn structure is something of a hang-up for me. If anyone could suggest an approach to accomplish what I'm describing below, or even point me to the right methods in the code that I will need to modify, I would be so grateful.
1) Each character starts with X number of "turn points" at the beginning of the battle (Solved - easy enough through the Set method.)
2) Before each turn, each character receives turn points (using a calculation based on that character's Agility) (Solved - added to Scene_Battler 4 before the turn order calculation.)
3) Whoever has the most turn points at this moment will receive the next turn. Tiebreakers will apply if multiple characters have the highest number of turn points. (solved - limiting it to one battler involved truncating the @action_battlers array.)
4) Then, the character who gets the turn loses turn points (based on the total Agility of all characters in the battle). At this time, you may enter a command (Attack, Spell, Item, etc.) for that character. (Solved - used Scene_Battler 3 and Scene_Battler 4)
5) After that character takes an action, the turn is over (that is, only one ally OR one enemy will take an action each turn). All "each turn" effects apply. (Solved - used Scene_Battler 3 and Scene_Battler 4)
I also need to know how to create a new "stat" for each character/enemy - it's fine if it's a non-visible variable. But like actor.sp and actor.int, I'd also like to be able to use actor.turnpoints, for example. (Solved - just needed to create Get and Set methods in Game_Battler 1.)
But the turn structure is something of a hang-up for me. If anyone could suggest an approach to accomplish what I'm describing below, or even point me to the right methods in the code that I will need to modify, I would be so grateful.
1) Each character starts with X number of "turn points" at the beginning of the battle (Solved - easy enough through the Set method.)
2) Before each turn, each character receives turn points (using a calculation based on that character's Agility) (Solved - added to Scene_Battler 4 before the turn order calculation.)
3) Whoever has the most turn points at this moment will receive the next turn. Tiebreakers will apply if multiple characters have the highest number of turn points. (solved - limiting it to one battler involved truncating the @action_battlers array.)
4) Then, the character who gets the turn loses turn points (based on the total Agility of all characters in the battle). At this time, you may enter a command (Attack, Spell, Item, etc.) for that character. (Solved - used Scene_Battler 3 and Scene_Battler 4)
5) After that character takes an action, the turn is over (that is, only one ally OR one enemy will take an action each turn). All "each turn" effects apply. (Solved - used Scene_Battler 3 and Scene_Battler 4)
I also need to know how to create a new "stat" for each character/enemy - it's fine if it's a non-visible variable. But like actor.sp and actor.int, I'd also like to be able to use actor.turnpoints, for example. (Solved - just needed to create Get and Set methods in Game_Battler 1.)



Comment