Site Tools


battle_timers

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
battle_timers [2021/09/17 22:46] – [The Action Timer] wylembattle_timers [2023/12/26 20:45] (current) – external edit A User Not Logged in
Line 6: Line 6:
 On each tick, every active timer counts down by one((With the exception of Count, which decrements every second tick)), and any timers that reach zero are flagged as expired. Only one expired timer for one participant can be handled in a given ATB tick, and they are checked in order. If none of that participant's timers are expired, the next participant is checked. If no participants have any expired timers, no events occur during that tick. On each tick, every active timer counts down by one((With the exception of Count, which decrements every second tick)), and any timers that reach zero are flagged as expired. Only one expired timer for one participant can be handled in a given ATB tick, and they are checked in order. If none of that participant's timers are expired, the next participant is checked. If no participants have any expired timers, no events occur during that tick.
  
-For more details on how ATB ticks work, read the (currently non-existent) article on ATB.+For more details on how ATB ticks work, see: [[ATB System]].
  
 =====Timer Details===== =====Timer Details=====
Line 22: Line 22:
 |  **Stop**  |  Stop status; other timers are frozen  |  Stop status is removed  |  Stop, HrGlass1/2/ |  Spell's power * 3 ((This results in 30 ticks for Stop, and 150, 300 and 600 ticks, respectively, for HrGlasses 1, 2 and 3))  | |  **Stop**  |  Stop status; other timers are frozen  |  Stop status is removed  |  Stop, HrGlass1/2/ |  Spell's power * 3 ((This results in 30 ticks for Stop, and 150, 300 and 600 ticks, respectively, for HrGlasses 1, 2 and 3))  |
 |  **Sap**  |  HP leak (2 HP per tick)  |  HP leak effect is removed  |  Virus, Big Bang, etc.  |  Either 30 ticks or a random number of ticks  | |  **Sap**  |  HP leak (2 HP per tick)  |  HP leak effect is removed  |  Virus, Big Bang, etc.  |  Either 30 ticks or a random number of ticks  |
-|  **Poison**  |  Poison status  |  Damage (1/8 max HP)  |  Venom, Poison Gas, etc.  |  Vitality + 20  | +|  **Poison**  |  Poison status  |  Damage (1/8 max HP)  |  Venom, Poison Gas, etc.  |  Vitality + 20((For monsters, the $2F stat is used instead of Vitality))  | 
-|  **Stone**  |  Gradual Petrification status  |  Petrification advances  |  Ray, Petrify  |  Vitality + 20  |+|  **Stone**  |  Gradual Petrification status  |  Petrification advances  |  Ray, Petrify  |  Vitality + 20((For monsters, the $2F stat is used instead of Vitality))  |
 |  **Wall**  |  Wall (Reflect) status  |  Wall status is removed  |  Wall, StarVeil, MoonVeil  |  Spell's power + 30 ((This results in 30 ticks for Wall, 50 for StarVeil, and 70 for MoonVeil))  | |  **Wall**  |  Wall (Reflect) status  |  Wall status is removed  |  Wall, StarVeil, MoonVeil  |  Spell's power + 30 ((This results in 30 ticks for Wall, 50 for StarVeil, and 70 for MoonVeil))  |
 |  **Count**  |  Count status  |  Death  |  Count (Plague, FatalEye)  |  Spell's power (10 Count ticks, which is 20 ATB ticks)  | |  **Count**  |  Count status  |  Death  |  Count (Plague, FatalEye)  |  Spell's power (10 Count ticks, which is 20 ATB ticks)  |
  
-The speed modifier affects the initial value set for all timers except for Count.((A fully slowed actor will have these timers doubled. A maximally fast character will have these timers multiplied by 3/4, then rounded down)). Changing the speed modifier does not affect existing timer values.+The [[Speed Modifier]] affects the initial value set for all timers except for Count.((A fully slowed actor will have these timers doubled. A maximally fast character will have these timers multiplied by 3/4, then rounded down)). Changing the Speed Modifier does not affect existing timer values.
  
-Each time the Poison and Stone timers take effect, they are reset to their initial value. Changes to the speed modifier do not affect this.+Each time the Poison and Stone timers take effect, they are reset to their initial value. Changes to the Speed Modifier do not affect this.
  
 =====The Action Timer===== =====The Action Timer=====
