Frame Data

Frame Data refers to the cycles of the game's main logic loop. Examples of frame data include timings of each individual hit of an attack, the timings of each individual tick of healing from healing, the timings at which buff icons appear after using BB/SBB/UBB, etc. Each frame is 1/60 of a second.
==Overview==
A unit’s movement animation can be broken down into five main parts: starting delay, movement, attack, buff application, and return movement.
*Starting Delay: the delay in the beginning due to earlier units' BBs activating
*Movement: the movement time required before the attack begins
*Attack: the hits from your unit that damage the enemy
*Buff Application: the application of all BB buffs to enhance the team or debuffs to weaken the enemy
*Return movement: the movement from the enemy position back to the unit's start position
Movement Speeds, Movement Types, and Effect Delays of a unit can be found on their unit wiki page.
==Types of Units==
===Moving Units===
Moving type units are those that physically move across the screen to get to the enemy and attack. A list of units with Moving Type movement can be found here.
===Teleporting Units===
Teleporting units are those that teleport to get to the enemy and attack. A list of units with Teleporting Type movement can be found here.
===Stationary Units===
Stationary units are those that attack the enemy in place without traveling to them. A list of units with Stationary Type movement can be found here.
==Starting Delay==
If there are multiple units swiping BB’s on Auto-Battle, then there is a delay that each BB causes to all units after it. For example, if there is a using SBB after a , then SBB will add a slight delay to attack. The exact delay depends on whether BB cut-in is on.
If BB cut-in is on, then there is a single frame (+1) delay to all units after it. If BB cut-in is off, then there is a longer delay of two frames (+2) to all subsequent units.
Note: Teleporters are an exception and have a very strange starting delay when cut-in is turned on. Instead of the usual +1 frame per previous SBB, it maintains the +2 frame per SBB that would result from having cut-in off. In addition, this scenario also subtracts a constant frame delay of 6 frames compared to having cut-in off.
For example, there is a swiping sequence of -> -> in a team with BB cut-in off (+2 frames per SBB). has no units swiping before her, so she has no starting delay. has only swiping before him, so his starting delay is +2. Finally, has both and swiping before him. Each contributes +2 frames to his delay, for a total delay of +4 frames for .
==Movement==
Before an attack can begin, units need to move to the enemy position. When there is more than a single enemy on the field, moving units always travel to a fixed point in the center of the field (making them easy to predict). However, when there is only enemy, the unit travels to the specific position the enemy is in (making it harder to predict sparking). This single-enemy case is vulnerable to inconsistency, often off by +1 or -1 frame.
There are three types of units, each of which move to the enemy in a different manner: moving units, teleporting units, and stationary units.
===Moving Units (Type 1)===
Moving units are broken up into five different types (simply called speed types 1, 2, 3, 4, and 5) that each have a corresponding movement speed. This movement speed value determines how long it takes for the unit to get to its target. These values are actually inversely proportional to the unit's real speed; the lower the value of the movement speed, the faster the unit travels. Therefore, speed 5 units like move the fastest.
The move speeds for each of the five types of moving units are listed below:
Move Speed Type	1 	2 	3 	4 	5
Move Speed 	0.0050	0.0041	0.0033	0.0024	0.0015
Each of the move speeds can be used to determine the exact number of frames required to move to the enemy, relative to the distance traveled across the field. Since the back row of units is further back, the movement time from the back row is longer than that from the front row.
Since moving units travel to the same spot in any situations involving two or more enemies, regardless of the enemy’s position, these movement times depend only on unit position and move speed type.
The compiled table of frame delays for each of the cases is shown below:
 	Type 1	Type 2	Type 3	Type 4	Type 5
