Fix missing death animation on model by yourself

by Dels © 2009

Content

Overview

As you maybe know some models found out in this forum are missing death animation. If you don't understand what i'm talking about, take alook this picture:
floating zombie
Wow a floating zombie? And this can be irritating to know if this guy still alive or die. So rather than asking fix for this model (and wait for the fix), why don't you fix it by yourself in merely 10 minutes? And upload the fix if you don't mind.

Here are some guide to do that, i will provide tools and teach you step-by-step, you don't need any knowledge using 3D tools like milkshape3D or others... if you can use notepad then it's more than enough. This will work with CS 1.6 and CS:CZ (Condition Zero), just choose the right model.

This also works for mostly player models you have and not only zombie (only the minimization model are specified for zombie models).

Tools

Here are tools we will use on this tutorial:

  1. Jed Half-Life Model Viewer (For viewing model sequences/animations).
  2. Compiler & Decompiler (Already in this package).
  3. CS/CZ Animation Converter (Already in this package).
  4. Milkshape3D (Optional, but greatly help when decompile model).

Guide

Now you already download all tools needed for this tutorial and here the step-by-step guide.

1. Preparing files

  1. Create a folder called models fix (it can be whatever you like) on your desktop for easier file management.
  2. Next copy your model(s) into folder already created in step #1, if it still archived (zip/rar/etc) extract it first, in this tutor i will fix a minimized zombie_source that have broken animation.
  3. Now we need a standard player model from CS/CZ, so go pick any (no matter what since they have similar bones), i pick GIGN model for easy.
  4. Extract the included tools package to directory tools.
    Tools
  5. Install Jed Half-Life Model Viewer & MilkShape3D (Optional or you can use my decompile.bat if you didn't like to install MS3D).
  6. Now your folder structure will be looks like this:
    Folder structure

2. Decompiling models

You can use MilkShape3D, Jed Half-Life Model Viewer + mdldecompiler.exe or my decompiler.bat.
For simplicity shake we will use MilkShape3D for now. If you didn't install MilkShape3D use my decompiler.bat (method B).

Method A

  1. Open up MilkShape3D
  2. Go to Tools -> Kratisto's Half-Life MDL Decompiler v1.2.
    MilkShape3D menu
  3. Okay decompile the reference (GIGN) model first.
    decompile GIGN model
  4. Now decompile the model you want to fix, only this time uncheck the Animation Sequences.
    decompile zombie model

Method B

  1. Open up decompiler.bat
  2. Drag and drop your reference (GIGN) .mdl but not ...T.mdl
  3. Press Enter to continue
  4. Type 1, press Enter and wait till it finish decompile your model
    decompiler.bat
  5. Repeat above steps but now do that for your need to fix model and type 2 when asked
    decompiler.bat

3. Update animations sequences

  1. Okay let's fire up CSCZMDLconv.exe.
    CS/CZ Model Converter
  2. Click Grab Old Bones and select the GIGN idle1.smd (or whatever since they all have same bones).
    Grab Old Bones
  3. Click Grab New Bones and select the .smd from your model (in my case it called zombie.smd).
    Grab New Bones
  4. Now click Browse and select all .smd from GIGN model.
    Browse for smd
  5. We need to fix the destination so it match our model (in my case was ..\Desktop\model fix\zombie_source\).
    Don't forget \ (backslash) in the end of folder name.
    Modifying destination
  6. Click Convert and wait till it say done, it usually take only 10-20 seconds.
    Sequences conversion

4. Editing .qc file

Editing merely only copy-paste.

  1. Open gign.qc with any text editor (notepad should enough).
    Search for //111 animation sequence(s), Block that text until end of file, which was //end of qc
    Copy that text.
    gign.qc
  2. Open zombie_source.qc (match your model filename) with any text editor (notepad should enough).
    Search for //xx animation sequence(s) (in my case 22), Block that text until end of file, which was //end of qc.
    And paste the text we already copy before (so it will read //111 animation sequences.)
    zombie_source.qc
  3. Save it, one step closer to completion, next compiling.

5. Compiling model

Open up compiler.bat.

  1. Drag and drop your .qc (in my case it was zombie_source.qc) into compiler window.
    Compile model
  2. Press Enter and wait till it finished and thats it we already done.

Next check up on Jed Half-Life Model Viewer.
Jed Half-Life Model Viewer
And from in-game test.
In-game test

6. (Optional) Minimize model for zombie

This was merely done by replacing unused animation sequences on .qc with lowest size animation (example, i_am_stupid_placeholder).

For simplicity shake, i have provided you base_zombie.txt which only contain needed animation (knife, grenade, death) so you can directly copy-paste into your .qc file and compile. For archiving more smaller model size you can replace death2, death3, head, gutshot, left, back, right, forward, crouch_die sequences with death1 animation.

Something like:


$sequence "death2" "death1" fps 30 ACT_DIESIMPLE 2 { event 2001 1 } 
$sequence "death3" "death1" fps 30 ACT_DIE_BACKSHOT 1 { event 2001 1 } 
$sequence "head" "death1" fps 30 ACT_DIE_HEADSHOT 1 { event 2001 1 } 
$sequence "gutshot" "death1" fps 30 ACT_DIE_GUTSHOT 1 { event 2001 1 } 
$sequence "left" "death1" fps 30 ACT_DIESIMPLE 1 { event 2001 1 } 
$sequence "back" "death1" fps 30 ACT_DIEBACKWARD 1 { event 2001 1 } 
$sequence "right" "death1" fps 30 ACT_DIESIMPLE 1 { event 2001 1 } 
$sequence "forward" "death1" fps 30 ACT_DIEFORWARD 1 { event 2001 1 } 
$sequence "crouch_die" "death1" fps 30 { event 2001 1 } 
!!!WARNING!!!
Do not even try to delete any sequence(s) from your model since either the model will not compile or it will float in the air like the previous once (which mean waste our works).

Question & Answer

Can't compile model?
Ensure that you have all required files and .qc wasn't corrupted then try to recompile.
Death animation still error?
Ensure you have followed my guide step-by-step, if you have, then (sadly) you must fix/reattach bones and animation sequences manually using Milkshape3D.
Model running backward or facing backward when running?
That's mean you pick the wrong order on Grab Old & New model, just re-convert sequences.
And how about custom models that have custom bones, like dog or spider models?
Then (sadly) you must reattach the bones and animation sequences manually using MilkShape3D

Credits