Difference between revisions of "Navmeshing"

From Sunrust Wiki
Jump to navigation Jump to search
Line 149: Line 149:
! scope="row" style="width: 13%;" | <span style="color:white">'''Regular'''</span>
! scope="row" style="width: 13%;" | <span style="color:white">'''Regular'''</span>
| style="width: 10%;" |[[File:Regularnode example.jpg|frameless|center|upright=0.7]]
| style="width: 10%;" |[[File:Regularnode example.jpg|frameless|center|upright=0.7]]
| Allows you to select the navmesh type. Will be discussed in more detail below.
| A common node type that allows bots to walk between them and automatically connects to all visible nodes.
|- style="vertical-align: center;"
|- style="vertical-align: center;"
! scope="row" style="width: 13%;" | <span style="color:red">'''No Auto-Path'''</span>
! scope="row" style="width: 13%;" | <span style="color:red">'''No Auto-Path'''</span>
| style="width: 10%;" | [[File:Noautopathnode example.jpg|frameless|center|upright=0.7]]
| style="width: 10%;" | [[File:Noautopathnode example.jpg|frameless|center|upright=0.7]]
| Allows you to change the display range of nodes
| A common node type, but <span style="color:orange"><u>'''will not automatically connect'''</u></span>.
This kind of node must be connected using the ''“Edit ReachSpecs” option'', which will be discussed below.
 
Changes the <span style="color:red">color to red</span> for the <span style="color:white">regular node</span> and <span style="color:red">adds a red icon on top</span> too. For all other node types, simply <span style="color:orange">has a red icon on top</span>.
 
