diff --git a/docs/source/Contribs/XYZGrid.md b/docs/source/Contribs/XYZGrid.md index 28837f0599..c1b4bc73f0 100644 --- a/docs/source/Contribs/XYZGrid.md +++ b/docs/source/Contribs/XYZGrid.md @@ -1,255 +1,1243 @@ # XYZGrid contribution -This contrib adds a 'coordinate grid' to the game, with rooms that are aware of -their X, Y, Z coordinate. It also adds shortest-path pathfinding, auto-stepping -and map visualization. +```versionadded:: 1.0 +``` -The system consists of 2D (XY) maps, where the Z -coordinate is the name of the map. Each map can be linked together. +This optional contrib adds a 'coordinate grid' to Evennia. It allows for +defining the grid as simple ascii maps that are then spawned into rooms that are +aware of their X, Y, Z coordinates. The system includes shortest-path +pathfinding, auto-stepping and in-game map visualization (with visibility +range). -The grid supports 8 cardinal directions (north, northeast, east etc) as well as -a 'fake' up/down directions (you enter up/down in-game but are actually moving to -a different XY position on the same map). - -An (XY) map is defined as a Python string, using a simple syntax; ``` -#-#-#-# # -| / d -#-# | # - \ u |\ -o---#--------#---+-#-# -| ^ |/ -| | # -v | -#-#-#-#-#----# - |x|x| - #-#-#-# +#-#-#-# # +| / d +#-# | # + \ u |\ +o---#-----#---+-#-# +| ^ |/ +| | # +v | \ +#-#-#-#-#-# #---# + |x|x| / + #-#-# #- +``` + +``` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + #---# + / + @- +-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Dungeon Entrance +To the east, a narrow opening leads into darkness. +Exits: northeast and east ``` -(descriptions of components are found below). -Basically the system will parse this string together with a _legend_ (a mapping -describing how each symbol of the map behaves) to generate a representation of -the map that can then be _spawned_ into actual rooms and exits. The map can also -contain links to other maps this (map transitions). - -The generation and maintenance of the map topology (how rooms are placed and -relate to each other) are maintained entirely from outside of the game. ## Installation 1. Import and add the `evennia.contrib.commands.XYZGridCmdSet` to the `CharacterCmdset` cmdset in `mygame/commands.default_cmds.py`. Reload - the server. This makes the `map`, `goto/path` and modified `teleport` and + the server. This makes the `map`, `goto/path` and the modified `teleport` and `open` commands available in-game. -2. Edit `mygame/server/conf/settings.py` and set +2. Edit `mygame/server/conf/settings.py` and add - EXTRA_LAUNCHER_COMMANDS['xyzgrid'] = 'evennia.contrib.launchcmd.xyzcommand' + EXTRA_LAUNCHER_COMMANDS['xyzgrid'] = 'evennia.contrib.launchcmd.xyzcommand' -3. Run the new `evennia xyzgrid help` for instructions on how to build the grid. + and -## Example usage + PROTOTYPE_MODULES += [’evennia.contrib.xyzgrid.prototypes’] -After installation, do the following (from your command line, where the -`evennia` command is available) to install an example grid: + This will add the new ability to enter `evennia xyzgrid