Text Keys

Text keys are instructions embedded in animation files that tell the game when to start and stop the animation, play sounds, process a hit on an actor, form a facial expression, etc. All animations require at a minimum start and end keys to indicate which frames should be considered the first and last frame of animation.

How to Find Text Keys in an Animation File

NifSkope: To find text keys in an animation (.kf) file, open the file in NifSkope and select (left-click) the 0 NiControllerSequence in the Block List window. Scroll to the bottom of the list and find the NiTextKeyExtraData node and select (left-click) it. In the Block Details window, find the Text Keys entry and expand it. Each text key will have its own Text Keys entry. Expand it. The text key will be in the Value column of the Value entry. The time of the text key appears just above it in the Time entry. (Time is in seconds.)

Finding the text keys in Nifskope.

Blender: To find text keys in Blender, import the animation and switch one of the windows to Text mode. Use the selection box (the one that probably says 'TX:Text') to find the TX:Anim entry and select it.

Finding the text keys in Blender.

List of Text Keys

a: [L|R]
Used to indicate when to switch between left and right attacks. The handtohandattackleft animation, for example, has a text key informing the engine when it should switch to a right-handed attack (a:R).
Attach
Used in Equip animations. Could indicate at what point to equip the weapon.
Attack
Used by BlockAttack animations to indicate when a counter-attack should be registered.
Blend: <int>
"Define a range of animation priorities for all bones in the animation. The existing priorities are modified to fit within +- range, where int is the blending integer priority defined. This is applied to the entire animation." Sinkhole. It is not clear for how long these animation priorities exist or whether or not it is specific to the animation it is set for or if it changes a general setting in the game engine. It is assumed that the blending begins with the Blend keyframe and ends when the animation ends and that the blending only affects bone priorities for the animation it is set for. Some animations set Blend: 0 text keys, however, which appear to forcibly set blending to 0 for that animation. I'm not sure why this would be required if the blending was restricted to the animation the key was set for, though it might make sense if the Blending was a general setting for the engine and if certain animations should not be blended. Examples of this can be found in the blockhit and handtohandblockhit animations.
Detach
Used in Unequip animations. Could indicate at what point to unequip the weapon.
end
Indicates the last frame of the animation. Required.
Enum: <string>
Indicate when sound effects (like footsteps) should be played. Enum sound effects appear to be used by the engine for specific events, such as footsteps and the sound made by a creature when it detects an enemy. Other sound effects that the animator may require can be played using the Sound text key. Note that the foot step sound effects do not have to be actual foot steps; if your creature floats, flies, or swims it can be any sound that would typically be made by your creature when moving. Standard sound effects include: Left, Right, BackLeft, BackRight (for feet), Aware, Attack, Hit (for injury), and Death.
Hit
Indicates the point in an animation at which an attack or spell hits its target. If you fail to include this key your attack and spell animations will never actually hit.
Hold
Used in bow animations. Presumably to indicate when to hold (pause) the animation sequence while the player has the bow drawn but has not yet released the arrow.
m: [L|R]
Used to indicate when the left or right foot is in contact with the ground and when to switch to the other foot. This key is used in movement animations but doesn't appear to be used in other animations.
Release
Used in bow animations. Presumably to indicate when to continue the animation sequence after the player has released the arrow.
Sound: <string>
Used to indicate when other sounds not expected by the engine should be played. Some sound effects are expected in movement animations, equipping animations, etc., and are usually handled by the Enum text key. All other sounds appear to be handled by the Sound key.
start
Indicates the first frame of the animation. Required.

(Information about this list of text keys is originally derived from Sinkhole and expanded upon by my own observations.)

Sample Text Keys for Vanilla Anims for the Default _Male 3rd Person Animations

blockattack
Time Text Key
0.0 start
0.0333 Blend: 0
0.3 Attack
0.3 Sound: WPNBlockShieldHeavy
0.4667 Enum: Right
0.6667 Enum: Left
0.7667 end
bowattack
Time Text Key
0.0 start
0.0333 Sound: WPNBowDraw
0.2667 Attach
1.3667 Hold
1.4333 Release
1.4333 Sound: bowShoot
1.9667 end
castself
Time Text Key
0.0 start
0.0333 Blend: 9
0.3667 Hit
1.4 end
handtohandattackleft
Time Text Key
0.0 start
0.2 Hit
0.4333 a:R
0.6667 end
handtohandattackleftpower
Time Text Key
0.0 start
0.2 Enum: Right
0.4667 Hit
0.5333 Enum: Right
1.1667 Enum: Right
1.2333 Enum: Left
1.3333 end
handtohandblockhit
Time Text Key
0.0 start
0.0333 Blend: 0
3.0 end
handtohandequip
Time Text Key
0.0 start
0.0333 Blend: 6
0.1 Attach
0.1 Enum: Equip
0.2 end
handtohandrecoil
Time Text Key
0.0 start
0.1667 Enum: Right
0.3333 Enum: Left
0.5667 Enum: Right
0.7333 end
handtohandstagger
Time Text Key
0.0 start
0.3333 Enum: Right
0.5 Enum: Left
0.7 Enum: Right
0.9333 Enum: Left
1.2 Enum: Right
1.8 Enum: Right
1.8667 Enum: Left
2.0333 end
handtohandunequip
Time Text Key
0.0 start
0.1 Detach
0.1 Enum: Unequip
0.3 end
idle
Time Text Key
0.0 start
6.0 end
jumpstart
Time Text Key
0.0 start
0.2667 end
walkforward
Time Text Key
0.0 start
0.3 Enum: Right
0.3667 m:R
0.8 Enum: Left
0.8667 m:L
1.0 end

Last updated July 20, 2011

© 2009-2011 Dave Finch