|- style="vertical-align: center;"
|- style="vertical-align: center;"
! scope="row" style="width: 13%;" | <span style="color:#00CCFF">'''Flying'''</span>
! scope="row" style="width: 13%;" | <span style="color:#00CCFF">'''Flying'''</span>
| style="width: 10%;" | [[File:Flyingnode example.jpg|frameless|center|upright=0.7]]
| style="width: 10%;" | [[File:Flyingnode example.jpg|frameless|center|upright=0.7]]
| zzz
| An aerial node type that is created for flying zombie classes, such as [[Wil O' Wisp|Wisp]].
''Creates a node at your position.''
 
Since there are no regular flying classes on sunrust servers, creating a flying node is <u>unnecessary</u>.
|- style="vertical-align: center;"
|- style="vertical-align: center;"
! scope="row" style="width: 13%;" | <span style="color:#FF33FF">'''Ladder'''</span>
! scope="row" style="width: 13%;" | <span style="color:#FF33FF">'''Ladder'''</span>
| style="width: 10%;" | [[File:Laddernode example.jpg|frameless|center|upright=0.7]]
| style="width: 10%;" | [[File:Laddernode example.jpg|frameless|center|upright=0.7]]
| zzz
| A <span style="color:orange"><u>'''''noclip node'''''</u></span> that allows bots to fly through paths <u>in and out</u> of it.
 
You need to be <span style="color:orange">extremely careful</span> with this type of node, since <span style="color:orange">it gives "cheats"</span> to bots for a certain segment, which may not be to the liking of players.
 
This node is often useful for long ladders or ladders that are difficult for bots to climb, but it can be used for other gameplay elements as well.
 
 
 
<u>Let's consider an example of the correct placement of nodes for correct bots work:</u>
* <span style="color:white">1 regular node</span> at the bottom of the ladder
* <span style="color:#FF33FF">1 ladder node</span> on top of the ladder. It can be located both on the ground or on the ladder prop itself, or in the air above the ladder case opening
* <span style="color:white">1 regular node</span> on top of the ladder on the ground a little further from the ladder node.
{| style="text-align: center; margin-left: auto; margin-right: auto; border: none;"
!|
!|
|-
| [[File:Correct placement ladder topnode.jpg|frameless|250px]]
| [[File:Correct placement ladder bottomnode.jpg|frameless|555px]]
|}
 
 
 
 
 
[[File:Bulb icon.png|frameless|30px]] <span style="color:orange"><u>'''Tip:'''</u></span> The “<span style="color:white"><u>regular</u></span> - <span style="color:#FF33FF"><u>ladder</u></span> - <span style="color:white"><u>regular</u></span> – <span style="color:#FF33FF"><u>ladder</u></span>” connection will '''''speed up the bots''''', so this can be used for <u>'''''speed boosts'''''</u>.
 
But the bots will not noclip right up to you, they will stop at ~200 units and start moving to you at a normal speed due to the activation of the <span style="color:teal"><u>“pursuit mode”</u></span> (this will be discussed below).
 
This is useful for surf parts of the map, for maps where zombies need to be extremely close to people, etc.
 
{| style="text-align: center; margin-left: auto; margin-right: auto; border: none;"
!|
|-
| [[File:Nodes speed boost.jpg|frameless|700px]]
|}
 
 
 
[[File:Bug icon.png|frameless|30px]] <span style="color:red"><u>'''Bug:'''</u></span> If you use this node with a <u>HL2 ladder</u>, then the <u>bot may not stop at the node, but fly to the nearest target with a noclip</u>.
 
This is because HL2 ladders hook you to the ladder at a certain point and you can climb towards other exit points. A bot with a ladder node doesn’t touch them (or doesn’t hit the node), so it just goes to the nearest target.
 
'''''<u>Always check what type of ladder case you must make sure this doesn't happen!</u>''''' If this is a HL2 ladder, then either don’t use the ladder node, or use it so that the bot doesn’t get to the point where it hooks onto the ladder (i.e. as far as possible from the beginning of the ladder).
 
|- style="vertical-align: center;"
|- style="vertical-align: center;"
! scope="row" style="width: 13%;" | <span style="color:yellow">'''Armory Node'''</span>
! scope="row" style="width: 13%;" | <span style="color:yellow">'''Armory Node'''</span>
| style="width: 10%;" | [[File:Armorynode example.jpg|frameless|center|upright=0.7]]
| style="width: 10%;" | [[File:Armorynode example.jpg|frameless|center|upright=0.7]]
| zzz
| Node designed for placing the armor crates on HG.
 
<u>Not used</u>, it is advisable to delete such nodes.
|- style="vertical-align: center;"
|- style="vertical-align: center;"
! scope="row" style="width: 13%;" | <span style="color:#00CC33">'''No Leave Node'''</span>
! scope="row" style="width: 13%;" | <span style="color:#00CC33">'''No Leave Node'''</span>
| style="width: 10%;" | [[File:Noleavenode example.jpg|frameless|center|upright=0.7]]
| style="width: 10%;" | [[File:Noleavenode example.jpg|frameless|center|upright=0.7]]
| zzz
| A special node that makes <span style="color:orange"><u>bots go exactly at it or along the path from one to another</u></span>. With a regular node, bots can deviate slightly, because of which they can fall on some places.
|- style="vertical-align: center;"
 
! scope="row" style="width: 13%;" | <span style="color:blue">'''Water Node'''</span>
A great example is the sewers on the <u>''zs_obj_6_nights_v15''</u> map, where bots must move on small boards, causing them to fall off with regular / no auto-path nodes.
| style="width: 10%;" | [[File:Waternode example.png|frameless|center|upright=0.7]]
 
| zzz
{| style="text-align: center; margin-left: auto; margin-right: auto; border: none;"
!|
|-
|[[File:Noleavenodes application.jpg|frameless|700px]]
|}
 
 
[[File:Bulb icon.png|frameless|30px]] <span style="color:orange"><u>'''Tip:'''</u></span> Sometimes no leave nodes can help with the pursuit mode, so the bots will function more correctly and attack the cade instead of trying to hit you through the wall. Of course, a lot of places are better fix with volumes, but that can help.
 
 
{| style="text-align: center; margin-left: auto; margin-right: auto; border: none;"
!|
|-
|[[File:Noleavenodes disable pursuit example.jpg|frameless|700px]]
|}
|}


<!--
Regular regularnode_example.jpg A common node type that allows bots to walk between them and automatically connects to all visible nodes.
No Auto-Path noautopathnode_example.jpg A common node type, but will not automatically connect. This kind of node must be connected using the “Edit ReachSpecs” option, which will be discussed below.


Changes the color to red for the regular node and adds a red icon on top too. For all other node types, simply has a red icon on top.
[[File:Bug icon.png|frameless|30px]] <span style="color:red"><u>'''Bug:'''</u></span> Due to the fact that no leave node forces bots to follow them exactly, sometimes bots can start spinning as if they got stuck when they hit the node, but in fact they are trying to get to it more accurately position and after a while they begin to walk normally along them. Therefore, it is not recommended to use these nodes in places of good fire angles, where they can become an easy target for survivors.
Flying flyingnode_example.jpg An aerial node type that is created for flying zombie classes, such as Wisp. Creates a node at your position. Since there are no regular flying classes on sunrust servers, creating a flying node is unnecessary.
Ladder laddernode_example.jpg A noclip node that allows bots to fly through paths in and out of it.


You need to be extremely careful with this type of node, since it gives "cheats" to bots for a certain segment, which may not be to the liking of players.
|- style="vertical-align: center;"
! scope="row" style="width: 13%;" | <span style="color:blue">'''Water Node'''</span>
| style="width: 10%;" | [[File:Waternode example.png|frameless|center|upright=0.7]]
| This node is <span style="color:orange"><u>created by placing a regular node in water</u></span>. <span style="color:orange"><u>This also works for a flying node</u></span>, which allows you to place nodes not only at the bottom, but also in the water itself.


This node is often useful for long ladders or ladders that are difficult for bots to climb, but it can be used for other gameplay elements as well.
Unfortunately, these types of nodes turn out to be <u>very "dirty"</u> for the water space and rather difficult to remove, and bots are not so good at walking with them.  


Let's consider an example of the correct placement of nodes for correct bots work:
'''I highly recommend using “areas” instead of water nodes.'''
- 1 regular node at the bottom of the ladder
- 1 ladder node on top of the ladder. It can be located both on the ground or on the ladder prop itself, or in the air above the ladder case opening
- 1 regular node on top of the ladder on the ground a little further from the ladder node.


correct_placement_ladder_topnode.jpg
correct_placement_ladder_bottomnode.jpg


[[Tip icon]] Tip: The “regular - ladder - regular – ladder” connection will speed up the bots, so this can be used for speed boosts. But the bots will not noclip right up to you, they will stop at ~200 units and start moving to you at a normal speed due to the activation of the “pursuit mode” (this will be discussed below). This is useful for surf parts of the map, for maps where zombies need to be extremely close to people, etc.


nodes_speed_boost.jpg


[[Bug icon]] Bug: If you use this node with a HL2 ladder, then the bot may not stop at the node, but fly to the nearest target with a noclip. This is because HL2 ladders hook you to the ladder at a certain point and you can climb towards other exit points. A bot with a ladder node doesn’t touch them (or doesn’t hit the node), so it just goes to the nearest target.
Always check what type of ladder case you must make sure this doesn't happen! If this is a HL2 ladder, then either don’t use the ladder node, or use it so that the bot doesn’t get to the point where it hooks onto the ladder (i.e. as far as possible from the beginning of the ladder).
Armory Node armorynode_example.jpg Node designed for placing the armor crates on HG. Not used, it is advisable to delete such nodes.
No Leave Node noleavenode_example.jpg A special node that makes bots go exactly at it or along the path from one to another. With a regular node, bots can deviate slightly, because of which they can fall on some places.


A great example is the sewers on the zs_obj_6_nights_v15 map, where bots must move on small boards, causing them to fall off with regular/no auto-path nodes.
[[File:Bug icon.png|frameless|30px]] <span style="color:red"><u>'''Bug:'''</u></span> For this type of nodes <u>only the “water path” created automatically works</u>, and this node can only function with similar water nodes or just regular nodes.  


noleavenodes_application.jpg
<span style="color:orange">This means that you cannot add a teleport path or make a link to a ladder</span>, the bots simply will not perceive it.  


[[Tip icon]] Tip: Sometimes no leave nodes can help with the pursuit mode, so the bots will function more correctly and attack the cade instead of trying to hit you through the wall. Of course, a lot of places are better fix with volumes, but that can help.
To solve this problem, '''''use regular nodes connected to the ladder''''', then lower the lower one into the water '''<u>using “EditNodes mode”</u>''' and connect it to the water node.


noleavenodes_disable_pursuit_example.jpg


[[Bug icon]] Bug: Due to the fact that no leave node forces bots to follow them exactly, sometimes bots can start spinning as if they got stuck when they hit the node, but in fact they are trying to get to it more accurately position and after a while they begin to walk normally along them. Therefore, it is not recommended to use these nodes in places of good fire angles, where they can become an easy target for survivors.
[[File:Bug icon.png|frameless|30px]] <span style="color:red"><u>'''Bug:'''</u></span> Sometimes with water nodes bots can float up to the ceiling, causing them to get stuck.  
Water Node waternode_example.png This node is created by placing a regular node in water. This also works for a flying node, which allows you to place nodes not only at the bottom, but also in the water itself.


Unfortunately, these types of nodes turn out to be very "dirty" for the water space and rather difficult to remove, and bots are not so good at walking with them. I highly recommend using “areas” instead of water nodes.
This is very important for underwater caves like zs_obj_enervation_v22. It is recommended to use “areas” for the water.


[[Bug icon]] Bug: For this type of nodes only the “water path” created automatically works, and this node can only function with similar water nodes or just regular nodes. This means that you cannot add a teleport path or make a link to a ladder, the bots simply will not perceive it. To solve this problem, use regular nodes connected to the ladder, then lower the lower one into the water using “EditNodes mode” and connect it to the water node.
|}