Line 35: Line 35:
 All actions must be queued before they can be executed. The Action Timer is used to determine when both of these steps can happen. All actions must be queued before they can be executed. The Action Timer is used to determine when both of these steps can happen.
  
-At the start of battle((barring Strike First, Surprise, and Back Attacks)), and after executing an action, a participant's Action Timer is set to their Modified Relative Agility. When this timer is handled after expiration:+At the start of battle((Exception: Strike First, Surprise, and Back Attacks. See: [[ATB System#start_of_battle|ATB System]] for how they modify starting timers)), and after executing an action, a participant's Action Timer is set to their Modified Relative Agility. When this timer is handled after expiration:
    * If this is a character, they enter the Menu Queue.    * If this is a character, they enter the Menu Queue.
-   * If this is a monster, the next step of their script is handled. This queues a command (though that command may be "Do Nothing")+   * If this is a monster, the next step of their script is handled. This queues a command (though that command may be "Do Nothing"), and may have other effects as well, such as modifying stats or setting condition flags.
  
 After a command is entered, the Action Timer is set to a value that depends on the command. After a command is entered, the Action Timer is set to a value that depends on the command.
    * For monsters, the base value is always 1.    * For monsters, the base value is always 1.
-   * For many commands like Fight, Parry, Change, Item, Hide, Bluff and Sneak, the base value is 0.+   * For many commands like Fight, Parry, Change, Item, Hide, Sing, [[twincast|Twin]], Bluff and Sneak, the base value is 0.
    * For spells, the base value is set to the spell's cast time.    * For spells, the base value is set to the spell's cast time.
    * For Jump, the base value is 4 ticks.    * For Jump, the base value is 4 ticks.
-   * For Twin, Kick and Dark, the base value is RA / 2, rounded down.+   * For [[twincast|TwinCast]], Kick and Dark, the base value is RA / 2, rounded down (with a minimum value of 1).
    * For Aim and Dart, the base value is RA / 4, rounded down.    * For Aim and Dart, the base value is RA / 4, rounded down.
 +   * For Recall, the base value is equal to RA.
  
-The speed modifier is then applied to the base value, and the Action Timer is set to the resulting value. When the timer is handled after expiration, the action is executed.+The [[Speed Modifier]] is then applied to the base value, and the Action Timer is set to the resulting value. When the timer is handled after expiration, the action is executed.
  
 ====Sleep and Paralyze==== ====Sleep and Paralyze====
Line 59: Line 60:
  
  
 +
 +=====Timer Flags=====
 +This section is highly technical, and probably only useful in the context of physical attack [[status procs]], certain spells that cause Paralyze or Sleep, and possibly the mimic glitch.
 +
 +Each timer includes a byte for storing flags:
 +
 +  * **EXPIRED**: Set when a timer reaches zero. Cleared when the timer is handled.
 +  * **COMMAND**: Set on the Action Timer when a command is queued. If the timer expires with this flag set, the current queued command will be issued and this flag will be cleared.
 +  * **STATUS**: Set when the timer is tied to a status effect (e.g., the Poison Timer, or with Sleep/Paralyze for the Action Timer)
 +  * **READY**: Mostly used in the same way as the EXPIRED flag, but for characters it isn't cleared until a command is queued. Seems to be used to track when a character is Stopped while at the command menu or in the Menu Queue. When Stop expires, their Action Timer will be set back to 1.
 +
 +For the purposes of status procs and the relevant spells that cause Paralyze and Sleep, the effect will fail if any flags are set on the target's Action Timer. It should only pass this test if the target has no command queued, is not asleep or paralyzed, and their Action Timer is non-zero.
 +
 +=====Interactions=====
 +====Hide/Jump====
 +The handlers for expired Poison, Stone, and Count timers do nothing if the character is currently Hiding or Jumping. The Poison damage/Petrification increase/Count death will not occur, and the timer will continue to be marked as expired.
 +
 +Wall and Sap timers are handled normally, though the character will not take damage from Sap.
battle_timers.1631918816.txt.gz · Last modified: 2021/09/17 22:46 by wylem