jueves, 17 de enero de 2019

Tutorial - ZMT-Bots waypoints

Spanish version HERE
Here you will learn to create your own waypoints for the maps you like the most. It is not a simple process and depending on the size of the map it may require a lot of time and tests to be completely good, so be patient!

The ZMT-Bots use the same navigation engine (obviously I've fixed some changes and errors) than the YaPB, discontinued bots from which the PodBots were created. Because of this, the ZMT-Bots use the same waypoint system. This does not mean that they can use the same, ZMT-Bots have their own different waypoints and a specific waypoint file must be created so they can obtain the expected behavior.

Previous point clarified, you can use waypoints created for PodBots and edit them with the ZMT-Bots editor, I have managed to maintain compatibility with these waypoints, so you only have to edit them, eliminate the different types of waypoints that are not compatible with ZMT-Bots and start using the new waypoints. All this will be much easier for users who already have experience creating PodBots waypoints.

Attention: There is a waypoints limit that exist per map and a limit of "flags" that a single waypoint can have. If these restrictions try to be exceeded it is very likely that game will stop working.

WAYPOINTS LIMIT FOR EACH MAP: 1024
FLAG LIMIT FOR EACH WAYPOINT: 4



The edit menu can be access selecting the "Edit waypoints" ZMT-Bots main menu option. Down the page are the waypoints editor menu different options can offer:

1- New waypoint
    Create new waypoint, you can also choose what type you want to create. From here you might also create a jump between two waypoints by choosing the option "jump".

2- Set flags
   Mark a waypoint with a "flag" of another type, transforming it into a different waypoint. This method is the same as the previous one but it is used to change an existing waypoint without having to create a new one.

3- Create paths
    Connect 2 waypoints; The nearest waypoint is connected to the waypoint that is in the player's sight. Paths can be of 4 types: incoming, outgoing, bidirectional (both sides) or jumps. 

In jumps case, they must be created automatically with the previouly mentioned "jump" option in "New waypoint" section and thus, jump's speed and direction is calculated automatically. However, if you want to create a jump but in destination position there is no floor, the first option will not work. In that case (and only in this case), you must use "jump" option that you can select in "Create paths" to create your jump in a "manual" way. Your aim and jump must be towards the destination waypoint when using the "jump" option.
Example in zm_dust2 manual jump, in this case bots must jump to waypoint in-air to reach a place where they will be teleported to another place on the map.

"Save/Clear waypoint in memory" option allows to save a single waypoint in memory to later conjoin it with the waypoint that is closest to the player, only after choosing a type of path. This is very useful in maps where bots will have to teleport in order to reach an isolated place, since most of the time they will not be able to conjoin the waypoints because they are too far or blocked by an obstacle.
The destination of the previous teleport in zm_dust2. This union was not possible without using the "Save / Clear waypoint in memory" option since it is too far and is blocked by a wall.

4- Set radius
    Change the player closest waypoint radius. This radius is the distance required the bots consider when waypoint has already been reached and is represented by a blue circle around the waypoint.

5- Teleport to waypoint
    Tele-transports the player to waypoint he'st aiming at.

6- Delete waypoint
    Delete a waypoint closest to the player.

7- Auto-waypoint mode
    On or off automatic mode to place-in waypoints.

8- Set Auto-Path distance
    Choose the distance the waypoints will automatically conjoin each other everytime you create a new one.

9- Noclip cheat on/off
    It allows to "Fly" to reach high places comfortably.

10- Rebuild ZMT-PathMatrix
    Rebuild waypoint matrix in case you modified or created new waypoints and does not update itself (you can easily know if bots are hitting the walls and do not navigate well, you only have to rebuild the matrix with this option).

11- Delete all flags on the map unknown for ZMT-Bots
     Delete all ZMT-Bots waypoints that are not compatible, for example waypoints that belong to the Podbots (in case you are editing a file that belonged to Podbots).

12- Save and exit
     Saves all the changes made to waypoints and closes the menu.





Each waypoint can be marked with up to 4 flags and each flag has been created to control ZMT-Bots behavior in different parts of a map.


Next, the different types of waypoints (or flags) are explained:

Normal (Presence required on the map):
    It has green color and it is the look that all waypoints will take when they do not have any assigned flag. The map should be mostly covered by these waypoints since they are used for ZMT-Bots normal navigation.

Falling Risk:
    It has yellow color and prevents the bots from moving laterally (strafe). It should be used, for example, on ledges or rooftops where there is a risk that bots will fall attempting an evasion with a player. Also, it can be used for situations where it is required that many bots enter together through a very narrow site. Actually, any situation where a path is strictly required forwards and backwards.
Use of Falling Risk so that the bots 
stay on top of the wall and avoid falling.

Obligatory Point:
    Its color is aquamarine and its use is intended only to control Nemesis special AI, Survivors, Snipers and Assassins. This waypoints does not affect humans or zombies behavior.

     Special classes bots mentioned earlier are allowed to navigate the waypoints matrix while they are in air or they're jumping, this allows, gives them more agility and achieve more natural, intelligent movements. However, there are cases in which it is necessary that the bot "touch the ground"; to say it briefly, if it is in the air it must wait to fall obligatorily in the indicated place to be able to continue with its navigation, this waypoint is for that.

    Normally it is necessary to place it before an important jump or near a fall where the bots always come with a lot of speed, so that the special bot stops. There are many situations where it will be necessary, however, its excessive use will hinder special bots navigation.

    Pay special attention to special bots navigation when testing your new waypoints, that will let you know where it is necessary to place one if you still have no experience. With practice you will learn where to place them.
If an Obligatory Point is not used in this location, a special class bot could pass by when it tries to jump into this box. In this way, the bot is forced to "touch" the box so that it can make the second jump.

Ladder:
    Its color is orange and it must be located at the start and the end of each ladder in the map to indicate the Bots this route is a ladder and they must change their navigation.

Human Camp (Presence required on the map):
    It is blue with cyan and is the initial goal of all human bots at a new starting round. It indicates a nice place to arrive, a safe or strategic place to resist against the infected.

     Also, it indicates the most important direction to look at when a bot is using this waypoint, although this angle is not mandatory and the bot has the freedom to look elsewhere for limited periods of time (to give it realism). However, by establishing this angle you ensure that the bot will be periodically looking there.

    You should always avoid placing a Human Camp in the middle where they passthrough, since a bot could stop there and block the way to other waypoints. Try to place these waypoints at the end of the way or on the side, always leaving a path open for other bots with normal waypoints (green).
This is the proper disposition to place Human Camps,
always leaving other bots a passthrough way

Human Reachable:
    It is magenta with red, and points to a place that could be reached if there were enough infected nearby to make a "ladder" between everyone and help others climb.

     If a human is found near this waypoint, that human is detected by the zombies and there are enough zombies nearby to reach it, automatically adjacent zombie bots will begin to build a "zombie ladder", ducking and jumping on each other until the human moves away from this waypoint, is infected or killed. It is common to mark a Human Camp waypoint also with Human Reachable; in that case the Human Camp will lose its cyan color to become magenta. The distance to which this waypoint influences is quite broad (250 radio); you can place a waypoint with the radius at this value to know how much distance it represents. This means that you do not need to place several together, with one in the area will be enough to cause a zombie ladder. Keep in mind, that there must be line of sight between this waypoint and the human to be valid.

     However, it is not always possible to use it, the place must comply with an important rule: There can not be free space below the point where this waypoint will be placed.

2 Human Camp, one of them is marked as Human Reachable on top of a box.

Use of Human Reachable in 2 tall boxes. This allows zombies to help each other climb to reach humans. A Human Reachable is enough per box.


Incorrect place to place a Human Reachable.
There is free space under the bridge.

Zombie Important:
    Its color is completely red and is used to indicate to zombie bots that this place should be checked periodically because it is an important site for humans (where it is very likely that they are). Although its use is not mandatory on the map, it is highly recommended that everyone pass by it and will grant help to zombies localize humans quickly.

     Zombies (when they have no humans in sight) use 40% of their time reviewing these waypoints and the remaining 60% checking places randomly. A map without this type of waypoint will cause the zombies to move randomly throughout the map and not as real players, who always go in the first instance, to the humans resistance main site.

Only Human/Zombie Pass:
    It is white with blue or red (depending on which team is reserved for the passage). It is a waypoint that allows restricting the passage to one of the teams, its use being very varied.

    You can create waypoints marked with Only Zombie Pass in places with spikes that would kill humans, but only zombie bots could use to reach them; so that only zombies jump from very high places (falls that would kill a human) to quickly reach a place or use waypoints marked with Only Human Pass to prevent the zombies from using that route because it is disadvantageous for them.

    You should know that if you block the access of a team to a specific map area, there must be some entry or other way for that team, if there is no other entry (and only in that case), the bots team you restricted can ( intentionally) ignore the blockade in order to arrive. There can't be any waypoint on the map that is inaccessible to a bot, regardless of team to which it belongs.

    You must not place more than 2 consecutive waypoints with this flag (one is enough to avoid the passage), if you place more (three linked with paths), the game may stop working. It is a bug that I still can not fix.
Using an Only Zombie Pass, to create a jump that only the zombies use,
 the fall would kill a human.

Zombie No Return:
    It is purple and is used to indicate a zombie that is in an area of "wait or queue" and must continue trying to move forward and never come back, even if there is another zombie ahead blocking his way. Normally this waypoint is only used in places where it is necessary to be crouched, because mobility is very limited. In cases where you can stand up use it is usually not necessary.

     Perhaps it is the most difficult waypoint to understand for most users. Automatically bots zombie try to evade other zombies to reach a human or return if they are blocked by another zombie, however this behavior changes if 2 conditions met:
- The human is in a narrow tunnel (and is crouched).
- It is visible at the tunnel's end (without walls between zombie and the human).

    Imagine a situation where a human is hiding at the end of a small narrow tunnel and all the zombies try to enter at the same time,this will form a row, always the first zombie in the row (the one that is closest to the human) will receive all the shots, delaying it , which would cause the zombies that come behind can not continue advancing.

    If zombies would use basic navigation behavior, they would decide to go back to avoid congestion, colliding with others. However, if the conditions previous mentioned met, zombies change their behavior: don't try to back down, staying in the multiple bots queue pushing as long as the human is visible and still alive. They will keep "pushing" always forward until the human dies.

    Everything you have read so far is completely automatic and does not require any waypoint to work. However, what happens if the tunnel is not in a straight line? What if the tunnel has several curves before reaching humans? The humans are not visible anymore, the zombies know that there are humans at the end of that tunnel, but they can not see them, so how can we activate this behavior in this kind of situations? For that I created the Zombie No Return.

   These waypoints should be placed in tunnels or narrow places where you want to keep the zombies in a "zombie row", this tells the infected ZMT-Bots that this specific place is not normal and congested and should not back down(fall back); to be able to enter the human shelter at the path end, although they can not see it. Another way to understand it is that it does not allow zombies go back to this waypoint if they already have a target towards the opposite direction of the current path.
In this tunnel, zombies have no line of sight with humans.
Thanks to Zombie No Return use bot zombies will make a "zombie multiple rail" or "zombie row"
although the tunnel is blocked by other zombies, to try enter.




Important tips when making new waypoints

If bots return often and continuosly in a jump, delete this waypoint and make the jump again.

The waypoint Falling risk does not perform the same function as a normal waypoint with 0 radius. Radius 0 only tells the bot that it has to arrive exactly at waypoint center to consider it "reached", but it doesn't prevent the bot's lateral movements and evasions.

The same waypoint can't be the receiver of a jump and, at the same time, be the one that starts another jump, this will make them fall or perform the jump bad. You must create another waypoint next to the first to start the second jump (Check the basic maps and see how the waypoints are placed on the stairs of zm_jackass2, for example).

If an infected bot is located in a "crouched" waypoint but also with radius 0, the bot's navigation will be more strict also trying forcefully to stay close to the waypoint without detour, although the human is very close. This is useful for quite reduced small spaces where it is necessary precise bots maneuvers which would make the bot get stucked with the walls.

If a human is somewhere on the map where there is no nearby waypoint (in an area of 250 without waypoints approximately) and is also detected by zombies view, the infected bots will try to reach that place "directly" and even performing a "zombie ladder". Thanks to this, you don't have to place waypoints in places where a player could climb to escape, since ZMT-Bots are prepared to try to reach it (if there are enough zombies).

It is always advisable to place a waypoint in tunnel entrances where bots have to duck to enter. This helps to put them in the right place at the time right time and enter faster.

Never leave very large areas without waypoints when they are at ground level, that will bring zombie bots problems. All the most "accessible" parts of the map must be covered by waypoints, especially the ground, wide open spaces.




Remember, if you did not understand of any of these waypoints operation, in basic maps you get many examples of use of each of them.


Do you have questions or need help? Please let me know down in the comments or write to my email, I will be happy to help.

Contact email: luis14ccs@gmail.com

1 comentario:

ZMT-Bots and Zombie Plague: Apocalypse

Spanish version  HERE Before posting this post, I was always unsatisfied with the behavior of the bots that existed while p...