Ads keep us online. Without them, we wouldn't exist. We don't have paywalls or sell mods - we never will. But every month we have large bills and running ads is our only way to cover them. Please consider unblocking us. Thank you from GameBanana <3

How to Modify NAV Files

A Tutorial for Counter-Strike 1.6

Members see zero ads. Membership is 100% free

Updates

menu
Minor Update 2y
  • - Re-formatted the tutorial
  • - Added some new minor information and help
  • - Made the tutorial easier to read and follow

Explains how to modify the paths that bot's take to navigate your map

How to Modify NAV Files

Contents

1. Introduction

2. Basics of NAV files

3. Going into edit mode

4. Selecting the areas

5. Functions for editing selected areas
  5. a Creating new areas for bots to navigate in
  5. b Connecting two areas together

6. Naming the NAV areas

7. Conclusion

1. Introduction

I've noticed that far too many maps for CS on Game Banana don't have their own navigation files written for them. It may seem like a minor feature, but it really makes a difference when playing with bots. This is why I've decided I would do a tutorial on modifying NAV files.

Before I start, I want to show you this PDF:

Bot Commands.PDF

It will be your best friend when it comes to editing bot-navigation files, as it includes all the functions needed to edit them, plus how to use them. In this tutorial however, I will go through a step-by-step method of implementing them practically in your map.

Unto the tutorial!

2. Basics of NAV files

So you might be wondering: how the heck do I edit NAV files? I can't see anything to do with bots in Valve Hammer Editor!
Well the fact is, you can't edit them with Hammer. You need to do it in-game (obviously without any players / bots or you'd keep dying when in the middle of modifying).

You've probably noticed that when you play a new map for the first time with bots, you will need to wait a few moments for the game to analyze the map; thus allowing the bots to navigate. This is basically Counter-Strike's method of automatically creating a NAV file.

The issue with this however, is sometimes the "auto-navigation-creator" misses a connection between NAV areas (especially when it comes to big changes in elevation), or doesn't make a very smooth path for the bots to use. This is where you need to take action and edit the NAV file, to improve the flow of your map's game-play.

3. Going into edit mode

So to start editing, open up your Counter-Strike's command console by pressing ~. If you have bots currently playing in your game, type in bot_kick and press Enter to remove them from your map. Then, type in bot_nav_edit 1 and hit Enter again to begin editing. When you leave the console and look around the map, you should see multiple, coloured rectangles all over the floors of your map (See image below):



4. Selecting the areas

The coloured rectangles are where the bots can move around, to reach critical points in the map. Moving your crosshair over a rectangle will turn it yellow. It is now selected. You don't need to click on anything at all. All the other rectangles should be red.

If you would like to keep that rectangle selected, even when not aiming at it, type in the console bot_nav_mark . A high pitched beep will sound, and the rectangle will glow white. Further commands will now affect that rectangle no matter where you are aiming.

5. Functions for editing selected areas

To show you the different functions of navigation meshes, I will be editing the NAV file of a small map I made with Hammer. 



As you can see, the map has a metal over-hanging catwalk. With the default NAV file, there will be no connection between the catwalk and the main floor. With several commands, I will show you how you can create a path which bots may use to navigate onto the catwalk.

5. a Creating new areas for bots to navigate in

In this scenario, I want the bots to jump onto the crates, and then onto the catwalk. To do this, I'll start by adding a new coloured-rectangle on top of the single crate. Follow these steps:

- First climb onto the single crate.

- Then aim down at the lid of the crate and make sure that the little, white 3D-crosshair is sitting on any corner of the top of the lid (if it isn't sitting on the lid then the area won't be created on the crate).

- Now, in the console type bot_nav_begin_area. When you leave the console, you should now see a light-blue rectangle extending from where you had the 3D-crosshair when you typed the command, to where the 3D-crosshair is now:



- When you're happy with size and shape of the rectangle, type in bot_nav_end_area to create a new navigation area.

