This topic aims to share my understandings to the default RMVXA battle flow implementations, and I'll only share basic stuffs here. However, you're still assumed to have at least iittle scripting proficiency(having written at least few basic Ruby codes) and basic knowledge to the default RMVXA battle flow on the user level(At least you need to know what's going on on the surface when playing it as a player).

Battle Phases

For the basics, you'll need to know a battle consists of an action input phase and an action execution phase. There are actually also initialization, turn end, and aborting, but they'll only be briefly covered here.

 

Battle Initialization Phase
It's the phase where the battle's setting up. There are lots of stuffs going on, like setting up the troop in the battle, whether losing and/or party escape's allowed, whether the battle starts normally, preemptively or under surprise, and some other stuffs.
When the battle starts preemptively, the party has a free turn at the start of the battle; When it starts under surprise, the troop has a free turn at the start of the battle instead. A free turn is a turn where the opponents can't input nor execute actions.
After finishing the battle initializations, the battle will proceed to the Action Input Phase.

 

Action Input Phase
It's the phase where players can either try to escape the battle, or input actions for all inputable actors. An actor is said to be inputable if he/she/it's alive and has no Restrictions enforced by states and no special flag auto battle. The action input phase will proceed as follows:
1. A party command window shows, letting players choose between fight and escape.
2a. If they choose to escape, then the party will either escape if the attempt's successful, or wasted its turn otherwise, as players won't be able to input anything for that turn. If the party escapes, the battle will proceed to the Abort Battle Phase before actually quitting the battle.
2b. If they choose to fight, then they can input actions for all inputable actors.
3. They'll first input actions for the 1st inputable party member, then the 2nd, 3rd, and finally the last inputable party member. Players won't be able to break that input sequence.
4. Each alive actor has his/her/its own action slots, with its size determined by his/her/its Action Times+. As long as he/she/it's also inputable, players will first input actions for the 1st action slot, then the 2nd, 3rd, ..., and finally the last action slot. Again, players won't be able to break that input sequence.
5. When inputting actions for inputable actors, players can either use the ok command or the cancel command. Using the former and the latter eventually proceeds to the next input and prior input respectively. Next input and prior input eventually proceeds to the Action Execution Phase and the party command window respectively.
The below flowchart illustrates the flow within the action input phase(even though it's ultra ugly lol):

 

Action Execution Phase
It's the phase where all battlers' actions are processed and all valid ones are executed. An action is said to be valid upon execution if it's forced or its user can use it upon execution. The action execution phase will proceed as follows:
1. The battle turn count will be increased by 1. This moment is also regarded as the start of the battle turn. Stuffs needing to happen upon turn start will be triggered here.
2. An action order queue including all battlers will be made. The higher the speed of the battler at that moment, the more up front that battler will be positioned in that queue. The speed of the battler's determined by his/her/its agi and all his/her/its inputted actions' speed.
3. The most up front battler in the action order queue will execute all of his/her/its actions, and then leave that queue. This process repeats until the action order queue's empty.
4. As long as that battler's movable(unless he/she/it's force actions), he/she/it'll first process the action in his/her/its 1st action slot, then the one in 2nd, 3rd, ..., and finally the one in the last action slot. All actions that are valid at that moment will be executed.
5. When the last action of that battler's executed, action end processing will be done, and stuffs needing to happen upon action end will be triggered there.
6. When all actors or enemies are dead, the battle will proceed to battle defeat or victory processing respectively. The battle will then be ended.
7. When the action order queue's empty, the battle will proceed to the Turn End Phase.

 

Turn End Phase
It's the phase where the battle turn ends. Stuffs needing to happen upon turn end will be triggered here. After that, the battle will proceed to the Action Input Phase.

 

Abort Battle Phase
It's the phase where the party successfully escapes the battle. The battle will end after processing battle abort.


Share


About the Author

No Comments

Quick Reply

Guest

Enter a username

Security check: What is 8 plus 2?