The Response System is an existing Source engine feature that handles dynamic NPC dialogue. Mapbase expands HL2’s Response System usage and capabilities in several ways.

πŸ“„ Note: This article is specifically for the context of Half-Life 2. For more general response system changes, see Response System Changes.

NPCs Converted

A few NPCs that previously used hardcoded soundscripts or sentences now use the Response System:

  • npc_combine_s β€” Now plays sentences through talker/npc_combine_s.txt
  • npc_metropolice β€” Now plays sentences through talker/npc_metropolice.txt
  • npc_sniper β€” Now plays soundscripts through talker/npc_sniper.txt

Optionally, npc_zombie_custom can be used to play responses on zombies.

Ally Response Concepts

Mapbase broadens the response concepts available to player ally NPCs (e.g. npc_citizen). This is mainly useful for when you are creating a custom character.

The following concepts originated from Alyx, but are now available on all companion NPCs:

  • TLK_MANY_ENEMIES β€” Spoken when fighting at least 5 enemies at once.
  • TLK_MOBBED β€” Spoken when at least 2 enemies are getting too close.
  • TLK_ENEMY_BURNING β€” Spoken when the NPC’s enemy is ignited.
  • TLK_DANGER_ZOMBINE_GRENADE β€” Spoken when a zombine pulls out a grenade.
  • TLK_SPOTTED_INCOMING_HEADCRAB β€” Spoken when an enemy headcrab is seen for the first time while it’s already mid-jump.
  • TLK_SPOTTED_HEADCRAB_LEAVING_ZOMBIE β€” Spoken when a headcrab is seen leaving a zombie that just died.
  • TLK_SPOTTED_ZOMBIE_WAKEUP β€” Spoken when a zombie is seen emerging from a slump actbusy.

The following concepts are completely new:

  • TLK_TAKING_FIRE β€” Spoken when someone fires at me, regardless of whether I was hit. (requires ai_shot_notify_targets to be enabled)
  • TLK_NEW_ENEMY β€” Spoken when a new enemy appears. Unlike TLK_STARTCOMBAT, this can be spoken during combat and has no delay between combat engagements. This is intended to be used when a new enemy enters an already-active arena.
  • TLK_COMBAT_IDLE β€” Randomly spoken when in combat, but not currently attacking (e.g. in cover or reloading). Similar to TLK_ATTACKING, but for when in an intermittent combat state.
  • TLK_LOSTENEMY β€” Spoken when the NPC loses its enemy.
  • TLK_REFINDENEMY β€” Spoken when the NPC reacquires a lost enemy.