Talk:Nav Mesh

From Valve Developer Community
Revision as of 03:28, 22 July 2021 by Orinuse (talk | contribs) (tf_show_X cvars)
Jump to: navigation, search

ZBOT WITH ALL NAV COMMANDS?

It would be great if someone could write here a Link to DOWNLOAD de ZBOT with FULL commands for Nav Editing. The one I have, doesn't have all the commands, and for example the one of nav_corner is not available and I really need it to add some interesting jumps.




Mike, I notice there are alot of commands, I'm assuming you have special binds? If you do, can you share them? -- ^Ben

---

This is a good source: http://www.turtlerockstudios.com/forums/csbot/viewtopic.php?t=725 -- Mark WiseCarver

This is starting to get a little big, how about making it a category with sub-articles? --TomEdwards 15:05, 30 Jun 2005 (PDT)

Agreed. How do I do that? -Mike

Go to category:Whatever and hit edit to add a description. Then add [[Category:Whatever]] to every article you split this page into and they will be added to it automagically. --TomEdwards 23:47, 30 Jun 2005 (PDT)

I would prefer to have it on one page. This is a task you would do all at once, so it's nice to have it all together. One window for this and the other for the game, since there's so much to remember, I think it's easier to have in one window. Perhaps we can reorganize is some so it is more intuitive, and also make it more concise. --Mungo

I take some of that back. I think the console commands section and the place names section could be their own articles, but I still would like the instructional part to stay together here. It doesn't really need its own category though, for just a couple of articles. -Mungo

I separated out the console commands into their own article so this page isn't so long. Hope no one minds. -mungo

Adding place names to your map

I've seen a lot mentioned about how to add place names using the in game navigation tool, but no mention on how to create a list of place names that you are able to use. Can this be done through Hammer? Thanks. --Evshell18 02:05, 24 Sep 2005 (PDT)

Nevermind, I didn't realize that you couldn't put your own custom place names in, and that you just have to call nav_place_use to see what names are available. --Evshell18 02:11, 26 Sep 2005 (PDT)

Left 4 Dead Meshes

I feel tempted to create a page relating to how Left 4 Dead meshes work in relation to marking; for instance marking an area "obscure" increases the amount of infected in that area, as well as spawning infected there rather crudely. On the flip side marking an area "empty" results in no infected spawning there. Would it be appropriate to add this information to this article (as there really isn't THAT much info, and the rest doesn't differ from the CSS mesh much) or create a new one? ~ Alfonzo 15 March 2009

Writing/Modifying AI to use Nav mesh

Has anyone ever done this? The nav mesh stuff is included in the sdk, and is the default system in an sdk template mod, but the default bots are only designed to run and pic random directions. Has anyone written / found ai navigation code for this method? --Welsh Mullet 22:11, 17 March 2011 (UTC)

Don't the CSS bots use the navigation mesh? Thelonesoldier 22:43, 17 March 2011 (UTC)
Yep, but the CSS bot code is closed source and basically the only thing not included in the SDK. As far as i know. I was wondering if someone had written plug-in bots for CSS or L4D as these both use meshs --Welsh Mullet 13:58, 18 March 2011 (UTC)

Team Fortress 2 Nav meshes

There's no TF2-specific information here regarding to nav meshes. I'll share what I know:

  • Use tf_show_mesh_decoration to show nav attributes. tf_show_mesh_decoration_manual will show manually placed nav attributes.
  • NAV_AVOID and NAV_STOP only work in the Counter-Strike series; they're never used in TF2.
  • Use tf_mark to add TF2 specific attributes.
  • I don't know how to mark an attribute with RED_ONE_WAY_DOOR or BLUE_ONE_WAY_DOOR. I tried using tf_mark but it didn't apply. I guess it's automatically generated by the game.
  • You can make bots airstrafe to a spot by adding a nav mesh to the edge of the corner.

