Tutorial / Tools > AI
Commander
Select NPCs and order them around: move, attack, follow, hold, wander.
What it does
Commander lets you pick a group of NPCs and order them around. Selected NPCs glow blue while you hold the tool, and the HUD shows how many you have selected.
Orders are move, attack, follow, hold and wander. An NPC that gets into a fight finishes it, then carries on with its order. NPCs that arrive at a spot hold it.
By default, selected NPCs like you and will not attack you. Classic NPCs only (Combine, zombies, citizens and so on); NextBots have no schedules.
Where to find it
Q menu > KGX's Admin Toolbox > AI > Commander.
Admins can use it. Other players can use it only if they are given the tool in Settings > Player Access.
Given to a player (v3.6.11.3): Their own NPCs; attack: never the server's NPCs, players only with kgxat_grant_others.
Controls
| Key | What it does |
|---|---|
| Left click | Select or unselect the NPC you aim at |
| E + left click | Select every NPC around the aimed spot (within the select radius) |
| Right click | Selected NPCs attack the aimed NPC or player, or move to the aimed spot |
| Shift + right click (on a spot) | Selected NPCs run to the spot |
| Reload | Selected NPCs follow you |
| E + reload | Clear the selection |
Options
| Option | What it does | Default |
|---|---|---|
| They run when moving | Selected NPCs run instead of walk when sent to a spot | Off |
| Selected NPCs like me (they will not attack me) | NPCs become friendly to you when you select them | On |
| Select radius (E + left click) | Radius for E + left click and Select every NPC around me (64-8192) | 600 |
| Selected: follow me | Selected NPCs follow you | |
| Selected: hold where they are | Selected NPCs hold their current spot | |
| Selected: wander around | Selected NPCs wander | |
| Selected: release (no order) | Removes the order; they go back to their own AI | |
| Select every NPC around me | Adds every NPC within the select radius of you | |
| NPC tag | A tag name for the button below | |
| Select every NPC with this tag | Adds every NPC that has the tag typed above | |
| Clear the selection | Unselects everything | |
| Reset to defaults | Puts the options above back to their defaults |
How to use it
Send a squad to a spot
- Left click each NPC you want, or hold E and left click near a group.
- Aim at the floor where they should go and right click.
- They spread out in a ring around the spot and hold it. Hold Shift while you right click, or tick They run when moving, to make them run.
Make NPCs attack a target
- Select the NPCs.
- Aim at an NPC or a player and right click.
- They attack it. When the target is dead, they hold where they are.
Bring NPCs along with you
- Select the NPCs.
- Press reload. They follow you and run when you get far away.
- To let them go, click Selected: release (no order) in the tool panel.
Select NPCs by tag
- Type the tag in NPC tag.
- Click Select every NPC with this tag.
- Give the order as usual.
Settings and commands
| Setting | What it does | Default |
|---|---|---|
kgxat_ai_orders |
1 = NPCs carry out orders from the AI tools. Switch it in AI > NPC AI. | 1 |
kgxat_cap_area_radius |
Most a limited player's area tools may use, including the E + left click radius (0-16384) | 512 |
Tips and limits
- Up to 64 NPCs can be selected at once.
- Attacking a player respects immunity: you cannot order an attack on a player you cannot target.
- Followers that are fighting stay in the fight while you are within 900 units.
- With a nav mesh on the map, NPCs walk their orders along it (AI > AI Brain setting).
- Every NPC's order shows above it while you hold an AI tool, for example "Holding here" or "Following Kris".
- Selected NPCs like me takes effect when an NPC is selected. NPCs selected before you changed it keep their attitude.
- Ordering an attack is written to the Action Log.