Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

Overview

When debugging AI behaviors, one of the most useful console variables is ai_DebugDraw.

Setting this cvar to 1 will result in debug information being drawn above the head of any active AI. In game mode, you can also press F11 to set ai_DebugDraw to 1 or zero.

You can use ai_AgentStatsDist to set the radius within which entity debug info will be drawn.

Generally, it will look like this:

There's a lot of information here, so it's broken down below:

A) REGENERATE COVER SURFACES - This means that the cover surfaces haven't been generated. If the game that you're working on supports cover surfaces, speak to a designer about this.

B) This is the name of the Entity - The name will be green for vehicle AI (i.e. the actual vehicle. The driver and passenger names will be in white).

C) Pipe User Group ID.

D) These are cover/combat state indicators. The conditions are true when they're lit up red, false if grey:

AbbreviationDescription
MC Moving to Cover
M/ICMoving in Cover / In Cover
CCCover Compromised
ALIs Alarmed

E) Current Behavior Name.

F) Current Target Name.

G) Current Target Perception:

AbbreviationDescription
VIS Visual
MEM Memory
SND Sound
AGG Aggressive
THRThreatening
INT Interesting

H) Current Goal Pipe Name.

I ) Current Goal Op Name - If the goalop is active, it will be rendered white. If paused, it will be rendered grey.

J) Stance name and Speed.

K) Aim information and Fire mode.

More AI Debug Draw

More information on AI Debug Draw can be found here.

Network AI Debug Draw

In multi-player sessions, AI is updated on the server. If it's a dedicated server, there may be a need to transmit AI debug draw data to the client to display. This is controlled by the following CVars:

CVar

Description

ai_NetworkDebug

Disable (0) or enable (1) the transmission of AI debug draw data to the client. To display transmission summary (on the client's display), use ai_NetworkDebug 2.

ai_NetworkDebugBytesPerSecond

Maximum transmission rate in bytes per second.

ai_NetworkDebugChannel

Network channel which the server uses to send AI debug draw data.

ai_NetworkDebugClientHost

Network address of the client.

ai_NetworkDebugMinDelay

Delay between successive transmissions.

cl_serveraddr

Server address that the client will try to connect to when the user types connect. Default is "localhost".

Excerpt
hiddentrue

AI Debug Draw is the primary tool to get information on the current state of the AI System and AI actors.

Chinese

综述

当调试 AI 行为时,最有用的控制台变量之一是 ai_DebugDraw

将此 cvar 设置为 1 将会导致在任何一个活动的 AI 头部上方绘制除错信息。在游戏模式中,您也可以通过按 F11ai_DebugDraw 设置为 1 或 0。

您可以使用 ai_AgentStatsDist 在将要绘制除错信息的实体内设置半径。

通常看起来是这样的:

这里有很多信息,所以细分如下:

A) REGENERATE COVER SURFACES - 这意味着还没有生成掩藏物表面。如果您所玩的游戏支持覆盖表面,请咨询设计师。

B) 这是实体的名称

  • 注: 载具 AI 的名称是 绿色的 (即真实载具。司机和乘客的名称是白色的)。

C) 管线用户组编号

D) 这些是掩藏物/战斗的状态指示器。当它们显示 红色时,则状态为真,如果显示 灰色,则状况为假。

缩写描述
MC 移动至掩藏物
M/IC在掩藏物中移动 / 在掩藏物中
CC掩藏物缺乏抵抗力
AL接收到报警

 E) 当前行为名称

F) 当前目标名称

G) 当前目标知觉:

缩写描述
VIS 视觉
MEM 内存
SND 声音
AGG  有侵略性的
THR有威胁的
INT 有趣的

 

H) 当前目标管线名称

I ) 当前目标 Op 名称

  • 如果 goalop 是激活的,将会渲染成 白色,如果暂停,则渲染成 灰色

J) 姿势名称和速度

K) “目标”信息和“开火”模式

更多 AI Debug 绘制

这里可以找到更多关于 AI Debug 绘制的信息。

网络 AI Debug 绘制

在多人会话中,在服务器上更新 AI。如果是专用服务器,则可能需要将 AI debug 绘制信息传输到客户端显示,这是由以下 CVar 控制的:

CVar描述
ai_NetworkDebug禁用 (0) 或启用 (1) 将 AI debug 绘制数据传输到客户端。若要显示传输摘要(显示在客户端显示器上),请使用 ai_NetworkDebug 2
ai_NetworkDebugBytesPerSecond最大传输速率以每秒字节数位单位。
ai_NetworkDebugChannel服务器使用的发送 AI debug 绘制数据的网络通道。
ai_NetworkDebugClientHost客户端的网址。
ai_NetworkDebugMinDelay连续传输之间的延迟
cl_serveraddr当用户输入 *连接*时,客户端将尝试接入的服务器地址,默认的是 "localhost"。