[[Bug icon]] Bug: Sometimes with water nodes bots can float up to the ceiling, causing them to get stuck. This is very important for underwater caves like zs_obj_enervation_v22. It is recommended to use “areas” for the water.


=== <u>Edit ReachSpecs</u> ===
=== <u>Edit ReachSpecs</u> ===
With this mode you can change paths ("links") between nodes. For example, you can delete the path from one node to another or completely disconnect the nodes, as a result of which the bots will either be able to go to this node, but will not be able to return, or, accordingly, will not move between these nodes at all. It also allows you to create special paths between nodes, for example, fast jump paths or teleport paths.
<!--
With this mode you can change paths ("links") between nodes. For example, you can delete the path from one node to another or completely disconnect the nodes, as a result of which the bots will either be able to go to this node, but will not be able to return, or, accordingly, will not move between these nodes at all. It also allows you to create special paths between nodes, for example, fast jump paths or teleport paths.
Regular nodes automatically create paths between themselves, but sometimes they may not be correct, so this is an extremely useful tool to edit them. If there are a lot of nodes, it will often be easier to use “Create nodes + Path draw distance”. This will be discussed later.
Regular nodes automatically create paths between themselves, but sometimes they may not be correct, so this is an extremely useful tool to edit them. If there are a lot of nodes, it will often be easier to use “Create nodes + Path draw distance”. This will be discussed later.
autopaths_nodes_example.jpg
autopaths_nodes_example.jpg

