Not enough ratings
HL2: Cheat Guide
By Whiteowl and 1 collaborators
Hello everyone!

This is a cheat guide for HL2 down to Ep2! The contents should be easy to follow, if not, let me know in the below comments section. If you're having trouble enabling the Developer Console, let me know that as well, I'll probably upload a picture of it in response.

Now, cheats can be the gateway to entertainment, if not, they can provide help in many cases! Like getting out of an area in which you are stuck by accident, to fixing problems with the game itself!

Note: examples will be provided where needed.

Note: In this little part below, you don't have to read if your DirectX is fine for HL2's episodes, it's mainly for the people who have the DX8 problem.

Now, just in the description, I'll give out a little cheat code which fixes the DirectX 8 problem multiple people have, you know, the one that forces HL2's episodes onto Dx8, and you cannot change it. Here's the code to fix it:
To fix the being stuck on DirectX 8 bug, simpley right click on either Ep1 or Ep2 in your Steam game library, then go to the properties which is at the bottom of the list, once in the properties, go to the "Set Launch Options," in the box type or copy/paste this cheat down,
+mat_dxlevel 90
or
+mat_dxlevel 95
depending on what your DirectX level is. Once you have pressed "ok" start up either Episode you put the code in the launch option for, and wait for it to load, the problem should therefore be fixed entirely! If you used DX90 and the screen ends up being pink with black checkers everywhere, change the DX level to 95, and load it up again!
hopefully this helped those of you who have the DXlevel problem, and it being stuck on DX Level 8, and not 9+ like it's supposed too!

Final note: This Cheat Guide will be updated regularly due to either new cheats or cheats I need to add because I didn't add them earlier... so stay tuned for upcoming cheat codes! :P (Or as a matter of fact, newer pictures)
Rate  
Favorite
Favorited
Unfavorite
1. sv_cheat required:
Enabling the Developer Console:

Before we start cheating, and doing cheat codes, we need to know where to enter in the commands, now, Valve has made a console purposed for cheating, and using commands. (If you already know how to enable the console, skip this small piece of text and head on to the cheats themselves)

