Page 1 of 1

[Tutorial] Decompiling Left 4 Dead Models

Posted: Sun Dec 21, 2008 10:12 pm
by shiftey
Taken from the Wiki: http://wiki.neic0.de/?title=Decompiling ... ead_Models

Getting Started

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:

* GCFScape: http://nemesis.thewavelength.net/index.php?p=25
* L4DMDLMod: http://l4dmods.com/downloads/l4dmdlmod.zip
* Cannonfodders Model Decompiler v0.4.1: http://www.chaosincarnate.net/cannonfod ... er.041.rar


Setting Up Files & Folders

* Install/configure GCFScape

* Place mdldecompiler.exe (Cannonfodders Model Decompiler v0.4.1) in your "...\sourcesdk\bin\ep1\bin" folder. (renaming it to "mdldecompiler041" isn't a bad idea)

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

left4deadmodels\
left4deadmodels\extracted
left4deadmodels\fixed
left4deadmodels\decompiled

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

left4deadmodels\decompiled\model_1
left4deadmodels\decompiled\model_2
left4deadmodels\decompiled\model_3


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.

* Run mdldecompiler041.exe (Cannonfodders Model Decompiler v0.4.1) in your "...\sourcesdk\bin\ep1\bin" folder.
* If you get an error similar to:

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.

Posted: Sun Dec 21, 2008 11:22 pm
by Neico
fail... i already told you that Extra AppId thing works without that commenting out crap you just need to uncheck that Steam file Access flag that's all and by the way: http://www.chaosincarnate.net/cannonfod ... mpiler.php get 5.0

don't make things more complicated as they already are...

Posted: Sun Dec 21, 2008 11:31 pm
by shiftey
Neic0, it may have worked for you. This tutorial is for people who are having problems. On my computer, I cannot use v5 for L4D models and even when I uncheck Steam File Access I get a Steam App ID error.

You must have configured your Source SDK and fixed it from the default or something.

Also:
If you get an error similar to:

Extra App ID set to 211, but no SteamAppID
If they don't get the error...they just don't have to do that. Doesn't hurt to mention the fix if they do get the error.

Posted: Mon Dec 22, 2008 5:21 am
by fug4life
It all helps.... So is l4d sdk out? I wouldnt know just interested....

Posted: Mon Dec 22, 2008 5:47 am
by Neico
no and i guess it will take until the end of this year (in Valve Time)