Revision as of 19:45, 2 September 2020

Art by AltShadow.

Navmeshing – the process of creating navigation for bots, or more simply, creating paths so that bots can work correctly on a given map. There are many different types of bots that are used for the zs gamemode: AzBots, D3Bots, MarcoBots, etc.

MarcoBots are currently used on Sunrust servers. MarcoBots are not open-source bots, they are private and exclusive type of bots and you cannot download them for your single player. Therefore, the navmesh creation takes place on a dedicated server (or directly in the main server itself).

The advantages of MarcoBots is the simplicity navmesh creation, the automation of many bot actions, since you don’t need to specify when they need to jump or crouch, and a huge level of optimization, as a result these bot load server much less and this leads to less lags.

The better navmesh is created, the more powerful the bots will be, since they will know how to act in each area of the map. A good navmesh also affects the optimization, server network and is especially necessary for the correct work of Great Evils - exclusive zombie boss classes only for bots.

Terminology

Navmesh
(abbreviated "mesh")
Navigation for bots.
Navmeshing The process of creating navigation for bots.
Nodes Points between which bots move and where they can find you.
Paths
(or "links")
Connections between nodes that allow or not move between specific nodes.
Areas A special type of bot navigation that differs from nodes. Instead of nodes, you select the required area and the bot can find you if you are in it. Will be discussed this type of navigation in more detail below.
Targeting A bot pathfinding for the closest or highest priority target.
Pursuit mode The bot stops moving on the nodes and starts moving exactly behind you, is activated for ~200 units.

