]> git.xonotic.org Git - xonotic/xonotic.wiki.git/blobdiff - Creating-bot-waypoints.md
Link to Creating-bot-waypoints
[xonotic/xonotic.wiki.git] / Creating-bot-waypoints.md
index eab45623490ac220a8e2043886c4c8b194611d05..ee1d65a64b4e39c65d311d2fcfe6f45dbdc2e8d1 100644 (file)
@@ -8,7 +8,7 @@ Note that many of the new features described here can be found **only in recent
 
 First of all you need to know what game modes are supported by the map you are going to waypoint and start the appropriated mode. To know this information you can right click on a map in the map list (menu / Singleplayer / Create window). For a map to appear in that list you need to put its .pk3 file in your ${xon_settings}/data/ directory.
 
-* If a map supports **CTF**, you should start a CTF game so that game automatically adds a waypoint for each flag. CTF waypoints are compatible with other modes (except Race and Assault) but keep in mind that waypoints of flags and all links from/to them will not be loaded in other modes. It's highly recommended to enable symmetrical editing on symmetrical maps as described in the `Symmetrical editing` section.
+* If a map supports **CTF**, you should start a CTF game since the editor automatically adds a waypoint for each flag. CTF waypoints are compatible with other modes (except Race and Assault) but keep in mind that waypoints of flags and all links from/to them will not be loaded in other modes. It's highly recommended to enable symmetrical editing on symmetrical maps as described in the [Symmetrical editing](https://gitlab.com/xonotic/xonotic/-/wikis/Creating-bot-waypoints#symmetrical-editing) section below.
 
 * If a map supports **Assault**, you should start an Assault game and destroy all the objective but the last one before editing waypoints because otherwise there are doors / obstacles that block paths to other parts of the map. If you forget to do so, don't worry, you can make up by relinking all the waypoints with `wpeditor relinkall` after having destroyed all the objectives.
 
@@ -30,7 +30,7 @@ wpeditor unreachable         determines waypoints, items and spawnpoints that ca
 wpeditor spawn crosshair     spawns a waypoint at crosshair's position (in general useful to create special and hardwired links with ease from existing waypoints, in particular it's the only way to create custom jumppad waypoints (spawn another waypoint to create destination))
 wpeditor spawn jump          spawns a jump waypoint (spawn another waypoint to create destination)
 wpeditor spawn crouch        spawns a crouch waypoint
