Stores precise timing information (start/end in milliseconds) for specific types of animations, often used to synchronize gameplay events like ability casts or melee strikes with the visual animation. ⏱️
Purpose: Defines key time points within animations for gameplay logic, such as when an ability effect should trigger (resolve_ms) relative to the animation starting (cast_ms).
Where it appears: Included in animated model types that typically perform actions: AnimatedUnit, AnimatedObjectNoCollision, AnimatedObjectCollision. See WriteOrder.
Engine impact: Used by the gameplay systems (e.g., combat, abilities) to synchronize actions and effects precisely with the visual animation playback. Incorrect timings can lead to abilities feeling laggy or effects appearing at the wrong moment.
Animation Set Editor: Timings are managed exclusively through the Animation Set Editor UI panel, specifically in the "Timings" section. Artists define entries based on Animation Type (CastResolve, Melee, etc.) and Tag ID.
Editing: Within the editor, you set the Cast Ms, Resolve Ms, Direction, and link it to an Animation Marker ID (which must correspond to an ID defined in the "Marker Sets" section of the same editor).
JSON Blob: Like AnimationSet data, the timings configuration is stored in the JSON blob (ANIM_BLOB_KEY) attached to the main model collection (under the "timings" key). This blob is the authoritative source for export.
Export (create_animation_timings): The exporter reads the "timings" list from the JSON blob and reconstructs the AnimationTimings structure, including all substructures, based on the editor's data (blob_to_animationtimings). If no timings are defined in the blob, this block might be skipped during export (depending on model type requirements).
Import (animtimings_to_blob): The importer reads the AnimationTimings block, converts it to the JSON list format, and stores it within the main animation blob (ANIM_BLOB_KEY) on the collection. The editor UI then loads this data.
In-Game Function: The game uses these timings to synchronize gameplay events. For example, in a melee attack animation (animation_type = 2), cast_ms might be when the weapon starts swinging, and resolve_ms is the exact moment the weapon should hit and deal damage. The direction might indicate the attack's vector, and animation_marker_id links it to potentially other data like sound or visual effect triggers defined in AnimationSet.
Editor is Key: Timings are complex and directly tied to gameplay feel. Accurate configuration via the Animation Set Editor is crucial.
Animated Object Fix: For non-unit animated objects (AnimatedObjectNoCollision, AnimatedObjectCollision), the exporter forces version = 3 and removes all timing entries, as these object types typically don't use them.