To open up the console, simpley start off by going into the game's options, head on to the tab at the top saying "Keyboard," this is the initial place for changing your keyboard config. once in "keyboard," you should see a button at the bottom of the options saying "Advanced Options", click on it, once the little window comes up, you'll see two advanced options, one says "Enable Developer Console" the other says "Enable Fast Weapon Switch" now, we want to enable the developer console, a.k.a. cheat console, tick the little box beside it, and then press "apply" and then "ok," after that, press the ` thingy, it's on your keyboard right next to "1" and there you have it, the console is enabled! After that, you can open it up whenever you want, and type in cheats in the box at the bottom of the console!

Edit: A little side note: If you want to get Achievements for HL2 and it's episodes, I recommend that you don't turn on sv_cheats, as you cannot cheat and get achievements at the same time. Achievements get turned off after enabling sv_cheats, even if you disable cheats, it still might come up with the message saying you can't, either reload a save, or completely restart the game, uhm, exit, and go back in, not restarting from chapter 1 or something, that'd be absurd.
_____________________________________________________________
sv_cheats 1:
this is the base cheat that will enable certain cheats for the game like godmode and flying/nocliping etc. to turn off, just type in 0, note that with all cheats that have just 1 after them, the key for turning off is just 0, easy!

god:
this cheat will give the player invaunribility so you can't die at all, to turn off simpley type the cheat again, and you should notice the console says either 'godmode off, or on.

noclip:
it will enable flying as well as the ability to go through walls, and also leave the map, (if you want)

impulse 101:
it will give you all weapons, as well as increase your health if your health is lower than 100

impulse 200:
it will make your weapon invisible, until you switch to another weapon

impulse 203:
it will delete the item your looking at

physcannon_maxforce: & physcannon_maxmass:
these are sort of experimental, but when you set these to high numbers like 90000 it'll make things either easier to pull from far distences, or punt them really far like the super gravgun

physcannon_mega_enabled 1:
this will give you the super gravitygun, just like in HL2 and Ep1! Though there is a bit of a bug trying to pick up vehicles like the jeep and jalopy, the vehicle goes a bit crazy and flies around in the air, it's also a bit amusing.

physcannon_mega_pullforce:
this is very similar to the other physgun cheats, if you set it to a high number like 90000, everything should be easier to pull.

(all the other physgun cheats that you'll see in the list really change how the physgun acts towards physics and etc. for some reason I'm not feeling like posting all the cheats there because some I haven't bothered to test So I guess from there you can pretty much experiment)

host_timescale [number]:
this cheat enables time in the game to move faster or slower, depending on what number you put, but I'd suggest that when you use it, don't go over 10 or more, because the game starts acting up, and may crash, but 10 is perfectly fine, to make time slower, just type something like 0.5 or 0. something, but not to slow, else you won't be able to move around. to change back to normal, just type in the number 1 and it'll restore to normal time speed

ai_disable 1:
it'll make all the ai's of the game stop dead in their tracks, (freeze) but you remain normal and can walk around etc. notice the text one the lower right part of the sceen, it'll tell you if AI's are disabled.
2. Spawnable NPCs:
The list off spawnable NPCs, cheats to spawn them are in the next section...

The spawnables:

alyx
dog
eli
mossman
magnusson
combine_s
crow
zombie
zombine
fast_zombie
poison_zombie
headcrab
headcrab_fast
headcrab_poison
monk
seagull
pigeon
antlion
antlionguard
citizen
hunter
strider
ministrider (doesn't really work)
stalker
cscanner
barnacle

Use any of the names above for the spawning the NPC cheats below.
3. NPC spawning cheats:
NPC Spawning:

These are the cheats for spawning npcs, I'll also include the weapons that can go with them.

npc_create npc_[insert npc name here]:
creates an npcs at the spot your looking at, so make sure your pointing at the ground anywhere, and not in walls, etc. (from the previous section use any npc names that are there for whatever npcs you want to spawn)
Example: npc_create npc_crow

npc_create equipment weapon_[insert weapon name here]:
gives the specified weapon to all npcs that you spawn after typing the cheat, it's easy to change the weapon name, then spawn a different NPC so they get something different, etc.

weapon list for the NPCs:

shotgun
smg1
ar2
crowbar
stunstick
pistol
alyxgun
rpg

(Example for the weapon creating is, npc_create equipment weapon_shotgun.
and note that there are a few weapons that don't work with npcs, like the crossbow
magnum, physcannon, granade, and bugbait.)

Also another NPC spawning cheat is:

give npc_[insert NPC name here]:
when you use this cheat, the npc will spawn where you are standing, so it's best to either type the cheat and as soon as you unpause, run off that spot, or just simpley noclip
Example: give npc_crow

It might not be possible for the NPC to get the weapon when using the "give npc_" command, you have to npc_create for it to work.

-spawning npcs is fun!
4. Ent_ commands:
The Ent Commands:

These cheats are a bit harder to understand fully, but with some of them make sure you are pointing at either an NPC, or a prop or direction, and be careful what you do with these cheats, because you don't want to kill someone by accident in the game. And with ent_fire cheats, you must space and put in the npc's name if they are purposely in the game, else you'll have to name them yourself.

ent_fire:
In my opinion, ent_fire is sort of like an editor to npcs/prop, and even the player but it's sort of hard to explain all because there are more an more commands to ent_fire, but's it's the base cheat to a whole network of ent_fire cheats, and a lot of example are needed.

ent_setname:
type a name after ent_setname, and it sets the name of the npc or prop you are looking at, and when you do use it, make sure not to space with the name. (example, ent_setname ironcrow)

ent_teleport:
it teleports the specific npc or prop (with the name you may have specified with ent_setname) to the direction you a looking at, it's handy for yourself as well. (example, ent_teleport ironcrow)

The other ent_ commands I haven't really tested, they are not as interesting to use for fun.
I'll give a list of ent_fire example, using the name is always neccessary, but first, show what ent_fire cheats I've tested, and I know what they do.

ent_fire [insert name] ignite:
this will ignite the character on fire, with the name you specified,
example, ent_fire ironcrow ignite. (ignite_lifetime cheat means they'll be ignited forever until they die or get killed)

ent_fire [insert name] sethealth [insert number]:
this will set the health of the name specified, for example
ent_fire ironcrow sethealth 100.

ent_fire [insert name] kill:
this'll kill the specified npc or prop that has a name.
example, ent_fire ironcrow kill

(in actual fact, I can't display all the ent_fire cheats, and what they do, just the ones that are for fun, because a lot of the ent_fire cheats, you can just experiment with, but I'll put int the ones that are either useful, or fun)

ent_fire [insert name] setrelationship:
this is a nifty cheat, as you can change where npcs hate or like you. And there are specific codes for it, example, ent_fire ironcrow setrelationship "alyx D_HT 99" (with quotes and all) I'll explain what relationships there are too.

HT stands for hate, meaning npcs with guns will attack the specified npc. But if they don't have guns, they'll run away and act all funny.

LI stands for like, meaning they will act just like an ally towards the specified npc.

NU stands for neutural, it's the same as LI, and the characters won't do anything

FR stands for fear, meaning the npc will fear the other npc specified.

99 it means the amount of relationship the specified npc has, but just use 99, as it's the easiest in using without any complexity.

To use them is pretty simple, just edit the bit that has 'HT' in it to either one of these, and make sure the number is specified after with a space in between.

It's even easier to set the relationship of the other targetted npc to the one hating, fearing, or liking them, just swap the names around!

-The combine seems to like Kleiner, that because it has Alyx's name, and it's relationship to everyone in the room, and every to the Combine, is set to "Like!"

With ent_fire on the player's not so hard, you simpley type "!player" and use whatever command you like, in the picture, the Combine's not attacking the player either, because the player has been specified as "like."

Example: ent_fire !player
(make sure you space to get a list of commands for him.)

ent_fire !picker:
!picker represents the NPCs your looking at, meaning you could do whatever to the NPC your looking at without having to give them a name, and using the name to do stuff, bit easier huh? But I'd still recommend ent_setname, just say for example:

Alyx died and the black screen didn't show up, or you killed her with cheats and still no blackscreen, what would you do then? (well if it's in an are which is not a scripted area like in chapter Mutual Fiend, if the NPC who's using a script, dies, they will stop, and so will the people who might have been talking to them)

If in a situation where you killed someone with cheats, or something like that, easily create an NPC (as you should know by now) and use ent_setname to the pointed at NPC, (NPC your looking at, etc) and if it wasn't in an area that has many scripts and other ally NPCs who need to be there to talk to Alyx etc, then the spawned NPC with the name (Alyx, for instance) will continue their role, when you get to a scripted sequence later on, and if the NPC doesn't follow you at first after setting the name, just go and hit them or shoot at the ground, OR spawn another NPC, pretty much that sort of confirms the newlynamed NPC with their new name.
5. Random cheats:
Random Cheat Codes:

So there are so many cheats that I know, and don't have time to post them all, so I'll just go with a bunch of random cheats that'll do things like create a quick earthquake, etc.

shake:
this'll create an earthquake, but it really just shakes the player's view

bind:
(bind is really hard to explain without examples) use it with keys, and certain commands you want. Example: bind "t" "npc_create npc_crow" meaning when you press "t" it'll put that command in action, and create the bird or npc you specify. (and you must use quotes, else nothing will happen, as some cheats are like that and must use quotes to specify clearly)

unbind:
this will unbind the specific key that you've binded
example: unbind "t" "npc_create npc_crow"

I must tell you that you can multi-bind, example:
bind "t" "npc_create equipment weapon_shotgun; npc_create npc_citizen"
this would give the npc that will be spawned when you press the key the specified
weapon. Also you could do, bind "t" "ent_setname citizen; ent_fire equipment weapon_shotgun; npc_create npc_citizen" it must be done in this order, I'm sure, because when you spawn the npc the npc will get the name when spawned as well as the gun.

mat_depthbias_normal 0:
set it's value to 1 and you'll get to see through walls, npcs, and props.
here's a picture of it!


CreateHairball:
this is a weird cheat, and I don't get what it means, or how to get
rid of it, but it basically creates a black ball of hair looking strands flying around
in the map, I don't know what it does otherwise. I'd just like to try creeping up
on it or shooting it.

violence_ablood 1:
the "a" stands for "alien" and when the value's set to 0, it should disable alien blood, but I'm not sure if it really does, maybe restart the map and it'll work.

violence_agibs 1:
set the value to 0 and it should disable the gibs, if not, maybe restart the map.

violence_hblood 1:
"h" stands for "human" and if you set the value to 0, it should disable human blood, but of course, I'm not sure if the "violence" cheats really do anything.

violence_hgibs 1:
setting the value to 0 should disable human gibs.

budhha:
it's like godmode, you can still take damage, but only until your health reaches 1, you are then unkillable. Be warned that it does seem to wear off, unlike godmode. I haven't quite gotten how it wears, but I suggest not letting your health reach 1 too many times, and re-use the cheat when loading a new map, even if it says it's "ON" turn it off, then back on.

Note that the cheat doesn't require sv_cheats enabled to be used. That is because it's not 100% invaunribilty like godmode. Also use this cheat if you want to be (sort of, because of wearing) invincible, but not use sv_cheats, and still take damage unlike godmode, which completely disables damage.

Map:
To get a full list of all maps go with
maps *
With this cheat you can load maps with ease, doesn't require anything enabled first, it's just head-on in there. For example how to use 'map'
map ep2_outland_01
once you enter the cheat, the game will auto load it.
6. The Picture/Secret Section.
Pictures, and secrets:

In this section, we mainly see pictures with text written underneath them, and here's a few easter egg pictures too. Easter eggs can be quite suprising when found by accident!

To make the physics of ragdolls move slower simpley type: cl_phys_timescale 0.05, then go ahead and spawn and spam kill zombies with rockets.
-This scene kinda happend by accident!

-Whee, flying headcrabs!
Used with phys_timescale 0.5, it's similar to the above one, but it's for props and npcs to move slower through gravity, (when they jump etc)

-this was rather fun! using super gravgun.

-Npc relationship, also changing names. Here, Alyx thinks the headcrab is the Vortigaunt!

Ent_teleport used here. Sooner or later, that lift stopped working, excess weight I guess...

No cheat was used here, just simpley grabbed a crate with the gravgun and made sure it was in front of the lift's exit, and somehow it caused Alyx and Eli to stop their lines, and let me run around the place in slow-motion!

Zombie tower!

Kung-Fu Vort, with Ai_disable on you could pause them in their actions, like here!

Well, the backround's weird, but only because I noclipped and skipped through the game and it caused it to happen.

Easter Egg 1. -The text reads "How did you get back here?!" found using "noclip."

Easter Egg 2. -The Lost Reference Easter Egg. As you may know, many people at Valve are fans of the TV series "Lost." Gabe Newell and J.J. Abrams exchanged fan mail, and Gabe promised a Lost reference in Episode 2, and here it is as an easter egg, for us to find!

Easter Egg 3. The H.E.V. faceplate from HL1. You can also find this same plate in Half-Life 2, chapter Black Mesa East, but here, I will explain how to find it in Episode 2, it's location is in the Transmission room, where you get to see Judith's transmission a second time, just shortly after you close the secondary silo. In the transmission room, you walk in and you see a storage-like area just on your right, inside there is the H.E.V. faceplate, just chuck a granade and get it with your gravity gun.

Anyway, I hope you enjoyed the pictures, and this guide helped you learn about cheats, or more about them, or what they do! If you have any comments or any other cheats, just post them in the comment section, as everyone should know!
26 Comments
< >
ruediix Jul 18 @ 7:21am 
As of changing magazine size, I'm not sure if you can do it in the console (if so you have to go into entity editing, (ent_fire).

As if doing it from config files, there is an option for that. In the hl2/scripts directory there is a series of files with the various weapon properties. You can change the magazine size with the "clip_size" option in those files.
i liek pie Jul 17 @ 11:54am 
thanks
Whiteowl  [author] Jul 16 @ 8:48pm 
sk_max_shotgun # (# means how much you want)

For all weapons just change shotgun or buckshot to crossbow, smg1, smg1_grenade, ar2, ar2_altfire, 357, pistol, grenade, rpg_round. First enable sv_cheats before using these codes, and to actually get all the extra ammo and stuff type down impulse 101 after doing sv_cheats and the sk cheats above.

I haven't added this in yet, nevertheless the dmg cheats which change how much damage they do.
i liek pie Jul 16 @ 6:52am 
how do i change the ammo capacity of things?
[EfeS] low Jun 27 @ 2:47pm 
thx
ruediix Apr 23 @ 11:08am 
Oh, as a note, the hairball is to test/benchmark the ropes system. It only works on the newer Source engines, but when they did the Linux port, they also updated the Source engine version of Half Life 2.

Before that it only worked on Half Life 2 Episode 1 and later. I still wouldn't count on it working in Half Life 2, as there is no reason for them to keep the required code in the system.
Whiteowl  [author] Apr 21 @ 5:42pm 
@Random Gamer 1337, yeah, about the superphysgun, you may not pick up the cars in particular, I've found that I can pick up the airboat with it.
Random Gamer 1337 Apr 21 @ 11:06am 
By the way, type "givecurrentammo" into the Developer Console to instantly max out the ammo of whatever ranged weapon you may be using, this doesn't require "sv_cheats" to be set to "1" and of course, like all other commands, it can be bound to a key.
Random Gamer 1337 Apr 21 @ 10:54am 
@ruediix The physcannon_maxmass command may create problems if you try to pick up dynamic props (e.g. vehicles and levers), but it won't affect the game in such a way if you try to pick up physics props (props that can be moved, but don't have any special functions like dynamic props have).
ruediix Mar 1 @ 3:47am 
My favorite is "sk_plr_num_shotgun_pellets" when you increase it and reduce the damage done per a pellet with "sk_plr_dmg_buckshot" you can make the shotgun behave more like a real shotgun. That way the spray always hits everything in it's radius, but the damage done is less.