Difference between revisions of "Navigation Mesh Commands"

From Valve Developer Community
Jump to: navigation, search
(Modified the title and location of last table)
(One intermediate revision by the same user not shown)
Line 7: Line 7:
  
 
=== Mesh generation ===
 
=== Mesh generation ===
;nav_mark_walkable
 
:Mark the current location as a walkable position. These positions are used as seed locations when sampling the map to generate a Navigation Mesh.
 
  
;nav_clear_walkable_marks
+
{| class="wikitable"
:Erase any previously placed walkable positions.
+
|-
 
+
! Command !! Description
;nav_generate
+
|-
:Generate a Navigation Mesh for the current map and save it to disk.
+
| nav_mark_walkable || Mark the current location as a walkable position. These positions are used as seed locations when sampling the map to generate a Navigation Mesh.
 
+
|-
;nav_generate_incremental
+
| nav_clear_walkable_marks || Erase any previously placed walkable positions.
:Run the generation process again without altering the existing mesh. If there are additional walkable areas and/or walkable marks, new areas will be generated and added to the mesh.  Note that these new areas will have to be manually connected to the existing mesh.
+
|-
 
+
| nav_generate || Generate a Navigation Mesh for the current map and save it to disk.
;nav_generate_incremental_range <integer>
+
|-
:Generates nav mesh in range specified (units?). The center of the is defined by the walkable mark.
+
| nav_generate_incremental || Run the generation process again without altering the existing mesh. If there are additional walkable areas and/or walkable marks, new areas will be generated and added to the mesh.  Note that these new areas will have to be manually connected to the existing mesh.
 
+
|-
;nav_auto_build_area
+
| nav_generate_incremental_range '''<[[Integer]]>''' || Generates nav mesh in range specified (units?). The center of the is defined by the walkable mark.
:Build out high-precision areas around the edit cursor and create them.
+
|-
 
+
| nav_auto_build_area || Build out high-precision areas around the edit cursor and create them.
;nav_save
+
|-
:Saves the current Navigation Mesh to disk.
+
| nav_save || Saves the current Navigation Mesh to disk.
 
+
|-
;nav_analyze
+
| nav_analyze || Loads the Navigation Mesh for the current map.
:Analyze the current Navigation Mesh and save it to disk. The analysis phase computes the second-order data needed by the bots for their planning and attention systems.
+
|}
 
 
;nav_load
 
:Loads the Navigation Mesh for the current map.
 
  
 
=== Selection commands ===
 
=== Selection commands ===
;nav_add_to_selected_set
+
{| class="wikitable"
:Add current area to the selected set. Usually the area selected is the one pointed at.
+
|-
 
+
! Command !! Description
;nav_add_to_selected_set_by_id  
+
|-
:Selects the nav by area number / id. This is useful for reports in the console regarding UpdateBlocked and possible flow errors.
+
| nav_add_to_selected_set || Add current area to the selected set. Usually the area selected is the one pointed at.
 
+
|-
;nav_begin_deselecting
+
| nav_add_to_selected_set_by_id || Selects the nav by area number / id. This is useful for reports in the console regarding UpdateBlocked and possible flow errors.
:Start continuously removing from the selected set.
+
|-
 
+
| nav_begin_deselecting || Start continuously removing from the selected set.
;nav_end_deselecting
+
|-
:Stop continuously removing from the selected set.
+
| nav_end_deselecting || Stop continuously removing from the selected set.
 
+
|-
;nav_begin_selecting
+
| nav_begin_selecting || Start continuously adding to the selected set.
:Start continuously adding to the selected set.
+
|-
 
+
| nav_end_selecting || Stop continuously adding to the selected set.
;nav_end_selecting
+
|-
:Stop continuously adding to the selected set.
+
| nav_begin_drag_deselecting || Start dragging a selection area.
 
+
|-
;nav_begin_drag_deselecting
+
| nav_end_drag_deselecting || Stop dragging a selection area.
:Start dragging a selection area.
+
|-
 
+
| nav_begin_drag_selecting || Start dragging a selection area.
;nav_end_drag_deselecting
+
|-
:Stop dragging a selection area.
+
| nav_end_drag_selecting || Stop dragging a selection area.
 
+
|-
;nav_begin_drag_selecting
+
| nav_toggle_in_selected_set || Selects the nav mesh area that the gun in-game crosshair is pointing at. This command is typically bound to a key for sake of convenience. For example, [[Nav mode.cfg (L4D)|nav_mode.cfg]] file found in the L4D config folder binds this command to the Z key.  
:Start dragging a selection area.
+
|-
 
+
| nav_clear_selected_set || Clears selection of all selected nav mesh areas that were visually highlighted. In other words, this command de-selects the nav mesh areas selected.
;nav_end_drag_selecting
+
|-
:Stop dragging a selection area.
+
| 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.
 
+
|-
;nav_toggle_in_selected_set
+
| select_with_attribute || Selects/highlights all nav mesh areas marked with one attribute specified.
:Selects the nav mesh area that the gun in-game crosshair is pointing at. This command is typically bound to a key for sake of convenience. For example, [[Nav mode.cfg (L4D)|nav_mode.cfg]] file found in the L4D config folder binds this command to the Z key.
+
|}
 
 
;nav_clear_selected_set
 