Required commands and control

To be able to create navmesh, you need to be granted access to a dedicated navmesh server. Contact Scott to have access to dev server: Scott#3224. After obtaining the necessary rights, you can connect to it and begin to create navmesh.

Dev Server IP: 104.194.10.86:27020


Next, you need to get the navmesh tool and start creating the navmesh. Let's look at the required commands for this:

Console commands.png
Select navmesh tool.
/navmeshtool Gives you a navmesh tool
/startmeshing Gives you a navmesh tool, god mode and an infinite wave time
/changemapnavmesh
mapname
Allows you to change the map on server
zs_admin_purgepaths Completely clears navmesh (SA only, console command)
/give weapon_zs_adminpathtool
PlayerName
Alternative way to get navmesh tool (SA only)



After you give yourself a navmesh tool, you may notice control tips in the upper left corner.

Disable the experience display in the options in “F4 –> Interface” to see them more correctly. If you also have spark_currency_widget 1, disable it as well.

When you hold down the “Alt” key. in the lower right corner, a menu for tool control will appear. Consider this interface:



Navmesh menu.png
Path edit mode
Path edit mode options.png
Allows you to select the navmesh type. Will be discussed in more detail below.
Path draw distance
Path draw distance menu.png
Allows you to change the display range of nodes
Flags
Navmesh menu flags.png
Ghost Mode – Gives you noclip.

Hide Air Paths – Hides air nodes.

Hide Sublevel Paths – Disables the visibility of nodes you cannot see.

Draw Through Walls – Enables drawing nodes through walls.


Let's consider these options in more details.


Path edit mode

Path edit mode.png

Create Node

This mode allows you to create nodes and select types of nodes.


Control:

Cratenode control.png
LMB – Creates a node at the specified point
RMB – Deletes the selected node
R – Creates a node that is in your position
Shift + RMB – Removes the node that is in the position of your gaze. This is an extremely useful tool that allows you to delete nodes that you cannot direct, such as nodes in the air or underground.


Options for Create Node:

Navmesh nodes noautopath menu.png
Path type – allows you to select the type of node you want to create

No Auto-Path – Creates a node that will not automatically connect to other nodes


Node Types

Regular
Regularnode example.jpg
A common node type that allows bots to walk between them and automatically connects to all visible nodes.
No Auto-Path
Noautopathnode example.jpg
A common node type, but will not automatically connect.

This kind of node must be connected using the “Edit ReachSpecs” option, which will be discussed below.

Changes the color to red for the regular node and adds a red icon on top too. For all other node types, simply has a red icon on top.

