Page 1 of 1

Half-Life: Alyx – Console Commands and Cheats

Half-Life: Alyx – Console Commands and Cheats
   0

As most of you know, I do not regularly post articles that are related to specific games.
However, Half-Life: Alyx most certainly is an exception for many reasons.

Having played and loved all Half-Life games, growing up with them, and having an interest in VR games, “Half-Life: Alyx” was simply a MUST HAVE.
After playing the game from beginning to end, more than once, I can only say that this is the new gold standard for VR gaming.

Spoiler alert!
Before you start reading this:
I HIGHLY recommend you finish the game first!

Really, it is so worth it, and you would not want to spoil the game with some lame cheats.
Don’t get me wrong; Cheats can be fun after you finished the game and you’re ready to mess around in the game.

So be warned as this description may contain spoilers.




Overview

What are Console Commands?

If you’ve never tinkered with the console commands in previous Half-Life games, then this may be a new one for you (Half-Life is not the only game having a “Console” option).

In essence the “Console” allows you to enter commands to be executed by the game engine (Source 2: Developer Page, Wiki Page). It is kinda like entering DOS command.

Some of these commands allow you to enter “cheats” and become invincible, or spawn weapons or other objects, switch maps, turn on the flash light, etc. But not all commands are cheats, some can actually help you tweak the performance on your rig (often at the expense of picture quality etc).

Now personally I believe that cheats have a tendency to spoil the game, so I’m just saying this again:

Finish the game first … 

If you haven’t completed the game, I highly recommend finishing the game before even looking at this article.

 

Accessing the Source 2 Console

Since we’re talking about Half-Life: Alyx, we automatically talk about Steam and SteamVR.
To enter the console, we will first need to start Steam on your PC (Half-Life: Alyx, at the time of this writing, is only available on the Windows platform).

Enabling the Console

  Make sure the game is closed, before doing this.

In Steam, go to your Library, find and right click the “Half-Life: Alyx” title.
 A menu should popup where you select “Properties“, which will open a separate window.

Half-Life: Alyx: Open Properties

Half-Life: Alyx: Open Properties

 

In this newly opened window, click the SET LAUNCH OPTIONS … button.
 Another window will open, where we enter -console -vconsole  in the edit box and click OK when done…

You can can now click the CLOSE button, we’re all done here – the Console has been enabled, so we can access it in the game.

 

Half-Life: Alyx: Launch Options

Half-Life: Alyx: Launch Options

How to open the Console and Enter Commands

Opening the Console

The Console can now only be opened when the game is running (!).
So make sure you have “Half-Life: Alyx” running.

The Console will only be visible on your PC screen! NOT in your headset!

Opening the Console in VR is a little tricky, since you will not see the keyboard, AND the Console will NOT be visible in your VR headset – instead it will only display on your monitor or laptop screen.

The easiest approach would be to simply pause the game, and temporary take off your VR HMD (headset).

Next step is to press the tilde ( ~ ) key on your keyboard – the tilde key is located between the Esc key and the TAB key, on the far left side of your keyboard.

Entering Commands

With the Console open on your PC monitor, we can now enter command in the “Command:” field at the bottom of the Console window.

Simply type the command in the “Command:” field and press Enter.

In the screenshot below you’ll see some of the details (for available commands, see the commands list below):

 The “Command:” field where you can enter commands.

Note that this field has an auto-complete mechanism, which will show a list of matching commands as you type, and allows you to explore other commands and entities that I have not listed here.

 Console output.

In this huge list of text messages, you can see what the game engine (Source 2) is spitting out as a log.

Note: In this example I intentionally made a typo, reflected in the first 2 lines, so you can see what to expect when you did something wrong.

 This button shows you a list of commands you have executed, so you can quickly recall them if needed.

 

Half-Life: Alyx - Console example

Half-Life: Alyx – Console example

 

An alternative: The DEV menu

The Console is a common way to go, but if you’re interested in doing some of these commands straight into VR, you could also use the so called “DEV” menu option. Just keep in mind that your options are limited here, but it is much easier to access while playing the game.

To enable the dev menu, follow the same steps as presented for enabling the Console (start here).
The only difference will be to enter -dev  instead of -console -vconsole  in the launch options (Step 4).

  The DEV menu will only be visible in your HMD (headset)!

On the left of the picture below, you’ll see what the player menu will look like when the DEV menu is enabled.
Selecting the “DEV MENU” will reveal the menu shown on the right, giving you quick access some some common cheats and some developer functions.

 

Half-Life: Alyx - DEV menu

Half-Life: Alyx – DEV menu

Console Commands

The following commands have been found/discovered by several sources, for use with the Console, and some are the same or similar to the ones seen in the other Half-Life games.

 

Unexpected side effects, and limited testing … 

