Can't Stand Still
Frames and Animations
In common usage this term defines one single picture took out from a series of motion pictures. In computer terms 'Frames per Second (fps)' measures the recovery rate of your monitor graphics. Beyond 25fps human eye doesn't recognize a succession of pictures as single ones, but is subject to delusion of movement. Still you get headaches caused by such slow succession, your eyes won't water way beyond 70fps. The bigger your monitor is, the higher its recovery rate should be.
Games are subject to an internal clock, the faster this clock ticks, the more important is your reactivity. Diablo II doesn't require the reactivity of a First-Person-Shooter. Its internal clock is set to 25fps, so any movement and calculation ingame refers to 25fps game clock speed. That is, the game updates monitor graphics 25 times a second. This has nothing to do with your actual hardware, your monitor displayment itself may (and should) be updated at 75fps or faster, but the game engine has nothing to offer in terms of actualisation.
In Diablo II the term 'frames' is also used to describe animations' speed like walking and running, casting, shooting, blocking etc. I myself always refer to 'Frames per Animation (fpa)' then to make a difference. You may also sometimes read the term 'tick' in descriptions of an effect over duration, to clarify it is a time frame meant, not a frame picture.
So the game actualizes monitor displayment each 0.4 seconds. You can't speed up that one (if you would by some ability to hack the game engine you would mess everything up). You may enter /fps via ingame console, this displays actual monitor displayment update. In TCP/IP games you may encounter very bad rates, even below 25fps, dependent on your network connection. Then playing the game becomes messy, since game engine's updates don't arrive in time to all players. This is called desync(hronization).
Effects lasting some duration like Poison Damge or chill and freeze as well as some other extra precision calculations are based on 1/256 seconds measurement. This is simply the least amount of time the game engine can work with.
Mechanism of animations' working is a bit difficult to understand. Blueprints are in AnimData.d2, according graphics are in *.dcc format, graphic's composition of different body parts is controlled via *.cof files. A more common graphics format which works a bit similar to cof/dcc mechanism is *.gif format, but gif files are just a kind of flip-book, whereas a game unit is composed of one or (way) more dcc files resembling each direction, and an unit's animation has to control all this single pictures at each frame. The composed single pictures are also called 'frames', well, we'll have to live with that.
|Not all listed animations are available to any unit in the game.|
|A1||Attack 1||Standard Attack, also is base to most|
|A2||Attack 2||a variant of A1, of no importance to characters,|
but monsters use it a lot
|BL||Blocking||shield block animation|
|GH||GetHit||Hit Recovery animation|
|DD||Death||first part of Death animation (dying)|
|DT||Death Throw||second part of Death animation (corpse)|
|KK||Kick||animation for kicking barrels, chests etc|
also base to Sin's Combat Kicks
|NU||Neutral (outside town)||eagerly standing around|
|S1||Skill 1||every unit may have assigned up to four|
special animations for certain skill usage
|TH||GetHit (in town)|
|TN||Neutral (in town)||aimlessly standing around|
|TW||Walk (in town)|
|WL||Walk (outside town)|
Some animations are interruptable, some are not. Standing still, walking and running cycles may be interrupted always. Attacking and spellcasting animations only are interruptable as long as the frame with the ActionFlag is not played yet. The ActionFlag defines the frame of an actve animation during which the assigned action - land a blow, release a missile - actually happens. Well, it can indeed be interrupted after that, but it doesn't matter anymore.
Other animations like GetHit during Hit Recovery time are uninterruptable.
1.10 brought a different handling of animation priorities than common before. Some animations are graphically skipped to improve performance. This is not positive in all cases, during an attack series you may be forced into Hit Recovery due to being hit by an enemy. If GetHit animation is skipped graphically you still see your character beating the heck out of the enemies, but without actually doing damage, since server-side the character is in Hit Recovery.
Up to 1.09 you could get 'block-locked', if the character successfully blocked a hit with the shield and suffered another hit during blocking animation's duration. Since 1.10 blocking animation is skipped after a successful block check for a short duration.
Assignment of animations to skill usage is done in Skills.txt. If an unit uses a skill which needs an animation the unit lacks, the unit will disappear or flicker. This became more important with exceeding crossclass skill usage in 1.1x. Arghm4n0 provided an album of screenshots with examples showing other classes using Druid's Arctic Blast.
Each animation's duration is dependent on class and equipped weapon(s), other equipment won't affect animations in technical terms. Following table lists common shortcuts. Last four rows are only in use with the Barbarian, since the other classes aren't allowed to equip two common weapons at once. See also the extraction from AnimData.d2 for further references.
|hth||hand to hand||fist|
|1ht||one handed thrust||knife or javelin|
|2ht||two handed thrust||spear|
|1hs||one handed swing||all one-handed but knife and javelin|
|2hs||two handed sword||not two-handed swing!|
|1js||Left Jab Right Swing||left hand thrusting weapon,|
right hand swinging weapon
|1jt||Left Jab Right Thrust||left hand thrusting weapon,|
right hand thrusting weapon
|1ss||Left Swing Right Swing||left hand swinging weapon,|
right hand swinging weapon
|1st||Left Swing Right Thrust||left hand swinging weapon,|
right hand thrusting weapo
Things are more complicated sometimes, since in addition to predefined animations some special cases also exist. Rollback animations are controlled in Skills.txt, commonly they're used with repeating attacks such as Jab, Zeal, Fend etc.
Furthermore sequence animations (SQ) do exist, which refer to a hardcoded table for characters and to MonSeq.txt for monsters.
Formulas of different animations' durations are derivated in the appropriate FAQtoids.
Tables with breakpoints are summarized in a separate FAQtoid.
- Attack Speed, animation process' description is very detailled here
- Hit Recovery
- Block Rate
- Cast Rate
- tables for all classes
- extraction of AnimData.d2
- extraction of Skills.txt
- Karon aka Rivo
Contact me via E-Mail, if you like.