How do you make it automatically render nav generate?

Discussion in 'Mapping Questions & Discussion' started by HT.SFM (Steam), Oct 6, 2015.

  1. HT.SFM (Steam)

    HT.SFM (Steam) L1: Registered

    Messages:
    15
    Positive Ratings:
    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.
     
  2. worMatty

    aa worMatty Repacking Evangelist

    Messages:
    1,072
    Positive Ratings:
    834
    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.
     
    • Thanks Thanks x 1
  3. HT.SFM (Steam)

    HT.SFM (Steam) L1: Registered

    Messages:
    15
    Positive Ratings:
    0
    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.
     
  4. UKCS-Alias

    aa UKCS-Alias Mann vs Machine... or... Mapper vs Meta?

    Messages:
    1,264
    Positive Ratings:
    748
    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.
     
    • Thanks Thanks x 1
  5. henke37

    aa henke37

    Messages:
    1,890
    Positive Ratings:
    443
    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.
     
    • Thanks Thanks x 1