5. b Connecting two areas together

So now we want to connect our new area on top of the single crate, with an existing area on the floor next to the crate; therefore allowing bots to jump onto the crate. To do this, follow these steps:

- Select the area on top of the crate and type in bot_nav_mark. It will now glow white. 

- Next, aim at the desired area on the floor below (make sure the area is yellow to show it's selected), and type in bot_nav_splice. This command will create another new area, that links the two previous selected areas. 

- You've linked the areas. Great. However bots will still not know how to get onto the crate. They know they can get there, but don't know how to, because the crate is too tall. We must add something to the area that links the crate to the floor, which tells the bot to perform a jump.

- To do this, select the linking area, and type in two commands bot_nav_jump and bot_nav_crouch. The area will now have an X-shape inside it. Bots that navigate through this area will perform a crouch-jump; thus allowing them to jump onto the single crate.

See the image below to get a better idea of this all looks:



Do the same with the next level of crates, and finally splice together the area on the top crate with the catwalk areas. In most cases the default NAV will also include the areas on higher terrain (i.e. the catwalk), so all that is needed is a connection from the crates to the catwalk surface.

You now have a working connection between the floor and the overhang! Watch as your bots navigate with ease onto the top level.

6. Naming the NAV areas

Have you ever noticed that when you're in different parts of an official map, a name appears just below your radar that reads "T Spawn" or "Main Hall"?
A NAV file made by the "auto-navigation-creator" will have no naming of areas featured, so you will have to edit these yourself:

- First, type into the console bot_nav_toggle_place_mode 1. All of your NAV areas will change to red no matter where you aim your crosshair.



- This means that those areas are unnamed, and haven't got a title. To set a title, simply type bot_nav_use_place "Title".
Replace "Title" with the desired place name. Before you go crazy though, there are a set selection of place names to choose from --you can't name the area "BananaRoom" and expect your bots to shout "Banana Room. Clear!".
Check out the link I included at the start of this tutorial for a list of available place-names. 

- Finally, to start giving the areas a place name with your desired "Title", type bot_nav_toggle_place_painting 1. All the areas that you aim at will now turn green and when you walk over them, a title will appear under your radar with the area name.

- To name multiple areas simple, hit  bot_nav_toggle_place_painting 0 to disable place-painting. Then change the place name with bot_nav_use_place "Title". Finally, re-enable place-painting with bot_nav_toggle_place_painting 1.

7. Saving and loading NAV files

Don't forget to save your work! Type bot_nav_save to do this. You should save regularly, as there is no undo command and you can't revert mistakes. You can load NAV files with bot_nav_load.

8. Conclusion

This is all I have for now, in terms of editing bot NAV files. I hope this is useful, and I also hope you mappers out there can start including modified navigation files in your maps! Not only does it improve the flow of game-play with bots, but it also means there's no initial, and often lengthy, analysis of the map by the "auto-navigation-creator".

If you want to find additional information about this topic, check out the link I provided at the start of the tutorial -- it's really helpful!

Here's a final screenie of a bot on top of the catwalk. You now know I'm not bull-sh*tting with this stuff. 



Chao!

-Glockster

Comments

Sign up to access this!
1-10 of 20
1
Pages
  • 1
  • 2
Go to page:
  • woop avatar
    woop Joined 2y ago
    Offline
    access_time 2y
    Thanks.

    Before you begin a nav mesh editing, make sure that you will bind first the commands listed in the PDF. This may help you finish quickly.
    Bananite
    URL to post:
  • Diabolic Lenin avatar
    Diabolic Lenin Joined 9y ago
    Offline
    1,465 points Ranked 21889th
    8 medals 1 rare
    • 6 years a member Medal icon
    • One month a member Medal icon
    • 6 months a member Medal icon
    • 1 year a member Medal icon
    • 2 years a member Medal icon
    • 4 years a member Medal icon
    access_time 2y
    I salute you.
    • You rock x 1
    Periferic Terrorist
    URL to post:
  • Michael Ben David avatar
    Michael Ben David username pic Joined 4y ago
    Seeking Demons.
    Life Tree Flag Affiliation: Life Tree
    4,378 points Ranked 1530th
    26 medals 3 legendary 6 rare
    • 2017 Top Contributor Medal icon
    • 30 submissions featured Medal icon
    • Submitted 30 Models Medal icon
    • 10 submissions featured Medal icon
    • Returned 1000 times Medal icon
    • Reached 50 subscribers Medal icon
    Michael Ben David avatar
    Michael Ben David
    Life Tree Flag
    Affiliation
    Life Tree
    access_time 2y
    anyone knows if the path tool in jack editor works for this? somehow?
    3D Artist Hunger For SUCCESS!!
    URL to post:
  • Ghost1420071 avatar
    Ghost1420071 Joined 4y ago
    Offλine
    1,731 points Ranked 21189th
    22 medals 5 rare
    • Returned 1000 times Medal icon
    • Received thanks 50 times Medal icon
    • GameBanana’s Christmas Giveaway 2017 Day Nine Winner! Medal icon
    • GameBanana’s Christmas Giveaway 2017 Day Fifteen Winner! Medal icon
    • 8-14 Entries! GameBanana’s Christmas Giveaway 2017 Medal icon
    • One month a member Medal icon
    access_time 2y
    It's great to see this still being updated.
    URL to post:
  • Micro-Storm avatar
    Micro-Storm username pic Joined 2y ago
    Paused
    Life Tree Flag Affiliation: Life Tree
    769 points Ranked 42243rd
    17 medals 2 rare
    • Submitted 20 Maps Medal icon
    • Submitted 20 Gamefiles Medal icon
    • Submitted 5 Maps Medal icon
    • Became a Studio Leader Medal icon
    • Thanked 5 submitters Medal icon
    • Submitted 1 Tool Medal icon
    Micro-Storm avatar
    Micro-Storm
    Life Tree Flag
    Affiliation
    Life Tree
    access_time 2y
    I even don't know you made this tutorial. This was totally helpful for them.
    • Thanks x 1
    GPS LOST........ avatar
    Mantra
    GPS LOST........
    URL to post:
  • Seb_Mercenary avatar
    Seb_Mercenary username pic Joined 8y ago
    Offline
    9,021 points Ranked 653rd
    21 medals 3 rare
    • Submitted 20 Gamefiles Medal icon
    • 6 years a member Medal icon
    • Returned 1000 times Medal icon
    • Gamefiler of the Month, January 2014 Medal icon
    • Gamefiler of the Month, March 2014 Medal icon
    • Tutor of the Month, May 2014 Medal icon
    access_time 5y
    What can I do without this tutorial? Without this my 1hp_waterfall map would be unplayable, there weren't any paths in the whole map :) Would rate this again, or x5 times.
    • Win x 1
    • Thanks x 1
    SA scripter / CS mapper avatar
    Mantra
    SA scripter / CS mapper
    URL to post:
  • MossZZ avatar
    MossZZ Joined 5y ago
    Offline
    796 points Ranked 42040th
    access_time 5y
    Once again thanks for Glock18 solved my question about bomb site and hostage.it helps a lot ~~~ :) let`s back to this topic, I checked the NAV of CS_ASSAULT , there is a purple line on the ladder , bots know to climb it with no problem, for my own maps, ladder did not have it . I think it is also need to edit it manually , did anyone know it ? another question, for every corner , there is a short straight line with difference color (blue/green/purple) I think it is a spot for bot to camp ,differences color may stand for the level of importance , is it also can edit by manual ??
    Bananite
    URL to post:
  • Glock18 avatar
    Glock18 username pic Joined 5y ago
    Offline
    2,481 points Ranked 20133rd
    28 medals 1 legendary 3 rare
    • Returned 5000 times Medal icon
    • Returned 1000 times Medal icon
    • Reached 50 subscribers Medal icon
    • Submitted 20 Maps Medal icon
    • Winter Worlds Mapping Contest Entrant Medal icon
    • Journey to the Center of the Earth Entrant Medal icon
    access_time 5y
    I think you cannot have both Bomb sites and Hostage rescue points. If you do the Bot AI will clash and they won't do anything. You might have to remove bomb targets, or hostage rescue zones. If you have problems to do with anything in the mapping section, just PM me and I'll help you out.
    • Agree x 1
    • Helpful x 1
    Need a mapper? PM me!
    URL to post:
  • MossZZ avatar
    MossZZ Joined 5y ago
    Offline
    796 points Ranked 42040th
    access_time 5y
    @Glock18 I am surely I have 2 bomb site and 1 hostage rescue point , I try it by myself , both working ,it is only the BOT don`t go for it. about naming mesh , I think I got it ,thanks for teaching ! by the way, there`s another strange point happening , before , when I playing by CT + CT bot & T bot , T bot will have the bomb (even they not going to plant it)but now , I found T bot do not have bomb ..but if I change my team to T , T team will have bomb without problem ...this problem happened on today .. finally , I got another problem which is related to mapping ,I will ask it on other Thread .
    Bananite
    URL to post:
  • Glock18 avatar
    Glock18 username pic Joined 5y ago
    Offline
    2,481 points Ranked 20133rd
    28 medals 1 legendary 3 rare
    • Returned 5000 times Medal icon
    • Returned 1000 times Medal icon
    • Reached 50 subscribers Medal icon
    • Submitted 20 Maps Medal icon
    • Winter Worlds Mapping Contest Entrant Medal icon
    • Journey to the Center of the Earth Entrant Medal icon
    access_time 5y
    @Moss Bro are you sure you have two bomb site entities in your map? One for A and one for B. If you don't then the bots obviously won't know to plant the bomb. You will also need a hostage rescue entity for bots to rescue hostages. Regarding the place naming, make sure "bot_nav_toggle_place_mode" is set to 1. "bot_nav_use_place _Title_" is just to set the desired placename. In order to actually paint the areas with this placename, you will have to go "bot_nav_toggle_place_painting 1" and aim at desired places to give them that name. Do you understand now mate?
    Need a mapper? PM me!
    URL to post:

Embed

menu
Share banner
Image URL
HTML embed code
BB embed code
Markdown embed code

Credits

Author
Glock18 avatar
Glock18 username pic Joined 5y ago
Offline
2,481 points Ranked 20133rd
28 medals 1 legendary 3 rare
  • Returned 5000 times Medal icon
  • Returned 1000 times Medal icon
  • Reached 50 subscribers Medal icon
  • Submitted 20 Maps Medal icon
  • Winter Worlds Mapping Contest Entrant Medal icon
  • Journey to the Center of the Earth Entrant Medal icon
Author

Submitter

Glock18 avatar
Glock18 username pic Joined 5y ago
Offline
2,481 points Ranked 20133rd
28 medals 1 legendary 3 rare
  • Returned 5000 times Medal icon
  • Returned 1000 times Medal icon
  • Reached 50 subscribers Medal icon
  • Submitted 20 Maps Medal icon
  • Winter Worlds Mapping Contest Entrant Medal icon
  • Journey to the Center of the Earth Entrant Medal icon
Glock18 avatar
Glock18

Creator
Sign up to access this!
Sign up to access this!
Sign up to access this!

Game

Sign up to access this!

Category

Details

Difficulty Level
Beginner

Attributes

Share

  • Share on Reddit
  • Share on Twitter
  • Share on Facebook
  • favorite 10
  • remove_red_eye 15.9k
  • mode_comment 21
  • access_time 5y
  • access_time 2y
  • refresh 2y

More from Submitter

menu

WiPs by Submitter

menu

More Mapping Tutorials

bcp.crwdcntrl.net tracking pixel