Attribute Information

  • BLOCKED_UNTIL_POINT_CAPTURE blocks the point until the specified point is captured.
  • BLOCKED_AFTER_POINT_CAPTURE blocks the point after the specified point is captured.
  • WITH_FIRST_POINT to WITH_FIFTH_POINT specifies the point for the former two attributes.
Note.png Note: On payload maps the payload is considered to be the first point.

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This is not true! The payload is not counted as a capture point, so WITH_FIRST_POINT will still refer to the proper first capture point.


  • SNIPER_SPOT and SENTRY_SPOT don't do anything as they only work in the scrapped raid gamemode. (Confirmed through looking in the Jungle Inferno leak and through observation in gameplay.)

(The following 2 attributes are meant to be used with doors.)

  • DOOR_ALWAYS_BLOCKS makes the nav area blocked when the door closes.
  • DOOR_NEVER_BLOCKS prevents the nav area from being blocked.
  • UNBLOCKABLE prevents the nav area from being blocked.

Someone make a page for TF2 nav meshes. Amicdict (talk) 13:31, 2 July 2021 (PDT)

Sounds good, but before I add it to my sorts large to-do list, I gotta figure out a suitable page to put a link of the Team Fortress 2 page after its done.
Also, if you don't mind, can you see ifDONT_HIDEandPRECISEserves any purpose for TFBots? Orin (talk) 13:54, 2 July 2021 (PDT)
Yeah sure. I'll report back what I can find. Amicdict (talk) 21:00, 2 July 2021 (PDT)
Ok yeah they both work in game as expected. Amicdict (talk) 21:02, 2 July 2021 (PDT)
Just to be sure.... What would (roughly) be the reactions of TFBots if they walk into a navigation area with thePRECISEattribute, and do TFBots use designated "hiding spot markers" (purple lines) at all?
Asking because both of these attributes have varying effects in all games I think, like thePRECISEattribute. In Left 4 Dead Left 4 Dead 2 has no effect, but in Counter-Strike: Global Offensive it strips bots the ability to path with random variance? (not sure what it does in Counter-Strike: Source)
Similar case for theDONT_HIDEattribute too iirc; Bots in Counter-Strike: Global Offensive actually care for "hiding spot markers", but in Left 4 Dead Left 4 Dead 2 none of the bots really make use of it. Orinuse (talk) 23:24 2 July 2021 (PDT)
Based off the Inferno leak, bot snipers use designated hiding spots as good sniping spots. I'm pretty sure PRECISE works as expected (as in it prevents "natural" variations in the movement), but I can't figure how to mark a designated hiding spot. Might just turn out that you need at least one free corner that has no connections, but I'm not sure on that.
A hiding spot is marked as an "ideal sniper spot" if the nav area of the hiding spot is larger than 200hu², or the farthest range area is larger than 1500hu². Otherwise it gets marked as a "good hiding spot" which aren't prioritized as much. Amicdict (talk) 12:23, 3 July 2021 (PDT)
Addendum: tf_show_mesh_decoration_manual when set to 1, won't show nav areas with RED_ONE_WAY_DOOR, BLUE_ONE_WAY_DOOR, TF_NAV_HAS_AMMO, TF_NAV_HAS_HEALTH, and TF_NAV_CONTROL_POINT, regardless of the value of tf_show_mesh_decoration. Also RED_ONE_WAY_DOOR and BLUE_ONE_WAY_DOOR seem to just only allow players on their respective team to go through.
Turns out that TF2 only recognizes sniper/sentry spots through func_tfbot_hint; Hiding spots seem to only be used by spies. Amicdict (talk) 19:55, 6 July 2021 (PDT)
If you have any more addendums, put them here, as while the page will take some time before its made, I'm still planning about the layout of the page. Oh yeah, late but about the thePRECISEattribute, you use themarkcommand. I'm not entirely sure what its for though, but someone I lnew figured out it disables some kind of "obstacle avoidance" AI. More details at the page for the list on Left 4 Dead Left 4 Dead 2 navigation area attributes. (Can't link it now, I have something to attend to) -Orin (talk) 08:11, 7 July 2021 (PDT)
Ok thanks. Also tf_show_gate_defense_areas and tf_show_point_defense_areas don't seem to do anything based off the code leak. - Amicdict (talk) 20:15, 9 July 2021 (PDT)

Correction: DOOR_NEVER_BLOCKS prevents the area from being blocked if the door its in closes. - Amicdict (talk) 19:26, 12 July 2021 (PDT)

Also it turns out that the payload is not counted as the first point. Amicdict (talk) 19:50, 12 July 2021 (PDT)

Sniper Spot Confusion

I'm confused on what is recognized as a sniper spot by TF2. From what I got in the Jungle Inferno leak, sniper bots are supposed to position themselves near func_tfbot_hints, but from my observations in-game, it feels like Snipers are using hiding spots (the purple and green lines that generate at corners) as sniper spots (I'm unable to confirm this). It's possible that I might be misinterpreting the code, but it's also possible that Valve changed Sniper bots to use hiding spots instead of func_tfbot_hints as sniper spots. I'm probably going to need reverse engineering to figure this out, if it ever comes to that. - Amicdict (talk) 23:47, 13 July 2021 (PDT)

