Skip to main content

Hitlag

Hitlag describes the freeze frames of a character and/or enemy that occurs when an attack hits said enemy.

caution

Enemy attacks can inflict hitlag on the character and gadgets, but gcsim does not simulate enemy attacks or gadgets experiencing hitlag.

Hitlag attributes

Hitlag frames are determined by five different attributes:

NameDescription
hitHaltTimeNumber of seconds that hitlag lasts at base.
hitHaltTimeScaleThe rate at which the time of hitlag-affected entities flows during hitlag. Given as a percentage in decimal format.
canBeDefenseHaltBoolean value that determines whether hitHaltTime is extended by 0.06s, when the enemy hit does not have their poise broken.
deployableBoolean value that determines whether the hitlag applies to the character or not. The hitlag will always apply to the enemy/gadget hit by the character. This value is determined experimentally.
framerateNumber of frames that represent 1s. Used to convert hitlag in seconds into hitlag in frames.
info

For simplicity, gcsim assumes that time during hitlag is frozen. This is because the values chosen for hitHaltTimeScale and the time spent in hitlag is usually so low, that it is negligible. Because of this, the following calculations ignore hitHaltTimeScale.

caution

Enemy poise is not simulated, so if canBeDefenseHalt is true for an attack, then gcsim will always add 0.06s. Most bosses and other heavy enemies like Ruin Guards cannot have their poise broken.

Hitlag calculation

hitlag in frames(framerate)={(hitHaltTime+0.06)framerateif canBeDefenseHalt=trueenemy is not poise brokenhitHaltTimeframerateif canBeDefenseHalt=false(canBeDefenseHalt=trueenemy is poise broken)\text{hitlag in frames(\text{framerate})} = \begin{cases} \lceil (\text{hitHaltTime} + 0.06) * \text{framerate} \rceil &\text{if } \text{canBeDefenseHalt} = \text{true} \land \text{enemy is not poise broken}\\ \lceil \text{hitHaltTime} * \text{framerate} \rceil &\text{if } \text{canBeDefenseHalt} = \text{false} \lor (\text{canBeDefenseHalt} = \text{true} \land \text{enemy is poise broken}) \end{cases}

Example: Keqing N1

Calculation

For example, Keqing's N1 has the following values for the previously described attributes:

NameValue
hitHaltTime0.03
hitHaltTimeScale0.01
canBeDefenseHalttrue
deployablefalse
framerate60

Inserting the values into the function described in the previous section leads to the following result:

hitlag in frames(60)={(0.03+0.06)60=6if canBeDefenseHalt=trueenemy is not poise broken0.0360=2if canBeDefenseHalt=false(canBeDefenseHalt=trueenemy is poise broken)\text{hitlag in frames(60)} = \begin{cases} \lceil (0.03 + 0.06) * 60 \rceil = 6 &\text{if } \text{canBeDefenseHalt} = \text{true} \land \text{enemy is not poise broken}\\ \lceil 0.03 * 60 \rceil = 2 &\text{if } \text{canBeDefenseHalt} = \text{false} \lor (\text{canBeDefenseHalt} = \text{true} \land \text{enemy is poise broken}) \end{cases}

Ingame

By looking at Keqing N1 hitlag footage against a tree and counting the number of hitlag frames for the different cases, we can confirm that the calculation matches ingame. Hitlag starts 1 frame after the character significantly slows down (significant camera shake/movement can also be used) and ends once the character starts moving again.

note

Trees have poise and they can have their poise broken.

  • not poise broken: 12601254=61260 - 1254 = 6
  • poise broken: 15221520=21522 - 1520 = 2

Hitlag extension

The vast majority of abilities (status/modifier in gcsim) can be hitlag extended. The main exception is deployable abilities like Xiangling's Pyronado and Bennett's Inspiration Field.

info

The current assumption for gcsim is that hitlag extension is equal to the hitlag frames.

Where to find hitlag attributes for specific attacks

info

You can look at:

  • how much hitlag a character/enemy in gcsim experiences
  • which modifiers are getting hitlag extended

by turning on the hitlag log category in the Sample tab settings menu!