Half-Life: Alyx

Half-Life: Alyx

64 ratings
How to make NPC battles
By ic3bug
With this little guide you will learn how to make combine soldier (or any other npc) battles in Half-Life: Alyx.
   
Award
Favorite
Favorited
Unfavorite
Launch options
To make this work – game's console must be enabled.

Go to game's properties: right click Half-Life: Alyx in your Steam library and select properties.

Press SET LAUNCH OPTIONS button under General tab.

Set these launch options:
-console -vconsole

Press OK.
In-Game
Launch the game and press tilde key (~) on the keyboard.

This is a console, where you can type commands like in a terminal.

Type this command in the command field down below, this command will enable cheats in the game.
sv_cheats 1

To not ruin your experience with achievements – disable them, for now, with this command:
achievement_disable 1
To enable achievements back just restart the game. Or you can try changing 1 to 0 which means false (1 - true).

Switch back to the game's window and start the game.
The Fun Part
While in-game, when the level has been loaded – try looking at the floor, switch to the console window and type this command (in the command field) on the keyboard and press Enter:
npc_create npc_zombie
Wowzers! You now created a zombie in the game. How cool is that?

Type this for the zombie to ignore you (don't forget to press Enter):
notarget

Combines

Now type:
ent_create npc_combine_s
You've created a default combine soldier, called grunt.
Why "ent_create" you might ask? Because with this command you can specify a model for an entity you are creating.

Now try these commands:
ent_create npc_combine_s {model models/characters/combine_suppressor/combine_suppressor.vmdl}
ent_create npc_combine_s {model models/characters/combine_soldier_heavy/combine_soldier_heavy.vmdl}
ent_create npc_combine_s {model models/characters/combine_soldier_captain/combine_captain.vmdl}
For a Suppressor, a Heavy and a Captain combine soldiers respectively.

Relationships

Let's make them hate each other! Type:
ent_fire npc_combine_s setrelationship "npc_combine_s D_HT 99"
What we are doing here is making every combine soldier on the map hate every other combine soldier. D_HT stands for hate. 99 is how much hate to generate. You can try 1, but not much will change. D_HT can be changed to:
  • D_FR – Fear. Characters will try to flee from the target.
  • D_LI – Like. Characters will considers the target a friend.
  • D_NU – Neutral. Characters will consider the target neutral.

Squads
To make squads you have to specify a name for each npc.
Like this:
ent_create npc_combine_s {model models/characters/combine_suppressor/combine_suppressor.vmdl targetname team_1}
Where targetname is the name, which will distinguish that npc from others, which is set to "team 1". Spawn the other one, but change targetname to "team 2":
ent_create npc_combine_s {model models/characters/combine_suppressor/combine_suppressor.vmdl targetname team_2}

Now you can type this command to fight within squads:
ent_fire team_1 setrelationship "team_2 D_HT 99"; ent_fire team_2 setrelationship "team_1 D_HT 99"

Other NPCs
To get a list of all npcs in the game, start with "npc_create" command. The console has autocompletion so it will show you all the available npcs. But beware that some of them lack the actual model, so it will show Error.

Here's the list of working NPCs:

npc_antlion
npc_barnacle
npc_combine_s
npc_crow
npc_headcrab
npc_headcrab_armored
npc_headcrab_black
npc_headcrab_fast
npc_headcrab_runner
npc_helicopter
npc_manhack
npc_pigeon
npc_seagull
npc_strider
npc_turret_floor
npc_zombie
npc_zombie_blind

To create an antlion worker use this command:
ent_create npc_antlion {spawnflags 262144}

That's it! Hope you liked it!

Let the battle begin!
49 Comments
Tinman 30 Dec, 2024 @ 6:38am 
Epic
Butter Fliege 11 Jul, 2023 @ 7:53am 
I am... everywere
anthonyk34304 11 Jul, 2023 @ 7:46am 
butter fliege why are you every were
Butter Fliege 16 Feb, 2023 @ 12:07pm 
if i write the spawn command for zombie or combine i just see a red box (like outline and then it vanishes again)
thehuntsman 10 Nov, 2022 @ 12:37am 
thanks, actually helpful.
i could not find anything on YouTube or anything really before this, thanks
я люблю женщин 1 Apr, 2022 @ 12:36pm 
ur a fucking legend thank you for this guide
osaka 19 Apr, 2021 @ 1:10pm 
not about the npc's but in the command thing is there a way to get infinte ammo for all guns?
Matt 28 Dec, 2020 @ 8:47pm 
@TAS_ER You can type -novr as a launch option, which bypasses SteamVR. It'll allow you to play in desktop, but obviously a lot of functionality is thrown out the window since the game is built for VR. If you're only planning to go to a specific map and setup an NPC fight, you'll be fine ;)
TAS_ER 7 Dec, 2020 @ 10:13am 
Do you have to Play This In VR? Im Guessing You do So Is There Any Command To Make the game Playable Without VR?
JackTheFreeMan 1 Nov, 2020 @ 4:39am 
oh, i thought you had to hit there arrow back into another enemy with the shield.