Zh/Nav Mesh/Console commands: Difference between revisions

From Valve Developer Community
< Zh‎ | Nav Mesh
Jump to navigation Jump to search
No edit summary
m (Setting bug notice hidetested=1 param on page where the bug might not need tested in param specified)
 
(40 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{otherlang2
{{LanguageBar|title = 导航网格命令}}
|jp=Counter-Strike:_Source_Navigation_Mesh_Console_Command_Reference:jp
|en=Counter-Strike:_Source_Navigation_Mesh_Console_Command_Reference
}}
== [[控制台命令|指令]] ==
为了加快您的工作效率,您可以将这些指令绑定至CFG脚本内。例如, [[Left 4 Dead|Left 4 Dead (L4D)]]的[[Nav mode.cfg (L4D)|nav_mode.cfg]]。
注意:区域可以等于导航网络。


=== 导航网络(网格)生成 ===
本页面由[[User:1416006136|大康]]更新翻译于2022年4月9日。部分内容由机器翻译。
;nav_mark_walkable
----
:标记一个位置,以这个以这个位置进行生成导航网络(这个仅标记,需要配合nav_generate或nav_generate_incremental生成,一般用后者)。
{{back|Nav Mesh}}
;nav_clear_walkable_marks
== {{L|Console command|命令}} ==
:消除地图内所有标记点。
这些命令可以绑定到配置文件中的键以加快工作流程。例如,{{L|Left 4 Dead|求生之路 (L4D)}} 具有 {{L|Nav mode.cfg (L4D)|nav_mode.cfg}}。


;nav_generate
=== 网格生成 ===
:为当前地图生成导航网络并保存至磁盘。
{| class="wikitable"
|-
! 命令 !! 描述
|-
| nav_mark_walkable || 将当前位置标记为可行走的位置。这些位置在对地图进行采样以生成导航网格时用作种子位置。
|-
| nav_clear_walkable_marks || 擦除任何以前放置的可行走区域标记。
|-
| nav_generate || 为当前地图生成导航网格并将其保存到磁盘。{{ent|nav_quicksave}}确定生成的信息量。
|-
| nav_generate_incremental || 从可行走区域而不是在整个网格上运行生成过程。新创建的区域通常会连接到预先存在的区域。
|-
| nav_generate_incremental_range '''<{{L|Integer}}>''' || 在指定范围内生成导航网格(单位?)。生成中心由可行走区域标记定义。
|-
| nav_auto_build_area || 在编辑光标周围构建高精度区域并创建它们。
|-
| nav_save || 将当前导航网格保存到 {{L|NAV}} 文件。
|-
| nav_load || 从当前地图的 {{L|NAV}} 文件加载导航网格。
|-
| nav_analyze || 分析当前地图的导航网格。{{ent|nav_quicksave}}确定生成的信息量。
|}


;nav_generate_incremental
=== 选择命令 ===
:在不改变现有存在nav的情况之下,增加新的导航网络。比如生成的导航网络有些地方没有被覆盖,可以利用这个填充那个部分并且不会修改原有已生成的导航网络。
Note that these new areas will have to be manually connected to the existing mesh.


;nav_generate_incremental_range <integer>
{| class="wikitable sortable"
:设置导航网络一次生成的距离(单位?),以标记点位中心。
|-
! 命令 !! class=unsortable | 描述
|- id="nav_add_to_selected_set"
| nav_add_to_selected_set || 将当前区域添加到选定集<sup>①</sup>。通常,所选区域是指向的区域。
|- id="nav_add_to_selected_set_by_id"
| nav_add_to_selected_set_by_id || 通过区域编号/ID选择导航。这对于控制台中有关UpdateBlocked和可能的流程错误的报告非常有用。
|- id="nav_begin_deselecting"
| nav_begin_deselecting || 开始持续从选定集中移除。
|- id="nav_end_deselecting"
| nav_end_deselecting || 停止持续从选定集中移除。
|- id="nav_begin_selecting"
| nav_begin_selecting || 开始持续添加到选定集中。
|- id="nav_end_selecting"
| nav_end_selecting || 停止持续添加到选定集中。
|- id="nav_begin_drag_deselecting"
| nav_begin_drag_deselecting || 开始拖动选择区域。
|- id="nav_end_drag_deselecting"
| nav_end_drag_deselecting || 停止拖动选择区域。
|- id="nav_begin_drag_selecting"
| nav_begin_drag_selecting || 开始拖动选择区域。
|- id="nav_end_drag_selecting"
| nav_end_drag_selecting || 停止拖动选择区域。
|- id="nav_toggle_in_selected_set"
| nav_toggle_in_selected_set || 选择游戏中准星指向的导航网格区域。该命令通常绑定到某个键以方便使用。例如,位于L4D配置文件夹中的{{L|Nav mode.cfg (L4D)|nav_mode.cfg}}文件将此命令绑定到Z键。
|- id="nav_clear_selected_set"
| nav_clear_selected_set || 清除所有已视觉突出显示的选定导航网格区域的选择。换句话说,此命令取消选择已选定的导航网格区域。
|- id="nav_flood_select"
| nav_flood_select || 选择/突出显示所有连接的导航网格,从游戏中的准星指向的导航网格开始。这并不意味着选择所有导航网格区域。
|- id="select_with_attribute"
| select_with_attribute || 选择/突出显示所有带有指定属性标记的导航网格区域。
|}
<small>——————<br>①选定集:已选中的导航网格的集合。<br>②流:指导航路线(Nav Flow)。</small>