Of course it's also possible that Sniper bots use hiding spots as fallback sniper spots in the event that func_tfbot_hints are missing. I can't really know. Amicdict (talk) 23:50, 13 July 2021 (PDT)

PvP Snipers use something called "theater" areas I believe, not sure what exactly theater areas are. I'm surefunc_tfbot_hintis actually used, but they just don't always stick to it. MvM snipers definitely need them.
Oh yeah, if you seetf_mark SNIPER_SPOTorbot_hint_sniper_spotentity, ignore them as they're mostly currently-irrelevant leftovers.- Orin (talk) 03:24, 22 July 2021 (PDT)

TF attributes override each other's blocked statuses.

I just found out that the blocked statuses from TF2 nav attributes override each other and the block status from the Source Engine nav attributes. Here is the priority:

  1. TF_NAV_UNBLOCKABLE
  2. TF_NAV_BLOCKED (and by proxy BLOCKED_UNTIL_POINT_CAPTURE and BLOCKED_AFTER_POINT_CAPTURE).
  3. TF_NAV_BLUE_ONE_WAY_DOOR (TF_NAV_RED_ONE_WAY_DOOR will be processed if TF_NAV_BLUE_ONE_WAY_DOOR doesn't consider itself as blocked.)
  4. TF_NAV_RED_ONE_WAY_DOOR(NAV_MESH_NAV_BLOCKER will be processed if TF_NAV_RED_ONE_WAY_DOOR doesn't consider itself as blocked.)
  5. NAV_MESH_NAV_BLOCKER (from func_nav_blocker).
  6. The internal blocked status made by the Source Engine itself.

For instance to actually have an area that is RED-only and blocked until 3rd point is captured, you would want to stack two nav areas. The first area would have BLOCKED_UNTIL_POINT_CAPTURE and TF_NAV_WITH_THIRD_POINT, and the second nav area would have TF_NAV_RED_ONE_WAY_DOOR. This way the game will properly process both attributes and will have the desired result.

Trying to stack the three attributes onto one area would just result in the area being unblocked for both teams after the 3rd point is captured.- Amicdict (talk) 19:33, 18 July 2021 (PDT)

tf_show_X cvars

If anyone is working on one, how's the progress on the TF2 nav mesh page? - Amicdict (talk) 21:19, 18 July 2021 (PDT)

I haven't allocated time to start writing a real page yet, sorry. Starting with the List of TF2 Navigation Mesh Attributes would be easier to follow up with other related pages I believe.

These are the additional cvars I missed. - Amicdict (talk) 22:00, 18 July 2021 (PDT)

Correction for tf_show_blocked_areas: Areas colored bright red, not purple, represent areas blocked for all teams. - Amicdict (talk) 01:21, 22 July 2021 (PDT)