Modding the Body Animations By Swapping with Another Survivor's Animations

Modding a Left 4 Dead 2 Survivor

Modding the Body Animations By Swapping with Another Survivor's Animations

Say you want an all-woman team of survivors. By following the other sections of this tutorial, you could replace Coach, Ellis, and Nick with a woman each, but each would be using the respective man's animations. Not that bad, but not ideal having a man's animations for a woman.

You could go a step further and rig each woman model to either Zoey's or Rochelle's animations. However, in online multiplayer campaigns, many of the animations will not show correctly. This is actually worse than seeing a man's animations for the woman. The problem is that each survivor's set of animations are listed in a different order in the mdl file, and the server says which animation to play based on this ordering.

I'll give an example to show the problem. Keep in mind this is simply the gist of, and not exactly, what occurs. The server says to each client player, "play Nick's reload shotgun animation", and each client knows this simply by receiving the number "3", meaning "play the third animation". If Nick is replaced by a custom woman using Zoey's animations, then the client will play Zoey's "third animation", which is not the "reload shotgun" animation.

The trick to make the animations show correctly online is to re-order the list of animations in the replacement model's mdl file. For the example, you need to re-order Zoey's animations to be in the same order as Nick's. You do this in the qc file via the $declaresequence command.

Notice that this means you only have to rig a custom model once and can then use a modified qc file to recompile for each of the other survivors.

Changing the Animations the Easy Way

Follow these steps unless an update to L4D2 causes this process not to work.

Changing the Animations the Hard Way

Follow these steps when an update to L4D2 causes the easy process not to work.

Related Tutorials