;nav_auto_build_area
==== 编辑命令 ====
:Build out high-precision areas around the edit cursor and create them.
{| class="wikitable sortable"
|-
! 命令 !! class=unsortable | 描述
|- id="nav_delete"
| nav_delete || 删除当前突出显示或标记的区域或选定集。
|- id="nav_delete_marked"
| nav_delete_marked || 删除当前标记的区域(如果有)。
|- id="nav_split"
| nav_split || 将区域分割成两个,使用光标对齐分割线并调用分割命令。
|- id="nav_subdivide"
| nav_subdivide || 将选定集或光标悬停的区域细分。
|- id="nav_make_sniper_spots"
| nav_make_sniper_spots || 将标记的区域切割成适用于狙击点的断开子区域。
|- id="nav_chop_selected"
| nav_chop_selected || 将所有选定的区域切割成它们的组成1x1区域。
|- id="nav_merge"
| nav_merge || 将两个区域合并为一个,标记第一个区域,用光标指向第二个并调用合并命令。
|- id="nav_mark"
| nav_mark || 为光标下的区域或梯子标记,以便后续编辑命令进行操作。
|- id="nav_unmark"
| nav_unmark || 清除标记的区域或梯子。
|- id="nav_begin_area"
| nav_begin_area || 定义新区域或梯子的一个角。要完成区域或梯子,请将对角拖动到所需位置并发出 'nav_end_area' 命令。
{{note|通过此方法创建的区域将双向连接到预先标记的区域。}}
|- id="nav_end_area"
| nav_end_area || 定义新区域或梯子的第二个角并创建它。
|- id="nav_connect"
| nav_connect || 从标记的区域创建''单向''连接到第二个区域。要进行双向连接,还需将第二个区域连接到第一个区域。
{{note|在选定集中,<code>nav_connect</code> 将尝试在第一个选择的区域与随后选择的每个区域之间进行双向连接。}}
|- id="nav_disconnect"
| nav_disconnect || 移除标记的区域与突出显示的区域之间的连接。
{{note|在选定集中,<code>nav_disconnect</code> 将尝试断开第一个选择的区域与随后选择的每个区域之间的连接。}}
|- id="nav_disconnect_outgoing_oneways"
| nav_disconnect_outgoing_oneways || 断开突出显示的区域或选定集的所有外向单向连接。
|- id="nav_splice"
| nav_splice || 在标记/选定的区域与突出显示/标记的区域之间创建联合区域。
|- id="nav_corner_select"
| nav_corner_select || 选择当前标记区域的一个角。多次使用以访问所有四个角。
|- id="nav_corner_raise"
| nav_corner_raise<br />nav_corner_raise '''<{{L|Hammer units}}>''' || 提升当前标记区域或选定集的所选角。
|- id="nav_corner_lower"
| nav_corner_lower<br />nav_corner_lower '''<{{L|Hammer units}}>''' || 降低当前标记区域或选定集的所选角。
|- id="nav_corner_place_on_ground"
| nav_corner_place_on_ground || 将所选集、当前标记区域的所选角或标记的区域本身放置在地面上。
|- id="nav_shift"
| nav_shift <x, y, z> || 按指定的量移动选定的区域。
|- id="nav_begin_shift_xy"
| nav_begin_shift_xy || 开始移动选定集。
|- id="nav_end_shift_xy"
| nav_end_shift_xy || 完成移动选定集。
|- id="nav_simplify_selected"
| nav_simplify_selected || 临时强制<code>nav_split_place_on_ground</code>为1,保持<code>nav_coplanar_slope_limit_displacement</code>和<code>nav_coplanar_slope_limit</code>至少为0.5,并将<code>nav_snap_to_grid</code>设为1。然后,它会剥离分析数据并将选定的区域细分为1x1区域,在生成任何区域之前执行<code>nav_generate_incremental</code>,最后在重新选择生成的导航区域之前重新组合它们。
|- id="nav_save_selected"
| nav_save_selected<br />nav_save_selected <code><name></code> || 将选定集存储在<code>maps/<map name或<name>>_selected_<number up to 1000>.txt</code>的{{L|KeyValues}}文件中。<br />{{bug|hidetested=1|如果<code><name></


;nav_save
code>存在,则文件将保存为<code>nav_save_selected</code>而不是<code><name></code>。}}
:保存当前地图的导航网络至磁盘。
|- id="nav_merge_mesh"
| nav_merge_mesh <filename> || 从指定的<code>maps/</code>{{L|KeyValues}}文件导入导航区域。
|}


;nav_analyze
=== 属性修改命令 ===
:分析当前已生成的导航网络并将其保存至磁盘。分析会更加精确地定义BOT(求生之路则是电脑玩家和感染者)的二阶数据,以更换规划他们的行为系统。
;nav_load
:为当前地图导入导航网络。


