Before you begin naving here are some things to do
I would like to thank everyone from whom most of this information was garnered. My only regret is that when I was putting all this info together it was only for me saved on a big text file and the names of some of authors were not copied. This info was originally on public forums so if I don't give all the names credit, I do at least one thing the authors intended, which is putting this info back out for the general publics use.
I would like to thank the good folks at csnavcentral.com[link] They are the nav gurus as far back as Condition Zero. Most of my information comes from their forum via Valve and Turtle rock studios.
This is a work in progress so don't expect any coherence until it is completed along with the videos that it is meant to enhance.
do not try editing navigation files from a public server.
Use a listen server or your computer.
To start, from the console [how to turn on the console] type; sv_cheats 1 and then type; nav_edit 1 . To turn the editor off reverse this process, type; nav_edit 0 and then type; sv_cheats 0 ...
Each of the following Nav_ commands operate on the navigation mesh, allowing hand-tuning of the automatically learned data. It is recommended that these commands be bound to keys for ease of use while editing.
CAUTION: There is no "undo" operation. Save your navigation mesh often.
Part 1: Navigation Editing
========================== {in the works an illustrated nav_edit list}
sv_cheats 0 / 1
Must be set to 1 to enable navigation tuning.
nav_quicksave 0/1
Set to 1 to skip the time consuming phases of the analysis. Useful for data collection and testing.
WARNING: Must be set to 0 for final nav_analyze
nav_generate
Generate a Navigation Mesh for the current map and save it to disk.
nav_analyze
Re-analyze the current Navigation Mesh and save it to disk.
nav_edit 0/1
Set to 1 to interactively edit the Navigation Mesh. Set to 0 to leave edit mode.
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_load
Loads the Navigation Mesh for the current map.
nav_save
Saves the current Navigation Mesh to disk.
NOTE: Recommend saving often. Just in case editing causes CSS to crash.
nav_mark
Marks the Area under the cursor for manipulation by subsequent editing commands.
nav_corner_lower
Lower the selected corner of the currently marked Area.
nav_corner_raise
Raise the selected corner of the currently marked Area.
nav_corner_select
Select a corner of the currently marked Area. Use multiple times to access all four corners.
nav_begin_area
Defines a corner of a new Area. To complete the Area, 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 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_crouch
Toggles the 'must crouch in this area' flag used by the AI system.
nav_delete
Deletes the currently highlighted Area.
WARNING: Do not delete a nav area a bot is standing on, or the system will crash!
nav_jump
Toggles the 'traverse this area by jumping' flag used by the AI system.
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_no_jump
Toggles the 'dont jump in this area' flag used by the AI system.
nav_precise
Toggles the 'dont avoid obstacles' flag used by the AI system.
nav_show_approach_points
Show Approach Points in the Navigation Mesh.
nav_show_danger
Show current 'danger' levels.
nav_splice
To splice, mark an area, highlight a second area, then invoke the splice command to create a new, connected area between them.
WARNING: Improper use of the 'splice' tool can cause degenerate nav meshes
nav_split
To split an Area into two, align the split line using your cursor and invoke the split command.
WARNING: Do not split a nav area a bot is standing on, or the system will crash!
nav_strip
Strips all Hiding Spots, Approach Points, and Encounter Spots from the current Area.
Part 2: Navigation Bot Controls
==============================
bot_crouch: 0/1
Label a marked nav area as a forced crouching point.
bot_debug: 0/1
Used for debugging info of bot behavior.
bot_freeze: 0/1
Used to freeze all bots; 1 is on, 0 is off.
bot_goto_mark
Sends a bot to the selected nav area (for editing nav meshes)
bot_show_nav: 0/1
Shows the bot's nav mesh.
bot_stop: 0/1
Same as bot_freeze?
bot_traceview: 0/1
See the bot's field of view while navigating a map.
bot_traceview_extended: 0/1
New command...
bot_walk: 0/1
Force the bots to walk.
bot_zombie: 0/1
Used for playtesting navmeshes. Turns of the AI so you can move the bot manually
Part 3: Place Painting
=======================
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_painting
Toggles Place Painting mode. When Place Painting, pointing at an Area will 'paint' it with the current Place.
nav_place_floodfill
Sets the Place of the Area under the cursor to the curent 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_use_place
If used without arguments, all available Places will be listed. If a Place argument is given, the current Place is set.
nav_mark_unnamed
Mark an Area with no Place name. Useful for finding stray areas missed when Place Painting.
Part 4: New Navigation Editing cvars
==========================
nav_area_bgcolor
RGBA color to draw as the background color for nav areas while editing.
nav_check_floor
Updates the blocked/unblocked status for every nav area.
nav_clear_walkable_marks
Erase any previously placed walkable positions.
nav_compress_id
Re-orders area and ladder ID's so they are continuous.
nav_coplanar_slope_limit
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_corner_place_on_ground
Places the selected corner of the currently marked Area on the ground.
nav_ladder_flip
Flips the selected ladder's direction.
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_show_area_info
Duration in seconds to show nav area ID and attributes while editing
nav_slope_limit
The ground unit normal's Z component must be greater than this for nav areas to be generated.
nav_snap_to_grid
Snap to the nav generation grid when creating new nav areas
nav_split_place_on_ground
If true, nav areas will be placed flush with the ground when split.
nav_transient
Toggles the 'area is transient and may become blocked' flag used by the AI system.
nav_update_blocked
Updates the blocked/unblocked status for every nav area.
Part 5: New Navigation Bot Controls
==========================
nav_avoid
Toggles the 'avoid this area when possible' 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_run
Toggles the 'traverse this area by running' flag used by the AI system.
nav_stand
Toggles the 'stand while hiding' flag used by the AI system.
nav_warp_to_mark
Warps the player to the marked area.
-----------------------
nav_save
- (saves your work) A final save must have a completed nav_analyze using nav_quicksave 0.
*** You can save a nav's place painting without having to re-analyze the map.
nav_load
- Reverts changes since last save
- Upon completion of nav editing a map's nav file, enter in console: nav_quicksave 0;nav_analyze
- This command processes what you have done so far and adds all the danger, camping, encounter, hiding, & sniping spots (etc.) to your .nav.
*** Be sure to re-analyze after any changes are made to the nav areas to avoid errors.
*** Always restart or reload the map after analyzing a map to avoid any crashes that may occur using changelevel css_mapname.
{this is the edit config I use}[when I press F11 it comes on F12 shuts off edit cfg and switches back to my play cfg]
sv_cheats 1 /must be on 1 to go to nav_edit
nav_edit 1 /turn on navigation editor
mp_timelimit 0 / so map doesn't change while editing
bot_zombie 1 / for docile T or CT to send around map for testing
mp_autoteambalance 0 /for testing
bot_join_after_player 0 /no bots while you edit
nav_show_area_info 5 /shows area info for 5 seconds
bind "UPARROW" "nav_jump" /toggles 'traverse area by jumping' flag
bind "DOWNARROW" "nav_crouch" /toggles 'must crouch in area' flag
bind "LEFTARROW" "nav_no_jump" /toggles 'dont jump in area' flag
bind "RIGHTARROW" "nav_precise" /toggles 'dont avoid obstacles' flag
bind "i" "bot_goto_mark" /for testing nav mesh
bind "k" "nav_split" /splits the white line under the curser in two
bind "-" "nav_merge" / make 2 same sized areas into one
bind "INS" "nav_splice" / splices one area to another
bind "*" "nav_connect" /use to connect ajacent marked area
bind "l" "nav_disconnect" / disconnects ajacent areas
bind "DEL" "nav_delete" /deletes highlighted area
bind "HOME" "nav_begin_area" /first half of make area command
bind "END" "nav_end_area" /second half of make area command
bind "ENTER" "nav_mark" /marks area for subsequent editing
bind "BACKSPACE" "nav_unmark" /unmarks area
bind "[" "nav_mark_walkable" /use to seed a map then when done F6
bind "]" "nav_check_connectivity" /use sparinly has issues
bind "/" "mat_fullbright 1" /turns dark area to day time light
bind "\" "+jump" /check for jump hight
bind "spacebar" "crouch+jump" /check for crouchjump command
bind "t" "nav_toggle_place_mode" /turn on / off ability to place-paint
bind "p" "nav_toggle_place_painting" /on/off name place under crosshair
bind "f" "nav_place_floodfill"
bind "KP_MINUS" "nav_corner_lower"/use after corner is selected
bind "KP_PLUS" "nav_corner_raise" /use after corner is selected
bind "KP_UPARROW" "nav_corner_raise;nav_corner_raise;nav_corner_raise;nav_corner_raise;nav_corner_raise" /mark then raise entire area
bind "KP_DOWNARROW" "nav_corner_lower;nav_corner_lower;nav_corner_lower;nav_corner_lower;nav_corner_lower" /mark then lower entire area
bind "KP_ENTER" "nav_corner_select" /slects corner for subseqent editing
bind "KP_INS" "nav_snap_to_grid 1;say SNAP TO GRID On" /I don't use
bind "KP_DEL" "nav_snap_to_grid 0;say SNAP TO GRID Off" /I don't use
bind "KP_HOME" "nav_build_ladder" /makes ladder if crosshair is green
bind "KP_END" "nav_compress_id" /reorders map areas & ladders
bind "9" "nav_restart_after_analysis 1;say RESTART AFTER ANALYSIS On"
bind "0" "nav_restart_after_analysis 0;say RESTART AFTER ANALYSIS Off"
bind "n" "nav_place_pick"
bind "b" "nav_avoid" /toggles 'avoid if possible' flag for AI
bind "h" "nav_dont_hide" /toggles 'area not siutable for hiding' AI flag
bind "r" "nav_run" /toggles 'traverse area by running' flag for AI
bind "u" "nav_stand" /toggles 'stand while hiding' flag for AI
bind "y" "nav_walk" /toggles 'traverse area by walking' flag for AI
bind "e" "+use" /use key same as in game
bind "q" "nav_corner_place_on_ground" / to flaten mesh angeled up
bind "z" "nav_create_place_on_ground 0" /I don't use this
bind "x" "nav_create_place_on_ground 1" /I don't use this
bind "c" "nav_no_hostages" /toggles 'hostages cant use this area' flag
bind "F10" "nav_save;say NAV Saved" /use often
bind "F9" "nav_load;say NAV Loaded" / i don't use this
bind "F11" "exec edit;say NAV EDIT On" / to switch to edit mode
bind "F12" "exec play;say NAV EDIT Off" / to switch back to play config
bind "F4" "nav_quicksave 1;nav_generate" /i dont use this
bind "F6" "nav_quicksave 1;nav_generate_incremental" /seedmap use this
bind "F7" "nav_quicksave 1;nav_analyze" /i don't use this
bind "F8" "nav_quicksave 0;nav_analyze" /use when done final command
[end of my edit cfg]
Here are some other bind options I found. I never tried any of these, but here they are incase you may want to try them..
Nav_edit "1"
bind y nav_mark_walkable //Before auto-generating, this makes sure the spot will be walkable
bind o nav_quicksave 0 //Turn quicksave off
bind p nav_quicksave 1 //Turn quicksave on
bind f9 nav_generate //Creates the initial navigation file for editing (may take a long time)
bind mouse1 nav_begin_area //Click to start defining a new nav area
bind mouse2 nav_end_area //Click to finish creation of new nav area
bind mouse3 nav_delete //Click to delete a nav area
bind m nav_mark //Mark or unmark a nav area (use with other commands below)
bind v nav_split //Splits a nav area at the white line in your line of sight
bind b nav_merge //Merges a marked nav area with the one in your line of sight
bind n nav_splice //Splices a marked nav area with the one in your line of sight
bind 1 nav_avoid //These number keys set or unset areas for bot activities
bind 2 nav_crouch
bind 3 nav_dont_hide
bind 4 nav_jump
bind 5 nav_no_jump
bind 6 nav_precise
bind 7 nav_run
bind 8 nav_stand
bind 9 nav_transient
bind 0 nav_walk
bind e nav_corner_select //Toggle selection of nav area corner in marked area
bind r nav_corner_raise //Raises selected nav area corner
bind l nav_corner_lower //Lowers selected nav area corner
bind c nav_connect //Connects a marked nav area with the one in your line of sight
bind x nav_disconnect //Disconnects a marked nav area fromthe one in your line of sight
bind f6 nav_save //Saves nav file
bind f7 nav_analyze //Necessary as a final step
bind g nav_toggle_place_painting //It is not practical to bind all the possible placenames;
//You'll have to type the individual command
Nav_edit "1"
nav_toggle_place_painting
bind mouse1 nav_begin_area //Begin dragging a new nav area
bind mouse2 nav_end_area //Creates the dragged area
bind mouse3 nav_delete //Deletes an Area
bind v nav_split //Splits the nav area you are looking at, at the white line
bind c nav_merge //Select a nav area using e (nav_mark) and highlight another
//(looking) then hit this key to merge them together
//bind 3 nav_crouch //Used for bots
//bind 3 nav_jump //Used for bots
//bind 1 nav_mark_walkable
//bind 2 nav_clear_walkable_marks
bind e nav_mark //Selects a nav area
bind t nav_corner_select //Selects corner on the selected nav area, press to toggle
bind f nav_corner_lower //lowers selected corner
bind r nav_corner_raise //raises selected corner
bind m nav_generate //AutoGenerate Nav file, you have to do this first and then
//edit apparently, else it crashes when you try to make a
//nav area
bind x nav_disconnect //When a nav area is selected look "highlight" another and
//press this key to disconnect the two
bind z nav_connect //When a nav area is selected look "highlight" another and
//press this key to connect the two
bind f6 nav_save //Saves Nav file
--------------------------------------------------------------------------------
Remember to place hostages at least 16 units off the ground or they will be stuck as well as spawnpoint
====================================
Point to your area, and type nav_make_sniper_spots and you see your sniper spot has been divided into a lot of litle areas
Then you write nav_save to save the changes, dont forget that or you might lose your work!
And type nav_edit 0 to go back in normal game Then have fun!
=======================================================
Other Commands
nav_check_file_consistency
Scans the maps directory and reports any missing/out-of-date navigation files. [has errors]
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_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. [has errors]
nav_show_ladder_bounds
Draws the bounding boxes of all func_ladders in the map.
==================================================
Console Variables
nav_area_bgcolor R G B A
RGBA color to draw as the background color for nav areas while editing.
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_draw_limit count
The maximum number of areas to draw in edit mode
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.[moot, you nav without players]
nav_slope_limit Z
The ground unit normal's Z component unfamiliar 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
[explain; what the different mesh separate elements mean ==link to nav_commands
link to , =valve nav tutorial, =link to wikipeidea link to=my videos
use a config-discus = insert example , edit.config===play.config]
|