Velvet Star Monitor

Standout celebrity highlights with iconic style.

updates

How can I show enemy health using console?

Writer Matthew Harrington

In PC Gamer's Prospekt review console is used to compare enemy base health values between Half-Life 2 and a HL 2 mod:

from Prospekt's first combat encounter, it felt to me like something was off. The breaking point came during a battle at the start of chapter five, when, in a fit of frustration, I quit out, loaded up Half-Life 2, and used the command console to check out a hunch. Sure enough, the Combine Overwatch Soldier and Elite—the two enemy types you fight throughout the majority of Prospekt—have been given significantly more health.

I would like to do my own tests, for example MINERVA mod may have increased the enemy health.

2 Answers

From what I have found, it seems like Prospekt used the console command impulse 103 while looking at the enemies, as this command will tell you the stats of a "monster".

From here

Prints AI state of the NPC the player is looking at to the console. Requires developer mode.

I'm not entirely sure what is meant by "AI state", as this, to me, implies "hostile" vs. "friendly", but from other sites, it seems that this is what will reveal enemy health to you.

From here:

While looking at amonster, displays stats.

And here:

Monster Stats, While Looking at Monster

impulse 103

And here:

Show monster stats impulse 103

3

Make sure that the developer console is enabled in the game settings (keyboard > advanced). Enable developer mode and cheats with developer 1 and sv_cheats 1 commands. Aim at an NPC and open console (the game should be automatically paused) and use command impulse 103. Example output for Antlion Soldier:

State: Combat, npc_antlion: Activity: ACT_RUN - Ideal Activity: ACT_RUN
Task 129 (#4), Schedule SCHED_CHASE_ENEMY,
Enemy is player Moving Leader.
Yaw speed:32.0,Health: 30
Groundent:worldspawn

god (God mode) and host_timescale x (slow down time; the default is host_timescale 1, for example host_timescale 0.25) can be used as supplementary commands.
Please note that the command tells the current health and damage is taken into account, to get base health be sure to aim at an intact character.

x=<1