How They Work

This section is for making your own soldier animations. There are basic sets of soldier animations (human_rifle, human_tool, human_sabre, human_bazooka, etc.). The "human" is the class name, and "rifle" or "sabre" or "bazooka" is the weapon type. These define many animations, for example _stand_idle_emote which is the basic standing-around animation. Each animation set defines its own variation, so there is human_rifle_stand_idle_emote, human_sabre_stand_idle_emote, etc.

There are also _full, _upper, and _lower that you can tack onto the end of an animation, which tells BF2 that this animation applies to the whole body, only the top, or only the bottom, respectively. For our purposes all animations will be “_full”. YOU MUST include “_full” at the end of the name, otherwise _upper is assumed.

So for example, there is human_sabre_stand_idle_emote_full, which is Luke’s idle animation, and there is human_sabre_stand_walkforward_full, which is Luke’s walking-forward animation. Note that there are walk, run, and sprint – on PC, with no analog stick for walking, all you ever see are run (maximum speed without the Sprint key) and sprint forward, and walk backward. There are also things like human_sabre_stand_attack1a, and _attack1a_end. These are Luke’s attacks, and the basic fallback attacks for other Jedi.

Overriding animations

For a new animation set, there must be a parent animation set. In our case, this is human_sabre. Any animation that the new animation set has will be used. However, any animation that is needed, but which the new animation set does not define, will be taken from the parent set. So for example, if our new animation set doesn’t have a stand_idle_emote, then human_sabre_stand_idle_emote will be used. Hopefully this is clear. Our new animation set can also add unique animations, for example you could add _myattack_full and use it from your combo file, even though there is no human_sabre_myattack_full.

Setting up an animation set

When you set up a new animation set, at least for a Jedi, the weapon type is still the same, "sabre" so you will be replacing the "human" part of "human_sabre" with your set’s name. If you wanted to make Tatooine Luke, for example, you could replace it with “tat_luke”, and all your animation names would begin with “tat_luke_sabre”. (If you were making an animation set for a character whose weapon uses the rifle animation set instead, then it would be "tat_luke_rifle.")

The first step to setting up your animation set is to create a folder for it. In your mod’s "data" folder, there should be a folder called "Animations", containing a folder called "SoldierAnimationBank", containing a folder called "template". What you must do is make a copy of that "template" folder (keeping the original folder) and rename it whatever your new animation set will be named. And since you copied the folder, there should be a "munge.bat" batch file inside it.

You must edit munge.bat so it will munge your animations to the right directory. So, open it in Notepad and you should see something like this:

@call ..\munge_animation.bat "/keepframe0 /dest aalya.zaf" Sides\REP

The bits you need to change are the "aalya.zaf" and the "Sides\REP". The first one is the class name, the name of your new animation set (for us, "tat_luke"), and the second one is the destination directory (which in our case is "sides\JDI\munged" but, as it automatically adds "\munged", it’s just "sides\JDI"). Like so:

@call ..\munge_animation.bat "/keepframe0 /dest tat_luke.zaf" sides\JDI

Save it, and that’s that. When you add or remove animations from your animation set, you need to double-click this batch file to run it which updates the animation-set files the game uses. We’ll get to that in a minute.

In the "assets" folder, which contains the entirety of the animations we used for BF2, you can see what goes into an animation set. Basically, there’s a basepose.msh, which is keyframed on frames 1 and 0, and sets up the skeleton and what is included in it. Then there are individual animations, animSetName_weaponType_animation_name_full/upper/lower, animated as normal.

Since this is a tutorial, we will be stealing Luke’s animations and putting them into our own animation set, which – even though it won’t look any different from human_sabre, will be our own to expand on as we wish. So first we steal Luke’s basepose and stand_idle_emote_full, and put them into our folder. Remember to rename the beginning of the later to “tat_luke” or whatever your set is called.

All that is really necessary for your animation set is a basepose.msh. This determines what your skeleton looks like – for example, the Wookiee and Ewok use human animations, and have only different skeletons, meaning their animation sets consist of simply a basepose (and specialized extra animations if they have any).

Now that your set has a basepose and an animation, if you double-click munge.bat, it should create some log files, and 3 files that BF2 uses for your animation set in \sides\JDI\munged: tat_luke.anims, tat_luke.zaabin, and tat_luke.zafbin.

You can open the .anims file in Notepad, and it will list what animations are defined by your set:


The name of the files that were created ("tat_luke.anims", etc) is what is used in your soldier’s ODF (AnimationName = "tat_luke"). Keep in mind that these files and your animation set need to have the same name – if "tat_luke.anims" has inside it obiwan_sabre_stand_idle_emote_full, this animation will not be able to be used by the game.

That’s all for creating animations; as you add or remove animations in your set, you need to re-run munge.bat in order to recreate those files in your side’s \munged folder. Then you need to run VisualMunge again and munge your side. Those 3 files are eventually copied into your side’s .LVL file and loaded by the game.

Keep in mind that you only need to re-run the animation munge.bat if you change your animation set – changing your soldier’s ODFs or combo file doesn’t require you to do that.

Creating new animations

See the XSI page: Skeletons and Animations

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License