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JNLX4AC
WE3JT43OR4L6675GINGU4B3YDBMURJZHDDYY3VLHUJEBAKH2HYEAC
6ZCKL3LCJ2QYYRI6CVK7CU4VXZMIZ6RIOTFUDEM2QTM4EHKVUKMAC
ED62QWGKBPORWVKDFOQRKJXEIWZVNGR3O4KWQBDSRNPT36AYOQYAC
TLA5UN6LZPXGKERI27EFY4HKIIU3VU5Y7ZU54WXL6ANBUV2VOTMQC
APGCKU4AFOV7Z7XIEO5A27H4IFUGDU227I3Z7OIRROYSLOFFBJ5AC
AFE345BJ7IX2YYYX3I5I6RYLXNWJCFE4WMH6F5JMIR6X7WUP75CAC
BTZ3QR6G7FV4DJCEG2CTDFH6YSUM4Y7NXM7NTAKBRLBOUIPKZM4QC
A map designed for D:1, which (usually) contains the primary upstair { and is
always tagged "entry". A player starting a new game will usually land in an
entry vault.
Branch entry vault, or branch portal vault:
A map containing the entry to a branch - either a branch stair (such as
the stair to the Orcish Mines), or a branch portal (a portal to Hell, say).
Always tagged "<branchname>_entry".
* Branch entry vault, or branch portal vault:
A map containing the entry to a branch - either a branch stair (such as the
stair to the Orcish Mines), or a branch portal (a portal to Hell, say). Always
tagged "<branchname>_entry".
* Special level:
A map for a location of significance in the game, such as the Ecumenical
Special level:
A map for a location of significance in the game, such as the Ecumenical
* Random vaults:
Random vaults may be randomly generated at any level in the dungeon. Random
vault maps are selected by the dungeon builder based on their DEPTH:
Random vaults:
Random vaults may be randomly generated at any level in the dungeon.
Random vault maps are selected by the dungeon builder based on their DEPTH:
* Random minivaults:
Random minivaults are small maps that are placed onto a level that the
dungeon builder has already constructed fully otherwise (the level may
Random minivaults:
Random minivaults are small maps that are placed onto a level that the
dungeon builder has already constructed fully otherwise (the level may
NAME: a_useless_temple_entry_02
# header section below:
ORIENT: float
CHANCE: 5
TAGS: temple_entry
FLAGS: no_rotate
SHUFFLE: de
SUBST: 1=12.
MONS: butterfly, plant
ITEM: stone, w:10 any book / w:90 nothing
# actual map below:
MAP
xx1@2xx
x1wWw2x
ewwOwwd
x2www1x
xx1.1xx
ENDMAP
NAME: useless_temple_entry
# header section below:
ORIENT: float # "ORIENT: float" tells the level builder that
# this entry can be anywhere on the level.
TAGS: temple_entry # "TAGS: temple_entry" turns the 'O' on the
MONS: butterfly, plant # map into stairs to the Temple.
ITEM: stone
# actual map below: # The symbols on the map:
MAP # x - rock wall
xx.d.xx # . - floor
x..1..x # @ - entry point (
@d2O2d. # O - stairs to the Temple
x..1..x # 1 - first monster from list (here butterfly)
xx.d.xx # 2 - second monster from list (here plant)
ENDMAP # d - first item from the list (here stones)
briefly after the example map and in detail in the following sections.
"ORIENT: float" tells the level builder that this entry can be anywhere on the
level; other ORIENT: values can force a map to one edge of the
level.
"CHANCE: 5" makes the map appear less often (default is 10).
"TAGS: temple_entry" turns the 'O' on the map into stairs to the Temple.
"FLAGS: no_rotate" forbids rotation (but mirroring is still allowed).
"SHUFFLE: de" may replace all 'd' with 'e' in the map.
"SUBST: 1=12." may replace each '1' with either '1' or '2' or '.'.
"MONS: butterfly, plant" turns all '1' into butterflies, and '2' into plants.
"ITEM: stone" turns all 'd' into stones.
"ITEM: w:10 any book / w:90 nothing" turns all 'e' into a book
(with 10% chance) or creates no object (with 90% chance).
in detail in the following sections.
The symbols on the map:
x - rock wall
w - water (could be deep or shallow)
W - shallow water
. - plain floor
@ - entry point (this square will be connected to the rest of the map)
O - stairs to the Temple
1 - first monster from the list (here butterfly) - note the SUBST: 1=12.
2 - second monster from the list (plant)
d - first item from the list (here stones)
e - second item from the list (here occassionally a book)
years, there are some inconsistencies. For examples, dangerous statues
(orange, silver, ice) are now genuine monsters. In particular, you might see
many older vaults still using the deprecated 'H' and 'S' glyphs which should
years, there are some inconsistencies. For examples, dangerous statues (ice,
orange, silver) are now genuine monsters. In particular, you might see many
older vaults still using the deprecated 'H' and 'S' glyphs which should
Try to respect line lengths of 80 characters. Should some line exceed that
(which is quite possible, especially for ITEM and MONS lines), you can use
the \ symbol to break a line. You can break a line anywhere, with the
exception of comma-separated lists, where you cannot start a new line with
a comma. See the end of this section for examples.
Valid flags are: no_tele_control, which prevents the player from
using teleport control; not_mappable, which prevents the player
from remembering where they've been (like in the Abyss), and
no_magic_map, which prevents magic mapping from working.
Valid flags are:
* no_tele_control - prevents the player from using teleport control
* not_mappable - prevents the player from remembering where
they've been (like in the Abyss)
* no_magic_map - which prevents magic mapping from working.
Valid flags are: no_tele_control, which prevents the player from
using teleport control; not_mappable, which prevents the player
from remembering where they've been (like in the Abyss), and
no_magic_map, which prevents magic mapping from working.
Valid flags are:
* no_tele_control - prevents the player from using teleport control
* not_mappable - prevents the player from remembering where
they've been (like in the Abyss)
* no_magic_map - which prevents magic mapping from working.
If your map is not a minivault or a floating vault, make sure the
side(s) forming the border have a rock wall padding at least 6 deep. For
instance, if your map is ORIENT: north, you must have a 6 deep border of
rock wall (or any other kind of wall) along the northern, eastern, and
western edges of the map. If you're doing a fullscreen map (encompass),
you must pad all around the map with 6 layers of wall.
The level making syntax is now very supportive for making a single map
appear in many versions. Use the SHUFFLE: and SUBST: directives and look
at the existing entry vaults. Besides reducing tedium, this avoids giving
veterans a spoiled edge. For example, if a secret chamber with loot is
always at the same place, it's a no-brainer for those who know. The same
goes for traps. This is much less so if there are several places for the
chamber (or trap) and there's even a chance it doesn't exist.
The level making syntax is very supportive for making a single map appear
in many versions. Use the SHUFFLE: and SUBST: and NSUBST: directives and
look at the existing entry vaults. Besides reducing tedium, this avoids
giving veterans a spoiled edge. As an example, if a secret chamber with
loot is always at the same place, it's a no-brainer for those who know.
The same goes for traps. This is much less so if there are several places
for the chamber (or trap) and there's even a chance it doesn't exist.
It is often worthwhile (to me at least) to have a theme in mind before
making the actual level. For entry vaults, something simple like
'fortress' or 'forest' may be enough. For later (or larger) maps, try
to think of distinguishing features your map may have. Being cool can
be good enough, but possessing some gameplay value (for example by being
easier for particular skills/capabilities like ranged attacks or
necromancy or Traps & Doors) is even better.
It is often worthwhile (for me at least) to have a theme in mind before
making the actual level. For entry vaults, something simple like 'forest'
or 'fortress' may be enough. For later (or larger) maps, try to think of
distinguishing features your map may have. Being cool can be good enough,
but possessing some gameplay value (for example by being easier for
particular skills/capabilities like ranged attacks or Traps & Doors or
necromancy) is even better.
Larger vaults can be conjured up in wizard mode using the &L command.
You don't need to specify the full name of the vault, a substring which
uniquely determines the vault is enough. You can playtest portal vaults
using the &P wizard command. Branch ends can be conveniently tested with
the &~ command.
Vaults can be conjured up in wizard mode using the &L command. You don't
need to specify the full name of the vault, a substring which uniquely
determines the vault is enough. You can playtest portal vaults using the &P
wizard command. Branch ends can be conveniently tested with the &~ command.
------------------
==================
Portal vaults are vaults accessed by portals in the dungeon (labyrinths
and bazaars are special cases of portal vaults). You can create custom
portal vaults in the following steps (no compilation is necessary):
* Create a new file name.des in the dat/ folder. Rules:
The "name" should be descriptive of the vault you're adding.
The "name" should not exceed eight letters.
The ending must be "des".
* Add "name.des" to the list of local files in dat/clua/loadmaps.lua.
* "name.des" should contain a comment at the top, explaining flavour and
gameplay goals of the portal vault (and perhaps additional ideas etc.)
* Define at least one vault containing the portal (see below).
* Define at least one destination map (see below).
* Add a short in-game description for the string "desc" (see below) to
dat/descript/features.txt.
Portal vaults are vaults accessed by portals in the dungeon (bazaars
are a special case of portal vaults). You can create custom portal
vaults as follows:
Before going into the details of portal vault creation, some words about
their uses: Portal vaults are different from branches in that they are
not guaranteed. Furthermore, there is only one go at a portal vault - if
you leave, it's gone for good. Finally, you can apply special rules to a
portal vault, like disabling mapping. Bazaars and labyrinths are typical
examples.
Define a vault to hold the portal itself:
In order to test a portal vault, you can either use PLACE: D:2 for an
entry vault, or use the wizard mode command &L for conjuring up the entry.
Define a vault to hold the portal itself
----------------------------------------
The MARKER parameters
---------------------
The lines
MARKER: O = lua:one_way_stair { desc = "A portal to places unknown", \
dst = "generic_portal" }
KFEAT: O = enter_portal_vault
ensure that an 'O' glyph will be turned into a portal. Upon leaving the portal
vault, you will be placed on its entry which has been turned into a floor. You
can turn it into something different (usually an empty stone arch), by adding
floor = 'stone_arch'
to the lua:one_way_stair parameters.
Note that the desc string is what you will see upon examining the portal.
The dst string is used for Crawl's right hand stat area; it will show
Place: generic portal
in the above example. The dst string is also used to link the destination maps
to the entry maps.
You can replace lua:one_way_stair by lua:timed_marker in order to make timed
portal vaults (which will disappear after some time). bazaar.des and lab.des
contain examples.
Using lua functions as shortcuts
--------------------------------
If you are making several entry and destination vaults, you will note a
lot of duplicated header statements. This can be lessened using lua.
Define a lua block right at the top (after your comments) as follows:
{{
function generic_portal(e)
e.marker([[O = lua:one_way_stair { desc = "A portal to places unknown", \
dst = "generic_portal", \
floor = "stone_arch" }]])
e.kfeat("O = enter_portal_vault")
e.colour("O = magenta")
end
}}
Instead of the MARKER and KFEAT lines introduced above you now just use
:generic_portal(_G)
and the resulting portal glyphs will even be magenta!