Manual "ATB Scale" (edition 1.3)
Introduction
To start, it is recommended to familiarize yourself with the "Battles" section.
"Geometry" of the ATB Scale
The ATB scale has a range of [0; 1] ATB.
Point 0 ATB corresponds to the end of the scale, point 1 ATB – to the beginning (not very convenient, but this is how the scale was displayed on screen in beta versions).
A stack begins its round at position 0 ATB and moves toward 1 ATB.
When a stack reaches point 1 ATB – it gets a turn.
The game uses exactly this coordinate system (as seen from the console debug logs).
I will introduce conventional notations:
curATB – current position of the stack on the scale (from 0 to 1).
startATB – initial position of the stack on the scale (from 0 to 1).
Initial Position on the Scale
Initial placement of stacks on the ATB scale
All stacks (and heroes) are placed in the range [0; 0.25] ATB.
Placement is random and does not depend on initiative.
startATB = [0; 0.25]
Swift Striker specialization.
Wingael - a hero with the "Swift Striker" specialization - has a bonus to initial placement on the scale = +0.005*level.
T.e. for Wingael:
startATB = [0.005*level; 0.25+0.005*level].
Version history:
In 1.0-1.2: the bonus to initial placement on the scale was = 0.02.
Initial placement of summoned creatures on the ATB scale
Summon Elementals and Summon Phoenix
Upon summoning, stacks are placed in the range [0; 0.25] with a step of 0.05 (i.e., 0 / 0.05 / 0.10 etc.).
Gating
For a summoned stack startABT=0. T.e. it is placed at the very end of the scale.
If the hero has the Urgash's Call ability, then startATB=1.
Phantom Forces
The starting position of the "clone" on the scale depends on the hero's level (and only on that):
startATB=0.4+0.02*level.
For example, at hero level 20, "clones" will be summoned to scale position = 0.4+0.02*20 = 0.8.
Scale Shifts
Main gameplay mechanics affecting stack shifts on the ATB scale
After completing its turn, a stack shifts to position curATB = 0.
If "high morale" triggers, the stack shifts to curATB = 0.5 after the turn.
If "low morale" triggers, the stack is forcibly shifted to curATB = 0.5 instead of getting a turn.
If a stack performs Defend, it shifts to the very end of the scale – curATB = 0.
If a stack performs Wait, it shifts to the middle of the scale – curATB = 0.5.
Hero shifts on the scale
If the hero takes their turn, they shift to curATB=0.
If the hero performs Wait, they shift to curATB=0.5.
Skill Sorcery
After casting a spell, the hero shifts to curATB = X, where X = 0.1/0.2/0.3 for Basic/Advanced/Expert skill levels.
If a hero with Sorcery does NOT cast a spell but performs any other action (direct attack, using an active ability, etc.), they shift to curATB = 0.
Ability Dark Renewal (skill Dark Magic).
In the event that the hero's strike/targeted spell fails on every target (Magic Resistance triggered for the target(s) or the hero "missed" the target with an area spell), the hero shifts to curATB=0.2+X. If the spell worked on at least one target, the hero shifts to curATB=X.
X = 0.0/0.1/0.2/0.3 depending on the hero's Sorcery skill level – none/Basic/Advanced/Expert.
The ability does not work when the hero casts mass spells (Armageddon, Mass Slow etc.), but it works when casting area spells (Meteor Shower, Mass Decay etc.).
Ability "marks": Mark of the Wizard (skill Artificer), Spirit Link (skill Dark Magic), Retaliation Strike (skill Counterstrike), Mark of the Damned (skill Gating).
After applying a "mark" to a target, the hero shifts to curATB=0.5.
Version history:
In 1.0-1.2: when applying a mark, the hero was pushed back to curATB=0.
Ability Imbue arrow.
After "enchanting an arrow," the hero shifts to curATB=0.5.
During subsequent attacks with the "enchanted arrow" (Deadeye Shot and Rain of Arrows abilities), the hero will shift to curATB=0 regardless of whether they have the Sorcery skill.
Ability Imbue Ballista.
An "enchanted" ballista, if a spell is cast during its fire, shifts the hero to curATB=X.
X = 0.0/0.1/0.2/0.3 depending on the hero's Sorcery skill level – none/Basic/Advanced/Expert.
Stack shifts on the scale from spells and hero abilities
Here is a nuance – a spell/ability cannot shift a stack to curATB < 0 or curATB > 1.
If a stack would be shifted to position curATB < 0, it shifts to curATB = 0 and becomes last on the ATB scale.
If a stack would be shifted to position curATB > 1, it shifts to curATB = 1 and immediately gets a turn.
Spell Wasp Swarm.
Pushes the stack toward the end of the scale by a certain percentage of the scale:
curATB = curATB – X ,
where X = 0.2; 0.4; 0.6 for Basic/Advanced/Expert Summoning Magic.
If Mark of the Wizard is applied to the target, there is a double push: curATB = curATB – 2*X.
Swarm Queen specialization (Dirael) gives a bonus to X:
X = X* (1+0.01*level/3). (i.e., the base "push" increases by 1% every 3 levels).
For example, at hero level 20 with Expert Summoning Magic, the "push" will be = 0.6*(1+0.01*20/3) = 0.64.
Ability Divine Guidance.
Shifts a stack by one third of the scale toward the beginning of the scale.
curATB = curATB + 0.33.
Ability Teleport Assault.
Shifts a stack by half the scale toward the beginning of the scale:
curATB = curATB + 0.5
Ability Master of Storms and spells Lightning and Chain Lightning
Spells push the stack (Chain Lightning – only the first target) along the scale by an ATB distance depending on the current position of the stack on the scale (i.e., from curATB).
cirATB = curATB*0.7.
For example, if a stack has almost received its turn, i.e., its curATB = 1 (more precisely, 0.(9)), it will be pushed back to curATB = 0.7 (more precisely, to 0.6(9)) – by 0.3 ATB.
If a stack has just moved, i.e., its curATB = 0, it will not be pushed back at all.
Version history:
In 1.0-1.1: The push along the scale was greater - curATB = curATB*0.3.
Ability Master of Ice and spells Ice Bolt and Circle of Winter
Spells stop the stack's movement along the scale for 0.3 turns (effect initiative = 10). Additionally, the stack is pushed back along the scale by a random value in the range [0; 0.3] - curATB = curATB – random(0; 0.3).
The "freeze" effect for 0.3 turns on the scale can be represented as a push by an ATB distance. The formula is as follows:
"Freeze Push" = 0.3* Initiative/10.
, where Initiative – stack initiative.
For example, for a stack with initiative = 20, the freeze effect will be equivalent to pushing along the scale by 0.6 ATB; for a stack with initiative = 5 – a push of 0.15 ATB.
In total, the general formula for Master of Ice:
curATB = curATB – 0.3*Initiative/10 – random (0; 0.3).
For Circle of Winter, both effects - freeze and push - are divided equally among all stacks hit by the spell. For example, if the spell hits 2 stacks, each will be frozen for 0.15 turns and pushed along the scale by random (0; 0.15).
Ability Tremors and spell Earthquake.
The spell pushes all stacks located "inside" the city by 1/10 of the scale toward the end of the scale.
curATB = curATB – 0.1.
Stack shifts on the scale from creature abilities.
Warding arrows (Master Hunter).
Pushes a stack along the scale by 1/5 of the scale:
curATB = curATB – 0.2.
The probability of pushing depends only on the ratio of total health between attacking and defending units. The exact formula is provided at the end of the Creature Special Abilities subsection.
Fear Attack (Nightmares)
Pushes a stack to the very end of the scale:
curATB = 0
The probability of pushing depends only on the ratio of total health between attacking and defending units. The exact formula is provided at the end of the Creature Special Abilities subsection.
Shield Bash (Conscript, Footman, Squire)
Pushes a stack to the very end of the scale:
curATB = 0
The probability of pushing depends only on the ratio of total health between attacking and defending units. The exact formula is provided at the end of the Creature Special Abilities subsection.
"Physics" of the ATB Scale
This section is not yet fully completed or thought through to the end. It may contain errors. However, I will post a draft version anyway.
To simplify calculations, it is necessary to introduce concepts of "speed", "distance", and "time". With "physics" in place, all calculations will be reduced to simple "physics problems" ("A stack traveled from point A to point B..." etc.).
"ATB-Distance".
Measured in ATB scales.
Unit of change – "ATB".
Full scale size = 1 ATB, half scale = 0.5 ATB etc.
"ATB-Time".
Changes in ATBsec.
For convenience, a "composite" unit must be introduced – the "normal turn" (hereafter simply "turn"). 1 turn = 10 ATBsec. Or 1 ATBsec = 0.1 turns.
Units of measurement – "ATBsec" and "turns".
1 turn is the time it takes for a stack with speed (which is also "initiative") = 10 to travel 1 ATB. (This is the reason for introducing the term "turn".)
To avoid confusion, the following terminology will be observed in the manual.
"Turn" (e.g., "1 turn", "0.2 turns") or "normal turn" - a unit of "ATB time".
"Creature/stack turn" or "creature/stack round" - ATB-time it takes for a creature/stack to traverse the full ATB scale (1 ATB) with its initiative value.
"Stack's move" or "stack gets a turn" - the moment when a stack reaches the beginning of the ATB scale and receives the opportunity to perform an action.
"ATB-Speed".
Also known as the stacks' "Initiative" characteristic.
Measured in ATB/ATBsec (i.e., how many ATB scales will be traversed per 1 ATBsec) or ATB/turn (i.e., how many ATB scales will be traversed per turn).
Henceforth, speed will be called "initiative".
"Average" stack initiative value = 10 – in this case, a full ATB scale will be traversed in 1 turn.
A small example of terminology use: "A stack with initiative = 10 will travel distance 1 ATB in the same ATB-time that a stack with initiative = 15 would travel 1.5 ATB."
Also: "The Teleport Assault ability shifts a stack by 0.5 ATB toward the beginning of the scale".
And again: "If the hero has the Sorcery skill, then after using a spell they shift to ATB-scale point = 0.1/0.2/0.3 ATB, and their next turn will occur in time = ATB-distance/initiative = 0.7/10 = 0.07 ATBsec = 0.7 turns".
Typical Problems
Practical problems can be solved by basing them on the "remaining time of the spell effect" (information in the "active effects" window on the stack).
Effect duration is displayed with precision to hundredths. Effect initiative = 10. This information is sufficient to calculate the ATB-distance traversed by the stack, based on the difference in effect durations:
ATB-time = difference_in_durations*initiative /10. Measured in ATB scales.
Other typical problems:
- In what ATB-time will a stack traverse part of the scale.
= 10*ATBdistance/Initiative turns.
- Current position of the stack on the scale (curATB).
= (cur_duration - last_duration)* Initiative /10.
- Stack initiative during the last move.
= 10* (1/(cur_duration - last_duration))
- By how much a stack shifted along the scale during the last move:
= 1-Initiative/(10/(cur_duration - last_duration))
Where: cur_duration – value of remaining spell effect time at current moment;
last_duration - value of remaining spell effect time during the stack's last turn.