Tutorial / Tools > World

Talking NPC

Characters that talk to players: pages of text and choices that can warp, give items, money or a job.

What it does

Talking NPC places a character that players talk to with E. It shows pages of text with up to six choices each. Choices can show another page, end the talk, warp the player, give a weapon, money, health or armor, give a job, sell a Property License, open the wardrobe, or fire a logic node.

Each NPC has its own look, voice, talk range and rules for who may talk to it. It can stand still, wander around its spot, or be a real NPC that holds a weapon and follows AI orders.

Talking NPCs are saved for this map and come back after cleanups and restarts. Presets let you reuse a finished NPC on every map.

Where to find it

Q menu > KGX's Admin Toolbox > World > Talking NPC.

Toolbox admins can use it. Superadmins can also give it to players in Settings > Player Access. Players then edit only their own NPCs and can load presets, but cannot save choices that give things.

Given to a player (v3.6.11.3): Their own talking NPCs: no rewards, weapons or private warps.

Controls

Key What it does
Left-click Place a talking NPC (it faces you; with the selected preset)
Right-click Edit the aimed NPC: pages, settings, voice
E + Right-click Apply the selected preset to the aimed NPC
Reload Remove the aimed talking NPC

Options

Option What it does Default
Model Pick a model: Citizen (male), Citizen (female), Rebel, Medic, Barney, Alyx, Dr. Kleiner, Eli, Gman, Metro Police, Combine soldier or Monk. Citizen (male)
Or any model Type any model path. models/Humans/Group01/male_07.mdl
Talking NPCs walking around Server switch: Nobody (all stand still), Only NPCs set to Wander, or Every talking NPC (unless set to Stay in place). Superadmins only. Only NPCs set to Wander
Preset The preset new NPCs get. (none: a new NPC says hello) places a plain NPC. (none)
Saved presets (every map) Double-click to select. Right-click for Use this preset or Delete (admins).
Refresh presets Reloads the preset list.
Reset to defaults Puts the model and preset back to their defaults.

A Greeter and a Wardrobe example preset come with the toolbox.

The editor

Right-click an NPC to open the editor. The top row has Name, Model and Reward cooldown (s) (default 300). The bottom row has Save as preset..., Load a preset..., Preview (not saved) and Save.

Pages

Up to 20 pages. Use Add a page and Remove this page under the page list.

Field What it does
Page text The box under Page 1 text ({name} = the player's name):. {name} is replaced by the player's name.
Voice line Optional own sound for this page. Browse... opens the sound browser; Play tests it.
Button text The choice's label.
Action What the choice does (see the table below).
Value (class, amount, name) The weapon class, amount, warp name, job name and so on. The ... button lists warp points and jobs.
Then page The page shown next; 0 ends the talk.
Action Value
Show a page Uses Then page.
End the talk None.
Warp the player (warp point name) A warp point from Functions > Warp Points.
Give a weapon (class) Weapon class.
Give money (amount) Amount.
Heal (HP) Health to give.
Give armor (points) Armor to give.
Make them a job (job name, or Unemployed) A job from Settings > Jobs.
Sell a Property License (price, 0 = free) Price.
Open the wardrobe (pick a player model; models on the Settings tab) None.
Fire a logic node (node id like L3, or L3:Input; World > Logic) Node id.
Open the Armory (custom classes and unlocks with match credits) None. v3.6.16: opens Create a Class (Settings > Armory).

Weapons, money, heal and armor are given once per Reward cooldown per player.

Settings
Option What it does Default
Line under the name Subtitle above its head. Press E to talk
Hide the name above its head Hides the name. Off
Name color, Talk window color Color pickers.
Skin 0 to 16. 0
Size 0.5 to 2. 1
Animation An idle animation from the model. (the usual idle)
Turn to face players nearby and the player it talks to Faces whoever is near or talking to it. On
Talk range (the window closes beyond it) 100 to 800. 300
Walking around its spot Server setting (World > Talking NPC panel), Wander (stops to talk) or Stay in place. Server setting
Wander radius 100 to 3000. 400
Walking speed 30 to 200. 60
Wardrobe models (comma separated, empty = every player model) Models offered by the wardrobe choice. Empty
Voice, Voice pitch Half-Life 2 voice set and pitch (70 to 140). Test the voice plays a greeting. Pitch 100
Greets when you start talking (everyone near hears it) On
Says a line on every next page On
Says goodbye when the talk ends On
Body Standing character (any model, no AI) or Real NPC (weapons, patrols, AI Brain, Commander, tags). Standing character
NPC type, Weapon, Or any NPC weapon class, Attitude to players, Health (real NPC, 0 = normal), NPC tag Real NPC settings.
Can be hurt and killed (off: takes no damage) Off
Comes back after (s, when killed or removed) 5 to 3600. 30
Only ranks (comma separated), Only jobs (comma separated, Unemployed works) Who may talk to it. Admins always can. Empty
What it says to everyone else Reply for players who may not talk to it. Empty

How to use it

Make a healer NPC
  1. Left-click the floor to place an NPC, then right-click it.
  2. On Pages, write page 1: Hello {name}. Need patching up?
  3. Click Add a choice: Button text Heal me, action Heal (HP), value 50.
  4. Add a choice Bye. with End the talk and click Save.
  5. Press E on the NPC to test it.
Send players to a place
  1. Make a warp point in Functions > Warp Points.
  2. Add a choice with Warp the player (warp point name).
  3. Click ... and pick the warp under Warp points, then Save.
Reuse an NPC as a preset
  1. Finish an NPC in the editor and click Save as preset....
  2. Enter a name. An existing name is replaced.
  3. Select it in Preset and left-click to place copies, or hold E and right-click an NPC to apply it.
Make a guard who talks
  1. In Settings, set Body to Real NPC (weapons, patrols, AI Brain, Commander, tags).
  2. Use a citizen, combine or story model, then pick a Weapon and Attitude to players.
  3. Click Save. Players still press E to talk.

Settings and commands

Setting What it does Default Range
kgxat_talknpc_wander 0 = none walk around, 1 = those set to Wander, 2 = all unless set to Stay in place. 1 0 to 2
kgxat_limit_talknpcs Most talking NPCs a non-admin player may place (Settings > Limits). 0 = not allowed. 1 0 to 32

Tips and limits

  • Saved per map in talknpcs_<map>.json. Presets are saved for every map in talkpresets.json.
  • At most 64 talking NPCs per map and 64 presets.
  • Aim at the floor to place one. It faces you.
  • Only admins can save or delete presets.
  • Choices that give weapons, money, heal, armor or a license are turned into End the talk when a player saves them. Players also cannot set a weapon, a tag, health or hostility.
  • Player models (models/player/...) have no NPC animations. As a real NPC they stand in a T pose; the editor warns you.

Back to Tools

Type to search every tool, panel, setting, FAQ answer and release.