About
DecompMDL is a command line tool for decompiling file formats used by GoldSrc!
It can decompile models and sprites, and extract textures from wads and maps with embedded textures!
I whipped up this tool because I needed a model decompiler that runs on Linux. (Crowbar doesn't, unfortunately.)
I ended up expanding it to support sprites and texture collections because I figured it would be a fun challenge.
Features
- Decompile MDL files
- Decompile SPR files
- Extract textures from WADs & BSP files with embedded textures
Basic Usage
All that's needed is a path to the desired input file. Everything else is optional.
The "-pattern" option is useful when extracting textures.
Some examples:
Decompiling the Glock viewmodel:
decompmdl "models\v_9mmhandgun.mdl"
Extracting all the "Anomalous Materials" textures from the Half-Life WAD:
decompmdl -pattern c1a0 "halflife.wad"
Running the program without any arguments will print out a message showing all possible arguments.
The "README" file in the download also contains said message.
Contributing
You can report issues or grab the source code via the
GitHub repository.
Enjoy!
A few notes though: texture extraction doesn't extract anything if no pattern is provided, and I'm a bit puzzled as to why sprite decompiling produces a sprgen .qc file - is anyone still using that nowadays? As for easy-to-use sprite/texture tools, what about Half-Life Texture Tools and WadMaker/SpriteMaker? They both support sprite and texture extraction.
Also, I just looked at the source. The pattern pointer is getting passed to a function that makes it lowercase, even if its null, which seems to be causing the problem.