DecompMDL

Half-Life HL
DecompMDL by Toodles
Posted 1 year ago2023-10-04 05:31:33 UTC • Completed • Half-Life
Loading...
Screenshot Thumbnail
Screenshot Thumbnail
Name
DecompMDL
By
Toodles Toodles
Type
Application
Engine
Goldsource
Game
Half-Life
Category
Completed
Included
EXE
Created
1 year ago2023-10-04 05:31:33 UTC
Updated
1 year ago2023-10-06 04:39:49 UTC
Views
1430
Downloads
307
Comments
4

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. :lol:

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! :)

4 Comments

Commented 1 year ago2023-10-04 15:37:20 UTC Comment #105575
nice!
Commented 1 year ago2023-10-06 00:30:51 UTC Comment #105579
Ah, more tools! :)

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.
Commented 1 year ago2023-10-06 04:37:48 UTC Comment #105580
I didn't know WadMaker and SpriteMaker supported extraction! Whoops! Guess I didn't look at the docs close enough. :zonked: I've only used WadMaker for... making wads.

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.
Commented 1 year ago2023-10-06 04:42:37 UTC Comment #105581
Oh, and the sprite QC files is sorta a formality thing. I wanted everything to recompile with the original SDK tools. That's also why I have the tools produce BMP files instead of something more common like PNG.

You must log in to post a comment. You can login or register a new account.