Nav Mesh/Console commands: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(→‎Mesh generation: Added more info about nav generation)
(Added anchors for more convenient redirects. Ladders aren't nav_generated in csgo, are they? Added wipe_nav_attributes, but don't know details about it, all I know is that wipe_attributes doesn't exist in csgo but the former does.)
Line 8: Line 8:
|-
|-
! Command !! Description
! Command !! Description
|-
|- id="nav_mark_walkable"
| 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_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.
|-
|- id="nav_clear_walkable_marks"
| nav_clear_walkable_marks || Erase any previously placed walkable positions.
| nav_clear_walkable_marks || Erase any previously placed walkable positions.
|-
|- id="nav_generate"
| nav_generate || Generate a Navigation Mesh for the current map and save it to disk. {{ent|nav_quicksave}} determines the amount of information generated. Also generates ladders and does a <code>nav_analyze</code> in the end.
| nav_generate || Generate a Navigation Mesh for the current map and save it to disk. {{ent|#nav_quicksave}} determines the amount of information generated. Also generates ladders {{csgo|not}} and does a <code>nav_analyze</code> in the end.
|-
|- id="nav_generate_incremental"
| nav_generate_incremental || Run the generation process from walkable markers instead of on the entire mesh. Newly created areas will usually connect to preexisting areas.
| nav_generate_incremental || Run the generation process from walkable markers instead of on the entire mesh. Newly created areas will usually connect to preexisting areas.
{{warning|{{l4d2}} Using it will delete all JUMP areas and also some random connections scattered around the map. Use it only in the beginning of the nav creation process.}}
{{warning|{{l4d2}} Using it will delete all JUMP areas and also some random connections scattered around the map. Use it only in the beginning of the nav creation process.}}
|-
|- id="nav_generate_incremental_range"
| 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_range '''<[[Integer]]>''' || Generates nav mesh in range specified (units?). The center of the is defined by the walkable mark.
|-
|- id="nav_auto_build_area"
| nav_auto_build_area || 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.
|-
|- id="nav_save"
| nav_save || Saves the current Navigation Mesh to a [[NAV]] file.
| nav_save || Saves the current Navigation Mesh to a [[NAV]] file.
|-
|- id="nav_load"
| nav_load || Loads navigation mesh from the current map's [[NAV]] file.
| nav_load || Loads navigation mesh from the current map's [[NAV]] file.
|-
|- id="nav_analyze"
| nav_analyze || Loads the Navigation Mesh for the current map. {{ent|nav_quicksave}} determines the amount of information generated.
| nav_analyze || Loads the Navigation Mesh for the current map. {{ent|#nav_quicksave}} determines the amount of information generated.
|}
|}


Line 33: Line 33:
|-
|-
! Command !! Description
! Command !! Description
|-
|- id="nav_add_to_selected_set"
| 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 || Add current area to the selected set. Usually the area selected is the one pointed at.
|-
|- id="nav_add_to_selected_set_by_id"
| 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_by_id || Selects the nav by area number / id. This is useful for reports in the console regarding UpdateBlocked and possible flow errors.
|-
|- id="nav_begin_deselecting"
| nav_begin_deselecting || Start continuously removing from the selected set.
| nav_begin_deselecting || Start continuously removing from the selected set.
|-
|- id="nav_end_deselecting"
| nav_end_deselecting || Stop continuously removing from the selected set.
| nav_end_deselecting || Stop continuously removing from the selected set.
|-
|- id="nav_begin_selecting"
| nav_begin_selecting || Start continuously adding to the selected set.
| nav_begin_selecting || Start continuously adding to the selected set.
|-
|- id="nav_end_selecting"
| nav_end_selecting || Stop continuously adding to the selected set.
| nav_end_selecting || Stop continuously adding to the selected set.
|-
|- id="nav_begin_drag_deselecting"
| nav_begin_drag_deselecting || Start dragging a selection area.
| nav_begin_drag_deselecting || Start dragging a selection area.
|-
|- id="nav_end_drag_deselecting"
| nav_end_drag_deselecting || Stop dragging a selection area.
| nav_end_drag_deselecting || Stop dragging a selection area.
|-
|- id="nav_begin_drag_selecting"
| nav_begin_drag_selecting || Start dragging a selection area.
| nav_begin_drag_selecting || Start dragging a selection area.
|-
|- id="nav_end_drag_selecting"
| nav_end_drag_selecting || Stop dragging a selection area.
| nav_end_drag_selecting || Stop dragging a selection area.
|-
|- id="nav_toggle_in_selected_set"
| 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.  
| 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.  
|-
|- id="nav_clear_selected_set"
| 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_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.
|-
|- id="nav_flood_select"
| 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_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.
|-
|- id="select_with_attribute"
| select_with_attribute || Selects/highlights all nav mesh areas marked with one attribute specified.
| select_with_attribute || Selects/highlights all nav mesh areas marked with one attribute specified.
|}
|}
Line 67: Line 67:
|-
|-
! Command !! Description
! Command !! Description
|-
|- id="nav_delete"
| nav_delete || Deletes the currently highlighted or marked area, or selected set.
| nav_delete || Deletes the currently highlighted or marked area, or selected set.
|-
|- id="nav_delete_marked"
| nav_delete_marked || Deletes the currently marked Area (if any).
| nav_delete_marked || Deletes the currently marked Area (if any).
|-
|- id="nav_split"
| nav_split || 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.
|-
|- id="nav_subdivide"
| nav_subdivide || Divides a selected set or the area that the crosshair is hovering over.
| nav_subdivide || Divides a selected set or the area that the crosshair is hovering over.
|-
|- id="nav_make_sniper_spots"
| 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.
|-
|- id="nav_chop_selected"
| nav_chop_selected || Chops all selected areas into their component 1x1 areas
| nav_chop_selected || Chops all selected areas into their component 1x1 areas
|-
|- id="nav_merge"
| 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.
|-
|- id="nav_mark"
| nav_mark || Marks the Area or Ladder under the cursor for manipulation by subsequent editing commands.
| nav_mark || Marks the Area or Ladder under the cursor for manipulation by subsequent editing commands.
|-
|- id="nav_unmark"
| nav_unmark || Clears the marked Area or Ladder.
| nav_unmark || Clears the marked Area or Ladder.
|-
|- id="nav_begin_area"
| 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_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.
{{note|Areas created through this method will bidirectionally connect to premarked areas.}}
{{note|Areas created through this method will bidirectionally connect to premarked areas.}}
|-
|- id="nav_end_area"
| nav_end_area || Defines the second corner of a new Area or Ladder and creates it.
| nav_end_area || Defines the second corner of a new Area or Ladder and creates it.
|-
|- id="nav_connect"
| nav_connect || Creates a ''one-way'' connection from a marked area to the second Area. To make a two-way connection, also connect the second area to the first.
| nav_connect || Creates a ''one-way'' connection from a marked area to the second Area. To make a two-way connection, also connect the second area to the first.
{{note|In a selected set <code>nav_connect</code> will try to bidirectionally connect the first selected area to every subsequently selected area.}}
{{note|In a selected set <code>nav_connect</code> will try to bidirectionally connect the first selected area to every subsequently selected area.}}
|-
|- id="nav_disconnect"
| nav_disconnect || Removes connections between a marked area and highlighted area.
| nav_disconnect || Removes connections between a marked area and highlighted area.
{{note|In a selected set <code>nav_disconnect</code> will try to disconnect connections between the first selected area and every subsequently selected area.}}
{{note|In a selected set <code>nav_disconnect</code> will try to disconnect connections between the first selected area and every subsequently selected area.}}
|-
|- id="nav_disconnect_outgoing_oneways"
| nav_disconnect_outgoing_oneways || Disconnect all outgoing one-way connections for a highlighted area, or selected set.
| nav_disconnect_outgoing_oneways || Disconnect all outgoing one-way connections for a highlighted area, or selected set.
|-
|- id="nav_splice"
| nav_splice || Makes a joint area between a marked/selected area and a highlighted/marked area.
| nav_splice || Makes a joint area between a marked/selected area and a highlighted/marked area.
|-
|- id="nav_corner_select"
| nav_corner_select || Select a corner of the currently marked Area. Use multiple times to access all four corners.
| nav_corner_select || Select a corner of the currently marked Area. Use multiple times to access all four corners.
|-
|- id="nav_corner_raise"
| nav_corner_raise<br />nav_corner_raise '''<[[Hammer units]]>''' || Raises the selected corner of the currently marked area or selected set.
| nav_corner_raise<br />nav_corner_raise '''<[[Hammer units]]>''' || Raises the selected corner of the currently marked area or selected set.
|-
|- id="nav_corner_lower"
| nav_corner_lower<br />nav_corner_lower '''<[[Hammer units]]>''' || Lowers the selected corner of the currently marked area or selected set.
| nav_corner_lower<br />nav_corner_lower '''<[[Hammer units]]>''' || Lowers the selected corner of the currently marked area or selected set.
|-
|- id="nav_corner_place_on_ground"
| nav_corner_place_on_ground || Places the selected set, selected corner of the currently marked area, or the marked area itself, on the ground.
| nav_corner_place_on_ground || Places the selected set, selected corner of the currently marked area, or the marked area itself, on the ground.
|-
|- id="nav_shift"
| nav_shift <x, y, z> || Shifts the selected areas by the specified amounts.
| nav_shift <x, y, z> || Shifts the selected areas by the specified amounts.
|-
|- id="nav_begin_shift_xy"
| nav_begin_shift_xy || Begin shifting the Selected Set.
| nav_begin_shift_xy || Begin shifting the Selected Set.
|-
|- id="nav_end_shift_xy"
| nav_end_shift_xy || Finish shifting the Selected Set.
| nav_end_shift_xy || Finish shifting the Selected Set.
|-
|- id="nav_simplify_selected"
| nav_simplify_selected || Temporarily forces <code>nav_split_place_on_ground</code> to 1, keeps <code>nav_coplanar_slope_limit_displacement</code> and <nav_coplanar_slope_limit> to at least 0.5, and <code>nav_snap_to_grid</code> to 1. It then strips analyzed data and subdivides the selected areas into 1x1 area, performs <code>nav_generate_incremental</code> on them without generating any areas, and finally recombines them before reselecting the resulting nav areas.
| nav_simplify_selected || Temporarily forces <code>nav_split_place_on_ground</code> to 1, keeps <code>nav_coplanar_slope_limit_displacement</code> and <nav_coplanar_slope_limit> to at least 0.5, and <code>nav_snap_to_grid</code> to 1. It then strips analyzed data and subdivides the selected areas into 1x1 area, performs <code>nav_generate_incremental</code> on them without generating any areas, and finally recombines them before reselecting the resulting nav areas.
|-
|- id="nav_save_selected"
| nav_save_selected<br />nav_save_selected <code><name></code> || Stores a selected set in a [[KeyValues]] file at <code>maps/<map name or <name>>_selected_<number up to 1000>.txt</code>. <br />{{bug|If <code><name></code> exists, the file is saved with <code>nav_save_selected</code> instead of <code><name></code>.}}
| nav_save_selected<br />nav_save_selected <code><name></code> || Stores a selected set in a [[KeyValues]] file at <code>maps/<map name or <name>>_selected_<number up to 1000>.txt</code>. <br />{{bug|If <code><name></code> exists, the file is saved with <code>nav_save_selected</code> instead of <code><name></code>.}}
|-
|- id="nav_merge_mesh"
| nav_merge_mesh <filename> || Imports nav areas from the specified [[KeyValues]] file in <code>maps/</code>.
| nav_merge_mesh <filename> || Imports nav areas from the specified [[KeyValues]] file in <code>maps/</code>.
|}
|}
Line 129: Line 129:
|-
|-
! Command !! Description
! Command !! Description
|-
|- id="nav_mark_attribute"
| mark '''<Attribute>'''<br>nav_mark_attribute '''<Attribute>''' || Marks the area with an attribute, such as CROUCH, PRECISE, NO_MOBS, etc.  
| mark '''<Attribute>'''<br>nav_mark_attribute '''<Attribute>''' || Marks the area with an attribute, such as CROUCH, PRECISE, NO_MOBS, etc.  
|-
|- id="nav_clear_attribute"
| nav_clear_attribute '''<Attribute>''' || Clears attribute specified. If clear_attribute does not work to clear an attribute specified, this command might work.
| nav_clear_attribute '''<Attribute>''' || Clears attribute specified. If clear_attribute does not work to clear an attribute specified, this command might work.
|-
|- id="clear_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.
| 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.
|-
|- id="wipe_attributes"
| wipe_attributes || Clears all attributes on the selected part of the nav mesh.
| wipe_attributes || Clears all attributes on the selected part of the nav mesh.
|-
|- id="wipe_nav_attributes"
| wipe_nav_attributes || Clears all nav attributes on the selected part of the nav mesh.
|- id="nav_crouch"
| nav_crouch || Toggles the 'must crouch in this area' flag used by the AI system.
| nav_crouch || Toggles the 'must crouch in this area' flag used by the AI system.
|-
|- id="nav_fog_mark"
| nav_fog_mark || Sets fog value for selected areas.
| nav_fog_mark || Sets fog value for selected areas.
|-
|- id="nav_fog_pick"
| nav_fog_pick || Sets fog value for selected areas.
| nav_fog_pick || Sets fog value for selected areas.
|-
|- id="nav_fog_select_place"
| nav_fog_select_place || Selects all areas with the given fog place.
| nav_fog_select_place || Selects all areas with the given fog place.
|-
|- id="nav_gen_cliffs_approx"
| nav_gen_cliffs_approx || Mark cliff areas, post-processing approximation.
| nav_gen_cliffs_approx || Mark cliff areas, post-processing approximation.
|-
|- id="nav_precise"
| nav_precise || Toggles the 'don't avoid obstacles' flag used by the AI system.
| nav_precise || Toggles the 'don't avoid obstacles' flag used by the AI system.
|-
|- id="nav_jump"
| nav_jump || Toggles the 'traverse this area by jumping' flag used by the AI system.
| nav_jump || Toggles the 'traverse this area by jumping' flag used by the AI system.
|-
|- id="nav_no_jump"
| nav_no_jump || Toggles the 'don't jump in this area' flag used by the AI system.
| nav_no_jump || Toggles the 'don't jump in this area' flag used by the AI system.
|-
|- id="nav_stop"
| nav_stop || Toggles the 'must stop when entering this area' flag used by the AI system.
| nav_stop || Toggles the 'must stop when entering this area' flag used by the AI system.
|-
|- id="nav_walk"
| nav_walk || Toggles the 'traverse this area by walking' flag used by the AI system.
| nav_walk || Toggles the 'traverse this area by walking' flag used by the AI system.
|-
|- id="nav_run"
| nav_run || Toggles the 'traverse this area by running' flag used by the AI system.
| nav_run || Toggles the 'traverse this area by running' flag used by the AI system.
|-
|- id="nav_avoid"
| nav_avoid || Toggles the 'avoid this area when possible' flag used by the AI system.
| nav_avoid || Toggles the 'avoid this area when possible' flag used by the AI system.
|-
|- id="nav_transient"
| nav_transient || Toggles the 'area is transient and may become blocked' flag used by the AI system.
| nav_transient || Toggles the 'area is transient and may become blocked' flag used by the AI system.
|-
|- id="nav_dont_hide"
| nav_dont_hide || Toggles the 'area is not suitable for hiding spots' flag used by the AI system.
| nav_dont_hide || Toggles the 'area is not suitable for hiding spots' flag used by the AI system.
|-
|- id="nav_stand"
| nav_stand || Toggles the 'stand while hiding' flag used by the AI system.
| nav_stand || Toggles the 'stand while hiding' flag used by the AI system.
|-
|- id="nav_no_hostages"
| nav_no_hostages || Toggles the 'hostages cannot use this area' flag used by the AI system.
| nav_no_hostages || Toggles the 'hostages cannot use this area' flag used by the AI system.
|}
|}
Line 175: Line 177:
|-
|-
! Command !! Description
! Command !! Description
|-
|- id="nav_toggle_place_mode"
| nav_toggle_place_mode || Toggle the editor into and out of place mode. Place mode allows the labelling of nav areas with place names.
| nav_toggle_place_mode || Toggle the editor into and out of place mode. Place mode allows the labelling of nav areas with place names.
|-
|- id="nav_set_place_mode"
| nav_set_place_mode || Sets the editor into or out of place mode. Place mode allows the labelling of nav areas with place names.
| nav_set_place_mode || Sets the editor into or out of place mode. Place mode allows the labelling of nav areas with place names.
|-
|- id="nav_use_place"
| nav_use_place '''<place>''' || If used with no argument, all available places will be listed. If a place argument is given, the ''current place'' is set.
| nav_use_place '''<place>''' || If used with no argument, all available places will be listed. If a place argument is given, the ''current place'' is set.
|-
|- id="nav_place_pick"
| nav_place_pick || Sets the ''current place'' to the place of the area under the cursor.
| nav_place_pick || Sets the ''current place'' to the place of the area under the cursor.
|-
|- id="nav_toggle_place_painting"
| nav_toggle_place_painting || Toggles place painting mode. When place painting, pointing at an area will assign the ''current place'' to it.
| nav_toggle_place_painting || Toggles place painting mode. When place painting, pointing at an area will assign the ''current place'' to it.
|-
|- id="nav_place_floodfill"
| 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.
|-
|- id="nav_place_replace"
|style=white-space:nowrap| nav_place_replace '''<place1> <place2>''' || Assigns the second place name to all areas that currently have the first place name assigned.
|style=white-space:nowrap| nav_place_replace '''<place1> <place2>''' || Assigns the second place name to all areas that currently have the first place name assigned.
|-
|- id="nav_place_list"
| nav_place_list || Lists all place names used in the map.
| nav_place_list || Lists all place names used in the map.
|-
|- id="nav_mark_unnamed"
| nav_mark_unnamed || Mark an area with no place name. Useful for finding stray areas missed when ''place painting''.
| nav_mark_unnamed || Mark an area with no place name. Useful for finding stray areas missed when ''place painting''.
|}
|}
Line 199: Line 201:
|-
|-
! Command !! Description
! Command !! Description
|-
|- id="nav_check_file_consistency"
| nav_check_file_consistency || Scans the maps directory and reports any missing/out-of-date navigation files.
| nav_check_file_consistency || Scans the maps directory and reports any missing/out-of-date navigation files.
|-
|- id="nav_check_connectivity"
| nav_check_connectivity || Reports any areas that aren't connected to every hostage rescue zone and bomb site in the map.
| nav_check_connectivity || Reports any areas that aren't connected to every hostage rescue zone and bomb site in the map.
|-
|- id="nav_update_blocked"
| nav_update_blocked || Updates the blocked/unblocked status for every nav area.
| nav_update_blocked || Updates the blocked/unblocked status for every nav area.
|-
|- id="nav_check_floor"
| nav_check_floor || Updates the blocked/unblocked status for every nav area.
| nav_check_floor || Updates the blocked/unblocked status for every nav area.
|-
|- id="nav_check_stairs"
| nav_check_stairs || Update the nav mesh STAIRS attribute
| nav_check_stairs || Update the nav mesh STAIRS attribute
|-
|- id="nav_fog_print_used"
| 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.
|-
|- id="nav_fog_set"
| 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 || If used without arguments, all available Fog values will be listed. If a Fog argument is given, the current Fog is set.
|-
|- id="nav_fix_playerclips"
| nav_fix_playerclips || Fixup nodes marked with NAV_PLAYERCLIP.
| nav_fix_playerclips || Fixup nodes marked with NAV_PLAYERCLIP.
|-
|- id="nav_remove_unused_jump_areas"
| nav_remove_unused_jump_areas || Removes jump areas with at most 1 connection to a ladder or non-jump area.
| nav_remove_unused_jump_areas || Removes jump areas with at most 1 connection to a ladder or non-jump area.
|-
|- id="nav_strip"
| nav_strip || Strips all Hiding Spots, Approach Points, and Encounter Spots from all Areas in the mesh.
| nav_strip || Strips all Hiding Spots, Approach Points, and Encounter Spots from all Areas in the mesh.
|-
|- id="nav_warp_to_mark"
| nav_warp_to_mark || Warps the player to the marked area.
| nav_warp_to_mark || Warps the player to the marked area.
|-
|- id="nav_ladder_flip"
| nav_ladder_flip || Flips the selected ladder's direction.
| nav_ladder_flip || Flips the selected ladder's direction.
|-
|- id="nav_compress_id"
| nav_compress_id || Re-orders area and ladder ID's so they are continuous.
| nav_compress_id || Re-orders area and ladder ID's so they are continuous.
|-
|- id="nav_show_ladder_bounds"
| nav_show_ladder_bounds || Draws the bounding boxes of all func_ladders in the map.
| nav_show_ladder_bounds || Draws the bounding boxes of all func_ladders in the map.
|-
|- id="nav_build_ladder"
| nav_build_ladder || Attempts to build a nav ladder on the climbable surface under the cursor.
| nav_build_ladder || Attempts to build a nav ladder on the climbable surface under the cursor.
|-
|- id="nav_gui"
| nav_gui || {{Todo|Explain}}
| nav_gui || {{Todo|Explain}}
|-
|- id="nav_trouble_report"
| nav_trouble_report || Returns any problems with navmesh (e.g. Disconnected Ladders, Orphan Navmesh Areas (Disconnected Navmesh areas))
| nav_trouble_report || Returns any problems with navmesh (e.g. Disconnected Ladders, Orphan Navmesh Areas (Disconnected Navmesh areas))
|-
|- id="nav_recompute_flow"
| nav_recompute_flow || {{l4ds}} The director attempts to connect the starting area to the CHECKPOINT attribute or the FINALE attribute by command. If succeeded, this establishes the flow.
| nav_recompute_flow || {{l4ds}} The director attempts to connect the starting area to the CHECKPOINT attribute or the FINALE attribute by command. If succeeded, this establishes the flow.
|-
|- id="nb_delete_all"
| 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.
| 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.
|-
|- id="nb_move_to_cursor"
| nb_move_to_cursor || Commands all NPCs to move to the location of the 3D cursor
| nb_move_to_cursor || Commands all NPCs to move to the location of the 3D cursor
|}
|}
Line 245: Line 247:
|-
|-
! Command !! Description
! Command !! Description
|-
|- id="nav_area_bgcolor"
| nav_area_bgcolor '''<R G B A>''' || RGBA color to draw as the background color for nav areas while editing.
| nav_area_bgcolor '''<R G B A>''' || RGBA color to draw as the background color for nav areas while editing.
|-
|- id="nav_area_max_size"
| nav_area_max_size || Max area size created in nav generation. <br>{{tf2}}{{l4d2}}{{csgo}}Default is set to 50.
| nav_area_max_size || Max area size created in nav generation. <br>{{tf2}}{{l4d2}}{{csgo}}Default is set to 50.
|-
|- id="nav_blockers_can_affect_flow"
| nav_blockers_can_affect_flow || {{l4d2}} Default is set to 1
| nav_blockers_can_affect_flow || {{l4d2}} Default is set to 1
|-
|- id="nav_create_area_at_feet"
| nav_create_area_at_feet || Anchor nav_begin_area Z to editing player's feet. <br>{{l4d2}} Default is set to 0
| nav_create_area_at_feet || Anchor nav_begin_area Z to editing player's feet. <br>{{l4d2}} Default is set to 0
|-
|- id="nav_create_place_on_ground"
| nav_create_place_on_ground '''<[[Boolean]]>''' || If set to 1, nav areas will be placed flush with the ground when created by hand.
| nav_create_place_on_ground '''<[[Boolean]]>''' || If set to 1, nav areas will be placed flush with the ground when created by hand.
|-
|- id="nav_coplanar_slope_limit"
| 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.
| 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.
|-
|- id="nav_coplanar_slope_limit_displacement"
| nav_coplanar_slope_limit_displacement || {{l4d2}} Default is set to 0.7
| nav_coplanar_slope_limit_displacement || {{l4d2}} Default is set to 0.7
|-
|- id="nav_corner_adjust_adjacent"
| 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_corner_adjust_adjacent || Radius used to raise/lower corners in nearby areas when raising/lowering corners. <br>{{l4d2}} Default is set to 18
|-
|- id="nav_debug_blocked"
| nav_debug_blocked || {{l4d2}} Default is set to 0
| nav_debug_blocked || {{l4d2}} Default is set to 0
|-
|- id="nav_debug_finale_area"
| 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_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
|-
|- id="nav_displacement_test"
| nav_displacement_test || Checks for nodes embedded in displacements (useful for in-development maps). <br>{{l4d2}} Default is set to 10000
| nav_displacement_test || Checks for nodes embedded in displacements (useful for in-development maps). <br>{{l4d2}} Default is set to 10000
|-
|- id="nav_draw_limit"
| nav_draw_limit '''<Count>''' || The maximum number of areas to draw in edit mode. <br>{{l4d2}} Default is set to 500
| nav_draw_limit '''<Count>''' || The maximum number of areas to draw in edit mode. <br>{{l4d2}} Default is set to 500
|-
|- id="nav_edit"
| nav_edit '''<[[Boolean]]>''' || Set to one to interactively edit the Navigation Mesh. Set to zero to leave edit mode.
| nav_edit '''<[[Boolean]]>''' || Set to one to interactively edit the Navigation Mesh. Set to zero to leave edit mode.
|-
|- id="nav_generate_fixup_jump_areas"
| nav_generate_fixup_jump_areas || Convert obsolete jump areas into 2-way connections. <br>{{l4d2}} Default is set to 1
| nav_generate_fixup_jump_areas || Convert obsolete jump areas into 2-way connections. <br>{{l4d2}} Default is set to 1
|-
|- id="nav_flood_select_tolerance"
| nav_flood_select_tolerance || Allowable z distance of selectable areas from the start area. <br>{{l4d2}} Default is set to 0
| nav_flood_select_tolerance || Allowable z distance of selectable areas from the start area. <br>{{l4d2}} Default is set to 0
|-
|- id="nav_fog_edit"
| nav_fog_edit || {{l4d2}} Default is set to 0
| nav_fog_edit || {{l4d2}} Default is set to 0
|-
|- id="nav_generate_fencetops"
| nav_generate_fencetops || Autogenerate nav areas on fence and obstacle tops. <br>{{l4d2}} Default is set to 1.
| nav_generate_fencetops || Autogenerate nav areas on fence and obstacle tops. <br>{{l4d2}} Default is set to 1.
|-
|- id="nav_restart_after_analysis"
| 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_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.
|-
|- id="nav_show_approach_points"
| nav_show_approach_points '''<[[Boolean]]>''' || Show Approach Points in the Navigation Mesh.
| nav_show_approach_points '''<[[Boolean]]>''' || Show Approach Points in the Navigation Mesh.
|-
|- id="nav_show_area_info"
| nav_show_area_info '''<Duration>''' || Duration in seconds to show nav area ID and attributes while editing
| nav_show_area_info '''<Duration>''' || Duration in seconds to show nav area ID and attributes while editing
|-
|- id="nav_show_danger"
| nav_show_danger '''<[[Boolean]]>''' || Show current 'danger' levels.
| nav_show_danger '''<[[Boolean]]>''' || Show current 'danger' levels.
|-
|- id="nav_show_player_counts"
| nav_show_player_counts '''<[[Boolean]]>''' || Show current player counts in each area.
| nav_show_player_counts '''<[[Boolean]]>''' || Show current player counts in each area.
|-
|- id="nav_slope_limit"
| nav_slope_limit '''<Z>''' || The ground unit normal's Z component must be greater than this for nav areas to be generated.
| nav_slope_limit '''<Z>''' || The ground unit normal's Z component must be greater than this for nav areas to be generated.
|-
|- id="nav_snap_to_grid"
| nav_snap_to_grid '''<[[Boolean]]>''' || If set to 1, snap to the nav generation grid when creating new nav areas
| nav_snap_to_grid '''<[[Boolean]]>''' || If set to 1, snap to the nav generation grid when creating new nav areas
|-
|- id="nav_split_place_on_ground"
| nav_split_place_on_ground '''<[[Boolean]]>''' || If set to 1, nav areas will be placed flush with the ground when split.
| nav_split_place_on_ground '''<[[Boolean]]>''' || If set to 1, nav areas will be placed flush with the ground when split.
|-
|- id="nav_quicksave"
| nav_quicksave '''<[[Boolean]]>''' || Set to one to skip analyzing encounter spots and sniper spots (red lines).<br>In {{tf2}}{{l4ds}}, always keep this enabled.
| nav_quicksave '''<[[Boolean]]>''' || Set to one to skip analyzing encounter spots and sniper spots (red lines).<br>In {{tf2}}{{l4ds}}, always keep this enabled.
|}
|}

Revision as of 15:46, 11 October 2022

English (en)Esperanto (eo)日本語 (ja)中文 (zh)Translate (Translate)
Nav Mesh

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

Selection commands

Command Description
select_with_attribute Selects/highlights all nav mesh areas marked with one attribute specified.

Editing commands

Command Description

Attribute 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.

Command Description
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.
wipe_nav_attributes Clears all nav attributes on the selected part of the nav mesh.

Place name commands

Command Description

Other commands

Command Description
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 Commands all NPCs to move to the location of the 3D cursor

Additional Console Variables

Command Description

See also

Non-Game Specific

Left 4 Dead Series

Introduction

Resources