=== Selection commands ===
属性通过修改 NPC 行为的命令来修改导航区域,例如强制蹲下、遵循特定路径、禁止生成等。许多属性也有自己的命令,例如 nav_crouch。命令“mark CROUCH”与命令 nav_crouch 相同。<br>
;nav_add_to_selected_set
{{L|Navigation_Meshes_(L4D)|属性}}。
:将当前区域添加至所选集合内,通常是光标所指位置。
{| class="wikitable"
|-
! 命令 !! 描述
|-
| mark '''<属性>'''<br>nav_mark_attribute '''<属性>''' || 用属性标记区域,例如 CROUCH、PRECISE、NO_MOBS 等。
|-
| nav_clear_attribute '''<属性>''' || 清除指定的属性。如果 clear_attribute 无法清除指定的属性,则此命令可能有效。
|-
| clear_attribute '''<属性>''' || 清除指定的属性。如果 nav_clear_attribute 无法清除指定的属性,例如 PLAYER_START,则此命令可能有效。
|-
| wipe_attributes || 清除导航网格选定部分的所有属性。
|-
| nav_crouch || 切换 AI 系统使用的“必须在该区域蹲伏”标志。
|-
| nav_fog_mark || 设置选定区域的雾值。
|-
| nav_fog_pick || 设置选定区域的雾值。
|-
| nav_fog_select_place || 选择具有雾的所有区域。
|-
| nav_gen_cliffs_approx || 标记悬崖区域,后处理近似值。
|-
| nav_precise || 切换 AI 系统使用的“请勿避开障碍物”标志。
|-
| nav_jump || 切换 AI 系统使用的“通过跳跃穿越该区域”标志。
|-
| nav_no_jump || 切换 AI 系统使用的“不要在该区域跳跃”标志。
|-
| nav_stop || 切换 AI 系统使用的“进入该区域时必须停止”标志。
|-
| nav_walk || 切换 AI 系统使用的“步行穿越该区域”标志。
|-
| nav_run || 切换 AI 系统使用的“通过运行穿越该区域”标志。
|-
| nav_avoid || 切换 AI 系统使用的“尽可能避开该区域”标志。
|-
| nav_transient || 切换 AI 系统使用的“区域是暂时的,可能会被阻塞”标志。
|-
| nav_dont_hide || 切换 AI 系统使用的“区域不适合隐藏点”标志。
|-
| nav_stand || 切换 AI 系统使用的“隐藏时站立”标志。
|-
| nav_no_hostages || 切换 AI 系统使用的“人质不能使用此区域”标志。
|}