Flying
Flyingnode example.jpg
An aerial node type that is created for flying zombie classes, such as Wisp.

Creates a node at your position.

Since there are no regular flying classes on sunrust servers, creating a flying node is unnecessary.

Ladder
Laddernode example.jpg
A noclip node that allows bots to fly through paths in and out of it.

You need to be extremely careful with this type of node, since it gives "cheats" to bots for a certain segment, which may not be to the liking of players.

This node is often useful for long ladders or ladders that are difficult for bots to climb, but it can be used for other gameplay elements as well.


Let's consider an example of the correct placement of nodes for correct bots work:

  • 1 regular node at the bottom of the ladder
  • 1 ladder node on top of the ladder. It can be located both on the ground or on the ladder prop itself, or in the air above the ladder case opening
  • 1 regular node on top of the ladder on the ground a little further from the ladder node.
Correct placement ladder topnode.jpg Correct placement ladder bottomnode.jpg



Bulb icon.png Tip: The “regular - ladder - regularladder” connection will speed up the bots, so this can be used for speed boosts.

But the bots will not noclip right up to you, they will stop at ~200 units and start moving to you at a normal speed due to the activation of the “pursuit mode” (this will be discussed below).

This is useful for surf parts of the map, for maps where zombies need to be extremely close to people, etc.

Nodes speed boost.jpg


Bug icon.png Bug: If you use this node with a HL2 ladder, then the bot may not stop at the node, but fly to the nearest target with a noclip.

This is because HL2 ladders hook you to the ladder at a certain point and you can climb towards other exit points. A bot with a ladder node doesn’t touch them (or doesn’t hit the node), so it just goes to the nearest target.

Always check what type of ladder case you must make sure this doesn't happen! If this is a HL2 ladder, then either don’t use the ladder node, or use it so that the bot doesn’t get to the point where it hooks onto the ladder (i.e. as far as possible from the beginning of the ladder).

Armory Node
Armorynode example.jpg
Node designed for placing the armor crates on HG.

Not used, it is advisable to delete such nodes.

No Leave Node
Noleavenode example.jpg
A special node that makes bots go exactly at it or along the path from one to another. With a regular node, bots can deviate slightly, because of which they can fall on some places.

A great example is the sewers on the zs_obj_6_nights_v15 map, where bots must move on small boards, causing them to fall off with regular / no auto-path nodes.

Noleavenodes application.jpg


Bulb icon.png Tip: Sometimes no leave nodes can help with the pursuit mode, so the bots will function more correctly and attack the cade instead of trying to hit you through the wall. Of course, a lot of places are better fix with volumes, but that can help.


Noleavenodes disable pursuit example.jpg


Bug icon.png Bug: Due to the fact that no leave node forces bots to follow them exactly, sometimes bots can start spinning as if they got stuck when they hit the node, but in fact they are trying to get to it more accurately position and after a while they begin to walk normally along them. Therefore, it is not recommended to use these nodes in places of good fire angles, where they can become an easy target for survivors.

Water Node
Waternode example.png
This node is created by placing a regular node in water. This also works for a flying node, which allows you to place nodes not only at the bottom, but also in the water itself.

Unfortunately, these types of nodes turn out to be very "dirty" for the water space and rather difficult to remove, and bots are not so good at walking with them.

I highly recommend using “areas” instead of water nodes.



Bug icon.png Bug: For this type of nodes only the “water path” created automatically works, and this node can only function with similar water nodes or just regular nodes.

This means that you cannot add a teleport path or make a link to a ladder, the bots simply will not perceive it.

To solve this problem, use regular nodes connected to the ladder, then lower the lower one into the water using “EditNodes mode” and connect it to the water node.


Bug icon.png Bug: Sometimes with water nodes bots can float up to the ceiling, causing them to get stuck.

This is very important for underwater caves like zs_obj_enervation_v22. It is recommended to use “areas” for the water.


Edit ReachSpecs