I reported a bug to Valve about workshop maps not getting their nav files loaded, when the map file is used directly on a gameserver by loading it through workshop or when a player loads the map up with "map workshop/mapworkshopIDhere".
So that the players should not need to copy it from the workshop location manually to their tf/maps directory, to test out with bots and so that the files work on a gameserver too through workshop - there is a better way.
I received a reply on the bug. It's not a bug, it's a new feature. Valve has somewhat recently added a thing within the engine, which allows nav files to be loaded by any method available. Instead of packing your maps navigation file (nav) as mapname.nav, you should name it as embed.nav.
This makes them map-name agnostic and doesn't matter if the map is loaded by any means, from server, from console, from workshop, it will always work regardless.
Doesn't this cause issues with multiple map navs named the same you ask? No, if you do it correctly. You do not need to manually to rename your maps nav as embed.nav. Just keep it as mapname.nav (for example pl_millstone_ugc_5.nav) along with your map.bsp (example pl_millstone_ugc_5.bsp).
How to pack your nav file easily:
Create file called nav.bat into your maps directory. This can be with any name so name it as you like so you can always find it when you need it. Put this content inside of it:
To make this more clear, here's a working example:
So edit the file to your needs whenever you need it. You can simply change the ending of the .bat file to .txt to edit it, add your proper map name in, save the file and rename back to .bat. If you dont see file endings, you need to change your windows folder settings to display those.
To pack nav in with the bat, just doubleclick that file to pack in your nav file as embed nav. The bat file will open your bsp, pack in the nav as embed.nav into maps directory and save the file. Just hit enter after a while and you are done.
How to pack your map files as harder way:
All community compilers should be updated to use this method so if you know a developer, hint them about this. If i speculate a bit, i think this embed.nav was not made without future use so better to start use it sooner or later.
Otherwise if you do not use this method and upload map to the workshop with packing it the old way and some servers run it directly from workshop, nav fails to work and bots wont move. This is an issue for any map but bigger issue for halloween maps where bosses require nav files to work.
I have this fix live and tested on the example map, pl_millstone_ugc_5 on workshop.
Thanks to both Eric & Jill for this information. I thought i'd share this here too.
So that the players should not need to copy it from the workshop location manually to their tf/maps directory, to test out with bots and so that the files work on a gameserver too through workshop - there is a better way.
I received a reply on the bug. It's not a bug, it's a new feature. Valve has somewhat recently added a thing within the engine, which allows nav files to be loaded by any method available. Instead of packing your maps navigation file (nav) as mapname.nav, you should name it as embed.nav.
This makes them map-name agnostic and doesn't matter if the map is loaded by any means, from server, from console, from workshop, it will always work regardless.
Doesn't this cause issues with multiple map navs named the same you ask? No, if you do it correctly. You do not need to manually to rename your maps nav as embed.nav. Just keep it as mapname.nav (for example pl_millstone_ugc_5.nav) along with your map.bsp (example pl_millstone_ugc_5.bsp).
How to pack your nav file easily:
Create file called nav.bat into your maps directory. This can be with any name so name it as you like so you can always find it when you need it. Put this content inside of it:
"..\..\bin\bspzip" -add filemapname.bsp maps\embed.nav mapname.nav mapname.bsp
@pause
To make this more clear, here's a working example:
"..\..\bin\bspzip" -addfile pl_millstone_ugc_5.bsp maps\embed.nav pl_millstone_ugc_5.nav pl_millstone_ugc_5.bsp
@pause
So edit the file to your needs whenever you need it. You can simply change the ending of the .bat file to .txt to edit it, add your proper map name in, save the file and rename back to .bat. If you dont see file endings, you need to change your windows folder settings to display those.
To pack nav in with the bat, just doubleclick that file to pack in your nav file as embed nav. The bat file will open your bsp, pack in the nav as embed.nav into maps directory and save the file. Just hit enter after a while and you are done.
How to pack your map files as harder way:
The syntax is:
"-addfile <input map> <embedded name> <file to embed> <output map>".
So, assuming your map is "cp_mymap.bsp" and your nav file is
"cp_mymap.nav", both in tf\maps, this command would pack your nav file
into the map as "embed.nav", and save the result as "cp_mymap_withnav.bsp":
bin\bspzip.exe -game tf -addfile tf\maps\cp_mymap.bsp embed.nav
tf\maps\cp_mymap.nav tf\maps\cp_mymap_withnav.bsp
All community compilers should be updated to use this method so if you know a developer, hint them about this. If i speculate a bit, i think this embed.nav was not made without future use so better to start use it sooner or later.
Otherwise if you do not use this method and upload map to the workshop with packing it the old way and some servers run it directly from workshop, nav fails to work and bots wont move. This is an issue for any map but bigger issue for halloween maps where bosses require nav files to work.
I have this fix live and tested on the example map, pl_millstone_ugc_5 on workshop.
Thanks to both Eric & Jill for this information. I thought i'd share this here too.