The Unified SDK ships a collection of smaller .NET conversion utilities designed to migrate legacy Half-Life asset formats into the JSON-based formats used by the SDK, as well as supporting tools for developers working with maps and entity data. All of these tools are included in theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/twhl-community/halflife-unified-sdk/llms.txt
Use this file to discover all available pages before exploring further.
hlu/tools directory of every Unified SDK release and follow the same platform conventions: on Windows run them as ToolName.exe [options] or dotnet ToolName.dll [options]; on Linux use dotnet ToolName.dll [options].
Hud2Json
Hud2Json converts Half-Life 1sprites/hud.txt and sprites/weapon_*.txt HUD definition files into the Unified SDK’s hud.json format.
Command line usage
--output-filename is not specified, the output file is written to the same directory as the input file, with the extension changed to .json.
Examples
- Windows
- Linux
Convert Convert
hud.txt and save the result alongside it:hud.txt and write to a specific output path:Error reporting
If any errors occur, Hud2Json logs the details to the console and stops execution.Materials2Json
Materials2Json converts Half-Life 1sound/materials.txt files into the Unified SDK’s materials.json format.
Command line usage
--output-filename is not specified, the output file is written next to the source file with the extension changed to .json.
Examples
- Windows
- Linux
Convert Convert and write to a custom path:
materials.txt in place:Error reporting
If any errors occur, Materials2Json logs the details to the console and stops execution.Sentences2Json
Sentences2Json converts Half-Life 1sound/sentences.txt files into the Unified SDK’s sentences.json format.
Command line usage
--output-filename is not specified, the output file is written next to the source file with the extension changed to .json.
Examples
- Windows
- Linux
Convert Convert and write to a custom path:
sentences.txt in place:Error reporting
If any errors occur, Sentences2Json logs the details to the console and stops execution.Skill2Json
Skill2Json converts Half-Life 1skill.cfg files into the Unified SDK’s skill.json format.
Command line usage
--output-filename is not specified, the output file is written next to the source file with the extension changed to .json.
Examples
- Windows
- Linux
Convert Convert and write to a custom path:
skill.cfg in place:Error reporting
If any errors occur, Skill2Json logs the details to the console and stops execution.KeyValueMatcher
KeyValueMatcher is a developer utility that scans BSP files in one or more maps directories and searches for entities matching specified patterns. It is useful for auditing entity data across a large set of maps — for example, finding all entities of a particular classname or locating every keyvalue that matches a given regular expression.Command line usage
--classname, --key, --value) accept regular expressions. If a pattern is not provided it is treated as matching everything (.*).
The --print-mode option controls what is printed for each match:
| Value | Description |
|---|---|
KeyValue | Print the matching key-value pair (default) |
Entity | Print all keyvalues of the matching entity |
Nothing | Suppress output (useful for counting only) |
--flags-match-mode option controls how flag bits are compared:
| Value | Description |
|---|---|
Inclusive | Match if the entity’s flags include the specified bits (default) |
Exclusive | Match only if the entity’s flags exactly equal the specified value |
Examples
- Windows
- Linux
Find all Print the full entity block for every entity that has a Find entities where
trigger_once entities across two map directories:target key:spawnflags inclusively matches bit 1:Error reporting
If any errors occur, KeyValueMatcher logs the details to the console and stops execution.MapCfgGenerator
MapCfgGenerator generates map configuration files for official Half-Life, Opposing Force, and Blue Shift maps. All maps from a given game share the same configuration contents, so this tool automates the creation of per-map cfg files that reference a shared game config. The destination directory should point to thecfgsrc/maps directory in your local copy of the assets repository.
Command line usage
Generated file format
Each generated file references a shared per-game configuration file. For example, a configuration file for a Half-Life map contains:Examples
- Windows
- Linux
Generate map cfg files into the assets repository’s maps config directory:
Error reporting
If any errors occur, MapCfgGenerator logs the details to the console.Bsp2Obj
Bsp2Obj converts Half-Life 1 BSP map files into the Wavefront OBJ format. This is useful for inspecting map geometry in 3D modelling software or for reference during development. For each BSP file the tool generates the following output files:mapname.obj— geometry in Wavefront OBJ formatmapname.mtl— material library filemapname_material_index.tga— texture image for each embedded material (one file per material)
mapname is derived from the BSP filename. index is the sequential number of the generated material. Materials and textures are only generated when the texture is embedded directly in the BSP file; otherwise a dummy material with no texture is used.
Command line usage
--destination is not specified, all output files are saved to the same directory as the input BSP file.
Examples
- Windows
- Linux
Convert a BSP and save the output alongside the source file:Convert a BSP and write the output to a specific directory:
Error reporting
If any errors occur, Bsp2Obj logs the details to the console and stops execution.MapUpgraderDocGenerator
MapUpgraderDocGenerator is a developer utility that generates Markdown documentation for the map upgrades implemented by theMapUpgrader.Upgrades library. It reads the XML documentation file produced when that library is built and converts it into human-readable Markdown text.
Command line usage
Examples
- Windows
- Linux
Generate documentation from the XML doc file produced by the build: