I want to share with the community a way to make your own animations by editing existing animation files in Nifskope.
Let's face it - the chances of someone out there having made any animation you might want are slim. Asking an
animator to make up some custom animations for you probably won't happen. Understandably so, because it is time-
consuming. So I'm whipping up a very basic tutorial here to get anyone who has the patience to learn started. It's
really not that hard to do - but it will eat up your time. For me after a few years of doing this it would take me
probably roughly 30 hours to finish a complete, realistic animation sequence. But it is so worth it for the in-game
results. If you don't understand something or I missed some steps or whatever don't hestitate to post and I will try
to answer. Be patient with me as I don't have the free time right now that I used to, so you may not get an answer
for a few days. One last word about the learning curve - it's really not hard to understand this but be prepared to
spend a lot of time learning. It will test your patience. I keep in mind the amazing results in-game. You may spend a
week making a great animation, but after that week you will have it forever and can reuse it over and over.
First you need an animation file to edit. I use 'anim_m_sleeping.nif' found in an animation pack by RS-232 (?) I
think (appreciated if anyone can find what this one is called and maybe link to it - it is very old, created maybe 7
-10 years ago). Animation files require 3 different files to work - with filenames that go like: 'Xanim....kf'
'Xanim....nif' and lastly 'anim....nif'. However, I have found that my technique works (for NPCs) with only needing
to change the 'anim....nif' file. So if you can't understand the above, dont worry about it. Also, incredibly enough,
you can apply an animation file to *any* humanoid model - meaning any non-argonian or khajit - for those you will
need to edit a khajit or argonian animation file, which I have no experience with.
Start Nifskope. Load up 'anim_m_sleeping.nif' (or another one if you must). Make sure you are not loading any file
that starts with an 'X' at the beginning of the filename (example: 'Xanim_m_sleeping.nif' or 'Xanim_m_sleeping.kf'
are wrong. You want 'anim_m_sleeping.nif'). Now, you should see a simplified humanoid figure that looks like a stick
figure sort of. If you don't, go to your 'render' menu and tick 'show hidden'. Also note that the figure holds a
sword in the right hand. This sword is simply a dummy to help you visualize angles of held objects and will not
appear in-game when applied to your animated models. Look for the play button around the top-center of the window,
and press play. You should see your figure begin to move and lie down. Note the time bar next to the play button is
advancing as the animation progresses - the numbers are in seconds and are an accurate representation of the number
of seconds which will elapse in-game for your animations. Press play again to stop the animation. Now click directly
on the timestamp number on the time bar. (If you have a recent version of Nifskope) a box appears where you can type
in the exact time you wish the timer to advance to. (Some older versions of Nifskope do not have this handy feature.
Before we start the nitty-gritty, take a moment to visualize in your mind the progression of your new animation. It
is very helpful to perform the animation yourself, noting how and when your arms, head, body, etc. are moving. Pre-
planning the animation will save time later if you realize you missed an important part - take it from someone who
has lost hours of work after realizing he must start over because he didnt think about it beforehand. For this
tutorial, let's start out easy and do the 'fellow bends over a bit and ponders some notices' animation. Start out by
saving a brand-new file so we don't overwrite the basic animation. Let's call it 'anim_ponder1.nif' (or whatever you
prefer) - make sure to retain the 'anim_' part at the start of the filename and the '.nif' extension. A word about
'male' and 'female' animations: any edited animation will work perfectly well on any humanoid model, male or female.
If you want to make special female animations that use more feminine movements that's fine - I don't have the
patience and would probably get them wrong anyway. Now for my visualization. In my mind, this one would consist of an
upper and lower torso forward bend at around a 20 degree angle with the right hand moving up to the chin and then the
hand stroking the chin. So we will keep this one simple and have movement in only the torso, right arm and hand, and
head (to keep it level as the torso bends).
Back in Nifskope, look at the upper left side of the window and note the 'Block List' window. In it, you see one line
labeled as '0 NiNode' with a value of 'anim_m_sleeping.nif'. Do not ever change this value in this line as I am
pretty sure this keeps you from having to change the other 2 files associated with this animation. Now click on the
little triangle left of the '0 NiNode' line to expand the block list entries. Now you should see a number of new
NiNode lines appear, all numbered. We need to start expanding the appropriate triangles to expose the body parts we
need to edit. Click on the triangle left of '2'. We now see '3 NiTextKeyExtraData' (and others). Click on this line
so that it is highlighted. Now look down to the 'Block Details' window, which has populated with some entries, one of
which is 'Text Keys'. Click on the triangle to expand it. Now expand one of the indented other text keys lines and
you will see 'Time' and 'Value' entries. These text keys refer to which idles will be used in-game to perform
animations at the specified times in seconds. I am going to keep this very simple for now and just say that the
creator of this file only made entries for idle7 through idle9 - and that's ok. We still have access to all idles
from 0 through 9. We just need to figure out by trial and error observation the times associated with each idle. I
have already done this. Keeping it simple, note to yourself that idle0 runs from 0.0 to 2.667 while idle1 runs from
2.667 to 17.5. Let's make it even simpler by remembering as follows: idle0 from 0 to 3 seconds and idle1 from 3 to 17
seconds. Why do we need to know this? To control animations in-game we will need to do 2 things in the construction
set: 1) attach the edited animation file to an NPC and 2) write a script to tell the game under what conditions to
play different parts of the animation file. This is not as hard as it sounds and I have found a simple template for
animation scripts which I will share with you later. We will try to take one step at a time.
In Nifskope again, expand the (block list) '4' line triangle (by clicking on the triangle). We have exposed the 5
line now. Click on the 5 line so it is highlighted. In Block Details (again, below the block list window) we see 3
expandable triangles. Line 5 is your master movement and rotation controller. We edit values here for moving the
entire body as a whole along the axes and rotating the entire body as a whole. Let's try it out, even though we wont
keep our changes because for this simple example we wont be moving or rotating the entire body, just body parts. You
would use the line 5 entries for things like: walking, running, doing acrobatic flips, etc. Actually we will play
with line 5 another time. Let's move on.
Back up in the Block List, expand '6'. Line 6 controls the movement of Bip01 Pelvis. This line also controls rotation
of the body as a whole. We won't be editing this line for this example but we will return to it later for more
discussion as this is an important line giving us several tools helpful for complicated motions. Now expand '9' which
is Bip01 Spine. This part controls movement of the neck and is rarely used. If you were making an animation where
precision head movement is essential you would use this but 99% of the time you dont need to change this one. Now
expand '12' which is Bip01 Spine1. Spine1 covers motions involving bending at the waist. Here we are, ready to make
our first real edits. Expand '13' (NiKeyFrameController) and then click 14 (NiKeyFrameData) to highlight it. Look
down at Block Details and locate 'Quaternion Keys' and expand the triangle. Now expand the first 3 indented
Quaternion Key entries (hereafter referred to as quat keys). A quick word about what you should and should not
adjust: for any Bip01 body part or any Bip01 whatsover you will note that you can expand 'Quaternion Keys',
'Translations', and 'Scales'. Quat Keys are always rotations, Translations are always movement along the axes, and
scales are always size changes. Keep it simple and maintain your sanity with this advice - 1) dont ever change scales
anywhere, just leave scales alone 2) the only place you ever change translations is in line 5, which is the
controller data for '2 NiNode Bip01'. Do not change translations in any other body part. If you find you need to
compensate for body part movement with whole body movement, always do it in line 5 (more on this in a future
segment). So hopefully you understand that for this tutorial we only ever change quat keys since 'bending down and
pondering notices' does not require any whole body motion along any axes. Meaning our actor is standing still and not
walking around anywhere.
So now we have the first 3 quat key entries expanded for 'Spine1'. We see that there is a 'Time' value as well as a
'Value' value for each quat key entry. The time is simply the time in seconds at which the actor will rotate this
body part to the value. Value is an expression of the magnitude of movement and can be edited as a 'Euler' or 'Axis'
expression. I find Euler to be much more understandable and intuitive so that's what we will use. In the 1st quat key
entry, double-click on the 'Y P R' area on the 'Value' line. The Y P R represents 3 axes of rotation, which when used
in combination will produce any conceivable rotation you can imagine. Don't worry if you aren't getting it you soon
will. Click on the little box that says either 'Axis' or 'Euler'. Click it a few times. Now make sure it says 'Euler'
when you are done clicking it. Now change the value in 'Y' to 50 (just type in 50 and press enter). Whoa! Did you see
that? Our stick figure turned his upper body left by 50 degrees. Now enter -80 in 'Y' (make sure the little box
always says 'Euler' by clicking it until it does). Now he turned 80 degrees right. Pretty rad. Now if you want press
play. The stick figure twists the upper body back to normal and resumes the lying down movement. Why? Look at the 2nd
quat key entry for 'Time', which reads 0.4667. If we pull the time bar back to 0 and press play again, we note that
our figure twists back to normal at precisely 0.4667 seconds. Making sure the time bar is back at 0, take a moment to
change Y back to 0 and change P to 30 (in the time: 0.0 quat key entry). Now the stick figure has bent over to the
side in a completely different way than before. We can do the same thing with R, causing the figure to bend forward
or back.
Now let's get our time entries in order. Click on the number on the 'Time' line for the 2nd quat key, and type in 1.5
and press enter. Do the same for the 3rd quat key but enter 3. Now you should have time values of 0.0000 for the 1st,
1.5000 for the 2nd, and 3.000 for the 3rd quat key entries. Remember above how I talked about idle0 and idle1? idle0
runs from time 0 to 3 seconds. Let's say for discussion purposes (don't actually do this) that we saved this file,
opened the CS, and attached it to an NPC. We could put it on any humanoid NPC, Divath Fyr, Ranis the Balmora
guildmistress, even Dagoth Ur I'm pretty sure - and they would be briefly bent over at the waist whenever the game
said they should be in idle0. More on this in a future article but let's look at what we have done by editing the
times - if we expand the 4th quat key entry we see the time is at 0.5667, which is of course in the past since we
changed the 3rd entry to 3.0. Don't worry about it - it doesnt crash the game or anything. The engine will simply
skip down the entries until it finds one after 3.0 and continue the animation, instantly and automatically. The only
problem is it will look bad after 3 seconds have elapsed. My point is, it's ok to partially edit your times and
rotations and then fire up MW to check your work - it wont break anything.
Now let's implement the first part of this animation sequence and enter the rotation values we actually want. Recall
that we are starting with a bending over of the upper body, to reflect that our actor is leaning over for a closer
look at the notice. Before we do that, lets get his breathing in order. You want the immersion of a realistic
animation right? Well then you need breathing - and it's easy to do. In the 1st through 3rd quat keys, enter as
follows: 1)Y0 P0 R0 2) Y0 P0 R5 3) Y0 P0 R0 (click on the Y P R area and type 0, tab, 0, tab, 0 then enter - make
sure the box says 'Euler'). R value of 5 indicates a forward bend at the waist of 5 degrees, so what we should see is
a slight forward bend to 1.5 seconds and then return to normal at 3.0 seconds. Make sure the timebar is at 0 and
press play. Hey! its not right that sux. Well now we see that we will need to do some preparation work to make this
happen. Whats going on here? Well, we have only changed the values for Spine1 - we will have to change the values for
each body part - I told you this may test your patience - remember the awesome results you can get for all this
effort. If you are still with me, in block list expand all of the needed triangles: 15 Spine 2, 18 Neck, 21 Head, 33
L Clavicle, 36 L UpperArm, 39 L Forearm, 87 R Clavicle, 90 R UpperArm, 93 R Forearm, 181 L Thigh, 184 L Calf, 207 R
Thigh, 210 R Calf. Now go back up to line 5, click to highlight. In block details expand translations (recall my
discussion above about line 5 being the only place we ever need to edit translations). Expand keys and expand the 1st
3 indented key entries. Note that the format is different here in translations: we have 'Time' as expected but
'Value' is now in X Y Z. This is because translations moves the entire figure along the X, Y, and/or Z axes with Z
being up or down. An important note about translations in line 5: these motions will ignore all in-game collison
features. This means if you enter large values here causing big movements, you can get issues such as actors walking
through walls or furniture, or clipping through the floor/ground. With that said, enter X0 Y0 Z77 as the 1st key
values. Note that our figure moved up just slightly. Why did I pick up as the direction? When cells load, actors
'fall' if they are above something until they collide with it, usually the floor. Luckily for us, the game engine
automatically compensates between 'falling' movement and our own line 5 animation movement for the Z axis. This means
that when animated actors are in line 5 movement, they will collide with the floor (or other objects) as long as they
are always *above* it. So when in doubt go up up up. Now change the times for the 1st 3 keys just like we did with
spine1 - 1st is time 0, 2nd is time 1.5, 3rd is time 3.0 (advanced students: you can also just enter time 3.0 in the
2nd key for parts that dont move around like this one - if you didnt understand, dont worry about it and just do like
above for all of them). Now change the values for 2nd and 3rd keys to X0 Y0 Z77. This locks our actor in the same
place for the first 3 seconds of the animation.
Now go to line 7 and expand it to expose line 8 (NiKeyFrameData for Pelvis). Lock this part in place by expanding the
1st 3 quat keys and going time 0, time 1.5, and time 3.0 as before. Now change the values for the 2nd and 3rd so they
match the 1st - note that in this case it is already that way so we don't need to do it this time. Now the patience
part: change the NiKeyFrameData in this same way for Head, L UpperArm, L Forearm, R Upperarm, R Forearm, L Thigh, L
Calf, R Thigh, and R Calf. The Neck, Spine, Hands, and Feet may need to be changed but we are trying to lock down the
really distracting body parts here for learning purposes.
Timebar at 0 and press play. Our figure should bend forward 5 degrees to 1.5 seconds and then back at 3.0. Doesn't
really look like breathing right? I agree. We need to now edit Spine2 to compensate for Spine1 to look like the chest
breathing in and out. Expand line 16 and click line 17 (NiKeyFrameData for Spine2) to highlight. Spine2 controls
upperbody rotation from the upper ribs to the shoulder. As usual, expand your 1st 3 quat keys, set time to 0 - 1.5 -
3.0, now enter values of 1) Y0 P0 R0 2) Y0 P0 R-11 3) Y0 P0 R0. This causes the upper torso to move backwards while
the lower torso is moving forwards, creating the appearance of breathing. You'll note that the arms are not staying
stable, and neither is the head. We need to edit the left and right upper arms, and the head to have compensating
movement so they dont sway. For now I leave this as an exercise to the reader. You can also play with the clavicle
values for more detail if desired - I find it mostly unnecessary.
This has gone much longer than I thought, so I will check back in a few days to see if there is any interest in a
continuation. Thanks for reading and I hope this might in time generate some fantastic animations.