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 the 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 video 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 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
==========================
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 CS 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
???
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.
-----------------------
I think this is a good list of what all the commands do. If I realize later I missed something, or they update the CSBot,
the CS NAV Central staff or I will add them as soon as we can.
- This complete tutorial was originally put together by Dead Bwoy and modified/added to by CS NAV Central Staff.
Well, here we go with another tutorial!
If you're unfamilliar with nav tuning for CSBot (for CS:CZ), I suggest you take a quick history lesson and read my tutorial on that.
http://www.turtlerockstudios.com/forums/csbot/viewtopic.php?p=1153#1153
or here: http://conditionzero.filefront.com/file.stuff?body=navtutorial
I'll be starting off with mostly all the changes from CSBot nav tuning to CSSBot nav tuning.
First off, you now must set sv_cheats to 1 before you can create / manually edit your nav.
To execute an auto-nav creation, set:
nav_quicksave 0
nav_generate
* If nav_quicksave is set to 1, the analyzation will be skipped. With it set to 0, a nav_analyze is automatically included in this process.
* I always suggest restarting the map to avoid any errors: changelevel css_mapname
If the auto-navigation creation has errors, you may need to manually tune the nav file. If so, proceed as follows...
For a brand new custom map, you'll need to start off by generating the initial mesh. If the auto generation fails to recognise all the walkable areas, you'll need to create markers around the map on the missed walkable areas. Set nav_edit 1 and use nav_mark_walkable to set seed points for the generation of walkable surfaces.
The automatic generation sometimes misses walkable areas, especially if there's an entity blocking the way. For example, if there is an area surounded by prop_door_rotating's and all the doors are closed, that area will more than likely be missed by the sampling of walkable space. In this case, you'll need to set a walkable space, re-analyze with a quicksave, and make sure the areas are connected through the doors / vents, etc. The auto analyzation also sometimes misses ladders, which will be covered later in the tutorial.
Again, same as with CSBot nav tuning, I suggest setting nav_quicksave 1 before you do any analyzation just to avoid long analyzation times. You must reset this cvar to nav_quicksave 0 before you do a final full analyzation.
After you set your seed points for any missed walkable areas, you're ready to re-generate a mesh for your nav. make sure you've set nav_quicksave to 1 and use nav_generate.
Once you've completed generating your initial mesh, it's time to start using the commands to edit the navigation mesh. It's very helpfull to have a seperate configuration of binds (keyboard layout) for use when fine tuning. For a sample config, see here:
http://www.turtlerockstudios.com/forums/csbot/viewtopic.php?p=2943#2943
Additional commands and cvars are also listed in that thread.
Now switch to your navigation editing config via console:
exec navedit_config.cfg
or whatever you named it. The file must be in your cstrike/cfg folder
To select a nav area, place your crossheirs in the nav area, it should turn yellow, and the surounding connected areas will be red.
To mark a nav area, select it, then enter: nav_mark (in console)
You may notice that some info pops up everytime you select an area... You can adjust the time this info is displayed using this cvar: nav_show_area_info X, where X is in seconds.
To delete a nav area, select it, then enter: nav_delete
To split a nav area, line up the white (split) line with where you want to split the nav area and enter: nav_split
* New to Source:
There is a new cvar for use with this command, nav_split_place_on_ground 0/1. When set to 1, a split area's corners will be placed on the ground. When set to 0, the corners will not be placed on the ground.
nav_split_place_on_ground 0/1
- If true (1), nav areas will be placed flush with the ground when split.
To merge two nav areas (you can only merge two areas with the same width), mark one of the navs you want to merge, then select the other one. Enter: nav_merge. A new, single nav area will be created from the marked area and the one you selected to merge.
To connect two nav areas, mark the nav area the bot will move from, then select the nav area the bot will mave to. enter: nav_connect
(NOTE: this is only a one way connection. To make it bi-directional, you must connect the nav areas bi-directionally to that nav area. A one way connection is a dark blue line and a bi-directional connection is labeled with a light blue line. A bi-directional connection may have two dark blue lines instead of a light blue line.)
To disconnect a nav area, mark the nav area you want to disconnect, select the nav area you want to disconnect it from, enter: nav_disconnect. This disconnects the two areas from each other, bi-directionally.
To create a new nav area, aim your crossheirs at the starting point for the nav, weather it be a walkable surface or a ladder, and enter: nav_begin_area. Stretch out the square until the nav area is the size you want it to be, enter: nav_end_area
This command has a few new uses in the new Source engine!
You can now create undetected ladder areas! You must point your crossheirs at the surface of the ladder so that your pointer turns green. Then this will allow you to create a vertical ladder area!
Quote:
from: http://www.turtlerockstudios.com/forums/csbot/viewtopic.php?t=712
Three major changes with nav ladders:
1) You can manually build them using the nav_begin_area and nav_end_area commands, provided your cursor is pointing at a ladder (it will turn green) when you invoke the nav_begin_area.
2) If you split areas attached to a ladder, they will lose their ladder connections. Make sure you re-attach them
3) You can connect nav ladders in exactly the same way you do with normal nav areas (nav_connect and nav_disconnect), allowing for one-way ladders and one-sided ladders.
Once you've got the basics figured out, you can start labeling the areas for certain actions, ie: jumping, crouching, and running...
here's a list of the labels and what they do:
nav_avoid
- Toggles the 'avoid this area when possible' flag used by the AI system.
nav_crouch
- Toggles the 'must crouch in this area' flag used by the AI system.
nav_dont_hide
- Toggles the 'area is not suitanav mesheslabelingble for hiding spots' 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 '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_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_transient
- Toggles the 'area is transient and may become blocked' flag used by the AI system.
If an area is marked nav_transient then at round start a check is run to see if this area is blocked or not. If blocked then it is regarded as blocked for the entire round and bots won't use it. It's really for maps with variable doors.
nav_walk
- Toggles the 'traverse this area by walking' flag used by the AI system.
Continued in part 4...
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
nav_edit 1
mp_timelimit 0
bot_zombie 1
mp_autoteambalance 0
bot_join_after_player 0
nav_show_area_info 5
bind "UPARROW" "nav_jump"
bind "DOWNARROW" "nav_crouch"
bind "LEFTARROW" "nav_no_jump"
bind "RIGHTARROW" "nav_precise"
bind "i" "bot_goto_mark"
bind "k" "nav_split"
bind "-" "nav_merge"
bind "INS" "nav_splice"
bind "*" "nav_connect"
bind "l" "nav_disconnect"
bind "DEL" "nav_delete"
bind "HOME" "nav_begin_area"
bind "END" "nav_end_area"
bind "ENTER" "nav_mark"
bind "BACKSPACE" "nav_unmark"
bind "[" "nav_mark_walkable"
bind "]" "nav_check_connectivity"
bind "/" "mat_fullbright 1"
bind "\" "+jump"
bind "t" "nav_toggle_place_mode"
bind "p" "nav_toggle_place_painting"
bind "f" "nav_place_floodfillcurrent"
bind "KP_MINUS" "nav_corner_lower"
bind "KP_PLUS" "nav_corner_raise"
bind "KP_UPARROW" "nav_corner_raise;nav_corner_raise;nav_corner_raise;nav_corner_raise;nav_corner_raise"
bind "KP_DOWNARROW" "nav_corner_lower;nav_corner_lower;nav_corner_lower;nav_corner_lower;nav_corner_lower"
bind "KP_ENTER" "nav_corner_select"
bind "KP_INS" "nav_snap_to_grid 1;say SNAP TO GRID On"
bind "KP_DEL" "nav_snap_to_grid 0;say SNAP TO GRID Off"
bind "KP_HOME" "nav_build_ladder"
bind "KP_END" "nav_compress_id"
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"
bind "h" "nav_dont_hide"
bind "r" "nav_run"
bind "u" "nav_stand"
bind "y" "nav_walk"
bind "e" "+use"
bind "q" "nav_corner_place_on_ground"
bind "z" "nav_create_place_on_ground 0"
bind "x" "nav_create_place_on_ground 1"
bind "c" "nav_no_hostages"
bind "F10" "nav_save;say NAV Saved"
bind "F9" "nav_load;say NAV Loaded"
bind "F11" "exec edit;say NAV EDIT On"
bind "F12" "exec play;say NAV EDIT Off"
bind "F4" "nav_quicksave 1;nav_generate"
bind "F6" "nav_quicksave 1;nav_generate_incremental"
bind "F7" "nav_quicksave 1;nav_analyze"
bind "F8" "nav_quicksave 0;nav_analyze"
[end of my edit cfg]
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
--------------------------------------------------------------------------------
Load your map, and open console type - exec nav_config.cfg Then go out of console and hit "m"
This will auto-generate a nav file for your map, this will work great in most cases, but sometimes makes an error. That’s where the rest of the commands i explained together with the cfg comes into play.
NB: Remember to place hostages at least 16 units off the ground or they will be stuck as well as spawnpoint
Editing Nav Files
By Mxthe
After that, you can now edit your file, but you may not know how, that is what im going to explain.
To start, make a simple map with an light_environement
Then compile, and in the console write Bot_add instead of nav_generate, sometimes I dont know why, when you write nav_generate it goes pretty wrong
Then you see the bots, but with the stairs they wont walk!!The stairs sometimes, rarely, but sometimes doesnt work with the bots.
So go in the console and write Nav_edit 1
Then you see lines where you aim at, theses are the nav areas, there is no areas on the stairs,
Point your crosshair where you want to start the area and write nav_begin_area
Then you will see a rectangular blue line wich moves with your crosshair
Move it to the end of the area you want
And type nav_end_Area
And you see, the area has correctly been apply to the stairs, it can be any form, it will always apply right, or if it doesnt, point the nav area with your crosshair, and type nav_delete.
Then we might wanna do sniper spots
Point the begining of the sniper spot and write same, nav_begin_area
If you do it wrong, type nav_delete
When its done
Point your area, and type nav_make_sniper_spots [
and you see your sniper spot has been divided in 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!
So you now know the basic!But with a litle intelligence you can figure out the rest, like hide an area from another or make ladders and stuff, it has very much possibilities, hope you understood!
No vtf for this tut, because it must be done INGAME!
Retrieved from "http://www.hl2world.com/wiki/index.php/Nav_Files"
Categories: MappingTutorials | MapTutIntro
Added: 1 year ago Views: 5,706
Counter Strike Source Bot command
Commands
Mesh Generation
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.
Other Commands
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_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_mark_unnamed
Mark an Area with no Place name. Useful for finding stray areas missed when Place Painting.
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.
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_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_draw_limit count
The maximum number of areas to draw in edit mode
nav_edit (0 or 1)
Set to one to interactively edit the Navigation Mesh. Set to zero to leave 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.
nav_slope_limit Z
The ground unit normal's Z component unfamiliarmust 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 corecognizesurroundednsuming phases of the analysis. Useful for data collection and testing.
[explain; what the different messeparateh 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]
cross heirssurroundingevery timenavsenvironmentwhichdoesn'tbeginning |