:Clears selection of all selected nav mesh areas that were visually highlighted. In other words, this command de-selects the nav mesh areas selected.
 
 
 
;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 ===
 
=== Editing commands ===
;nav_delete
+
{| class="wikitable"
:Deletes the currently highlighted Area.
+
|-
 
+
! Command !! Description
;nav_delete_marked
+
|-
:Deletes the currently marked Area (if any).
+
| nav_delete || Deletes the currently highlighted Area.
 
+
|-
;nav_split
+
| nav_delete_marked || Deletes the currently marked Area (if any).
:To split an Area into two, align the split line using your cursor and invoke the split command.
+
|-
 
+
| nav_split || To split an Area into two, align the split line using your cursor and invoke the split command.
;nav_make_sniper_spots
+
|-
:Chops the marked area into disconnected sub-areas suitable for sniper spots.
+
| nav_make_sniper_spots || Chops the marked area into disconnected sub-areas suitable for sniper spots.
 
+
|-
;nav_chop_selected
+
| nav_chop_selected || Chops all selected areas into their component 1x1 areas
:Chops all selected areas into their component 1x1 areas
+
|-
 
+
| nav_merge || To merge two Areas into one, mark the first Area, highlight the second by pointing your cursor at it, and invoke the merge command.
;nav_merge
+
|-
:To merge two Areas into one, mark the first Area, highlight the second by pointing your cursor at it, and invoke the merge command.
+
| nav_mark || Marks the Area or Ladder under the cursor for manipulation by subsequent editing commands.
 
+
|-
;nav_mark
+
| nav_unmark || Clears the marked Area or Ladder.
:Marks the Area or Ladder under the cursor for manipulation by subsequent editing commands.
+
|-
 
+
| nav_begin_area || Defines a corner of a new Area or Ladder. To complete the Area or Ladder, drag the opposite corner to the desired location and issue a 'nav_end_area' command.
;nav_unmark
+
|-
:Clears the marked Area or Ladder.
+
| nav_end_area || Defines the second corner of a new Area or Ladder and creates it.
 
+
|-
;nav_begin_area
+
| nav_connect || To connect two Areas, mark the first Area, highlight the second Area, then invoke the connect command. Note that this creates a ''one-way'' connection from the first to the second Area. To make a two-way connection, also connect the second area to the first.
:Defines a corner of a new Area or Ladder. To complete the Area or Ladder, drag the opposite corner to the desired location and issue a 'nav_end_area' command.
+
|-
 
+
| nav_disconnect || To disconnect two Areas, mark an Area, highlight a second Area, then invoke the disconnect command. This will remove all connections between the two Areas.
;nav_end_area
+
|-
:Defines the second corner of a new Area or Ladder and creates it.
+
| nav_splice || To splice, mark an area, highlight a second area, then invoke the splice command to create a new, connected area between them.
 
+
|-
;nav_connect
+
| nav_corner_select || Select a corner of the currently marked Area. Use multiple times to access all four corners.
:To connect two Areas, mark the first Area, highlight the second Area, then invoke the connect command. Note that this creates a ''one-way'' connection from the first to the second Area. To make a two-way connection, also connect the second area to the first.
+
|-
 
+
| nav_corner_raise || Raise the selected corner of the currently marked Area.
;nav_disconnect
+
|-
:To disconnect two Areas, mark an Area, highlight a second Area, then invoke the disconnect command. This will remove all connections between the two Areas.
+
| nav_corner_lower || Lower the selected corner of the currently marked Area.
 
+
|-
;nav_splice
+
| nav_corner_place_on_ground || Places the selected corner of the currently marked Area on the ground.
:To splice, mark an area, highlight a second area, then invoke the splice command to create a new, connected area between them.
+
|-
 
+
| nav_begin_shift_xy || Begin shifting the Selected Set.
;nav_corner_select
+
|-
:Select a corner of the currently marked Area. Use multiple times to access all four corners.
+
| nav_stop_shift_xy || Finish shifting the Selected Set.
 
+
|-
;nav_corner_raise
+
| nav_simplify_selected || {{Todo|Explain}}
:Raise the selected corner of the currently marked Area.
+
|}
 
 
;nav_corner_lower
 
