The Half-Life Unified SDK introduces a set of new entities, modifies a number of existing ones, and removes several that were obsolete, non-functional, or problematic. This page provides a complete reference to those changes. For documentation on entities that are unchanged from the original game, consult the TWHL entity guide.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.
Maps created for the original Half-Life or its expansion packs may need to be run through the MapUpgrader tool before they will work correctly with the Unified SDK. Removed entities are automatically converted to their replacements (where applicable) during this process.
Shared Keyvalues
Many keyvalues are available across multiple entity types. The tables below describe all shared keyvalues grouped by the category of entity that supports them.Shared Between All Entities
| Keyvalue | Syntax | Description |
|---|---|---|
model | model <path> | Custom model to use. Overrides the entity’s default model. Not all entities support custom models. |
health | health <value> | Custom health value. Overrides skill configuration or entity defaults. Negative values and 0 may cause malfunctions. |
model_replacement_filename | model_replacement_filename <path> | Relative path to a model replacement file. All search paths are checked. |
sound_replacement_filename | sound_replacement_filename <path> | Relative path to a sound replacement file. All search paths are checked. |
sentence_replacement_filename | sentence_replacement_filename <path> | Relative path to a sentence replacement file. All search paths are checked. |
custom_hull_min | custom_hull_min X Y Z | Overrides the minimum hull size specified by the model or entity. |
custom_hull_max | custom_hull_max X Y Z | Overrides the maximum hull size specified by the model or entity. |
classification | classification <name> | Overrides the entity’s classification. Must be a name defined in the entity classifications config file. |
child_classification | child_classification <name> | Overrides the classification of entities spawned by this entity. Supports special values !owner and !owner_or_default. |
unkillable | unkillable <0|1> | If 1, the entity takes damage but health never drops below 1. Only supported by some NPCs. |
child_classification Special Values
| Value | Description |
|---|---|
!owner | Sets the child entity’s classification to that of the spawning entity. |
!owner_or_default | Uses the spawning entity’s classification only if it has a custom one; otherwise falls back to the child’s default. |
child_classification keyvalue is supported by the Osprey, Black Ops Osprey, and Big Momma (Gonarch).
Shared Between All NPCs
| Keyvalue | Syntax | Default | Description |
|---|---|---|---|
allow_item_dropping | allow_item_dropping <0|1> | 1 | Controls whether this NPC drops items when killed. |
is_player_ally | is_player_ally <0|1|2> | 0 | Overrides the NPC’s relationship towards the player. 0 = default, 1 = always hostile, 2 = always friendly. |
allow_follow | allow_follow <0|1> | 1 | Controls whether this NPC can be +USEd to follow the player (when friendly). |
UseSentence | UseSentence <sentence_name> | — | Sentence to play when the NPC starts following the player. |
UnUseSentence | UnUseSentence <sentence_name> | — | Sentence to play when the NPC stops following the player. |
Shared Between All Items
| Keyvalue | Default | Description |
|---|---|---|
respawn_delay | — | Custom respawn delay (seconds). -1 disables respawn. Allows items to respawn in singleplayer. |
stay_visible_during_respawn | 0 | If 1, the item remains visible during its respawn countdown instead of disappearing. |
flash_on_respawn | 1 | If 1, the item flashes when it respawns. |
play_pickup_sound | 1 | If 1, the item plays its pickup sound when collected. |
fall_mode | 0 | 0 = item falls to the ground on spawn; 1 = item floats in place. |
trigger_on_spawn | — | Target to trigger when the item (re)spawns. |
trigger_on_despawn | — | Target to trigger when the item is picked up (despawns). |
Shared Between All Ammo Types
| Keyvalue | Description |
|---|---|
ammo_amount | Amount of ammo the player receives. -1 gives the maximum possible amount. 0 creates a fake ammo entity that gives nothing. |
Shared Between All Weapons
| Keyvalue | Description |
|---|---|
default_ammo | Amount of ammo in the weapon when first picked up (primary ammo type only). -1 gives maximum ammo. 0 makes the weapon start empty. |
Shared Between All func_tank Entities
| Keyvalue | Default | Description |
|---|---|---|
enemytype | 0 | 0 = target the player only; 1 = target all characters allied with the player. |
enable_target_laser | 0 | If 1, shows a laser beam indicating where the tank is aiming. Only visible to the player controlling the tank. |
target_laser_sprite | sprites/laserbeam.spr | Sprite used for the targeting laser beam. |
target_laser_width | 1 | Width of the targeting laser beam (range: 0–255). |
target_laser_color | 255 0 0 | Color of the targeting laser beam in R G B format. |
New Entities
The following entities are new additions in the Unified SDK and have no equivalent in the original game.ambient_music
Plays background music tracks. Replaces the removed
target_cdaudio and trigger_cdaudio entities.ammo_all
Gives the player a quantity of all ammo types at once.
ammo_generic
A configurable generic ammo entity for custom ammo types.
env_fog
Adds map-side fog control to the level.
logic_campaignselect
Used to trigger logic based on the currently active campaign.
logic_isskill
Fires outputs based on the current skill level setting.
logic_random
Fires one of several targets at random.
logic_setcvar
Sets a cvar to a specified value when triggered.
logic_setskill
Sets the current skill level when triggered.
logic_setskillvar
Sets an individual skill variable to a specified value.
player_sethealth
Sets the player’s health to a specified value when triggered.
player_sethudcolor
Changes the player’s HUD color when triggered.
player_setsuitlighttype
Sets the type of suit light (flashlight or night vision) when triggered.
player_hassuit
Fires different targets depending on whether the player has the HEV suit.
player_hasweapon
Fires different targets depending on whether the player has a specific weapon.
point_teleport
Teleports an entity to a specified origin and angle.
trigger_changekeyvalue
Changes a keyvalue on a target entity when triggered.
trigger_playerfreeze
Freezes or unfreezes player movement when triggered.
Modified Entities
The following existing entities have been changed in the Unified SDK. Each link leads to the full entity reference.| Entity | Summary of Changes |
|---|---|
func_breakable | Additional keyvalue support and behaviour refinements. |
func_healthcharger | Extended configuration options. |
func_pushable | Additional keyvalue support. |
func_recharge | Extended configuration options. |
monster_blkop_osprey | Supports child_classification keyvalue. |
monster_generic | Extended model and keyvalue support. |
monster_osprey | Supports child_classification keyvalue. |
monster_tentacle | Behaviour and keyvalue refinements. |
monstermaker | Extended spawn and classification control. |
multi_manager | Improved reliability; see Entity Triggering. |
player_weaponstrip | Expanded strip options. |
trigger_changelevel | Supports persistent inventory in Co-op. |
trigger_relay | Improved trigger chain handling. |
trigger_teleport | Extended teleport configuration. |
Modifications Affecting Multiple Entities
Sound and sentence names have been standardised across several entities. Where the original SDK used hard-coded strings, the Unified SDK provides keyvalues to override them.Removed Entities
The following entities have been removed from the Unified SDK. Maps that reference them should be updated using the MapUpgrader tool.| Entity | Reason for Removal |
|---|---|
target_cdaudio | Replaced by ambient_music. |
trigger_cdaudio | Replaced by ambient_music. |
func_tank_of | Merged into the standard func_tank entity. |
func_tankmortar_of | Merged into the standard func_tankmortar entity. |
func_tankrocket_of | Merged into the standard func_tankrocket entity. |
func_tanklaser_of | Merged into the standard func_tanklaser entity. |
test_effect | Never used in any shipped map and non-functional. |
world_items | Obsolete; replaced by individual item entities. |
item_security | Removed (no replacement). |
trip_beam | Debug-only entity never used in shipped content. |
cycler_weapon | Causes problems when weapon code changes; not practically useful. |
The MapUpgrader tool automatically converts removed entities to their replacements where a direct replacement exists (for example
target_cdaudio → ambient_music). Entities with no replacement are simply removed from the map.