How do you make it automatically render nav generate?

HT.SFM (Steam)

L1: Registered
Aug 29, 2015
15
0
Hi, as part of this years 2015 Halloween event I have made a map which has a feature that spawns in a random Boss from a previous Halloween event. I have a total of 4 different npc types that can spawn in this map (Skeleton, Skeleton King, Monoculus, Headless_Horseman). The Npc's function as they should when I render the map EXCEPT that I have to render a nav_generate file in console to allow them to function in the map. I hope to release this map to the workshop at some time this weekend, however I am unaware of how I could include a entity that would put a nav file inside the bsp so people don't need to download a extra nav file to play the map. I have looked at previous Halloween maps in the game and they don't come with a nav file the same as the one that you can get in console. They only support the Halloween Boss or Skeletons that are in the map (same thing with mvm but with the robots). I am looking in the map for possible entities that sound like nav generate files but it is not clear which one to use...
logic_navigation and tf_point_nav_interface.
Before anyone asks, I cannot find a "boss_nav" related entity so yeah.....
Anyway so if anyone knows how to make it so that a nav generate like file can be included then please say.
 

worMatty

Repacking Evangelist
aa
Jul 22, 2014
1,258
999
Hi, there!

As you know, a nav mesh must be generated for a map before an NPC can navigate it. This function is performed by the game engine. There is no way I know of to have a server automatically generate a nav mesh if one does not exist. I believe that functionality would fall to a server addon. In my experience, though, that functionality is not something that is typically desired by a server operator.

You can pack a nav mesh that you generate in to the BSP, as you would with your custom assets such as script files, models and materials. When you distribute your BSP through traditional channels, the nav mesh will be mounted by the server when the map is loaded and NPCs will be able to navigate. I have heard that, if a server operator generates his own nav mesh for a BSP that has its own packed in, it can cause the server to crash, but I haven't tested it. But again, it's unlikely a server operator would generate their own nav mesh as a matter of course.

Unfortunately, nav meshes in Workshop maps are not currently supported. It is a problem for MvM map authors. The only solution is to mention the requirement to generate a nav mesh in your Workshop map's description. I expect the problem will be fixed in future so keep an eye out.
 

HT.SFM (Steam)

L1: Registered
Aug 29, 2015
15
0
Hi, there!

As you know, a nav mesh must be generated for a map before an NPC can navigate it. This function is performed by the game engine. There is no way I know of to have a server automatically generate a nav mesh if one does not exist. I believe that functionality would fall to a server addon. In my experience, though, that functionality is not something that is typically desired by a server operator.

You can pack a nav mesh that you generate in to the BSP, as you would with your custom assets such as script files, models and materials. When you distribute your BSP through traditional channels, the nav mesh will be mounted by the server when the map is loaded and NPCs will be able to navigate. I have heard that, if a server operator generates his own nav mesh for a BSP that has its own packed in, it can cause the server to crash, but I haven't tested it. But again, it's unlikely a server operator would generate their own nav mesh as a matter of course.

Unfortunately, nav meshes in Workshop maps are not currently supported. It is a problem for MvM map authors. The only solution is to mention the requirement to generate a nav mesh in your Workshop map's description. I expect the problem will be fixed in future so keep an eye out.
I have found a video since that might work. If I create a .nav file after the map is rendered and put int the bsp it might work.
 

UKCS-Alias

Mann vs Machine... or... Mapper vs Meta?
aa
Sep 8, 2008
1,264
816
Not when on the workshop. Currently on the workshop you have to provide a seperate zip file to be sure it works. So best is to keep it outside of the map for now.
 

henke37

aa
Sep 23, 2011
2,075
515
Remember that nav_generate is only a start. You should check the nav mesh yourself, looking for mistakes. I find that nav_generate in particular has problems with high drops.