From Valve Developer Community
Revision as of 23:57, 26 September 2008 by Cfive (talk | contribs) (It can decompile OB models)

Jump to: navigation, search

I am also looking for some experienced programmers to help me redo the whole program. If you want to help email me there are also no known problems with these programs, aside from the fact that they don't work on Vista. I simply edited the hex to make it work.

Warning: Erix' attempts at updating these tools have ended in various problems on a number of users machines, making them unreliable. A more reliable alternative is to use Cannonfodder's version - put these in the root/bin (eg: counterstrike source/cstrike/bin) folder to make them function properly.

@Philthy: citation needed. Also, what kind of reliability problems have occurred after using his modified version? For I don't seem to have experienced any problems after using his version months ago. Fractal 18:36, 16 Sep 2006 (PDT)


  1. Download Erix' version of StudioCompiler.exe and place it in your sourcesdk/bin/ep1/bin directory.
  2. Create a Shortcut to StudioCompiler somewhere handy, like on your desktop.
  3. Make sure the SDK Tools Current Game is set for the game_directory you want to compile to. You need SDK tools running before you can launch Studiocompiler.
  4. Click the Shortcut to launch the program. (You don't 'drag-n-drop' onto the shortcut like you can with vtex or studiomdl)

Merge StudioCompiler & MDLdeCompiler articles ?

  • Am I correct in thinking that StudioCompiler includes MDLdeCompiler?
  • The article at studiocompiler contains a fair description but dead links.
  • This article (mdldecompiler) contains little description but good links.
  • Therefore wouldn't it be better to merge the StudioCompiler & MDLdeCompiler articles?

Known issues

moving with speed <= 0

  • When you decompile various NPC models like zombies and birds, and then recompile them,

you'll note that they are unable to move around and an error message somewhat like this will appear (provided you are in "dev" mode)

"npc_zombie moving with speed <= 0 (walk2)"
Due to a decompiler limitation you'll have to fix this yourself using some capable animation program. First, in your walking animation smd's, make sure the actual skeleton is moving forward/backward/whatever direction you need. Then, in the qc add LX to the $sequence and $include lines that have the walk animations. - GunGrave
To fix this you have to open every walk animation smd in 3ds Max or similar program, and have the model actually move forward/backward/whatever direction. And then in the qc add "LX" to the $sequence and $animation lines that have walk smd's. - unknown
If they aren't animated moving then it's coded....u can do both - prall


  • Weightmaps are screwed up on decompile Cpt.Swing 07:46, 24 Feb 2008 (PST)


Using MdlDecompiler to look at a DOD player model QC, I found this:

$modelname "player\german_support.mdl"
$model "body" "german_support_reference.smd"
$model "helmet" "german_helmet_reference.smd"
$model "helmet" "UnknownModelName.smd"
// ...
$attachment "2" "ValveBiped.Bip01_Head1" -0.00 0.00 0.00 rotate -0.00 0.00 0.00
$attachment "head" "ValveBiped.Bip01_Head1" -0.00 0.00 0.00 rotate -0.00 0.00 0.00

Looking through the SMDs, the "german_helmet_reference.smd" mesh is enveloped to the "ValveBiped.Bip01_Head1" bone and "UnknownModelName.smd" contains no triangles whatsoever. So, is this :

1. MdlDecompiler not translating the binaries into a valid QC (I haven't tested it) ?

2. An alternative to $bodygroup for combining meshes; enveloping a second mesh to the main skeleton as opposed to using the head $attachment and a sub-model ?

3. Or something else entirely ? --Beeswax 17:56, 2 May 2008 (PDT)

It's a limitation/bugs of mdldecompiler. They're meant to be $bodygroups and the "unknownmodelname" SMDs show up for every NPC/player model I've tried. --TomEdwards 05:09, 3 May 2008 (PDT)


  • I can't decompile some animations.mdl of orangebox version. for example alyx_animations.mdl. Someone, tell me how I can correct this?

It can decompile OB models

Open the .mdl in notepad and Change header from IDST0 IDST- or any other IDST<insert one character here> to IDST, <--- WITH THE COMMA :p --JakeB 19:32, 10 Jul 2008 (PDT)

Lol, perfect timing :D i know it can decompile, but only with the comma, i just meant it cannot decompile on its own without the comma I just never wrote that, i was going to but never done it. Thanks. Add it to the article itself i suggest. --Dan.s 04:47, 11 Jul 2008
Would that change the models at all?
No. --Craziestdan 13:59, 24 Sep 2008 (PDT)

Can studiocompiler do Orange Box models? Cfive 19:04, 25 Sep 2008 (PDT)

Yes.--Craziestdan 08:37, 26 Sep 2008 (PDT)

Cool, one last question, do I need to do the comma thing for studiocompiler, too? Cfive 16:57, 26 Sep 2008 (PDT)