Bone Priorities

How to Find a Bone Priority in an Animation File

To find the bone priority in an animation (.kf) file, open the file in NifSkope and select (left-click) the 0 NiControllerSequence in the Block List window. In the Block Details window, find the Controlled Blocks entry and expand it. Each bone will have its own Controlled Blocks entry (the name of the bone is listed in the Value column). Expand the bone's Controlled Blocks entry and find the Priority listing. The bone priority appears in the Value column.

Bone Priorities for Default _Male 3rd Person Animations
Animation AnimGroup Cycle Type Bip01 Bip01 Pelvis Bip01 Spine Bip01 Spine1 Bip01 Spine2 Bip01 Neck Bip01 Neck1 Bip01 Head Bip01 L Clavicle Bip01 L UpperArm Bip01 L Forearm Bip01 L Hand Bip01 L Finger0 Bip01 L Finger01 Bip01 L Finger02 Bip01 L Finger1 Bip01 L Finger11 Bip01 L Finger12 Bip01 L Finger2 Bip01 L Finger21 Bip01 L Finger22 Bip01 L Finger3 Bip01 L Finger31 Bip01 L Finger32 Bip01 L Finger4 Bip01 L Finger41 Bip01 L Finger42 Torch ArrowBone Bip01 L ForearmTwist Bip01 L UpperArmTwist Bip01 R Clavicle Bip01 R UpperArm Bip01 R Forearm Bip01 R Hand Bip01 R Finger0 Bip01 R Finger01 Bip01 R Finger02 Bip01 R Finger1 Bip01 R Finger11 Bip01 R Finger12 Bip01 R Finger2 Bip01 R Finger21 Bip01 R Finger22 Bip01 R Finger3 Bip01 R Finger31 Bip01 R Finger32 Bip01 R Finger4 Bip01 R Finger41 Bip01 R Finger42 ArrowHelper01 Weapon Bip01 R ForearmTwist Bip01 R UpperArmTwist BackWeapon Bow:0 Bow:0 Quiver magicNode Bip01 L Thigh Bip01 L Calf Bip01 L Foot Bip01 L Toe0 Bip01 R Thigh Bip01 R Calf Bip01 R Foot Bip01 R Toe0 SideWeapon Bip01 TailRoot Bip01 Tail01 Bip01 Tail02 Bip01 Tail03 Bip01 Tail04 Bip01 Tail05 Bip01 Tail06 Bip01 Tail07 Bip01 Tail08 Bip01 NonAccum
blockattack BlockAttack Clamp 27 27 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 - 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 - 75 75 75 75 - - 75 - 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27
bowattack AttackBow Clamp 25 25 55 55 55 55 55 95 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 - 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
castself CastSelf Clamp 26 26 46 46 46 46 46 96 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 - 66 66 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 - 46 46 46 46 - - 46 66 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26
handtohandattackleft AttackLeft Clamp 25 25 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 - 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 - 55 55 55 55 - - 55 - 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
handtohandattackleftpower AttackLeftPower Clamp 55 55 55 55 55 55 55 55 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 - 65 65 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 - 55 55 55 55 - - 55 - 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
handtohandblockhit BlockHit Clamp 27 27 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 - 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 - 75 75 75 75 - - 75 - 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27
handtohandequip Equip Clamp 25 25 55 55 55 55 55 55 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 - 35 35 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 - 55 55 55 55 - - 55 - 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
handtohandrecoil Recoil Clamp 25 25 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 - 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 - 55 55 55 55 - - 55 - 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
handtohandstagger Stagger Clamp 70 70 70 70 70 70 90 90 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 - 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 - 70 70 70 70 - - 70 - 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70
handtohandunequip Unequip Clamp 25 25 55 55 55 55 55 55 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 - 35 35 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 - 55 55 55 55 - - 55 - 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
idle Idle Loop 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 - 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 - 20 20 20 20 20 20 20 - 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
walkforward Forward Loop 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 - 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 - 30 30 30 30 - - 30 - 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30

Notes

Bone Groups