Please be aware that some commands listed may come with unexpected side effects like:
– Big ERROR messages in your play view
– Items may not spawn
– etc.

Also keep in mind that I have not tested all commands, and quite a few were found online.
The autocomplete function in the console will reveal more possibilities – please comment below if you find something cool that should be added to this list!

Enable or Disable Commands 

Some command take a 1 or a zero as a parameter – Here 1 means “enable“, and zero means “disable“.

About “sv_cheats” … 

  • Enable “sv_cheats 1” required for some of these commands

Some of the commands listed below will work right away, but most will require that you enable cheat-mode by first entering the “sv_cheats 1” command. This is needed only one time, for each session.

  • “sv_cheats 1” will disable achievements

When using cheats (sv_cheats 1), the entire achievement system will be disabled during this session, and for games saved while cheats were active. Which of course makes perfect sense …

 

Commonly used Console Commands

Half-Life: Alyx – Commonly used Console Commands
Command Purpose
sv_cheats 1 Enables the use of cheat commands (will disable achievements)
god Toggle invincibility
sv_infinite_ammo 1 Infinite ammo in your backpack (reloads needed)
sv_infinite_clips 1 Infinite ammo in magazines (no reload needed)
impulse 101 Gives all weapons, and 20 resin
impulse 102 Unlocks all gun upgrades
give item_hlvr_weapon_energygun  Spawn pistol
give item_hlvr_weapon_shotgun Spawn shotgun
give item_hlvr_weapon_rapidfire Spawn SMG (Sub Machine Gun)
hlvr_shotgun_grant_upgrades 3 Give shotgun all upgrades
item_hlvr_crafting_currency_large  Get 5 resin
vrfly_enabled 1 Fly around by using the keyboard (and mouse):
   W, A, S, D keys for moving,
   – Arrow keys for looking

 

Player Commands

Half-Life: Alyx – Generic Player Console Commands
Command Purpose
god Toggle invincibility
buddha You will take damage, but you cannot die
Note: it seems Jeff can still kill you
vrfly_enabled 1 Fly around by using the keyboard (and mouse):
   W, A, S, D keys for moving,
   – Arrow keys for looking
vrfly_speed <number> Changes the flying speed (default: 60)
sv_gravity <number> Changes the gravity in the game (default: 500)
( 0 = no gravity )

 

Enemy Commands

 

Half-Life: Alyx – Enemy Related Console Commands
Command Purpose
barnacle_vr_damage_pull <number> Set the damage taken from barnacles (default: 5)
sk_zombie_headshot_kills_crab This may allow you to kill a zombie with a single headshot

 

Weapon Related Commands

Getting Ammo

 

Half-Life: Alyx – Ammo Related Console Commands
Command Purpose
sv_infinite_ammo 1 Infinite ammo your backpack (reloads needed)
sv_infinite_clips 1 Infinite ammo in magazines (no reload needed)
impulse 101 Gives all weapons, and 20 resin
impulse 102 Unlocks all gun upgrade
give item_hlvr_clip_energygun Spawn pistol magazine
give item_hlvr_clip_shotgun_multiple  Spawn 4 shells for shotgun
give item_hlvr_clip_rapidfire Spawn SMG magazine
give item_hlvr_grenade_frag Spawn Combine (standard) grenade
give item_hlvr_grenade_xen Spawn Xen grenade
hlvr_addresources 10 0 0 0 Give 10 pistol ammo
hlvr_addresources 0 10 0 0 Give 10 SMG ammo
hlvr_addresources 0 0 10 0 Give 10 Shotgun shells
hlvr_addresources 0 0 0 10 Give 10 resin

Pistol (energygun)

Half-Life: Alyx – Pistol Related Console Commands
Command Purpose
give item_hlvr_weapon_energygun Spawn pistol
give item_hlvr_clip_energygun Spawn pistol magazine
vr_energygun_ammo_per_clip <count>  Amount of bullets a pistol magazine can hold (default: 10)
vr_energygun_rof <seconds> Time, in seconds, between pistol shots (default: 0.175)
Try seconds=0.2 for a laser like shooting (caution: may cause lag) 
hlvr_energygun_grant_upgrade <id>  Pistol upgrades, where id =
   0 : Laser Sight
   1 : Reflex Sight
   2 : Bullet Hopper
   3 : Burst Fire

Shotgun

