Decompiling the Survivor Model Files
Modding a Left 4 Dead 2 Survivor
Decompiling the Survivor Model Files
There are three options for decompiling models: Crowbar, MDL Decompiler 0.4.1, and StudioCompiler.
Crowbar is the most current, decompiles a lot more data (such as face animation data) that the other decompilers do not, and usually allows re-compiling of the models without any changes.
MDL Decompiler 0.4.1 is the version of MDL Decompiler that is most effective for L4D2 survivor models and is listed here because it has been the standard, even though it has not been updated for many years.
StudioCompiler contains MDL Decompiler 0.5 and doesn't work well with the L4D2 survivor models, but is listed here for completeness.
Decompiling with Crowbar
Open Crowbar.
Click "Browse..." button and select the mdl file of the model.
Check all checkboxes except for the "debug" and "extra info" ones. (You can include the debug info without any problems, but the info is not needed for this tutorial.) NOTE: Be sure the Apply "Right-Hand Fix" option is checked; this will prevent having to do an extra step later.
Select the "Subfolder (of MDL file)" option.
Click the "Use Default" button. (This will set the option, for example, to "decompiled 0.19" in Crowbar 0.19.)
Click the "Decompile MDL File" button.
After the decompile is finished, check the Decompile Log for any errors.
Decompiling with MDL Decompiler
Place the extracted L4D2 survivor files or the survivor addon files that you want to convert into their own folder. There should be a vtx file, a mdl file, a phy file and a vvd file.
Verify two files exist, one with extension of ".dx80.vtx" and one with ".dx90.vtx". If needed, you can copy an existing vtx file (".vtx", ".sw.vtx", ".dx80.vtx", or ".dx90.vtx") and change the copy's extension.
Open the mdl file in Notepad++. (The first four characters should be "IDST" [without the quotes]. The fifth character is usually a zero "0" [without the quotes], but can be one of several different characters.)
Change the fifth character to a comma ",".
Save (overwriting same file).
Close Notepad++.
IMPORTANT: Because of bugs in MDL Decompiler, ALWAYS restart MDL Decompiler for each decompile, whether it fails or succeeds. Not doing so will likely cause problems with the next decompile.
Open MDL Decompiler.
Uncheck the "Use Steam File Access" option at the bottom.
In the "Choose Model file" option, select mdl file.
In the "output" option, select the folder that the mdl file is in. (MDL Decompiler should default to this folder).
Click the "Extract" button.
Close the couple of windows that pop up indicating error or success.
Close MDL Decompiler.
Verify that there are new files in the folder: one or more smd files and a "mdldecompiler.qc" file.