The default _male armature can be roughly divided into two major bone groups: bones above the waist and bones below the waist. Within these groups it is possible to identify rough sub-groups: all bones in the chain beginning with the left clavicle (shoulder bone) descending to the left finger tip bones, including the upper arm and forearm twist bones and the Torch/Shield bone, appear to share the same bone priorities; a similar sub-group exists for the bones from the right clavicle to the right finger tip bones that includes the Weapon bone in place of the Torch/Shield bone. Both sets of leg bones, the tail bones, and the pelvis (along with the Bip01, Bip01 NonAccum, and SideWeapon bones) may be considered a sub-group as well, as they seem to share the same priorities, although in this case the sub-group is functionally the same as the group of 'bones below the waist'. The remaining bones display some variety: the head/neck/spine chain is often broken up with varying priorities based on the animation. The Quiver and BackWeapon bones, of course, are usually grouped with the spine bones.

Animation Groups

Idle animations have the lowest priority (about 20), which is appropriate since the player is not directly controlling the avatar during idles. Movement animations have higher (30) priorities, which allow the movement animations to override the idle animations when the player moves the avatar. Animations involving the casting of spells or melee attacks tend to set higher bone priorities for bones above the waist and lower priorities for bones below the waist. This allows the bones directly involved in the action to override movement or idle animations on the spine, head, and arms while still allowing the player to move the avatar with the higher priorities on the legs. Special bones, like the weapon and magic node bones are rougly grouped by location with the rigged bones. The Torch, Weapon, BackWeapon, Quiver, Bow, and magicNode bones are grouped with the bones above the waist and the Bip01, Bip01 NonAccum, and SideWeapon with the bones below the waist.

Stagger animations have very high bone priorities (70+), although they are occasionally exceeded by other animations. This, of course, makes sense since the purpose of the stagger is to 'override' the player's choice of actions and hence penalize them.

Bows and Spells

Bow and spell casting animations require certain bones that are only present in animations that execute bow and spell-related actions. Bow:0 (two bones), ArrowBone, and ArrowHelper01 in bow animations and magicNode in spell casting animations. Dashes in the chart for other animations indicate that no priority was set for the bone in the animation, indicating it was either not present or explicitly left blank. (I still have to check this.)

Text Keys

How to Find Text Keys in an Animation File

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.)

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
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

Notes

Every animation must define a text key for the first frame of animation to export and the last frame of animation to export. These are the 'start' and 'end' keys respectively. Everything between these keys (inclusive) will be exported by the export scripts.

Note that these keys do not have to be placed exactly on the first and last frame of animation, although the start key usually is. Because the last frame of the actual animation is usually identical to the first frame (to allow for a smooth transition in looping animations) exporting both frames will cause a very short but unnatural pause while the first frame is repeated. To avoid this pause, the end key is usuallly placed 1 frame before the last frame of animation. For example: if your animation is 46 frames long, and frame 1 and frame 46 have identical transform keys, you will need to place your end text key at frame 45.

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.)

Sound Effects

To add sound effects to your animations create an Enum: <string> text key at an appropriate point in your animation where 'string' is one of the standard sound effects listed in the creature sound tab: Attack, Aware, Death, Hit (for injury), Idle, Left (for Left Foot), BackLeft (for Left Back Foot), Right (for Right Foot), BackRight (for Back Right Foot), and Weapon. If you would like to use a different sound, use the Sound <string> text key, where 'string' is the editor name in the Construction Set of the sound to use.

Sounds must be placed in the Oblivion\Data\Sound\FX\ folder. It is recommended that you follow Bethesda's standard file structure when creating your files. Once the sound is created and placed in the proper directory, create a new sound in the CS (Object Window -> Miscellaneous -> Sound). Note that you must select a sound file (not the folder) in order to add the sound to a creature the first time.

Once you have created your sound, you must add it to the creature. Open the Sounds tab on the creature and right-click to add a New sound. Select one of the default sound types from the menu and browse to the appropriate sound file. (Note that sound effects called via the Sound text key do not need to be added to the creature's Sounds tab because the file name is explicit in the animation.)

If you would like to add variations on a default sound, you may now edit your sound effect in the editor and change the file path to point to the folder containing the file you originally selected. Adding more sound files to this folder will allow the engine to randomly select a file to play when the sound effect is called.