Half-Life: Alyx – Shotgun Related Console Commands
Command Purpose
give item_hlvr_weapon_shotgun Spawn shotgun
hlvr_shotgun_give Gives shotgun
give item_hlvr_clip_shotgun_multiple  Spawn 4 shells for shotgun
vr_shotgun_rof <seconds> Time, in seconds, between shotgun shots (default: 0.5)
vr_energygun_handcannon_pellet_count <count>  Number of shotgun pellets per shotgun shot
Try count = 250 to kill anything in sight.
vr_shotgun_chamber_light_brightness 5000 When out of ammo, makes shotgun glow bright.
hlvr_shotgun_grant_upgrade <id> Shotgun upgrades, where id =
   0 : AutoLoader
   1 : Grenade Launcher
   2 : Laser Sight
   3 : Quick Fire

SMG (Sub Machine Gun or rapidfire)

Half-Life: Alyx – SMG Related Console Commands
Command Purpose
give item_hlvr_weapon_rapidfire Spawn SMG (Sub Machine Gun)
give item_hlvr_clip_rapidfire Spawn SMG magazine
vr_rapidfire_ammo_per_capsule <count>  Amount of ammo a SMG magazine can hold (default: 30)
vr_rapidfire_rof <seconds> Time, in seconds, between SMG shots (default: 0.10)
hlvr_rapidfire_grant_upgrade <id> SMG upgrades, where id =
   0 : Energy Ball (unusable)
   1 : Tag Dart (unusable)
   2 : Stun Grenade Clips (unusable)
   3 : Exploding Bullets (unusable)
   4 : Reflex Sight
   5 : Laser Sight

 

Gravity Gloves (the “Russels”)

Tweaking The Russels … 

A Steam user, flarn2006, wrote a guide on how to tweak the gravity gloves.
If you feel you need to tweak the “Russels”, his guide will be worth reading.

 

Half-Life: Alyx – Gravity Gloves Related Console Commands
Command Purpose
vr_hand_pull_acceleration_max <value> The “pull” strength of the Russels (default: 500)
vr_hand_pull_angle_far <value> Intended for objects far away, this influences the angle (default: 0)
   0 means the object will come straight at you,
   90 means the object will move to your side instead.
vr_hand_pull_angle_near <value> Intended for objects near by, influencing the angle (default: 0)
   0 means the object will come straight at you,
   90 means the object will move to your side instead.
vr_hand_pull_angle_far_distance <value>  The distance for an object to be considered far away (default unknown)
Example value: 300
vr_hand_pull_angle_near_distance <value>  The distance for an object to be considered near by (default unknown)
Example value: 100
vr_hand_pull_acceleration_debug 1 Show how the trajectory of pulled objects is being calculated

Flashlight

In case you find a fix for this: having talked to other players, having the ability to have the flashlight on whenever the player feels like it, would be a wonderful “cheat”. Or maybe the option to have the flashlight on permanently. Either way: if you find a fix for that, then please post this in the comments.

Half-Life: Alyx – Flashlight Related Console Commands
Command Purpose
give item_hlvr  Spawn Flashlight
hlvr_give_flashlight Gives the flashlight and turns it on.
Note: Will trigger an error if you do not yet have the gravity gloves (Russels) 

Spawning

Please be aware that some objects can come with weird side effects.
Most common problems I ran into:

  • Rotating “Error” when an object is too big for the available space
  • Rotating “Error” when there is something wrong with the object (eg. missing textures, etc).
  • Nothing happens … (not sure what triggers an item to no spawn, possible chapter progress?)

Spawning Items

You can spawn items with the “give” command: give <item>

Half-Life: Alyx – Spawn Items Commands
Item Spawns …
item_hlvr_weapon_energygun Pistol
item_hlvr_weapon_rapidfire Shotgun
item_hlvr_weapon_shotgun SMG (Sub Machine Gun)
item_hlvr_multitool Multitool (the “Alyx”)
item_hlvr Flashlight
item_hlvr_clip_energygun Pistol magazine
item_hlvr_clip_rapidfire SMG magazine
item_hlvr_clip_shotgun_multiple 4 shotgun shells
item_hlvr_grenade_frag Combine grenade
item_hlvr_grenade_xen Xen grenade
item_hlvr_crafting_currency_small  Single resin
item_hlvr_crafting_currency_large  5 resins
item_hlvr_health_station_vial Bug vial for health stations
item_hlvr_prop_battery Combine power cell

 

Spawning NPC’s (Non Player Character)

Spawning Non Player Characters (NPCs) is done with the “npc_create” command: npc_create <name>

Note: spawning NPCs did not always work all that great at times. Sometimes an item would not spawn, or the item would display a big ERROR message instead of the item (especially when you’re running out of space for the item you’re trying to spawn).
It may happen that a spawned NPC is inactive and does not do anything.
Also not that the list for spawning combine characters appears incomplete as well (Combine Grunt vs Combine Charger).