-wpeditor spawn support       spawns a support waypoint (spawn another waypoint to create destination from which all incoming links are removed), useful to replace links to preblematic jumppad/teleport waypoints
+wpeditor spawn support       spawns a support waypoint (spawn another waypoint to create destination from which all incoming links are removed), useful to replace links to problematic jumppad/teleport waypoints
 wpeditor hardwire            marks the nearest waypoint as origin of a new hardwired link (spawn another waypoint over an existing one to create destination)
 wpeditor hardwire crosshair  marks the waypoint at crosshair instead of the nearest waypoint
 ```
@@ -53,10 +53,25 @@ To your convenience I set up a config file with all the commands described in th
 | Cyan   | Crouch waypoint                                                                                                        |
 | Green  | Support waypoint (useful to replace incoming links of a problematic teleport / jumppad)                                |
 
+|  Normal waypoint |  Support waypoint |
+| :------: | :------: |
+| ![normal_wp](uploads/9573c68889648122385609f314b1f077/normal_wp.jpg)  | ![support_wp](uploads/ffc9cef7d586de00266c20d4eeffaaf8/support_wp.jpg) |
+| Links to all the waypoints (except the teleporter waypoint which has a support waypoint) | Links only to the destination waypoint (the teleporter waypoint which can't have any other incoming link) |
+
+| Hardwired waypoint | Crouch waypoint |
+| :------: | :------: |
+| ![hardwired_wp](uploads/80220aa4479a827e72b0a3734c9b237e/hardwired_wp.jpg) | ![crouch_wp](uploads/77207df550e8c0316e08bdd696917493/crouch_wp.jpg) |
+| Normal waypoint with one or more hardwired link | Links to all the waypoints within 100 qu range |
+
+| Jump waypoint | Jump waypoint linked to a Crouch waypoint |
+| :------: | :------: |
+| ![jump_wp](uploads/ae680fd80bdf748fdee6d2f9186dada3/jump_wp.jpg) | ![jump_wp_to_crouch_wp](uploads/bdb424baaeff32bf3f406b43be17e5a6/jump_wp_to_crouch_wp.jpg) |
+| Links only to the destination waypoint(s) | Links only to the destination waypoint(s) |
+
 Enable the waypoint editor with `g_waypointeditor 1` or `th_waypointeditor_enable`, start a map and become a player to be able to edit waypoints.
 
 If there are no user-made waypoints you can see only the autogenerated ones (yellow and red).
-Start by adding normal waypoints with the command `wpeditor spawn`, the editor will automatically generate links between them. Outgoing links are displayed as lightnings popping out from the nearest waypoint, if you want to see the incoming links you have to hold the `CROUCH` key down (default key: SHIFT).
+Start by adding normal waypoints with the command `wpeditor spawn`, the editor will then automatically generate links between them. Outgoing links are displayed as lightnings popping out from the nearest waypoint, if you want to see the incoming links you have to hold the `CROUCH` key down (default key: SHIFT).
 
 A link from waypoint A to waypoint B means that a bot can theoretically safely walk from A to B (it can even jump obstacles but not gaps), even though in practice it depends on waypoint position and bot skill: bot may face some difficulties, for example if too close to a ledge or turning while approaching to A. In general to avoid bad surprises you shouldn't put waypoints too close to wall edges, gaps or dangerous places.
 
@@ -66,27 +81,29 @@ Bots can swim too if you put waypoints in the water or even above the water surf
 
 Use the command `wpeditor saveall` to save waypoints and links, preferably run this command periodically to avoid accidental loss of waypoints you have added since the last save.  
 It will generate 3 files in your data directory:
-* `data/data/maps/\<mapname\>.waypoints` containing waypoints data
-* `data/data/maps/\<mapname\>.waypoints.cache` containing links data
-* `data/data/maps/\<mapname\>.waypoints.hardwired` containing hardwired and special links data
+* `data/data/maps/<mapname>.waypoints` containing waypoints data
+* `data/data/maps/<mapname>.waypoints.cache` containing links data
+* `data/data/maps/<mapname>.waypoints.hardwired` containing hardwired and special links data
 
 In Race or Race CTS mode, you will get these files instead:
-* `data/data/maps/\<mapname\>.race.waypoints`
-* `data/data/maps/\<mapname\>.race.waypoints.cache`
-* `data/data/maps/\<mapname\>.race.waypoints.hardwired`
+* `data/data/maps/<mapname>.race.waypoints`
+* `data/data/maps/<mapname>.race.waypoints.cache`
+* `data/data/maps/<mapname>.race.waypoints.hardwired`
 
 #### Symmetrical editing:
 
-The waypoint editor has a very useful editing mode that halves time required to waypoint symmetrical maps (mostly the CTF ones): every time you spawn / remove a waypoint, the same operation is repeated on its symmetrical position. There are even options to set up custom symmetry on maps with not perfect flag symmetry or that don't support CTF.
+The waypoint editor has a very useful editing mode that halves time required to waypoint symmetrical maps (mostly the CTF ones): every time you spawn / remove a waypoint, the same operation is repeated on its symmetrical position. There are even options to set up custom symmetry on maps without a perfect flag symmetry or without CTF support at all.
 
-First of all you need to understand the map symmetry:
+First of all you need to figure out the map symmetry:
 
 1. **Point reflection**: the most common among Xonotic maps (Dance, Implosion, Geoplanetary), half part of the map is (horizontally) rotated by 180 degrees around a point (origin) that is the center of the map.
 1. **Reflectional symmetry**: less common (Runningman CTF), half part of the map is a mirror-image of the other one, the axis of symmetry is in the mirror-line.
 1. **Rotational symmetry** (of order 3 or greater): rarely used as it needs 3 or more flags (gasoline_3teams, gasoline_4teams). With order 3 a part of the map is rotated twice by 120 and 240 degrees around a point (origin) that is the center of the map.
 
 If you think map symmetry is 1) or 3) try `g_waypointeditor_symmetrical 1`, if you think it's 2) try `g_waypointeditor_symmetrical 2`.
-Check that the autodetermined symmetry is correct by spawning one or more test waypoint and checking that the symmetrical waypoints are spawned *exactly* where they should be. If you can't find a symmetrical waypoint or its position is wrong you can determine origin or axis of symmetry with the help of the commands `wpeditor symorigin get|set p1 p2 ... pX` and `wpeditor symaxis get|set p1 p2` where p1 p2 ... pX are positions "x y z" that you know are perfectly symmetrical. With `get` values of origin / axis are printed to the console, with `set` values of origin / axis are applied immediately, that is they are set to the g_waypointeditor_symmetrical_* cvars.  
+Check that the autodetermined symmetry is correct by spawning one or more test waypoint and checking that the symmetrical waypoints are spawned *exactly* where they should be: if they respect map symmetry then you are ready to waypoint the map.
+
+If you can't find the symmetrical waypoints or their position are wrong it's possible to determine the origin or axis of symmetry with the commands `wpeditor symorigin get|set p1 p2 ... pX` and `wpeditor symaxis get|set p1 p2` where p1 p2 ... pX are positions "x y z" that you know are perfectly symmetrical. With `get` values of origin / axis are printed to the console, with `set` values of origin / axis are applied immediately, that is they are set to the g_waypointeditor_symmetrical_* cvars.  
 Note: don't forget to remove test waypoints before you change symmetry settings otherwise you won't be able to easily remove their symmetrical waypoints.
 
 The symmetry settings are saved to the waypoint files and reloaded from there when you restart the map.
@@ -135,11 +152,11 @@ Use the command `wpeditor unreachable` to reveal waypoints and items unreachable
 
 Recomended settings:
 ```
-bot_nofire 1           // when set, bots never fire
-bot_debug_goalstack 1  // visualize the current path that each bot is following
-skill 4                // waypoints should work well at least with bots with medium movement skill
+bot_nofire 1
+bot_debug_goalstack 1
+skill 4
 bot_number 1
 ```
 
-Check how well bot navigates the map with your waypoints: add a single bot with medium skills and spectate it (preferably in free third person view by pressing twice `BACKSPACE` once you are spectator); if you notice it takes weird paths (zigzags), gets stuck, bumps into wall, falls down or can't jump an obstacle on some links try to fix them by creating a slightly different route that is more reliable.
-It is also a good idea to test how high skilled bots behave as they can bunnyhop (skill 7 and higher).
+Check how well bot navigates the map with your waypoints: add a single bot with medium skills (`skill 4`) and spectate it (preferably in free third person view by pressing `BACKSPACE` twice once you are spectator so you can change camera angles with your mouse); if you notice it takes weird paths (zigzags), gets stuck, bumps into walls, falls down or can't jump an obstacle on some links try to fix them by creating a slightly different route that is more reliable.
+It is also a good idea to test how high skilled bots behave as they can bunnyhop (skill 7 and higher).
\ No newline at end of file