Site Tools


atb_system

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
atb_system [2021/10/01 07:00] – created wylematb_system [2023/12/26 20:45] (current) – external edit A User Not Logged in
Line 2: Line 2:
  
 =====Concepts===== =====Concepts=====
-[[Battle Timers]]: A set of timers for each battle participant that determine when events occur in a battle.+**[[Battle Timers]]**: A set of timers for each battle participant that determine when events occur in a battle.
  
-[[Speed Modifier]]: A value that is raised or lowered by speed-modifying spells, and used as a modifier for most timers.+**[[Speed Modifier]]**: A value that is raised or lowered by speed-modifying spells, and used as a modifier for most timers.
  
-Menu Queue: The list of characters whose menu is ready to pop up.+**Menu Queue**: The list of characters whose menu is ready to pop up.
  
-Pointer: Keeps track of which slot is currently being checked for expired timers.+**Pointer**: Keeps track of which slot is currently being checked for expired timers.
  
-Queuing an action: Every action must be queued before it can be executed. For characters, this generally involves choosing a menu command; the period between queuing and execution of the action includes spell incantation animations, preparing to swing, etc. For monsters, there is no visible indication when an action is queued. (Note that "Queue" may be a misnomer here, and this is not to be confused with the Menu Queue)+**Queuing a command**: Every command must be queued before it can be executed. For characters, this generally involves choosing a menu command; the period between queuing and execution of the command includes spell incantation animations, preparing to swing, etc. For monsters, there is no visible indication when a command is queued. (Note that "queue" may be a misnomer here, and this is not to be confused with the Menu Queue)
  
-Executing an action: When the action actually takes place. For most actions, this means the character moves forward and acts (or the monster flashes and acts).+**Executing a command**: When the command actually takes place. For most commands, this means the character moves forward and acts (or the monster flashes and acts).
  
 =====How it works===== =====How it works=====
  
