# Decompiling Left 4 Dead Models/zh-hans

## 反编译之前

Decompiling Left 4 Dead models is a very annoying process and takes some time to figure everything out. This tutorial only covers decompiling the models for editing in a 3d program. There are plenty of tutorials that cover the rest of the process.

To start, you will need the following programs/tools:

## Setting Up Files & Folders

• Create the following folders wherever you please (If you know what you're doing you don't have to do this):
left4deadmodels\

• Create a folder for each model in the "decompiled" folder, otherwise you'll keep overwriting files. Example:
left4deadmodels\decompiled\model_1


## Extracting & Fixing

• Open up GCFScape, go to File > Open and find ".\steam\steamapps\common\left 4 dead\left4dead\pak01_dir.vpk". When you find the model you want to decompile, extract it to your left4deadmodels\extracted folder you created earlier. Leave GCFScape open as you will need it again soon for the models materials.
• Now you can run L4DMDLMod. MDL File is the mdl file in your left4deadmodels\extracted folder. You want to "Save data for decompiling to" your left4deadmodels\fixed folder. Click MOD MDL!, and when it completes exit L4DMDLMod.

## Decompiling

Note: Cannonfodders Model Decompiler v0.4.1 does not work on all Windows Vista PC's. If this process doesn't work, ask a friend with XP to do this for you.

Extra App ID set to 211, but no SteamAppID


You will need to go to your ".\steam\steamapps\[steamid]\half-life 2\hl2\gameinfo.txt" and comment out the ToolsAppID line like so:

//ToolsAppId                        211

• If it shows the error again try doing the same thing for your Counterstrike: Source gameinfo.txt and the gameinfo.txt in your ".\sourcesdk\launcher" folder.
• "Choose Model File" should point to the mdl file you wish to decompile in your left4deadmodels\fixed folder. "Choose Output Directory" should point to the models decompiled folder. (Ex. left4deadmodels\decompiled\model_1). Uncheck "Use Steam File Access" then press Extract. Repeat this for each mdl file.

## Materials

• Now that the models are decompiled, you can look in each of their qc files for the materials they use.
• Use GCFScape to extract them to the corresponding models folder (Ex. left4deadmodels\decompiled\model_1).
• Open the qc again and find the line beginning with \$cd. Change the path to ".\", which points to the folder the qc file and materials resides in.

You can now do what you will with your decompiled Left 4 Dead models.