Ai show connect
The ai_show_connect
console command is a debugging tool for examining the AI node graph. The quality of the node graph has a large impact on the perceived quality of the AI, so it's important to be able to identify and solve node graph problems.
When debugging node graph problems, first determine the hull size used by the NPC that's having problems navigating. Each NPC tells the AI system the size of its NPC Hull. A small headcrab will be able to get into spaces that the much larger Antlion Guard can't, so the AI system calculates potential connections between nodes for each registered hull.
The easiest way to fix node graph problems is to use the map_edit command, which allows you to interactively modify the node graph in-engine.
Example

An example of ai_show_connect
in action. The currently selected hull is shown in the bottom right corner. In this case, the hull is HUMAN_HULL, which is used by all humanoid sized enemies (Combine Soldiers, Metropolice, Citizens, Alyx, etc).
Usage
ai_show_connect
- Toggle displaying ground node connections.
ai_show_connect_jump
- Toggle display of jump connections between nodes.
ai_show_connect_fly
- Toggle display of fly connections between nodes.
ai_next_hull
- Display the next NPC Hull size.
ai_nodes
- Display all nodes. Useful for spotting nodes without any connections to them. Entering the command twice will also display the Hammer ID of the node.