-All battle participants (characters and monsters) have an [[battle_timers#Action_Timer|Action Timer]] that determines the number of ATB ticks must pass before they are eligible to queue or execute an action. At the [[#start of battle]]((barring Strike First, Surprise, and Back Attacks)) and after each action is finished executing, the Action Timer is set to the Relative Agility of that participant, modified by the [[Speed Modifier]].(([RA * Speed Modifier) / 16], rounded down)).+All battle participants (characters and monsters) have an [[battle_timers#Action_Timer|Action Timer]] that determines the number of ATB ticks must pass before they are eligible to queue or execute a command. At the [[#start of battle]]((barring Strike First, Surprise, and Back Attacks)) and after each command is finished executing, the Action Timer is set to the Relative Agility of that participant, modified by the [[Speed Modifier]].(([RA * Speed Modifier) / 16], rounded down)).
  
 ====What happens in each tick==== ====What happens in each tick====
Line 24: Line 24:
   - HP Sap and Regen are applied, if applicable.   - HP Sap and Regen are applied, if applicable.
   - The battle victory/defeat conditions are checked.   - The battle victory/defeat conditions are checked.
-  - Any auto-actions (Berserk, Charm, Auto-Hide or Auto-Show) are enqueued for characters who meet those conditions and do not already have an auto-action queued.+  - Any auto-action (Berserk, Charm, Auto-Hide or Auto-Show) commands are enqueued for characters who meet those conditions and do not already have an auto-action command queued.
   - The menu queue is handled:   - The menu queue is handled:
     * If the menu is currently open, the game checks for any conditions that would automatically close it (auto-hide or equipping the Avenger)     * If the menu is currently open, the game checks for any conditions that would automatically close it (auto-hide or equipping the Avenger)
     * If the player has just entered a menu command, it is queued at this point, setting that character's Action Timer accordingly.     * If the player has just entered a menu command, it is queued at this point, setting that character's Action Timer accordingly.
-    * Otherwise, if the menu was not open and any characters are in the Menu Queue, the first is pulled off that queue, and if they are eligible to act, their menu will start to open on the next frame.+    * Otherwise, if the menu was not open and any characters are in the Menu Queue, //and if L+R are not currently being held//, the first is pulled off that queue. If they are eligible to act, their menu will start to open on the next frame.
       * If the character has fired their last arrow, it will be removed here.       * If the character has fired their last arrow, it will be removed here.
       * If the character was Parrying, that status is removed here.       * If the character was Parrying, that status is removed here.
       * If the Avenger is equipped, Berserk status is set and the menu will not be opened.       * If the Avenger is equipped, Berserk status is set and the menu will not be opened.
   - The next expired timer is handled:   - The next expired timer is handled:
-    * The slot the Pointer is currently pointing at is checked for any expired timers. If none are expired, it will continue moving through slots until an expired timer is found or all 13 slots have been checked. If an expired timer *is* found, it is handled. +    * The slot the Pointer is currently pointing at is checked for any expired timers. If none are expired, it will continue moving through slots until an expired timer is found or all 13 slots have been checked. If an expired timer *is* found, it is handled, and the Pointer moves to the next slot
-      * Note: There are 7 different types of timers. In order, they are: Stop, Action, Sap, Poison, Stone, Wall, Count. Only one expired timer for one participant can be handled in a given tick, and they are checked in order.((All timers are checked for one slot before the Pointer moves on to the next)) +      * Note: There are 7 different types of [[Battle Timers|timers]]. In order, they are: Stop, Action, Sap, Poison, Stone, Wall, Count. Only one expired timer for one participant can be handled in a given tick, and they are checked in order.((All timers are checked for one slot before the Pointer moves on to the next)) 
-      * In the case of characters, an expired Action Timer means that when the Pointer reaches that character, they will either execute their action (if one is queued), or enter the Menu Queue. +      * In the case of characters, an expired Action Timer means that when the Pointer reaches that character, they will either execute their command (if one is queued), or enter the Menu Queue. 
-      * In the case of monsters, an expired Action Timer means that they will either execute their action (if one is queued), or the next turn of their battle script will be processed, queuing an action.((This action could be "Do Nothing")) +      * In the case of monsters, an expired Action Timer means that they will either execute their command (if one is queued), or the next turn of their battle script will be processed, queuing a command((This command could be "Do Nothing")) and handling any immediate actions such as changes to condition flags, resistances, stats like Magic Power, etc. 
-        * Note that if a monster starts a chain, all other participants' timers will be frozen until the chain is completed. +        * Note that if a monster starts a chain, all other participants' timers will be frozen until the chain is completed, and auto actions and the menu queue will not be processed
-      * Queuing an action sets the Action Timer based on the command entered. In the case of monsters, this is always? a fixed timer with a duration equal to 1, adjusted by the Speed Modifier.+      * Queuing a command sets the Action Timer based on the command entered. In the case of monsters, this is always? a fixed timer with a duration equal to 1, adjusted by the Speed Modifier. See the [[battle_timers#action_timer|Battle Timers]] article for more details.
   - Any monster counters are processed.   - Any monster counters are processed.
  
Line 53: Line 53:
  
 The game then finds the lowest Action Timer value, and subtracts one less than that value from all Action Timers. (This effectively skips ahead until the lowest Action Timer is 1) The game then finds the lowest Action Timer value, and subtracts one less than that value from all Action Timers. (This effectively skips ahead until the lowest Action Timer is 1)
 +
 +=====Running=====
 +Immediately after the battle victory/defeat conditions are checked, the game checks if the L and R buttons are both held down during that frame. If so, it first checks whether the party is ready to run.
 +
 +For fights where the enemy in the first slot is less than level 97:
 +  * If a character has entered the menu queue, the party is ready to run.
 +For fights where the enemy in the first slot is level 97 or higher:
 +  * At the start of battle, a run delay timer is set to a value depending on this monster's level.
 +    * This value is 3, 7, or 10 for levels 97, 98, and 99, respectively.
 +  * If the timer has reached zero, the party is ready to run. Otherwise, the run delay timer is decremented, and will be checked again on the next tick.
 +  * Note that if the enemy in the first slot is level 99, then if at any point the player is not holding L+R, the delay timer is set to 15.
 +
 +When the party is ready to run:
 +  * If running is enabled in this fight, the party runs away.
 +  * If running is disabled in this fight, display the "Can't run" message immediately, effectively freezing the ATB for the duration that it's displayed.((The duration is dependent on the Battle Message Speed setting, though some fights automatically use the slowest speed))
 +
 +Note that character menus will not appear while L and R are being held.
atb_system.1633071627.txt.gz · Last modified: 2021/10/01 07:00 (external edit)