Now that we have all the model files, we are going to need to convert them into a format we can work with. That means we will need to decompile them. Specifically we will decompile the survivor_mechanic.mdl
file as this one contains the actual mesh data we need.
In order to decompile the model we are going to need some more software(go figure lol!). This time what we need is a program called MDLDecompiler
You can download a version of it here: Hooch's MDL Decompiler
Download it to your desktop and extract the file(RAR files are kind of like ZIP files. WinRAR should be able to handle them but if not).
You should be left with an executable, a readme and another RAR file.
The new rar contains support files that you might need(only use them if you need them) and the readme contains the basic install instructions, which we’ll go over now.
Copy MDLDecompiler Fixed.exe
to the following folder:C:\Program Files\steam\steamapps\<Your Steam Username Here>\sourcesdk\bin\ep1\bin
- Now let’s right click that exe and select Send To->Desktop (create shortcut) so we don’t have to dig through all those folders every time we wanna run it.
- Ok, double click your shortcut(or the exe if you still have it handy) and MDLDecompiler should start up.
Note that this is the “fixed” version meaning, in theory, it should work better and be easier to use, but your mileage may vary. Here’s a screenie:
Where it says Choose Model File click the 3 dots on the right. You will now browse to your MDL file for ellis, which is the survivor_mechanic.mdl file located in our folder as follows: survivor_ellis\models\survivors\mechanic_ellis.mdl
- After selecting the mdl and hitting OK, we will click the 3 dots on the right of Choose Output Directory.
- Extract anywhere you like generally, but for the sake of keeping things organized, we’re going to decompile to our survivor_ellis folder.
- So in the survivor_ellis folder click on models, then click on survivors, then make a new folder called “decompile” and select that.
- Now click choose folder and it should go back to the main program window. Make sure neither of the boxes at bottom left are checked and click on Extract button.
At this point the program crashed on me and I couldn’t get it working right, which is unfortunately all too common. I’m including this in the tutorial because it is such a common problem that I think it’s worth addressing.
Download a different version of mdldecompile
r from here:MDLDecompiler Version 0.4.1
I'm aware there is a 0.5
Version, but it tends to goof up as well. So lets stick with good old 0.4.1
. Copy it to the same place that you put the previous version and make a shortcut to it on your desktop. Now start it up. Once open click choose file again and it is possible you will be greeted with an error message that looks something like this:
- Click OK and the program will close out.
- Double click it again and start it back up.
- Uncheck “Use Steam File Access” at the bottom left and now click on the Choose MDL file dots again.
- (This time it should work and you can browse to your survivor_mechanic.mdl as you did before.)
- Click Choose Output directory and select your decompile folder that you made before.
- Now click on Extract and cross your fingers…Unable to load model.
But don’t worry cause I got this shizz…this is another common problem. It has to do with that stuff the “fixed
” version was suppose to address. Since we’re no longer using the fixed version we’re gonna need to address that issue after all, so let’s do that now…
For this we’re going to use a program called Notepad++
because it will save you a lot of heartache, and it’s a lot better than regular ole notepad anyways.
You can find it here:Notpad ++
Download it and install it with all the default options. When you hit the finish button it should start up. Now open your survivor_mechanic.mdl
file from our survivor_ellis folder(it’s in models\survivors). It will open in Notepad++ after a moment and you should see something very similar to this:
The only part we care about is the very first part, where it reads IDST1
We want to replace the 1
with a ,
So highlight the 1 in Notepad++ then hit the , key on your keyboard. Voila! Click the save button or go File->Save and after it’s saved you can exit the program.
Back in MDLDecompiler, which should still be open and have all the stuff selected, let’s try hitting the Extract button again…It starts to work then throws up another error about a missing file.
Click OK and the program will most likely crash out. So start it back up again and make sure your file and output folder are chosen like before. I know it’s frustrating for me to tease you like this but just trust me when I say it’s better to come across these problems with me now, this way, so all the info sticks in your head. Later on, if any of this stuff happens, you’ll be like, “oh yeah..this is just like what that asshat over at that tutorial had me do that one time…I can fix this!” and that’s when you’ll see why I’m doing things this way ;) Anyhoo, moving on…Now we need to fix another of our mdl files.
- Leave MDLDecompiler open, but lets now open our survivor_ellis folder and go into the models\survivors\ folder where all our model files are.
- You’ll see a file called survivor_mechanic.dx90.vtx.
- Highlight it, right click and select Copy, then right click again in the open area of the folder and select Paste.
- This will make a new file called survivor_mechanic.dx90 – Copy.vtx.
- Highlight that file and right click it, this time selecting Rename.
- Rename it: survivor_mechanic.dx80.vtx then hit enter to accept that change.
- Hit Yes if it asks you to confirm. (stoopid windows).
Ok, now let’s go back to MDLDecompiler
and hit that damn Extract
button again… It should say something about Loaded Model…click OK…and if all goes well, it should say Completed Dumping Model! Yay! Of course, this part is all a bit iffy….it will sometimes STILL crash out on you and sometimes not. I have 2 computers and on 1 it worked fine with no issues while on the other it crashed out randomly.
My fix on the 2nd computer ended up being to use an older version of MDLDecompiler, which you can get here: http://www.mrlanky.com/mdldecompiler4.exe
For me, that did the trick and I was finally greeted with this:
So, after a lot of trial and error we should now have successfully decompiled our MDL file. And in the process we’ve covered several of the most common problems people encounter while doing it and found some solutions and workarounds. That’s pretty great! Take a break and have yourself a doughnut-you’ve earned it!! I’ll meet you back here in a few minutes for the next part...back already? Let’s go!