Difference between revisions of "Ai show connect"

From Valve Developer Community
Jump to: navigation, search
(Removed category AI.)
m (some formatting)
Line 1: Line 1:
 
{{wrongtitle|title=ai_show_connect}}
 
{{wrongtitle|title=ai_show_connect}}
 
+
==Introduction ==
 
The <code>ai_show_connect</code> 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.  
 
The <code>ai_show_connect</code> 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.
+
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 [[npc_headcrab|headcrab]] will be able to get into spaces that the much larger [[npc_antlionguard|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.
 
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.
  
 +
== Graph Display ==
 +
[[Image:ai_show_connect.jpg|thumb|right|caption|300px|The node graph in Half-Life 2's d1_town_01.bsp]]
  
==Example==
+
An example on the right shows <code>ai_show_connect</code> in action. The currently selected hull is shown in the bottom right corner. In this case, the hull is <code>HUMAN_HULL</code>, which is used by all humanoid sized enemies (Combine Soldiers, Metropolice, Citizens, Alyx, etc).
<center>[[Image:ai_show_connect.jpg|550px|The node graph in HL2's d1_town_01.bsp]]</center>
 
An example of <code>ai_show_connect</code> 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).  
 
 
 
 
 
==Notes==
 
  
 
The color of the lines between the nodes will identify the type or state of the connection between the nodes. The colors are as follows:
 
The color of the lines between the nodes will identify the type or state of the connection between the nodes. The colors are as follows:
* Green
+
; Green: Ground movement connection. Only usable by NPCs that move on the ground.
** Ground movement connection. Only usable by NPCs that move on the ground.
+
; Blue: Jump movement connection. Only usable by NPCs that can jump.  
* Blue
+
; Cyan: Fly movement connection. Only usable by NPCs that can fly.
** Jump movement connection. Only usable by NPCs that can jump.  
+
; Grey: A connection currently turned off by an [[info_node_link_controller]].
* Cyan
+
; Dark red: A connection that is valid for some other Hull size, but not the currently selected Hull.
** Fly movement connection. Only usable by NPCs that can fly.
+
; Bright red: A connection that an NPC recently marked invalid because it was unable to move between the nodes.  
* Grey
 
** A connection currently turned off by an [[info_node_link_controller]].
 
* Dark red
 
** A connection that is valid for some other Hull size, but not the currently selected Hull.
 
* Bright red
 
** A connection that an NPC recently marked invalid because it was unable to move between the nodes. Once marked, connections stay invalid for at least 4 seconds to prevent multiple NPCs trying to navigate over a dynamically blocked connection.
 
  
 +
Once marked, connections stay invalid for at least 4 seconds to prevent multiple NPCs trying to navigate over a dynamically blocked connection.{{clr}}
  
 
==Usage==
 
==Usage==
 
* <code>ai_show_connect</code>
 
* <code>ai_show_connect</code>
** Toggle displaying ground node connections.
+
: Toggle displaying ground node connections.
 
* <code>ai_show_connect_jump</code>
 
* <code>ai_show_connect_jump</code>
** Toggle display of jump connections between nodes.
+
: Toggle display of jump connections between nodes.
 
* <code>ai_show_connect_fly</code>
 
* <code>ai_show_connect_fly</code>
** Toggle display of fly connections between nodes.
+
: Toggle display of fly connections between nodes.
 
* <code>ai_next_hull</code>
 
* <code>ai_next_hull</code>
** Display the next [[NPC Hull]] size.
+
: Display the next [[NPC Hull]] size.
 
* <code>ai_nodes</code>
 
* <code>ai_nodes</code>
** 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.
+
: 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.
 
 
  
 
==See also==
 
==See also==
 
 
*[[map_edit]]
 
*[[map_edit]]
 
*[[ai_debug_nav]], [[npc_go]], [[npc_route]], [[ai_moveprobe_debug]].
 
*[[ai_debug_nav]], [[npc_go]], [[npc_route]], [[ai_moveprobe_debug]].

Revision as of 04:55, 13 March 2006

Template:Wrongtitle

Introduction

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.

Graph Display

The node graph in Half-Life 2's d1_town_01.bsp

An example on the right shows 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).

The color of the lines between the nodes will identify the type or state of the connection between the nodes. The colors are as follows:

Green
Ground movement connection. Only usable by NPCs that move on the ground.
Blue
Jump movement connection. Only usable by NPCs that can jump.
Cyan
Fly movement connection. Only usable by NPCs that can fly.
Grey
A connection currently turned off by an info_node_link_controller.
Dark red
A connection that is valid for some other Hull size, but not the currently selected Hull.
Bright red
A connection that an NPC recently marked invalid because it was unable to move between the nodes.
Once marked, connections stay invalid for at least 4 seconds to prevent multiple NPCs trying to navigate over a dynamically blocked connection.

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.

See also