;nav_add_to_selected_set_by_id
=== [[Nav Mesh Editing#Place Names|区域名称]]命令 ===
:将明确的导航网络ID进行选择,一般对于后期处理错误很有帮助。
{| class="wikitable"
|-
! 命令 !! 描述
|-
| nav_toggle_place_mode || 切换编辑器进入和退出区域模式。区域模式允许使用地名标记导航区域。
|-
| nav_set_place_mode || 将编辑器设置为或不在区域模式。区域模式允许使用地名标记导航区域。
|-
| nav_use_place '''<place>''' || 如果不带参数使用,将列出所有可用的位置。如果给出了地点参数,则设置“当前地点”。
|-
| nav_place_pick || 将“当前位置”设置为光标下区域的位置。
|-
| nav_toggle_place_painting || 切换地方绘画模式。绘制地点时,指向一个区域将为其分配“当前地点”。
|-
| nav_place_floodfill || 将光标下区域的位置设置为“当前位置”,并将该位置“填充”到所有相邻区域。当“洪水”到达与初始区域相同或不同的区域时,洪水填充<sup>①</sup>停止。
|-
|style=white-space:nowrap| nav_place_replace '''<place1> <place2>''' || 将第二个地名分配给当前分配了第一个地名的所有区域。
|-
| nav_place_list || 列出地图中使用的所有地名。
|-
| nav_mark_unnamed || 标记一个没有地名的区域。用于查找“放置绘画”时遗漏的杂散区域。
|}
<small>——————<br>①即"flood fill"。</small>


;nav_begin_deselecting
=== 其他命令 ===
:Start continuously removing from the selected set.
{| class="wikitable"
|-
! 命令 !! 描述
|-
| nav_check_file_consistency || 扫描地图目录并报告任何丢失/过期的导航文件。
|-
| nav_check_connectivity || 报告未连接到地图中每个人质救援区和炸弹地点的任何区域。
|-
| nav_update_blocked || 更新每个导航区域的阻塞/未阻塞状态。
|-
| nav_check_floor || 更新每个导航区域的阻塞/未阻塞状态。
|-
| nav_check_stairs || 更新导航网格 STAIRS 属性
|-
| nav_fog_print_used || 打印出地图中使用的雾名称列表。
|-
| nav_fog_set || 如果不带参数使用,将列出所有可用的雾值。如果给出了 Fog 参数,则设置当前的 Fog。
|-
| nav_fix_playerclips || 修复标有 NAV_PLAYERCLIP 的节点。
|-
| nav_remove_unused_jump_areas || 移除最多有 1 个连接到梯子或非跳跃区域的跳跃区域。
|-
| nav_strip || 去除网格中所有区域的所有隐藏点、接近点和遭遇点。
|-
| nav_warp_to_mark || 将玩家传送到标记区域。
|-
| nav_ladder_flip || 翻转选定梯子的方向。
|-
| nav_compress_id || 重新排序区域和阶梯 ID,使其连接。
|-
| nav_show_ladder_bounds || 绘制地图中所有 func_ladders 的边界框。
|-
| nav_build_ladder || 尝试在光标下的可攀爬表面上构建导航梯子。
|-
| nav_gui || {{Confirm|与 {{ent|nav_edit|1}} 相同}}
|-
| nav_trouble_report || 返回导航网格的任何问题[例如,断开的梯子,孤立的导航网格区域(断开连接的导航网格区域)]。
|-
| nav_recompute_flow || {{l4ds}} 导演尝试通过命令将起始区域连接到 CHECKPOINT 属性或 FINALE 属性。如果成功,这将建立导航流。
|-
| nb_delete_all<br>nb_delete_all '''<组>''' || 移除游戏中的所有 NPC,或者,如果指定了组,则仅移除指定的组。比如求生之路中的被感染者。
|-
| nb_move_to_cursor || 命令所有 NPC 移动到 3D 光标的位置。
|}


;nav_end_deselecting
===附加控制台变量===
:Stop continuously removing from the selected set.
{| class="wikitable"
|-
! 命令 !! 描述
|-
| nav_area_bgcolor '''<R G B A>''' || RGBA 颜色在编辑时作为导航区域的背景颜色绘制。
|-
| nav_area_max_size || 在导航生成中创建的最大区域大小。 <br>{{tf2}}{{l4d2}}{{csgo}}默认设置为 50。
|-
| nav_blockers_can_affect_flow || {{l4d2}} 默认设置为 1。
|-
| nav_create_area_at_feet || 将 nav_begin_area Z 锚定到编辑玩家的脚。 <br>{{l4d2}} 默认设置为 0
|-
| nav_create_place_on_ground '''<{{L|Boolean|布尔值}}>''' || 如果设置为 1,则在手动创建时,导航区域将与地面齐平。
|-
| nav_coplanar_slope_limit '''<值>''' || 用于确定相邻可步行样本是否为平面的度量标准,可用于创建单个平面导航区域。<br>如果两个相邻候选单位法线的点积等于或大于 '''<值>''',它们被认为是共面的并且可以合并。因此,'''<值>''' 的范围可以是 0 到 1。
|-
| nav_coplanar_slope_limit_displacement || {{l4d2}} 默认设置为 0.7
|-
| nav_corner_adjust_adjacent || 在升高/降低拐角时,半径用于升高/降低附近区域的拐角。 <br>{{l4d2}} 默认设置为 18
|-
| nav_debug_blocked || {{l4d2}} 默认设置为 0
|-
| nav_debug_finale_area || {{l4d2}} 显示压轴区域和选定压轴中心的范围。很可能专为求生之路系列设计。默认设置为 0
|-
| nav_displacement_test || 检查嵌入在置换中的节点(对开发中的地图很有用)。 <br>{{l4d2}} 默认设置为 10000
|-
| nav_draw_limit '''<Count>''' || 在编辑模式下绘制的最大区域数。 <br>{{l4d2}} 默认设置为 500
|-
| nav_edit '''<{{L|Boolean}}>''' || 设置为 1 以交互方式编辑导航网格。设置为零以退出编辑模式。
|-
| nav_generate_fixup_jump_areas || 将过时的跳跃区域转换为 2 路连接。 <br>{{l4d2}} 默认设置为 1
|-
| nav_flood_select_tolerance || 可选区域与起始区域的允许 z 距离。 <br>{{l4d2}} 默认设置为 0
|-
| nav_fog_edit || {{l4d2}} 默认设置为 0
|-
| nav_generate_fencetops || 自动生成围栏和障碍物顶部的导航区域。 <br>{{l4d2}} 默认设置为 1。
|-
| nav_restart_after_analysis '''<{{L|Boolean|布尔值}}>''' || 如果设置为 1,当 nav nav_restart_after_analysis 完成时,重新启动服务器。关闭它可能会导致崩溃,但对于增量生成很有用。
|-
| nav_show_approach_points '''<{{L|Boolean|布尔值}}>''' || 在导航网格中显示接近点。
|-
| nav_show_area_info '''<时长>''' || 编辑时显示导航区域 ID 和属性的持续时间(以秒为单位)
|-
| nav_show_danger '''<{{L|Boolean|布尔值}}>''' || 显示当前的“危险”等级。
|-
| nav_show_player_counts '''<{{L|Boolean|布尔值}}>''' || 显示每个区域的当前玩家人数。
|-
| nav_slope_limit '''<Z>''' || 地面单位法线的 Z 分量必须大于此值才能生成导航区域。
|-
| nav_snap_to_grid '''<{{L|Boolean|布尔值}}>''' || 如果设置为 1,则在创建新导航区域时捕捉到导航生成网格
|-
| nav_split_place_on_ground '''<{{L|Boolean|布尔值}}>''' || 如果设置为 1,则导航区域在分割时将与地面齐平。
|-
| nav_quicksave '''<{{L|Boolean|布尔值}}>''' || 设置为 1 以跳过分析遭遇点和狙击点(红线)。<br>在 {{tf2}}{{l4ds}} 中,始终保持启用此功能。
|}


;nav_begin_selecting
== 另请参阅 ==
:选择一个批量选择开始点。
=== 通用 ===
* {{L|Nav Mesh Editing}}
=== 求生之路系列 ===
==== 介绍 ====
* {{L|L4D Level Design/Nav Meshes|L4D 关卡制作/导航网格}}
* {{L|L4D Level Design/Nav Flow|L4D 关卡制作/导航路线}}
* {{L|L4D Level Design/Advanced Nav Editing|L4D 关卡制作/高级导航编辑}}


;nav_end_selecting
==== 资源 ====
:选择一个批量选择结束点。
* {{L|List of L4D Series Nav Mesh Attributes|导航网格属性 (求生之路)}}
* {{L|Left 4 Dead 2 Level Creation|求生之路2关卡创建指南}}
* {{L|nav_mode.cfg|nav_mode.cfg (L4D) - Valve 提供的用于导航网格编辑的基本省时按键绑定}}


;nav_begin_drag_deselecting
{{ACategory|Level Design}}
:Start dragging a selection area.
 
;nav_end_drag_deselecting
:Stop dragging a selection area.
 
;nav_begin_drag_selecting
:Start dragging a selection area.
 
;nav_end_drag_selecting
:Stop dragging a selection area.
 
;nav_toggle_in_selected_set
:选择光标对准的导航网络,通常可以绑定一个按键。例如,[[Nav mode.cfg (L4D)|nav_mode.cfg]] 在求生之路1的配置文件内,绑定按键为“z”。
 
;nav_clear_selected_set
:取消所有选择的导航网络。
 
;nav_flood_select
:Selects/highlights all nav meshes that are connected, starting with the nav mesh that the in-game gun crosshair is pointing at. This does not mean that all nav mesh areas are selected.
 
;select_with_attribute
:Selects/highlights all nav mesh areas marked with one attribute specified.
 
=== Editing commands ===
;nav_delete
:删除选择的导航网络。
 
;nav_delete_marked
:删除当前标记的区域(如果有。)
 
;nav_split
:拆分导航网络,方法是对准某个导航网络,导航网络将会出现一条线,以此条线来拆分导航网络。
 
;nav_make_sniper_spots
:Chops the marked area into disconnected sub-areas suitable for sniper spots.
 
;nav_chop_selected
:Chops all selected areas into their component 1x1 areas
 
;nav_merge
:合并导航网络,需要同高度位置且长度宽度相等。
 
;nav_mark
:标记区域或者梯子,以便后续操作。
 
;nav_unmark
:取消标记区域或者梯子。
 
;nav_begin_area
:手动创建一个导航网络的一个对角,然后以相对方向拖动鼠标以规划区域,输入“nav_end_area”完成创建。
;nav_end_area
:完成手动创建的导航网络。
 
;nav_connect
:连接两个导航网络。选中一个导航网络对准另一个导航网络,并输入此指令。请注意:这样做是单向连接,比如以求生之路为例,上单向连接下,则感染者可以从上下来,但是他们不会从下上去。所以如果你需要双向连接请选择两个导航网络。
 
;nav_disconnect
:取消导航网络的连接。
 
;nav_splice
:选择两个导航网络,然后输入此指令,由系统自动创建两个导航网络的空缺部分。
 
;nav_corner_select
:Select a corner of the currently marked Area. Use multiple times to access all four corners.
 
;nav_corner_raise
:升高当前选择的导航网络。
 
;nav_corner_lower
:降低当前选择的导航网络。
 
;nav_corner_place_on_ground
:将导航网络贴紧地面,通常的用于不平整的地形。
 
;nav_begin_shift_xy
:Begin shifting the Selected Set.
 
;nav_stop_shift_xy
:Finish shifting the Selected Set.
 
;nav_simplify_selected
 
=== NAV修正命令 ===
修改某个导航网络的属性,这样被修改的区域可以强制bot进行一些操作,比如在此区域强制下蹲,遵循某路线前进或者是禁止在此区域生成等。像是“mark CROUCH”与命令“nav_crouch”效果一致。例如,在求生之路中,有 [[Navigation_Meshes_(L4D)|属性列表]]来为求生之路的僵尸生成和电脑人控制进行应用。
 
;mark <attribute>
:标记一个区域的属性,像是CROUCH, PRECISE, NO_MOBS等。
 
;nav_clear_attribute <attribute>
:清除指定区域属性。
 
;clear_attribute <attribute>
:Clears attribute specified. If nav_clear_attribute does not work to clear an attribute specified, such as PLAYER_START, this command might work.
 
;wipe_attributes
:Clears all attributes on the selected part of the nav mesh
 
;nav_crouch
:标记此区域的BOT必须强制下蹲。
 
;nav_fog_mark
:设置选择区域雾的值。
 
;nav_fog_pick
:设置选中区域雾的值。
 
;nav_fog_select_place
:Selects all areas with the given fog place.
 
;nav_gen_cliffs_approx
:Mark cliff areas, post-processing approximation.
 
;nav_precise
:Toggles the 'don't avoid obstacles' flag used by the AI system.
 
;nav_jump
:标记此区域BOT必须跳跃。
 
;nav_no_jump
:标记此区域BOT无法跳跃。
 
;nav_stop
:标记进入此区域必须停止。
 
;nav_walk
:Toggles the 'traverse this area by walking' flag used by the AI system.
 
;nav_run
:Toggles the 'traverse this area by running' flag used by the AI system.
 
;nav_avoid
:Toggles the 'avoid this area when possible' flag used by the AI system.
 
;nav_transient
:Toggles the 'area is transient and may become blocked' flag used by the AI system.
 
;nav_dont_hide
:Toggles the 'area is not suitable for hiding spots' flag used by the AI system.
 
;nav_stand
:Toggles the 'stand while hiding' flag used by the AI system.
 
;nav_no_hostages
:Toggles the 'hostages cannot use this area' flag used by the AI system.
 
=== Place name commands ===
;nav_use_place
:If used without arguments, all available Places will be listed. If a Place argument is given, the current Place is set.
 
;nav_place_replace
:Replaces all instances of the first place with the second place.
 
;nav_place_list
:Lists all place names used in the map.
 
;nav_toggle_place_mode
:Toggle the editor into and out of Place mode. Place mode allows labelling of Area with Place names.
 
;nav_set_place_mode
:Sets the editor into or out of Place mode. Place mode allows labelling of Area with Place names.
 
;nav_place_floodfill
:Sets the Place of the Area under the cursor to the current Place, and 'flood-fills' the Place to all adjacent Areas. Flood-filling stops when it hits an Area with the same Place, or a different Place than that of the initial Area.
 
;nav_place_pick
:Sets the current Place to the Place of the Area under the cursor.
 
;nav_toggle_place_painting
:Toggles Place Painting mode. When Place Painting, pointing at an Area will 'paint' it with the current Place.
 
;nav_mark_unnamed
:Mark an Area with no Place name. Useful for finding stray areas missed when Place Painting.
 
=== 其他指令 ===
;nav_check_file_consistency
:Scans the maps directory and reports any missing/out-of-date navigation files.
 
;nav_check_connectivity
:Reports any areas that aren't connected to every hostage rescue zone and bomb site in the map.
 
;nav_update_blocked
:Updates the blocked/unblocked status for every nav area.
 
;nav_check_floor
:Updates the blocked/unblocked status for every nav area.
 
;nav_check_stairs
:Update the nav mesh STAIRS attribute
 
;nav_fog_print_used
:Prints out the list of fog names used in the map.
 
;nav_fog_set
:If used without arguments, all available Fog values will be listed. If a Fog argument is given, the current Fog is set.
 
;nav_fix_playerclips
:Fixup nodes marked with NAV_PLAYERCLIP.
 
;nav_remove_unused_jump_areas
:Removes jump areas with at most 1 connection to a ladder or non-jump area.
 
;nav_strip
:Strips all Hiding Spots, Approach Points, and Encounter Spots from all Areas in the mesh.
 
;nav_warp_to_mark
:Warps the player to the marked area.
 
;nav_ladder_flip
:Flips the selected ladder's direction.
 
;nav_compress_id
:Re-orders area and ladder ID's so they are continuous.
 
;nav_show_ladder_bounds
:Draws the bounding boxes of all func_ladders in the map.
 
;nav_build_ladder
:Attempts to build a nav ladder on the climbable surface under the cursor.
 
;nav_gui
:
 
;nav_trouble_report
:
 
;nav_recompute_flow
:
 
;nb_delete_all or nb_delete_all <group type>
:Removes all NPCs in the game or, if group type is specified, removes group specified. An example group type would be Infected in L4D.
 
;nb_move_to_cursor
:Commands NPCs to move to area where the in-game gun crosshair is pointing. This command is useful in testing the movement of any infected or survivors in L4D.
 
==Console Variables==
;nav_area_bgcolor ''R G B A''
:RGBA color to draw as the background color for nav areas while editing.
 
;nav_area_max_size
:Max area size created in nav generation. {{l4d2}} Default is set to 50
 
;nav_blockers_can_affect_flow
:{{l4d2}} Default is set to 1
 
;nav_create_area_at_feet
:Anchor nav_begin_area Z to editing player's feet. {{l4d2}} Default is set to 0
 
;nav_create_place_on_ground ''(0 or 1)''
:If set to 1, nav areas will be placed flush with the ground when created by hand.
 
;nav_coplanar_slope_limit ''value''<br/>
:Metric to determine whether adjacent walkable samples are planar and can be used to create a single planar nav area.  If the dot product of two adjacent candidate's unit normals is equal to or greater than ''value'', they are considered co-planar and can be merged. Therefore, ''value'' can range from 0 to 1.
 
;nav_coplanar_slope_limit_displacement
:{{l4d2}} Default is set to 0.7
 
;nav_corner_adjust_adjacent
:Radius used to raise/lower corners in nearby areas when raising/lowering corners. {{l4d2}} Default is set to 18
 
;nav_debug_blocked
:{{l4d2}} Default is set to 0
 
;nav_debug_finale_area
:{{l4d2}} Show extents of finale area and selected finale center. Most likely designed specifically for L4D Series. Default is set to 0
 
;nav_displacement_test
:Checks for nodes embedded in displacements (useful for in-development maps). {{l4d2}} Default is set to 10000
 
;nav_draw_limit ''count''
:The maximum number of areas to draw in edit mode. {{l4d2}} Default is set to 500
 
;nav_edit ''(0 or 1)''
:Set to one to interactively edit the Navigation Mesh. Set to zero to leave edit mode.
 
;nav_generate_fixup_jump_areas
:Convert obsolete jump areas into 2-way connections. {{l4d2}} Default is set to 1
 
;nav_flood_select_tolerance
:Allowable z distance of selectable areas from the start area. {{l4d2}} Default is set to 0
 
;nav_fog_edit
:{{l4d2}} Default is set to 0
 
;nav_generate_fencetops
:Autogenerate nav areas on fence and obstacle tops. {{l4d2}} Default is set to 1
 
;nav_restart_after_analysis ''(0 or 1)''
:If set to 1, when nav nav_restart_after_analysis finishes, restart the server. Turning this off can cause crashes, but is useful for incremental generation.
 
;nav_show_approach_points ''(0 or 1)''
:Show Approach Points in the Navigation Mesh.
 
;nav_show_area_info ''duration''
:Duration in seconds to show nav area ID and attributes while editing
 
;nav_show_danger ''(0 or 1)''
:Show current 'danger' levels.
 
;nav_show_player_counts ''(0 or 1)''
:Show current player counts in each area.
 
;nav_slope_limit ''Z''
:The ground unit normal's Z component must be greater than this for nav areas to be generated.
 
;nav_snap_to_grid ''(0 or 1)''
:If set to 1, snap to the nav generation grid when creating new nav areas
 
;nav_split_place_on_ground ''(0 or 1)''
:If set to 1, nav areas will be placed flush with the ground when split.
 
;nav_quicksave ''(0 or 1)''
:Set to one to skip the time consuming phases of the analysis.  Useful for data collection and testing.
 
== See also ==
* [[Left 4 Dead 2 Level Creation]]
* [[Navigation Meshes]]
* [[Navigation Meshes (L4D)]]
* [[L4D Level Design/Nav Meshes]]
* [[L4D Level Design/Nav Flow]]
* [[L4D Level Design/Advanced Nav Editing]]
* [[nav_mode.cfg|nav_mode.cfg (L4D) - Essential time-saving key binds for nav mesh editing, provided by Valve]]
 
[[Category:Level Design]]

Latest revision as of 07:17, 20 May 2025

English (en)Esperanto (eo)日本語 (ja)中文 (zh)Translate (Translate)
Info content.png
This translated page needs to be updated.
You can help by updating the translation.
Also, please make sure the article complies with the alternate languages guide.(en)
This notice is put here by LanguageBar template and if you want to remove it after updating the translation you can do so on this page.


本页面由大康更新翻译于2022年4月9日。部分内容由机器翻译。


Nav Mesh

命令(en)

这些命令可以绑定到配置文件中的键以加快工作流程。例如,求生之路 (L4D)(en) 具有 nav_mode.cfg(en)

网格生成

命令 描述
nav_mark_walkable 将当前位置标记为可行走的位置。这些位置在对地图进行采样以生成导航网格时用作种子位置。
nav_clear_walkable_marks 擦除任何以前放置的可行走区域标记。
nav_generate 为当前地图生成导航网格并将其保存到磁盘。nav_quicksave确定生成的信息量。
nav_generate_incremental 从可行走区域而不是在整个网格上运行生成过程。新创建的区域通常会连接到预先存在的区域。
nav_generate_incremental_range <Integer(en)> 在指定范围内生成导航网格(单位?)。生成中心由可行走区域标记定义。
nav_auto_build_area 在编辑光标周围构建高精度区域并创建它们。
nav_save 将当前导航网格保存到 NAV(en) 文件。
nav_load 从当前地图的 NAV(en) 文件加载导航网格。
nav_analyze 分析当前地图的导航网格。nav_quicksave确定生成的信息量。

选择命令

命令 描述
select_with_attribute 选择/突出显示所有带有指定属性标记的导航网格区域。

——————
①选定集:已选中的导航网格的集合。
②流:指导航路线(Nav Flow)。

编辑命令

命令 描述

属性修改命令

属性通过修改 NPC 行为的命令来修改导航区域,例如强制蹲下、遵循特定路径、禁止生成等。许多属性也有自己的命令,例如 nav_crouch。命令“mark CROUCH”与命令 nav_crouch 相同。
属性(en)

命令 描述
mark <属性>
nav_mark_attribute <属性>
用属性标记区域,例如 CROUCH、PRECISE、NO_MOBS 等。
nav_clear_attribute <属性> 清除指定的属性。如果 clear_attribute 无法清除指定的属性,则此命令可能有效。
clear_attribute <属性> 清除指定的属性。如果 nav_clear_attribute 无法清除指定的属性,例如 PLAYER_START,则此命令可能有效。
wipe_attributes 清除导航网格选定部分的所有属性。
nav_crouch 切换 AI 系统使用的“必须在该区域蹲伏”标志。
nav_fog_mark 设置选定区域的雾值。
nav_fog_pick 设置选定区域的雾值。
nav_fog_select_place 选择具有雾的所有区域。
nav_gen_cliffs_approx 标记悬崖区域,后处理近似值。
nav_precise 切换 AI 系统使用的“请勿避开障碍物”标志。
nav_jump 切换 AI 系统使用的“通过跳跃穿越该区域”标志。
nav_no_jump 切换 AI 系统使用的“不要在该区域跳跃”标志。
nav_stop 切换 AI 系统使用的“进入该区域时必须停止”标志。
nav_walk 切换 AI 系统使用的“步行穿越该区域”标志。
nav_run 切换 AI 系统使用的“通过运行穿越该区域”标志。
nav_avoid 切换 AI 系统使用的“尽可能避开该区域”标志。
nav_transient 切换 AI 系统使用的“区域是暂时的,可能会被阻塞”标志。
nav_dont_hide 切换 AI 系统使用的“区域不适合隐藏点”标志。
nav_stand 切换 AI 系统使用的“隐藏时站立”标志。
nav_no_hostages 切换 AI 系统使用的“人质不能使用此区域”标志。

区域名称命令

命令 描述
nav_toggle_place_mode 切换编辑器进入和退出区域模式。区域模式允许使用地名标记导航区域。
nav_set_place_mode 将编辑器设置为或不在区域模式。区域模式允许使用地名标记导航区域。
nav_use_place <place> 如果不带参数使用,将列出所有可用的位置。如果给出了地点参数,则设置“当前地点”。
nav_place_pick 将“当前位置”设置为光标下区域的位置。
nav_toggle_place_painting 切换地方绘画模式。绘制地点时,指向一个区域将为其分配“当前地点”。
nav_place_floodfill 将光标下区域的位置设置为“当前位置”,并将该位置“填充”到所有相邻区域。当“洪水”到达与初始区域相同或不同的区域时,洪水填充停止。
nav_place_replace <place1> <place2> 将第二个地名分配给当前分配了第一个地名的所有区域。
nav_place_list 列出地图中使用的所有地名。
nav_mark_unnamed 标记一个没有地名的区域。用于查找“放置绘画”时遗漏的杂散区域。

——————
①即"flood fill"。

其他命令

命令 描述
nav_check_file_consistency 扫描地图目录并报告任何丢失/过期的导航文件。
nav_check_connectivity 报告未连接到地图中每个人质救援区和炸弹地点的任何区域。
nav_update_blocked 更新每个导航区域的阻塞/未阻塞状态。
nav_check_floor 更新每个导航区域的阻塞/未阻塞状态。
nav_check_stairs 更新导航网格 STAIRS 属性
nav_fog_print_used 打印出地图中使用的雾名称列表。
nav_fog_set 如果不带参数使用,将列出所有可用的雾值。如果给出了 Fog 参数,则设置当前的 Fog。
nav_fix_playerclips 修复标有 NAV_PLAYERCLIP 的节点。
nav_remove_unused_jump_areas 移除最多有 1 个连接到梯子或非跳跃区域的跳跃区域。
nav_strip 去除网格中所有区域的所有隐藏点、接近点和遭遇点。
nav_warp_to_mark 将玩家传送到标记区域。
nav_ladder_flip 翻转选定梯子的方向。
nav_compress_id 重新排序区域和阶梯 ID,使其连接。
nav_show_ladder_bounds 绘制地图中所有 func_ladders 的边界框。
nav_build_ladder 尝试在光标下的可攀爬表面上构建导航梯子。
nav_gui
证实:nav_edit 1 相同
nav_trouble_report 返回导航网格的任何问题[例如,断开的梯子,孤立的导航网格区域(断开连接的导航网格区域)]。
nav_recompute_flow 求生之路系列求生之路系列 导演尝试通过命令将起始区域连接到 CHECKPOINT 属性或 FINALE 属性。如果成功,这将建立导航流。
nb_delete_all
nb_delete_all <组>
移除游戏中的所有 NPC,或者,如果指定了组,则仅移除指定的组。比如求生之路中的被感染者。
nb_move_to_cursor 命令所有 NPC 移动到 3D 光标的位置。

附加控制台变量

命令 描述
nav_area_bgcolor <R G B A> RGBA 颜色在编辑时作为导航区域的背景颜色绘制。
nav_area_max_size 在导航生成中创建的最大区域大小。
军团要塞2求生之路2反恐精英:全球攻势默认设置为 50。
nav_blockers_can_affect_flow 求生之路2 默认设置为 1。
nav_create_area_at_feet 将 nav_begin_area Z 锚定到编辑玩家的脚。
求生之路2 默认设置为 0
nav_create_place_on_ground <布尔值(en)> 如果设置为 1,则在手动创建时,导航区域将与地面齐平。
nav_coplanar_slope_limit <值> 用于确定相邻可步行样本是否为平面的度量标准,可用于创建单个平面导航区域。
如果两个相邻候选单位法线的点积等于或大于 <值>,它们被认为是共面的并且可以合并。因此,<值> 的范围可以是 0 到 1。
nav_coplanar_slope_limit_displacement 求生之路2 默认设置为 0.7
nav_corner_adjust_adjacent 在升高/降低拐角时,半径用于升高/降低附近区域的拐角。
求生之路2 默认设置为 18
nav_debug_blocked 求生之路2 默认设置为 0
nav_debug_finale_area 求生之路2 显示压轴区域和选定压轴中心的范围。很可能专为求生之路系列设计。默认设置为 0
nav_displacement_test 检查嵌入在置换中的节点(对开发中的地图很有用)。
求生之路2 默认设置为 10000
nav_draw_limit <Count> 在编辑模式下绘制的最大区域数。
求生之路2 默认设置为 500
nav_edit <Boolean(en)> 设置为 1 以交互方式编辑导航网格。设置为零以退出编辑模式。
nav_generate_fixup_jump_areas 将过时的跳跃区域转换为 2 路连接。
求生之路2 默认设置为 1
nav_flood_select_tolerance 可选区域与起始区域的允许 z 距离。
求生之路2 默认设置为 0
nav_fog_edit 求生之路2 默认设置为 0
nav_generate_fencetops 自动生成围栏和障碍物顶部的导航区域。
求生之路2 默认设置为 1。
nav_restart_after_analysis <布尔值(en)> 如果设置为 1,当 nav nav_restart_after_analysis 完成时,重新启动服务器。关闭它可能会导致崩溃,但对于增量生成很有用。
nav_show_approach_points <布尔值(en)> 在导航网格中显示接近点。
nav_show_area_info <时长> 编辑时显示导航区域 ID 和属性的持续时间(以秒为单位)
nav_show_danger <布尔值(en)> 显示当前的“危险”等级。
nav_show_player_counts <布尔值(en)> 显示每个区域的当前玩家人数。
nav_slope_limit <Z> 地面单位法线的 Z 分量必须大于此值才能生成导航区域。
nav_snap_to_grid <布尔值(en)> 如果设置为 1,则在创建新导航区域时捕捉到导航生成网格
nav_split_place_on_ground <布尔值(en)> 如果设置为 1,则导航区域在分割时将与地面齐平。
nav_quicksave <布尔值(en)> 设置为 1 以跳过分析遭遇点和狙击点(红线)。
军团要塞2求生之路系列求生之路系列 中,始终保持启用此功能。

另请参阅

通用

求生之路系列

介绍

资源