Skip to main content

Documentation 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.

The Half-Life Unified SDK is an updated version of the Half-Life SDK that merges full support for the expansion packs Opposing Force and Blue Shift into a single, unified modding codebase. It is aimed at mod developers who want to build on top of Half-Life and its expansions, providing a solid foundation of bug fixes, refactored code, and modernised tooling — all while keeping the familiar Half-Life game feel intact. The SDK uses a CMake-based project structure with support for Visual Studio 2019 and 2022 on Windows and GCC 11 on Linux, and includes a ready-to-run mod installation so players can experience all bug fixes right away.

What’s in Scope

The Unified SDK is focused on targeted, practical improvements to the existing Half-Life codebase:
  • Bug fixes — correcting defects present in the original game and its expansions
  • Code quality improvements — refactoring, generalizing, and simplifying game systems to make mod development easier, without complete redesigns that would raise the barrier of entry
  • Fixing game-breaking asset bugs — for example, soft-locked trigger setups in game assets
The following are out of scope and will not be added to the project:
  • Graphical upgrades
  • Physics engine changes
  • Other engine-level changes
  • Gameplay changes

Development Status

The repository currently contains a pre-alpha build on the master branch. Pre-alpha builds are not ready to be used as the base for a new mod — features are still being developed, are unfinished, and may be buggy. During the pre-alpha phase, testing is limited to individual features when they are specifically noted as ready for testing.
The current development milestone is shown in the title of each release and is visible in-game via the project info overlay. Once version 1.0.0 is released, master will track stable releases and a separate development branch will be created.

Prerequisites

Working with this SDK requires solid experience with several technologies. If you are new to any of these, plan to spend time learning them before diving in:
  • C++ — the primary language for all game code
  • CMake — the build system used to configure and generate project files
  • Git — version control, including working with submodules
  • vcpkg — the package manager used to acquire most third-party dependencies
  • Visual Studio (Windows) or GCC / Make (Linux) — the compiler toolchain
The TWHL wiki has tutorials to help you get started with Half-Life modding: Half-Life Programming — Getting Started. For questions about the SDK or mod development, visit the TWHL website or its Discord server.

Installation

Download the mod installation and set up Half-Life Unified SDK on your machine.

Building

Clone the repository, configure CMake, and compile the SDK from source.

Project Structure

Understand how the source code, assets, and tools are organised across repositories.

TWHL Community

Ask questions, find tutorials, and follow project status updates on TWHL.

Important Limitations

Demos do not work with the Unified SDK due to how some SDK features are implemented. Use an external recording program such as OBS to capture gameplay footage.
Maps from the original games must be upgraded using the MapUpgrader tool before they can be played in this mod. The ContentInstaller handles this automatically for the official campaign maps during installation.

Supported Game Versions

The Unified SDK works on the steam_legacy and anniversary versions of Half-Life, but requires the game to be switched to the steam_legacy branch during installation. After installation is complete you may switch back to the anniversary version. See the Installation guide for details.
Only the latest Steam version of Half-Life is supported. For Opposing Force and Blue Shift campaign content you will need to own those games on Steam and have them installed. The Half-Life Unified SDK mod installation is currently available on Windows only.

What Is Not Supported

The following are explicitly unsupported and will not work with the Unified SDK:
  • WON and older Steam versions of Half-Life
  • Xash3D engine builds
  • Metamod and AMXMod (SDK code changes break their hooking systems)
  • Playing on Unified SDK servers with a vanilla Half-Life client, or playing on vanilla servers with the Unified SDK client
  • Placing Unified SDK game DLLs into a vanilla Half-Life installation

Build docs developers (and LLMs) love