:Lower the selected corner of the currently marked Area.
 
 
 
;nav_corner_place_on_ground
 
:Places the selected corner of the currently marked Area on the ground.
 
 
 
;nav_begin_shift_xy
 
:Begin shifting the Selected Set.
 
 
 
;nav_stop_shift_xy
 
:Finish shifting the Selected Set.
 
 
 
;nav_simplify_selected
 
  
 
=== Bot navigation modification commands ===
 
=== Bot navigation modification commands ===
A nav area flag may also be called an attribute. The flag/attribute modifies the nav area with commands that modify NPC behavior, such as a forced crouch, following a specific path, disallowing spawn, etc. Many attributes also have their own command, such as nav_crouch. The command "mark CROUCH" is the same as the command nav_crouch. L4D, as an example, has a [[Navigation_Meshes_(L4D)|list of attributes]] where some may apply to only L4D.
 
 
;mark <attribute>
 
:Marks the area with an attribute, such as CROUCH, PRECISE, NO_MOBS, etc.
 
 
;nav_clear_attribute <attribute>
 
:Clears attribute specified. If clear_attribute does not work to clear an attribute specified, this command might work.
 
 
;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
 
:Toggles the 'must crouch in this area' flag used by the AI system.
 
 
;nav_fog_mark
 
:Sets fog value for selected areas.
 
 
;nav_fog_pick
 
:Sets fog value for selected areas.
 
 
;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
 
:Toggles the 'traverse this area by jumping' flag used by the AI system.
 
 
;nav_no_jump
 
:Toggles the 'don't jump in this area' flag used by the AI system.
 
 
;nav_stop
 
:Toggles the 'must stop when entering this area' flag used by the AI system.
 
 
;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.
 
  
 +
Attributes modify the nav area with commands that modify NPC behavior, such as a forced crouch, following a specific path, disallowing spawn, etc. Many attributes also have their own command, such as nav_crouch. The command "mark CROUCH" is the same as the command nav_crouch.<br>
 +
