Freedom Force/KeyframesBasic

From NifTools
Jump to: navigation, search


Contents

Basic Keyframe hexing

There are a number of keyframe hexes that have been important for the FF community for years. These basic operations can be quite daunting in a hex editor but are fairly trivial in NifSkope. Further, some procedures that were difficult even for the initiated are now quite easy. Finally some operations that were previously inconceivable are now straightforward. I'll cover these in this basic tutorial. An advanced tutorial is planned that will cover less straightforward operations. Note that this tutorial mainly covers FF keyframes, including FF keyframes used in FF3R. FF3R keyframes have a different format and will be covered elsewhere.

The initial steps

Be aware that you cannot currently (as of 0.94) load a mesh and then load the animations. You can however load the leyframes in stand-alone mode and than manipulate them as easily as you can a NIF file. You should take all the normal precautions before starting work. Be aware there are no undo functions and you get what you ask for. It's worth noting that when saving a keyframe, NifSkope issues a warning "unassigned parent link" but that this can be ignored and is normal for the style of keyframes that FF/FF3R uses. Despite it, your changes have been saved and the keyframe will work. Large keyframes can take some time to display after loading, even on a powerful machine, so be prepared to wait a bit. You should have the 'block list' and the 'block details' views enabled for keyframe work. The keyframe view is not really useful for FF/FF3R keyframes but can be enabled if you wish.

Fixing broken melee contacts

Load the broken keyframe. Find the broken melee animation in the value column of the block list. Click on the plus to see the children. You will see two chains of nodes. We are interested in NiTextKeyExtraData. Click on it. In the block details you will see a chain of Text Keys. Click the plus sign. This reveals two, three or more individual text keys. Clicking the plus reveals the details of the key, which correspond to the animation elements we all know from character tool. A broken animation might have five keys, start, contact,contact,contact,end. The second and third contacts should be contact_2 and contact_3. Simply double click on the text key to edit it. It's that simple. There is no requirement to change the offset as NifSkope does it for you. Save your work and check the fix in game. Using that animation in character creation should now show number of contacts 3 and cost accordingly.

Swapping alternate animations

Perhaps the simplest of operations. We'll assume you wish to swap idle and idle2. Load the keyframe. Find the idle animation in the value column of the block list. Double click on it and change it to idle2. Find the old idle2 animation in the value column of the block list. Double click on it and change it to idle. Save your work.

Fixing broken area animations

Female_basic is known to have a broken area animation. This is quite an easy fix in NifSkope. Load the broken keyframe. Find the area animation. Again, we are interested in NiTextKeyExtraData. Click on it. In the block details you will see a chain of two Text Keys. If you compare it to area_2 you will find three text keys. Start, leave_hand and end. The area animation is missing the leave_hand key, which is why it doesn't work. First, we need to give the area animation three text keys. Double click on Num Text Keys and change it to three. Then left click on text keys, right click and select array, update. A third, blank text key will appear. Copy the current values for 'time' and 'value' from the current end key into this new key. Now we can repair the second key. Change the value to 'leave_hand'. Change the time to a value between 0 and the current value for time. For this example choose 2, but you might wish to experiment. That's it. Save your work.

Adding multiple contacts to melee animations

For this example we'll assume we have keyframes that have a melee_3 animation with three contacts. We want to increase this to six. Load the keyframes and locate the melee_3 animation and open the child nodes. Again, we are interested in NiTextKeyExtraData. Click on it. In the block details you will see a chain of at least five Text Keys; start,contact,contact_2,contact_3 and end. We will assume there are only five for this example. First, we need to give the animation three extra text keys. Double click on Num Text Keys and change it to eight. Then left click on text keys, right click and select array, update. New blank text keys will appear. Copy the current values for 'time' and 'value' from the current end key into the last of these new keys. Now we can add the extra contacts; contact_4,contact_5,contact_6. Change the original end key to contact_4 and the two remaining new keys to contact_5 and contact_6. The final step is to change the values for time on all six contact keys to ascending values between 0 and the value on the end key. Save and Try it out in game. Unlike with conventional hexing, it is entirely plausible to actually increase the number of animated blows as well, but this is a more advanced operation.

Copying existing animations

It is easy to make a complete copy of an existing animation and rename it. (Perhaps to prevent the game complaining in the logs about missing animations or in preparation for adding a multiple contact melee animation.) Simply left click on the animation you want to copy. Then right click and block, copy branch. Then right click on the blank line at the bottom of the block list and block,paste branch. Rename the copied key by double clicking on the value in the block list. All done, save your work.

Changing a looping animation to once only and vice versa

This is also fairly easy, if a little tedious. Some animations, e.g. melee_idle, loop continuously when played. Other, such as melee_2, play only once. It is possible to switch the behaviour of animations. Be aware that the game engine only allows animations with the correct flag to be used for certain purposes. Changing a melee animation to loop will prevent the game recognising it as a melee animation at all, despite the name. It is usually best to use this technique on animations you have copied using the technique above. Select the animation. Click the plus to reveal the child nodes. We are interested in the NiKeyFrameController chain. This chain usually consists of a string of controllers that reference the next controller. Each controller acts on a specific bone node. We are interested on the flag on each controller, which is either 8(cycle) meaning loop or 12(clamp) meaning once only. Simply descend the list of controllers changing the flag on ALL of them to the desired value. Save your work and test it.

Removing Animations

You might wish to remove animations from a keyframe to reduce the size of the keyframe. Civilian or police keyframes might be a good reason. This is simple. Click on the unwanted keyframe the right click Block,Remove Branch.

Copying animations from another KF file

Open a set of keyframes. Lets call this KF1 From the File menu choose New Window In this new window, open the other KF that has the animation(s) you want, lets call this KF2. It should be one that is compatible with the mesh you are working on. Left click on the animation you want to copy in the block list from KF2 window. Then right click and block, copy branch Go to the window of the original animation,(KF1) then right click on the blank line at the bottom of the block list and choose block,paste branch. Go walk your dog, cook dinner, see what the weather is like outside. This is going to take a while. You might even think that the program has crashed and want to stop it. Don't! Even a powerful machine can take some time to re-organize the keyframes if they are large. Come back when it's eventually done (5 mins is not unusual) rename the animation if required. Save the KF file. Don't bother trying to move the branch up or down the list, because it won't work, and also because Ctool puts all the animation name alphabeticaly anyway.

FF3R keyframes

10.1.0.0 keyframes, as used by FF3R or converted keyframes, have a slightly different format and are slightly easier to work with. The main differences are: Each animation begins with NiControllerSequence. This has a link to each NiKeyframeController (they are not chained) AND defines the node the controller works on. There is only ONE NiTextKeyExtraData, which contains the animation strings as before. Much clearer than FF, no counting nodes required. The same principles apply though.

Personal tools