Dungeon.def format

dungeon.def is the file that describes how the dungeon branches and what special levels are used and where. It is compiled into a binary file by dgn_comp

Comments
All lines beginning with # are comments and are ignored by the compiler.

Example:


 * 1) This is a comment.

DUNGEON
DUNGEON: "name" "bonetag" (base, range)

This is used to define a new dungeon.
 * "name" is the name of the dungeon
 * "bonetag" is the character used in file names when a bones file is created in this dungeon.
 * base and range define the dungeon depth.

You can also add an optional integer, which is the chance of this dungeon being generated.

Example: DUNGEON: "The Dungeons of Doom" "D" (25, 5)

ENTRY
ENTRY: lvl

TODO

Example: ENTRY: -1

DESCRIPTION
DESCRIPTION: flag

Sets a flag for the whole dungeon.

flag is one of the following flags:
 * town
 * hellish
 * mazelike
 * roguelike</tt>

Example: DESCRIPTION: mazelike

ALIGNMENT
ALIGNMENT: flag

Sets the dungeon alignment.

flag is one of the following flags:
 * unaligned</tt> (or it's synonym noalign</tt>)
 * lawful</tt>
 * neutral</tt>
 * chaotic</tt>

Example: ALIGNMENT: lawful

PROTOFILE
PROTOFILE: "str"

Sets the special level prototype filename.

Example: PROTOFILE: "tower"

BRANCH
BRANCH: "name" @ (base, range) type dir


 * "name"</tt> is the name of the branch
 * base</tt> and range</tt> define the branch depth
 * type</tt> is optional (defaults to stair</tt>), or one of the following:
 * stair</tt>, a two-way stair
 * no_up</tt>, no up staircase
 * no_down</tt>, no down staircase
 * portal</tt>, portal connection
 * dir</tt> is optional (defaults to <tt>down</tt>), or is one of the following:
 * <tt>up</tt>
 * <tt>down</tt>

Example: BRANCH: "Vlad's Tower" @ (9, 5) up

CHAINBRANCH
CHAINBRANCH: "name" "chain" + (base, range) type dir

TODO.
 * <tt>base</tt> and <tt>range</tt> define the branch depth
 * <tt>type</tt> and <tt>dir</tt> as in BRANCH

Example: CHAINBRANCH: "Gehennom" "castle" + (0, 0) no_down

LEVEL
LEVEL: "name" "bonetag" @ (base, range) chance

TODO
 * <tt>name</tt> is the name of this special level. used for loading the special levels from disk.
 * <tt>bonetag</tt> is a single character used in a filename when this level leaves a bones. This should be unique among all special levels.
 * <tt>base</tt> and <tt>range</tt> define the branch depth
 * <tt>chance</tt> is optional, gives the % chance of this level existing in any given game.

Example: LEVEL: "oracle" "O" @ (5, 5)

RNDLEVEL
RNDLEVEL: "name" "bonetag" @ (base, range) chance nlevels

TODO
 * <tt>name</tt> is the name of this special level. used for loading the special levels from disk.
 * <tt>bonetag</tt> is a single character used in a filename when this level leaves a bones. This should be unique among all special levels.
 * <tt>base</tt> and <tt>range</tt> define the branch depth
 * <tt>chance</tt> is optional, gives the % chance of this level existing in any given game.
 * <tt>nlevels</tt> is the number of different special level layout version for this particular level.

Example: RNDLEVEL: "bigrm" "B" @ (10, 3) 40 5

LEVELDESC
LEVELDESC: flag

<tt>flag</tt> is the same as DESCRIPTION has.

Example: LEVELDESC: town

LEVALIGN
LEVALIGN: flag

<tt>flag</tt> is the same as ALIGNMENT has.

Example: LEVALIGN: chaotic

CHAINLEVEL
TODO

RNDCHLEVEL
TODO