I've used this tutorial to add the animation of the pikeman to the rifleman (
http://forums.civfanatics.com/showthread.php?t=353426). To do this successfully, I had to add a bone to the rifleman unit, because it lacks the BIP R Clavicle bone that is needed for the pikeman animation. I think the way to do this with NifSkope isn't covered anywhere else, so I want to give here a short explanation about how I did it. I don't know if this is the absolute right way to do it and if it always works this way, but at least it did for the rifleman. Also I expect that everyone who reads this already has some experience with NifSkope, so I will not cover every detail.
As I said the pikeman animation uses the BIP R Clavicle. Using the animation with a rifleman unit that lacks this bone leads to strange behavior. Thus the first thing that has to be done is to add the needed bone to the rifleman bone set. The BIP R Clavicle is (if present) located between the BIP Neck (parent) and the BIP R UpperArm (child). Adding the bone is pretty simple, just go to the BIP Neck in NifSkope, add a NiNode to it, rename this NiNode to BIP R Clavicle, give the BIP R Clavicle the BIP R UpperArm as child (don't copy & paste! Use the BIP R UpperArm that is already present) and 'unchild' the BIP R UpperArm from the BIP Neck. After this is done, the NifSkope should look like this:
Next point is to make the new bone a target for the .kf files. This way this file can alter the bone's position during the animation. To do so, just click on the NiMultiTargetTransformController (entry 5 in the picture above) and open the Extra Targets List at the bottom of the Block Details. Here you should see all the bones of the rifleman unit, except for the newly made BIP R Clavicle. Change the Num Extra Targets to 23, refresh the Extra Targets and put the number of the BIP R Clavicle in the new entry that is called 'none'.
Believe it or not, now the pikeman animation will work with no problems for the rifleman unit. It might look a bit odd in NifSkope, but looks fine in the game. Everything seems well now, but there is still a problem. Similar to the visibility of the extra items or weapons the position of the bones will always be locked to the last change that was made to it. This means for the rifleman, that at the time that a normal rifleman animation is played on it, the right arm will twisted in the wrong direction, because the rifleman animations don't have an entry for the BIP R Clavicle. To make the rifleman be able to use both sets of animation, the rifleman animations will have to be modified. I will explain what to do for the rifleman_md_ranged_idle.kf, but in fact these changes will have to be done for all animations that might have a pikeman animation before them.
After opening the rifleman_md_ranged_idle.kf with NifSkope search in the NiControllerSequence for a node that is called NiTransformInterpolator that has a childnode called NiTransformData. This Node stores the change of the position, rotation and scale of a bone during the animation. Because the BIP R Clavicle we added to the rifleman has to be resetted to zero for the rifleman animations, we need a new NiTransformInterpolator that does exactly this. So, copy branch the NiTransformInterpolator and paste it at the bottom of the node list. Click on the NiTransformData of that new node change the number of Num Rotation Keys and Num Keys in Translations to 2. Refresh Quaterion Keys and Keys in Translations. Now open the 2 Quaterion Keys in Quaterion Keys and the 2 Keys in Keys and change the Time of the first Key to 0 and the time of the second Key to a high number, 40 worked fine for me. Then change all entries of the Value in all Keys to zero. The result should look like this:
This it the finished NiTransformInterpolator that we need for the BIP R Clavicle in the rifleman animation. Now all that is left is to add the BIP R Clavicle to the animation an give it this NiTransformInterpolator. To do so click on the NiControllerSequence (entry 1) and open Controlled Blocks in the Block Details. Here can be seen all the bones that are controlled by the animation sequence. Add one to the Num Controlled Blocks, refresh the Controlled Blocks and go to the new entry called <empty>. Open this entry. In the now open list change the Interpolator entry to the number of the newly created NiTransformInterpolator, the String Palette to the number of the NiStringPalette in the node list of the NiControllerSequence, the Node Name Offset to BIP R Clavicle and the Controller Type Offset to NiTransformController. The result should look like this:
Save the file and that's it. If everything went well, the animation should now work in the same way it used to before the addition of the BIP R Clavicle bone to the rifleman unit.
I hope this works for you, and thanks for the attention.
Edit:
After reading this very helpful tutorial:
http://forums.civfanatics.com/showthread.php?t=271331 I learned that it is also very important to set the flag of the added node in the units nif to 6. Otherwise you might run into problems.