A (Top Left) 	15 	13 	10 	7 	4
B (Top Right) 	30 	24 	19 	14 	9
C (Middle Left) 	20 	16 	13 	9 	6
D (Middle Right)	40 	33 	26 	19 	12
E (Bottom Left) 	18 	15 	12 	8 	5
F (Bottom Right)	33 	27 	21 	15 	9
For cases involving single target enemies, the frame delay varies based on each of the six enemy positions. The testing involved for finding these values would be extremely tedious and the results wouldn’t be entirely usable, since attacking single target enemies is especially vulnerable to frame lag and makes consistent sparking impossible. As a result, these values are currently unknown.
===Teleporting Units (Type 2)===
Teleporting units are by far the hardest unit type to find movement delay for. The values for movement frames in the datamine do not seem to accurately reflect the real teleporting time, so the values for each teleporter have to be calculated through in-game testing. The currently-tested teleporter delays are as follows:
 	Arthur	 	 	 	Gabriela
24	10 	31 	44	33 	29
 	 	Carrol	 	Diastima	Licht
39	17 	22 	16	20 	14
These values are independent of the positioning of either the teleporter or the enemy due to the nature of how teleporting works. Regardless of how close or far the teleporter might be to its intended destination, the unit will simply teleport there without having to travel across the screen.
For example, for a teleporting to the enemy, there needs to be just the addition of a constant 24 frame delay for her teleportation movement.
===Stationary Units (Type 3)===
Stationary units all have a simple movement delay, called the “move speed”. This is a constant frame delay that is independent of any positioning of the unit or enemy (since stationary units don’t have to perform any movement).
For example, has a move speed of 4, so we need to add 4 frames of in-place movement as a delay before her attack can begin.
==Attack==
After movement, there is a slight delay (called the effect delay) before the attack itself can begin. After the effect delay, the attack’s damage needs to be calculated. On this start frame, the game checks the effects of all buffs, except those that are calculated on a hit-by-hit basis (like spark damage and BC/HC drop), and applies them to the attack. Any buffs that were applied on a frame before this calculation frame are considered. Once this is done, the timings for the attack can be determined by adding the frame times for each hit to obtain the actual frame on which every hit lands.
Note that hit-by-hit buffs like spark damage are calculated on the particular frame that a hit sparks. On each hit, the game checks to see whether the hit is sparked; if it is, it receives the effect of any active spark damage buffs.
For example, to illustrate how attack frame calculation is done, suppose there is a with a total of 10 frames movement delay, 1 frame effect delay for damage, and a single hit applied on frame 30. Then, the effect delay will cause the attack to start on frame 11 (10+1). Any buffs applied on frame 10 or earlier will affect this attack. Then, the single hit will land on frame 41 (11+30).
==Buff Application==
Buff application uses the same type of effect delay as attacks do. Basically, each BB buff effect has its unique effect delay after movement time on which that buff applies. Typically, the effect delay for a unit’s buff is 0 for buffs to make sure they also apply in time to affect the unit's own attack.
For example, using the same scenario with as previously mentioned, imagine that his attack buff has a 0 frame effect delay. Then, the buff will apply on frame 10 (10+0), which is just in time to buff his own attack that starts on frame 11.
==Return Movement==
For all teleporting and moving units, the return movement will always be a moving type action. The return speed for all units is set to a constant 0.002, which corresponds to a speed partly between move speed types 4 and 5 (which is quite fast). Since this is a moving type action, the time taken to return to the original position will vary based off of enemy and unit position.
For stationary units, since they never move in the first place, they do not have any return time.
BB recast effects, from units such as Dark Path Arthur, have units repeat their BB/SBB/UBB right after they finish their return movement phases.
==Frame Calculation Formulas==
To calculate the total frame delay before a unit’s attack, use the formulas listed below. These total delays are added to each frame of the attack to get the final frame that each hit lands on.
===Moving Units===
*FrameDelay: set to 1 for cut-in on, 2 for cut-in off (the delay for each previous BB)
*Order: the order in which the unit was swiped (1 for first, 6 for last)
*MovementDelay: the speed for movement (taken from the second table in the Moving Units section)
*EffectDelay: the delay before the attack's damage frames begin
===Teleporting Units===
*Order: the order in which the unit was swiped (1 for first, 6 for last)
*TeleportDifference: set to 6 if cut-in is on, set to 0 if cut-in is off
*TeleportTime: the teleport movement time (taken from the table in the Teleporting Units section)
*EffectDelay: the delay before the attack's damage frames begin
===Stationary Units===
*FrameDelay: set to 1 for cut-in on, 2 for cut-in off (the delay for each previous BB)
*Order: the order in which the unit was swiped (1 for first, 6 for last)
*Movement Delay: the movement delay for in-place movement
*EffectDelay: the delay before the attack's damage frames begin
==Examples==
===Example 1: Moving Unit===
Unit Name 	
Order/Positioning Details 	SBB, swiped third with cut-in offfrom the middle right position (D)
Buff 	BB Mod buff (0 effect delay)
Move Type 	1
Move Speed Type 	4
Effect Delay 	1
First three hits (Frame #)	23, 26, 29
*Starting Delay: 2*(3-1) = 4 frames
*Movement delay: 19 frames
*Attack: starts on frame 24 (4+19+1)
*Buff Application: applied on frame 23 (4+19)
By frame 4, has started. By frame 23, she is finished moving. She applies buffs at frame 23, then attacks at frame 24 (meaning her BB mod buff has enough time to apply to her own attack). So her first three hits are delayed by 24, landing on frames 47, 50, 53.
===Example 2: Teleporting Unit===
Unit Name 	
Order/Positioning Details 	SBB, swiped second with cut-in offfrom any position
Buff 	Fire EWD buff (0 effect delay)
Teleport Time 	24
Effect Delay 	1
First three hits (Frame #)	40, 43, 46
*Starting Delay: 2*(2-1) = 2 frames
*Movement delay: 24 frames
*Attack: starts on frame 27 (2+24+1)
*Buff Application: applied on frame 26 (2+24)
By frame 2, has started. By frame 26, she is finished moving. She applies buffs at frame 26, then attacks at frame 27 (meaning her EWD buff has enough time to apply to her own attack). So her first three hits are delayed by 27, landing on frames 67, 70, 73.
===Example 3: Stationary Unit===
Unit Name 	
Order/Positioning Details 	SBB, swiped sixth with cut-in onfrom any position
Buff 	BB Mode Buff (0 effect delay)
Move Time 	0
Effect Delay 	1
First three hits (Frame #)	91,94,97
*Starting Delay: 1*(6-1) = 5 frames
*Movement delay: 0 frames
*Attack: starts on frame 6 (5+0+1)
*Buff Application: applied on frame 5 (5+0)
By frame 5, has started. By the same frame, she has already finished moving. She applies buffs at frame 5, then attacks at frame 6 (meaning her BB Mod buff has enough time to apply to her own attack). So her first three hits are delayed by 6, landing on frames 97, 100, 103.
==Relevant Links==
*List of Units with Movement Speeds on Normal Attack
**Units with Movement Speed Type 1 on Normal Attack
**Units with Movement Speed Type 2 on Normal Attack
**Units with Movement Speed Type 3 on Normal Attack
**Units with Movement Speed Type 4 on Normal Attack
**Units with Movement Speed Type 5 on Normal Attack
*List of Units with Movement Speeds on Skill
**Units with Movement Speed Type 1 on Skill
**Units with Movement Speed Type 2 on Skill
**Units with Movement Speed Type 3 on Skill
**Units with Movement Speed Type 4 on Skill
**Units with Movement Speed Type 5 on Skill
*List of Units with Movement Types on Normal Attack
**Units with Moving Type Movement on Normal Attack
**Units with Teleporting Type Movement on Normal Attack
**Units with Stationary Type Movement on Normal Attack
*List of Units with Movement Types on Skill
**Units with Moving Type Movement on Skill
**Units with Teleporting Type Movement on Skill
**Units with Stationary Type Movement on Skill
Category:Game mechanics