Animations Guidelines

From Project Tamriel Wiki
Jump to navigation Jump to search

Animations make Morrowind creatures, NPCs, and objects come to life.

Animations in Morrowind are nowadays created using Blender's inbuilt tools, and are exported using the Morrowind Blender tool. Hence, this page largely covers the quirks of the NIF file format as it relates to animation.

Animations are one of the more obscure, but most-needed parts of Morrowind asset creation; any developers with experience in the subject are highly valued.

Beware that much of the informtion below may be outdated, especially as regards the Blender Morrowind plugin.


No new up-to-date animation tutorials exist for Morrowind, unfortunately. However, the following selection of old guides may still be useful, though bear in mind that the UI and possibilities of Blender and its Morrowind plugin have massively improved since these were made:

Note: Vanilla Morrowind assets were developed using 3ds Max, which was also the preferred way to make animations in the early Morrowind modding scene, and for which you may still find many guides floating around. However, modern versions of 3ds Max are no longer compatible with the old Morrowind export plugin, and it is currently not possible to make animations for Morrowind in that program.


Morrowind uses two main types of animation: keyframes and controllers.

  • Keyframe animation is either started by scripts (for ACTIVATOR, LIGHT and DOOR type objects only; for example, OutsideBanner), or called in a hardcoded manner by the engine (NPCs and creatures, with fixed animation names like idle2, and the head body part for blinking and speaking). Keyframe animation uses three files: NIF, xNIF and xKF (for example, Furn_banner_tavern_01.nif, xFurn_banner_tavern_01.nif, and xFurn_banner_tavern_01.kf. The NIF file can contain both geometry and animation and is used exclusively by the Construction Set (as far as the game is concerned, it can technically be reduced to a skeleton with no animations), while the xNIF and xKF files contain only geometry and only keyframe animations, respectively, and are used by the game.
    • Exceptions: head body parts have text keys but only use the NIF file, and xNIF files can also contain additional animations (for example, NiVisController in XDremora.nif, NiBSParticleNode in XKwama Forager.nif).
  • Controller animations run on their own based on time and only need the NIF file. Examples include animated particles (Ex_waterfall_mist_01.nif), UV as in animated texture (Ex_Vivec_waterfall_01.nif), geometry (NiMorpherController), and alpha (magic_hit_Levitate.nif).
    • Note: such alpha-animated magic effects used by the engine work in NiNode, but for objects they need NiBSAnimationNode with certain flag values or 32, see the NiBSAnimationNode flags section in the Particle Effect Guidelines.


Animation files can be attached to individual NPCs and overwrite only existing animation types (described here), and animation types that aren't overwritten are kept from base_anim (for example, breton dancer girl).

Animations are sampled at 15 FPS, the smallest time between two keys is 0.0667 seconds. In Blender, the default frame number is the time key multiplied by 30, plus 1.


Beware that this section may be largely outdated! Someone with modern Morrowind/Blender animation knowledge should look this over.

Combining Separate Animations

Morrowind animations are all in a single file and that's very inconvenient to work with. To separate and combine xKF files only, see the AnimKit section below.

To use animation windows like the Action editor or NLA editor in Blender with those very long files without lagging to seconds per frame, hide some of the bones to hide their animation channels. Consider using bone layers for this.

For Blender 2.49, to separate and combine animations from different files, use File>Append or Link>(click .blend file)>Action>(DefaultAction or name of the action containing animations), then use the Action Editor to browse for the new appended action for all bones; for the root node do the same with File>Append or Link>(click .blend file)>Ipo>(Ipo or name of the curve containing the root animation) then use the Ipo editor with Object mode. To copy or paste from one action to another, first select the bones in pose mode or channels in the editor.

Editing head shapes in Blender

To repeat the same edits in base, talk and blink shapes, use the shortcut W in Edit mode to get the options Blend from shape or Propagate to all shapes.

Head width

Heads and hair will be affected by race modifiers, so they will often look thinner or wider in the game/CS than their model really is. Examples with the default vanilla modifiers (see Weight at the bottom of the UESP race table): Imperial and Nord males will be stretched 25% wider, whereas Breton and Dark Elf females will be 10% thinner.

Head with multiple shapes

Additional static shapes can be used, but only the first shape can be animated with Talk and Blink. More animated shapes won't sync with these animation keys and will instead use the NPC's current base anim times if they don't ignore parent animation. If the mesh contains any skinned Tri Head shapes it can't be animated.

Applying animations from an xKF file to a skeleton

NifSkope cannot import Morrowind xKF animations into a NIF file. A slow manual workaround is to copy each NiKeyframeController (with only NiKeyframeData under it) into its bones in the NIF file.

KF: Editing keyframe strings in Nifskope

When editing text values, pressing Enter applies the change and closes the text box which doesn't let you jump a line. To create line returns, you can press Shift+Enter.

KF: Soundgen

After editing xKF keys with line returns in NifSkope, keys with several animation group lines beginning with a "soundgen" line may give animation group errors (Bad note string "Sound...). To fix that, move the soundgen line after the animation group lines in that key.

KF: Sound

Keyframe text keys can use "sound:" directly with sound IDs. The IDs aren't hardcoded and can use any sound created in the CS as long as the ID doesn't contain whitespaces.

KF: Maximum combined keys

A kf entry can't have more than 5 anim text keys for the same time after sampling at 15 fps (less than 0.0667s difference is not enough) and there can't be more than 6 different animation groups sharing any part of the animation - otherwise you get a "Too many shared anim groups" warning message.

NPC animation file: X.NIF

When giving a NPC a special animation file, the X.NIF file must contain all the bones used in the "base_anim.NIF" files, the base files (NIF, X.NIF, X.KF) used for all NPC animations. Add tail and toe bones to avoid error messages for users with modified base anim files that include beast bones.

The X.NIF file needs nodes for each body slot: the "Bip01 Neck" node is the bone itself that is needed for animation and skinning, but the "Neck" node is the one that determines where the Neck body slot will be rendered.

"Shield Bone" coordinates give the rotation, position and scale of the shield. "Weapon Bone" gives the rotation, position and scale of the weapon (unlike Shield Bone, Weapon Bone properties are overwritten by the vanilla KF animation file).

Player animation

Although the "player" actor can be given an animation file (in the animation property of the NPC_ record with the ID "player") it reportedly works only if the player's race is not changed during character generation.

Animation types

Animation names are hardcoded (described here). Melee weapon animations (1hand, 2hand, 2close and 2wide) have their own walk or run animations, but bow animations for example use the 1h animations for movement.

NPC animation body groups

Animation groups of bones are lower body (root, lower spine, legs), upper body (spine1 and up) and left arm. Animations can be mixed for the player but also for NPCs: left arm is mixed for torch and ashstorm animations; upper and lower body are mixed when moving with hands in a spellcasting pose... This has less visible and unintended consequences, for instance getting back in melee attack range of an over encumbered NPC can make it attack with its upper body while its lower body doesn't animate; attack animations between "hit" and "follow" use other lower body animations during some frames which is why combat animations jitter...

Extra NPC bones

In the unmodified vanilla engine, NPC bone names are hardcoded for animation: it's possible to use other bone names in the XNIF file to change the translations and rotations of hardcoded bones, but only bones with known names will take animations from the KF file and allow skinned meshes to animate. Bone names recognised by the engine are (from MCP doc, add "Bip01 " before each name):

Lower body group - Pelvis, L Thigh, L Calf, L Foot, L Toe0, R Thigh, R Calf, R Foot, R Toe0, MRT, Tail

Upper body group - Spine1, Spine2, Neck, Head, R Clavicle, R UpperArm, R Forearm, R Hand, R Finger0, R Finger1, R Finger2, R Finger3, R Finger4, Weapon Bone

Left arm group - L Clavicle, L UpperArm, L Forearm, L Hand, L Finger0, L Finger1, L Finger2, L Finger3, L Finger4, Shield Bone

The "Dummy<digit x 2>" node name pattern has a special use in the engine only for mutiple-effect target spells, in e/vfx_pattern02.nif .. e/vfx_pattern08.nif used by the Weapon IDs VFX_Multiple2 .. VFX_Multiple8.

Extra NPC bones: MCP

With MCP's optional feature "improved animation support", arbitrary bone names are possible for animation if they include the name of one of the original bones, and they'll behave as part of that bone's group (lower body, upper body or left arm). OpenMW natively allows arbitrary bone names.

Animated equipment

Controllers can be used in weapons and equipment with time keys that link them to NPC/player animations, but in the vanilla engine attack animations will be overridden by walk or run animations if the bearer is moving. As equipment animated like this relies on key times in base_anim, it will only be compatible with animation replacers that do respect the same time values as vanilla base_anim. Another issue for animated weapons is that if they're used by the player, a different animation file is used for first person perspective, and time keys are not the same as in third person.

Root bone

Any animations of the root bone change the actor's coordinates in the game. For creatures or NPC animations the names of nodes matter. The root node must be called by a specific name for movement to work in the game ("Root Bone" or "Bip01" work for creatures). To move the root node in blender (for walking, running) select the armature in object mode.

Root bone: Minimum movement

If movement animations (walk, run) are missing root coordinate changes or if their movement speed is too slow the engine will give an error saying it was exported with "Animate in Place" from MAX.

For walking, MCP has a default fix that "Allows actors with very slow walk animations (<1 unit/sec) to load without causing animation errors". It only works for walking animations (not running animations - and not walking in combat stance which only the player uses by default).

Static NPCs

For static corpse or mannequin animations in the vanilla engine the NPC animation file can technically be NIF only, but if xNIF and xKF files are missing animation types not included in the NIF will be ignored and not taken from base_anim.


Rotation Type and Translations Interpolation key types (in NiKeyframeController/NiKeyframeData):

Rotations should be linear (“LINEAR_KEY”). “When rotating objects or systems, please use a Linear Rotation Controller for the best and most accurate results. TCB & Smooth Rotation are supported but not suggested and may provide wacky results in some cases. Ever have trouble in 3dMax or MaxImmerse getting something to simply rotate 360* without stuttering at the end of its rotation? Use a Linear Rotation Controller.

Controller flags

See the NiBSAnimationNode Flags section in the Particle Effect Guidelines; relevant flags have the same meanings as for particles.


Liztail's Animation Kit (MMH link, Nexus link) is a utility for both players and modders centered around modifying the NPC animation files.

A very useful feature is the addition of tail bones needed for new Khajiit varieties. Below sections detail other main functions of the utility for modders.


split_kf splits full animation xKF files into smaller single animation ones.

Note that there is a limitation with Split regarding multiple text keys. At worst, split can stop as soon as it finds a key with several lines that have different animation names and no longer exports any of the animations that come later in the file, without any error message. At best, split divides animations that share the same keys into several xKF animations, including frames on which one animation stops and another starts, so an animation file that is first split and then re-merged by Animkit can become much heavier with no added benefit.


merge_kf merges small, single-animation xKF files into big, multi-animation ones.

There are several limitations with Merge:

  • It doesn't support several animations with different names starting on the same frame; if there are more than one, you'll have to add them back to the text key in NifSkope.
  • It doesn't support scale keys and only supports linear controllers for translation and rotation.
  • Merge accepts only base_anim animation names for text keys, and they are case sensitive: Knockdown will be correctly found and merged, KnockDown will not.
  • Since only base_anim names are used, merge only supports NPC animations. If you want to merge animations from creatures that have the same skeleton as NPCs, you'll first have to adapt for case sensitive keys like KnockDown, and for animations that have names that don't exist for NPCs, like Attack, you'll have to at least temporarily rename the files to other NPC animation names. You may also need to check and rename the text keys inside the corresponding xKF file, and take into account that not all animations are Start and Stop – some have loops, NPC attacks have different keys, and so on.
  • Merge reorders the timeline and will probably change the order in which the bone keys are chained in the xKF. The different times may break compatibility with animated equipment.


preview_kf previews animations by applying each to a .nif file with a skeleton.

A limitation with Preview is that it creates one .nif for each animation in the xKF, even if you merge all animations into the same xKF first. It's only meant to be used to easily preview what each animation key looks like.

To trick Animkit into creating a single .nif instead of one .nif for each animation: open the merged xKF in NifSkope, click NiTextKeyExtraData, take the time from the last text key, and edit the second text key to have the time of the last text key. To fix that .nif in NifSkope: remove its NiTextKeyExtraData, open the unmodified merged xKF, expand NiTextKeyExtraData, remove the NiStringExtraData branch under it, copy the NiTextKeyExtraData, paste it into the previewed .nif and look at its number, click the root node (0 NiNode) and give that number in Extra Data.