Nb debug

From Valve Developer Community
Jump to: navigation, search

The NextBot AI system features a robust debugging console command called nb_debug. When this command is used, all NextBot entities will show their ID number and any relevant debugging information.

This command allows for several types of NextBot debugging, such as "VISION" or "PATH". This page is meant to document each of the different debug types a NextBot can have.

Behavior

The LOOK_AT debug type in action. The white line is where the Engineer is looking, while the blue line is where the Scout should be looking.
The PATH debug type in action. The tf_zombie is calculating an orange path to move towards its enemy.

Main article: Example of NextBot Behaviors

This type shows the current actions of a NextBot underneath their ID number. An example of what a behavior should look like is this: MainBehavior( ChildAction >> Action )

Look At

This type manages how bots look at other entities by not only showing their line-of-sight, but also printing logs regarding their sights in the console. Here is what a log of what a bot sees should look like: 9058.80: BotName Look At ( x, y, z ) for numberofseconds s, Pri = priority, Reason = reason for the priority

Animation

To do: Team Fortress 2 bots do not appear to have any debugging information of this type. Left 4 Dead may need to be investigated for proper documentation.

Locomotion

This type shows arrows with multiple colors below the NextBots, with these arrows indicating the direction the bots need to move.

To do: What does each arrow color mean?

Vision

This type reports logs relating to each NextBot's vision in the console. Here is an example of what a log of this type looks like: 9216.66: player(#2) caught sight of player(#3)

Hearing

To do: Team Fortress 2 bots do not appear to have any debugging information of this type. Left 4 Dead may need to be investigated for proper documentation.

Events

To do: Team Fortress 2 bots do not appear to have any debugging information of this type. Left 4 Dead may need to be investigated for proper documentation.

Errors

This type appears to be similar to VISION, but it only prints a specific kind of log. Here is an example of what a log of this type looks like: 9539.07: player(#9) can't find clear line to look at potentially visible near known but hidden entity player(#5)

Path

This type shows a visual representation of a NextBot's movement through the navigation mesh.