Half-Life: Alyx – Spawn NPC Commands
Non Player Character name Spawns …
npc_zombie Zombie
npc_zombie_blind Blind Zombie
npc_barnacle Barnacle (unpredictable location)
npc_antlion AntLion
npc_headcrab Classic headcrab
npc_headcrab_armored Armored headcrab
npc_headcrab_black Poison (black) headcrab
npc_headcrab_fast Lightning dog or Reviver headcrab
npc_headcrab_runner Fast headcrab (seems incomplete, no AI and no sound)
npc_combine? White combine grunt (with canister on his back)
npc_combine_s? Combine charger (big dude)
npc_manhack Manhack (flying drone/shredder)
npc_cscanner Scanner camera
npc_turret_floor Turret (untested)
npc_crow Static crow (untested)
npc_seagull Static seagull (untested)
npc_pigeon Static pigeon (untested)
npc_vr_citizen_female Female citizen, idle, no AI (untested)
npc_vr_citizen_male Male citizen, idle, no AI (untested)
npc_grenade_bugbait Static bugbait, no interactions (untested)

 

Graphics

The following commands allow you to tweak some of the graphics settings, which may or may not be helpful to increase game performance.
I did not really find any of these very useful (except the FPC counter maybe).

Half-Life: Alyx – Graphics Related Console Commands
Command Purpose
cl_showfps 1 Show/Hide FPS counter on the desktop view
r_drawskybox 0  Disables the Skybox, which makes the sky black in most areas
vr_enable_volume_fog 0  Disable volumetric fog (may increase performance)
vr_enable_lights 0  Disable live lights, like for example the Flashlight’s light

Developer Tools

Half-Life: Alyx – Developer Console Commands
Command Purpose
highest_chapter_unlocked <number>  Unlocks all chapters, up to (max) chapter 10
nav_generate_no_restart 1 Generates a navmesh so NPC’s can walk around
a custom SteamVR Workshop Tools map
load <saveslot>/<name> Loads a certain previously saved game.
Example: load S2/quick
Quick loads the quick save from the 3rd save slot.
(S0 = 1st slot, S1 = 2nd slot).
splitscreen_mode <mode> Enables a splitscreen mode – caution: not very stable.
Modes: 0 – 4 (default: 0).
vr_draw_hand 1 Draws ghost hands that always stay where your controllers are.
(The normal in-game hands can be moved by handles or walls)

 

Maps

You can load any map manually, with the “map” command: map <mapname>

Note: some maps have sub maps as well, which I haven’t listed here.

 

Half-Life: Alyx – Map Reference
Map name
startup
a1_intro_world 
a2_drainage
a2_headcrabs_tunnel
a2_hideout
a2_pistol
a2_quarantine_entrance
a2_train_yard
a3_c17_processing_plant
a3_distillery
a3_hotel_interior_rooftop
a3_hotel_lobby_basement
a3_hotel_street
a3_hotel_underground_pit
a3_station_street
a4_c17_parking_garage
a4_c17_tanker_yard
a4_c17_water_tower
a4_c17_zoo
a5_vault
a5_ending

How to take a Screenshot

Taking a screenshot, for some odd reason, can be a challenge, so here a short list of options (source).
I’m still exploring the option to use something like voice control to take a screenshot instantly, or start recording some of my game play (like the XBox One where you can say “Xbox record this” or something like that).

Valve Index

At the moment of writing this article, the Valve Index seems to be the best of the best.
I’m holding off on this one, until it becomes wireless.

Take a screenshot: Press Trigger + Menu buttons on the same controller.

HTC Vive

Take a screenshot: Press Trigger + Power buttons and wait for 1 – 2 seconds, then release both buttons at the same time on the same controller.

Samsung Odyssey

Take a screenshot: Press Joystick + Trigger buttons on the same controller.

Oculus Rift (S) and Oculus Quest

The Oculus Quest is my go-to HMD (Head Mounted Display), even though the Field of View is more limited than some other HMD’s, it is by far the coolest experience to run around wirelessly (using ALVR). I previously owned a Rift, but after buying the Quest, I had no use for it anymore and sold it.

Take a screenshot: Press the Left Trigger (on the left controller) + Oculus Button (on the right controller).

Donation options


Donations are very much appreciated, but not required. Donations will be used for web-hosting expenses, project hardware or a motivational boost (a drink or snack). Thank you very much for those have donated already! It's truly AwEsOmE to see that folks like our articles and small applications.

Please note that clicking affliate links, like the ones from Amazon, may result in a small commission for us - which we highly appreciate as well.

Comments


There are no comments yet.
You can post your own comments by using the form below, or reply to existing comments by using the "Reply" button.



Your Comment …

Do not post large files here (like source codes, log files or config files). Please use the Forum for that purpose.

Please share:
*
*
Notify me about new comments (email).
       You can also use your RSS reader to track comments.


Tweaking4All uses the free Gravatar service for Avatar display.
Tweaking4All will never share your email address with others.