[[Navigation_Meshes_(L4D)|Attributes]]. for {{l4d}} {{l4d2}}.
 +
{| class="wikitable"
 +
|-
 +
! Command !! Description
 +
|-
 +
| mark '''<Attribute>''' || Marks the area with an attribute, such as CROUCH, PRECISE, NO_MOBS, etc.
 +
|-
 +
| nav_clear_attribute '''<Attribute>''' || Clears attribute specified. If clear_attribute does not work to clear an attribute specified, this command might work.
 +
|-
 +
| 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 || Toggles the 'must crouch in this area' flag used by the AI system.
 +
|-
 +
| nav_fog_mark || Sets fog value for selected areas.
 +
|-
 +
| nav_fog_pick || Sets fog value for selected areas.
 +
|-
 +
| 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 || Toggles the 'traverse this area by jumping' flag used by the AI system.
 +
|-
 +
| nav_no_jump || Toggles the 'don't jump in this area' flag used by the AI system.
 +
|-
 +
| nav_stop || Toggles the 'must stop when entering this area' flag used by the AI system.
 +
|-
 +
| 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 ===
 
=== Place name commands ===
;nav_use_place
+
{| class="wikitable"
:If used without arguments, all available Places will be listed. If a Place argument is given, the current Place is set.
+
|-
 
+
! Command !! Description
;nav_place_replace
+
|-
:Replaces all instances of the first place with the second place.
+
| 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_list
+
| nav_place_replace || Replaces all instances of the first place with the second place.
:Lists all place names used in the map.
+
|-
 
+
| 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_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
+
| nav_set_place_mode || Sets the editor into or out of Place mode. Place mode allows labelling of Area with Place names.
: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_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_place_pick
+
| nav_toggle_place_painting || Toggles Place Painting mode. When Place Painting, pointing at an Area will 'paint' it with the current Place.
:Sets the current Place to the Place of the Area under the cursor.
+
|-
 
+
| nav_mark_unnamed || Mark an Area with no Place name. Useful for finding stray areas missed when Place Painting.
;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.
 
 
 
 
=== Other commands ===
 
=== Other commands ===
;nav_check_file_consistency
+
{| class="wikitable"
:Scans the maps directory and reports any missing/out-of-date navigation files.
+
|-
 
+
! Command !! Description
;nav_check_connectivity
+
|-
:Reports any areas that aren't connected to every hostage rescue zone and bomb site in the map.
+
| nav_check_file_consistency || Scans the maps directory and reports any missing/out-of-date navigation files.
 
+
|-
;nav_update_blocked
+
| nav_check_connectivity || Reports any areas that aren't connected to every hostage rescue zone and bomb site in the map.
:Updates the blocked/unblocked status for every nav area.
+
|-
 
+
| 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_floor || Updates the blocked/unblocked status for every nav area.
 
+
|-
;nav_check_stairs
+
| nav_check_stairs || Update the nav mesh STAIRS attribute
:Update the nav mesh STAIRS attribute
+
|-
 
+
| nav_fog_print_used || Prints out the list of fog names used in the map.
;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_fog_set
+
| nav_fix_playerclips || Fixup nodes marked with NAV_PLAYERCLIP.
:If used without arguments, all available Fog values will be listed. If a Fog argument is given, the current Fog is set.
+
|-
 
+
| nav_remove_unused_jump_areas || Removes jump areas with at most 1 connection to a ladder or non-jump area.
;nav_fix_playerclips
+
|-
:Fixup nodes marked with NAV_PLAYERCLIP.
+
| nav_strip || Strips all Hiding Spots, Approach Points, and Encounter Spots from all Areas in the mesh.
 
+
|-
;nav_remove_unused_jump_areas
+
| nav_warp_to_mark || Warps the player to the marked area.
:Removes jump areas with at most 1 connection to a ladder or non-jump area.
+
|-
 
+
| nav_ladder_flip || Flips the selected ladder's direction.
;nav_strip
+
|-
:Strips all Hiding Spots, Approach Points, and Encounter Spots from all Areas in the mesh.
+
| nav_compress_id || Re-orders area and ladder ID's so they are continuous.
 
+
|-
;nav_warp_to_mark
+
| nav_show_ladder_bounds || Draws the bounding boxes of all func_ladders in the map.
:Warps the player to the marked area.
+
|-
 
+
| nav_build_ladder || Attempts to build a nav ladder on the climbable surface under the cursor.
;nav_ladder_flip
+
|-
:Flips the selected ladder's direction.
+
| nav_gui || {{Todo|Explain}}
 
+
|-
;nav_compress_id
+
| nav_trouble_report || {{Todo|Explain}}
:Re-orders area and ladder ID's so they are continuous.
+
|-
 
+
| nav_recompute_flow || {{Todo|Explain}}
;nav_show_ladder_bounds
+
|-
:Draws the bounding boxes of all func_ladders in the map.
+
| nb_delete_all<br>nb_delete_all '''<Group>''' || Removes all NPCs in the game or, if group is specified, removes Specified group only. An example group type would be Infected in L4D.
 
+
|-
;nav_build_ladder
+
| nb_move_to_cursor || {{Todo|Explain}}
:Attempts to build a nav ladder on the climbable surface under the cursor.
+
|}
 
+
===Additional Console Variables===
;nav_gui
+
{| class="wikitable"
:
+
|-
 
+
! Command !! Description
;nav_trouble_report
+
|-
:
+
| nav_area_bgcolor '''<R G B A>''' || RGBA color to draw as the background color for nav areas while editing.
 
+
|-
;nav_recompute_flow
+
| nav_area_max_size || Max area size created in nav generation. <br>{{l4d2}} Default is set to 50
:
+
|-
 
+
| nav_blockers_can_affect_flow || {{l4d2}} Default is set to 1
;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.
+
| nav_create_area_at_feet || Anchor nav_begin_area Z to editing player's feet. <br>{{l4d2}} Default is set to 0
 
+
|-
;nb_move_to_cursor
+
| nav_create_place_on_ground '''<[[Boolean]]>''' || If set to 1, nav areas will be placed flush with the ground when created by hand.
: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.
+
|-
 
+
| nav_coplanar_slope_limit '''<Value>''' || Metric to determine whether adjacent walkable samples are planar and can be used to create a single planar nav area.<br>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.
==Console Variables==
+
|-
;nav_area_bgcolor ''R G B A''
+
| nav_coplanar_slope_limit_displacement || {{l4d2}} Default is set to 0.7
:RGBA color to draw as the background color for nav areas while editing.
+
|-
 
+
| nav_corner_adjust_adjacent || Radius used to raise/lower corners in nearby areas when raising/lowering corners. <br>{{l4d2}} Default is set to 18
;nav_area_max_size
+
|-
:Max area size created in nav generation. {{l4d2}} Default is set to 50
+
| nav_debug_blocked || {{l4d2}} Default is set to 0
 
+
|-
;nav_blockers_can_affect_flow
+
| 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
:{{l4d2}} Default is set to 1
+
|-
 
+
| nav_displacement_test || Checks for nodes embedded in displacements (useful for in-development maps). <br>{{l4d2}} Default is set to 10000
;nav_create_area_at_feet
+
|-
:Anchor nav_begin_area Z to editing player's feet. {{l4d2}} Default is set to 0
+
| nav_draw_limit '''<Count>''' || The maximum number of areas to draw in edit mode. <br>{{l4d2}} Default is set to 500
 
+
|-
;nav_create_place_on_ground ''(0 or 1)''
+
| nav_edit '''<[[Boolean]]>''' || Set to one to interactively edit the Navigation Mesh. Set to zero to leave edit mode.
:If set to 1, nav areas will be placed flush with the ground when created by hand.
+
|-
 
+
| nav_generate_fixup_jump_areas || Convert obsolete jump areas into 2-way connections. <br>{{l4d2}} Default is set to 1
;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_flood_select_tolerance || Allowable z distance of selectable areas from the start area. <br>{{l4d2}} Default is set to 0
 
+
|-
;nav_coplanar_slope_limit_displacement
+
| nav_fog_edit || {{l4d2}} Default is set to 0
:{{l4d2}} Default is set to 0.7
+
|-
 
+
| nav_generate_fencetops || Autogenerate nav areas on fence and obstacle tops. <br>{{l4d2}} Default is set to 1.
;nav_corner_adjust_adjacent
+
|-
:Radius used to raise/lower corners in nearby areas when raising/lowering corners. {{l4d2}} Default is set to 18
+
| nav_restart_after_analysis '''<[[Boolean]]>''' || 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_debug_blocked
+
| nav_show_approach_points '''<[[Boolean]]>''' || Show Approach Points in the Navigation Mesh.
:{{l4d2}} Default is set to 0
+
|-
 
+
| nav_show_area_info '''<Duration>''' || Duration in seconds to show nav area ID and attributes while editing
;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_show_danger '''<[[Boolean]]>''' || Show current 'danger' levels.
 
+
|-
;nav_displacement_test
+
| nav_show_player_counts '''<[[Boolean]]>''' || Show current player counts in each area.
:Checks for nodes embedded in displacements (useful for in-development maps). {{l4d2}} Default is set to 10000
+
|-
 
+
| nav_slope_limit '''<Z>''' || The ground unit normal's Z component must be greater than this for nav areas to be generated.
;nav_draw_limit ''count''
+
|-
:The maximum number of areas to draw in edit mode. {{l4d2}} Default is set to 500
+
| nav_snap_to_grid '''<[[Boolean]]>''' || If set to 1, snap to the nav generation grid when creating new nav areas
 
+
|-
;nav_edit ''(0 or 1)''
+
| nav_split_place_on_ground '''<[[Boolean]]>''' || If set to 1, nav areas will be placed flush with the ground when split.
:Set to one to interactively edit the Navigation Mesh. Set to zero to leave edit mode.
+
|-
 
+
| nav_quicksave '''<[[Boolean]]>''' || Set to one to skip the time consuming phases of the analysis.  Useful for data collection and testing.
;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 ==
 
== See also ==
 
* [[Left 4 Dead 2 Level Creation]]
 
* [[Left 4 Dead 2 Level Creation]]

Revision as of 04:31, 3 March 2021

日本語 简体中文

Commands

These commands can be bound to a key in a config file for faster workflow. For example, Left 4 Dead (L4D) has nav_mode.cfg.

Mesh generation

Command Description
nav_mark_walkable Mark the current location as a walkable position. These positions are used as seed locations when sampling the map to generate a Navigation Mesh.
nav_clear_walkable_marks Erase any previously placed walkable positions.
nav_generate Generate a Navigation Mesh for the current map and save it to disk.
nav_generate_incremental Run the generation process again without altering the existing mesh. If there are additional walkable areas and/or walkable marks, new areas will be generated and added to the mesh. Note that these new areas will have to be manually connected to the existing mesh.
nav_generate_incremental_range <Integer> Generates nav mesh in range specified (units?). The center of the is defined by the walkable mark.
nav_auto_build_area Build out high-precision areas around the edit cursor and create them.
nav_save Saves the current Navigation Mesh to disk.
nav_analyze Loads the Navigation Mesh for the current map.

Selection commands

Command Description
nav_add_to_selected_set Add current area to the selected set. Usually the area selected is the one pointed at.
nav_add_to_selected_set_by_id Selects the nav by area number / id. This is useful for reports in the console regarding UpdateBlocked and possible flow errors.
nav_begin_deselecting Start continuously removing from the selected set.
nav_end_deselecting Stop continuously removing from the selected set.
nav_begin_selecting Start continuously adding to the selected set.
nav_end_selecting Stop continuously adding to the selected set.
nav_begin_drag_deselecting 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 Selects the nav mesh area that the gun in-game crosshair is pointing at. This command is typically bound to a key for sake of convenience. For example, nav_mode.cfg file found in the L4D config folder binds this command to the Z key.
nav_clear_selected_set Clears selection of all selected nav mesh areas that were visually highlighted. In other words, this command de-selects the nav mesh areas selected.
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

Command Description
nav_delete Deletes the currently highlighted Area.
nav_delete_marked Deletes the currently marked Area (if any).
nav_split To split an Area into two, align the split line using your cursor and invoke the split command.
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 To merge two Areas into one, mark the first Area, highlight the second by pointing your cursor at it, and invoke the merge command.
nav_mark Marks the Area or Ladder under the cursor for manipulation by subsequent editing commands.
nav_unmark Clears the marked Area or Ladder.
nav_begin_area Defines a corner of a new Area or Ladder. To complete the Area or Ladder, drag the opposite corner to the desired location and issue a 'nav_end_area' command.
nav_end_area Defines the second corner of a new Area or Ladder and creates it.
nav_connect To connect two Areas, mark the first Area, highlight the second Area, then invoke the connect command. Note that this creates a one-way connection from the first to the second Area. To make a two-way connection, also connect the second area to the first.
nav_disconnect To disconnect two Areas, mark an Area, highlight a second Area, then invoke the disconnect command. This will remove all connections between the two Areas.
nav_splice To splice, mark an area, highlight a second area, then invoke the splice command to create a new, connected area between them.
nav_corner_select Select a corner of the currently marked Area. Use multiple times to access all four corners.
nav_corner_raise Raise the selected corner of the currently marked Area.
nav_corner_lower Lower the selected corner of the currently marked Area.
nav_corner_place_on_ground Places the selected corner of the currently marked Area on the ground.
nav_begin_shift_xy Begin shifting the Selected Set.
nav_stop_shift_xy Finish shifting the Selected Set.
nav_simplify_selected To do: Explain

Bot navigation modification commands

Attributes modify the nav area with commands that modify NPC behavior, such as a forced crouch, following a specific path, disallowing spawn, etc. Many attributes also have their own command, such as nav_crouch. The command "mark CROUCH" is the same as the command nav_crouch.
Attributes. for <Left 4 Dead> <Left 4 Dead 2>.

Command Description
mark <Attribute> Marks the area with an attribute, such as CROUCH, PRECISE, NO_MOBS, etc.
nav_clear_attribute <Attribute> Clears attribute specified. If clear_attribute does not work to clear an attribute specified, this command might work.
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 Toggles the 'must crouch in this area' flag used by the AI system.
nav_fog_mark Sets fog value for selected areas.
nav_fog_pick Sets fog value for selected areas.
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 Toggles the 'traverse this area by jumping' flag used by the AI system.
nav_no_jump Toggles the 'don't jump in this area' flag used by the AI system.
nav_stop Toggles the 'must stop when entering this area' flag used by the AI system.
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

Command Description
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.

Other commands

Command Description
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 To do: Explain
nav_trouble_report To do: Explain
nav_recompute_flow To do: Explain
nb_delete_all
nb_delete_all <Group>
Removes all NPCs in the game or, if group is specified, removes Specified group only. An example group type would be Infected in L4D.
nb_move_to_cursor To do: Explain

Additional Console Variables

Command Description
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.
<Left 4 Dead 2> Default is set to 50
nav_blockers_can_affect_flow <Left 4 Dead 2> Default is set to 1
nav_create_area_at_feet Anchor nav_begin_area Z to editing player's feet.
<Left 4 Dead 2> Default is set to 0
nav_create_place_on_ground <Boolean> If set to 1, nav areas will be placed flush with the ground when created by hand.
nav_coplanar_slope_limit <Value> 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 <Left 4 Dead 2> Default is set to 0.7
nav_corner_adjust_adjacent Radius used to raise/lower corners in nearby areas when raising/lowering corners.
<Left 4 Dead 2> Default is set to 18
nav_debug_blocked <Left 4 Dead 2> Default is set to 0
nav_debug_finale_area <Left 4 Dead 2> 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).
<Left 4 Dead 2> Default is set to 10000
nav_draw_limit <Count> The maximum number of areas to draw in edit mode.
<Left 4 Dead 2> Default is set to 500
nav_edit <Boolean> 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.
<Left 4 Dead 2> Default is set to 1
nav_flood_select_tolerance Allowable z distance of selectable areas from the start area.
<Left 4 Dead 2> Default is set to 0
nav_fog_edit <Left 4 Dead 2> Default is set to 0
nav_generate_fencetops Autogenerate nav areas on fence and obstacle tops.
<Left 4 Dead 2> Default is set to 1.
nav_restart_after_analysis <Boolean> 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 <Boolean> 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 <Boolean> Show current 'danger' levels.
nav_show_player_counts <Boolean> 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 <Boolean> If set to 1, snap to the nav generation grid when creating new nav areas
nav_split_place_on_ground <Boolean> If set to 1, nav areas will be placed flush with the ground when split.
nav_quicksave <Boolean> Set to one to skip the time consuming phases of the analysis. Useful for data collection and testing.

See also