Cheats & Console Commands
While the purest Half-Life 2 experience is often found by playing through without assistance, sometimes you just want to experiment, bypass a tricky section, or unleash some glorious chaos. This section details how to enable and use the developer console to input various cheats and commands, along with some specific, powerful options to enhance your gameplay.
Enabling the Developer Console
Before you can enter any commands, you need to enable the developer console. Follow these steps:
- Launch Half-Life 2.
- From the main menu, navigate to Options.
- Select the Keyboard tab.
- Click on Advanced....
- Check the box labeled "Enable developer console (~)".
- Click OK to save your changes.
- During gameplay, you can now press the tilde key (~, usually located below Esc) to open and close the console.
Activating Cheats
Most of the more impactful cheats require a special command to be entered first. This tells the game you intend to use cheats.
- Open the console (~).
- Type
sv_cheats 1and press Enter. - You should see a confirmation message. Now you can use the cheat commands listed below.
- To disable cheats, type
sv_cheats 0.
General Console Commands
These commands provide broad control over your game experience.
god: Toggles invincibility. Gordon Freeman becomes immune to all damage.noclip: Toggles the ability to fly through walls and objects. Useful for exploring out-of-bounds areas or getting unstuck.impulse 101: Grants all weapons and maximum ammo for each. Be warned, this can be quite a lot of firepower!buddha: Prevents you from dying, but you still take damage. Your health will drop to 1 but not go below it.give item_healthkit: Spawns a health kit at your current location.give item_battery: Spawns an HEV suit battery at your current location.map [mapname]: Loads a specific map. For example,map d1_trainstation_01will load the first map of the game. You can find map names online or by exploring the game files.
Weapon and Ammo Commands
Need a specific weapon or just more bullets for your favorite? These commands have you covered.
To give yourself a weapon, use the format give weapon_[weaponname]. For ammo, use give item_ammo_[ammotype] or give item_box_[boxtype].
Specific Weapon Spawns:
give weapon_pistol: Spawns the standard 9mm Pistol.give weapon_357: Spawns the .357 Magnum.give weapon_smg1: Spawns the SMG (Submachine Gun).give weapon_shotgun: Spawns the Shotgun.give weapon_ar2: Spawns the AR2 Pulse Rifle.give weapon_crossbow: Spawns the Crossbow.give weapon_rpg: Spawns the RPG (Rocket Propelled Grenade Launcher).give weapon_frag: Spawns a Frag Grenade.give weapon_physcannon: Spawns the Gravity Gun (Supercharged if you're past Nova Prospekt).give weapon_stunstick: Spawns the Combine Stunstick.
Specific Ammo Spawns:
| Effect | Code |
|---|---|
| .357 Ammo | item_ammo_357 |
| 9mm Ammo | item_box_srounds |
| Crossbow Ammo | item_ammo_crossbow |
| Pulse Gun Ammo | item_box_lrounds |
| RPG Rocket | item_ml_grenade |
| Shotgun Ammo | item_box_buckshot |
| SMG Ammo | item_box_mrounds |
| SMG Grenades (secondary fire) | item_ar2_grenade |
The 'Alyx Gun' - Prototype Pistol
This unique weapon, often referred to as the 'Alyx Gun', is a prototype pistol not typically found in standard gameplay. It functions as a third pistol, boasting a 30-round clip but no additional reserve ammo by default. Visually, it's quite distinct, appearing almost like an iron bar. When spawned, it will appear at your feet, requiring you to press the 'E' key to pick it up.
| Effect | Code |
|---|---|
| Gives you the 'Alyx Gun' | give weapon_alyxgun |
| Sets new damage for Alyx Gun (default 150) | sk_plr_dmg_alyxgun # (replace # with desired damage value) |
| Sets new max ammo for Alyx Gun (default 0) | sk_max_alyxgun # (replace # with desired max ammo value) |
Example: To give yourself the Alyx Gun and then set its damage to 200 and max ammo to 90, you would enter:
give weapon_alyxgunsk_plr_dmg_alyxgun 200sk_max_alyxgun 90
Xbox Specific Cheats (Legacy)
For players on the original Xbox version of Half-Life 2, there were specific button combinations for cheats. These are not applicable to the PC version.
- Restore Ammo for Current Weapon: Y, B, A, X, White, Y, X, A, B, White
- Unlock All Chapters: Left (x4), Black, Right (x4), White
These console commands and cheats offer a vast array of options to customize your Half-Life 2 experience, whether for fun, exploration, or overcoming a particularly challenging segment.