Difference between revisions of "Dungeon.def format"
(link to MAZE in def-file format) |
(describe the commands for adding new LEVELs and BRANCHes) |
||
Line 14: | Line 14: | ||
This is used to define a new dungeon. | This is used to define a new dungeon. | ||
+ | |||
*<tt>"name"</tt> is the name of the dungeon | *<tt>"name"</tt> is the name of the dungeon | ||
*<tt>"bonetag"</tt> is the character used in file names when a bones file is created in this dungeon. | *<tt>"bonetag"</tt> is the character used in file names when a bones file is created in this dungeon. | ||
Line 36: | Line 37: | ||
DESCRIPTION: flag | DESCRIPTION: flag | ||
− | Sets a flag for the | + | Sets a flag for the previously defined DUNGEON. You can use as many DESCRIPTION lines as you want. |
flag is one of the following flags: | flag is one of the following flags: | ||
Line 51: | Line 52: | ||
ALIGNMENT: flag | ALIGNMENT: flag | ||
− | Sets the dungeon | + | Sets the alignment for the previously defined DUNGEON. Only one of these per dungeon allowed. |
flag is one of the following flags: | flag is one of the following flags: | ||
Line 75: | Line 76: | ||
BRANCH: "name" @ (base, range) type dir | BRANCH: "name" @ (base, range) type dir | ||
− | *<tt>"name"</tt> is the name of the branch | + | Adds a branch to the previously defined DUNGEON. |
− | *<tt>base</tt> and <tt>range</tt> define the branch | + | |
+ | *<tt>"name"</tt> is the name of the branch. You must later define a DUNGEON with the same name. | ||
+ | *<tt>base</tt> and <tt>range</tt> define the depth where the branch occurs. | ||
*<tt>type</tt> is optional (defaults to <tt>stair</tt>), or one of the following: | *<tt>type</tt> is optional (defaults to <tt>stair</tt>), or one of the following: | ||
**<tt>stair</tt>, a two-way stair | **<tt>stair</tt>, a two-way stair | ||
Line 93: | Line 96: | ||
CHAINBRANCH: "name" "chain" + (base, range) type dir | CHAINBRANCH: "name" "chain" + (base, range) type dir | ||
− | + | Adds a branch to the previously defined DUNGEON. This is similar to BRANCH, except the depth depends where a LEVEL occurs in the previously defined DUNGEON. | |
− | *<tt>base</tt> and <tt>range</tt> define the branch depth | + | |
+ | *<tt>name</tt> is the name of the branch. You must later define a DUNGEON with the same name. | ||
+ | *<tt>chain</tt> is a name of a previously defined LEVEL in this DUNGEON. | ||
+ | *<tt>base</tt> and <tt>range</tt> define the branch depth, relative to <tt>chain</tt>. | ||
*<tt>type</tt> and <tt>dir</tt> as in [[#BRANCH|BRANCH]] | *<tt>type</tt> and <tt>dir</tt> as in [[#BRANCH|BRANCH]] | ||
Line 104: | Line 110: | ||
LEVEL: "name" "bonetag" @ (base, range) chance | LEVEL: "name" "bonetag" @ (base, range) chance | ||
− | + | Adds a special level to the previously defined DUNGEON. See also RNDLEVEL. | |
− | *<tt>name</tt> is the name of this special level | + | |
+ | *<tt>name</tt> is the name of this special level, and is used for loading the special levels from disk. You must define a special des-level with the same name. | ||
*<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>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>base</tt> and <tt>range</tt> define the branch depth | ||
Line 117: | Line 124: | ||
RNDLEVEL: "name" "bonetag" @ (base, range) chance nlevels | RNDLEVEL: "name" "bonetag" @ (base, range) chance nlevels | ||
− | + | Adds a special level to the previously defined DUNGEON, with several variants for the des-level. See also LEVEL. | |
+ | |||
*<tt>name</tt> is the name of this special level. used for loading the special levels from disk. The name format will be <tt>name-num</tt>, where <tt>num</tt> is the variant of the level to be loaded. For example, <tt>bigrm-3</tt>. See also MAZE in [[Des-file format#MAZE|Des-file format]]. | *<tt>name</tt> is the name of this special level. used for loading the special levels from disk. The name format will be <tt>name-num</tt>, where <tt>num</tt> is the variant of the level to be loaded. For example, <tt>bigrm-3</tt>. See also MAZE in [[Des-file format#MAZE|Des-file format]]. | ||
*<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>bonetag</tt> is a single character used in a filename when this level leaves a bones. This should be unique among all special levels. | ||
Line 130: | Line 138: | ||
LEVELDESC: flag | LEVELDESC: flag | ||
+ | |||
+ | Defines flags for a previously defined LEVEL or RNDLEVEL. | ||
<tt>flag</tt> is the same as [[#DESCRIPTION|DESCRIPTION]] has. | <tt>flag</tt> is the same as [[#DESCRIPTION|DESCRIPTION]] has. | ||
Line 139: | Line 149: | ||
LEVALIGN: flag | LEVALIGN: flag | ||
+ | |||
+ | Defines alignment of a previously defined LEVEL or RNDLEVEL. | ||
<tt>flag</tt> is the same as [[#ALIGNMENT|ALIGNMENT]] has. | <tt>flag</tt> is the same as [[#ALIGNMENT|ALIGNMENT]] has. | ||
Line 149: | Line 161: | ||
CHAINLEVEL: "name" "bonetag" "chain" + (base, range) chance | CHAINLEVEL: "name" "bonetag" "chain" + (base, range) chance | ||
− | + | Adds a special level to the previously defined DUNGEON. This is similar to LEVEL, except the depth depends where another LEVEL occurs in the previously defined DUNGEON. | |
*<tt>name</tt> is the name of this special level. used for loading the special levels from disk. | *<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. Can also be <tt>"none"</tt>. | *<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. Can also be <tt>"none"</tt>. | ||
− | *<tt>base</tt> and <tt>range</tt> define the | + | *<tt>chain</tt> is a name of a previously defined LEVEL in this DUNGEON. |
+ | *<tt>base</tt> and <tt>range</tt> define the level depth, relative to <tt>chain</tt>. | ||
*<tt>chance</tt> is optional, gives the % chance of this level existing in any given game. | *<tt>chance</tt> is optional, gives the % chance of this level existing in any given game. | ||
Line 163: | Line 176: | ||
RNDCHLEVEL: "name" "bonetag" "chain" + (base, range) chance nlevels | RNDCHLEVEL: "name" "bonetag" "chain" + (base, range) chance nlevels | ||
− | + | Adds a special level to the previously defined DUNGEON, with several variants for the des-level. This is similar to CHAINLEVEL, except the depth depends where another LEVEL occurs in the previously defined DUNGEON. | |
− | *<tt>name</tt> is the name of this special level. used for loading the special levels from disk. | + | *<tt>name</tt> is the name of this special level. used for loading the special levels from disk. The name format will be <tt>name-num</tt>, where <tt>num</tt> is the variant of the level to be loaded. For example, <tt>bigrm-3</tt>. See also MAZE in [[Des-file format#MAZE|Des-file format]]. |
*<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. Can also be <tt>"none"</tt> | *<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. Can also be <tt>"none"</tt> | ||
− | *<tt> | + | *<tt>chain</tt> is a name of a previously defined LEVEL in this DUNGEON. |
− | *<tt>base</tt> and <tt>range</tt> define the | + | *<tt>base</tt> and <tt>range</tt> define the level depth, relative to <tt>chain</tt>. |
*<tt>chance</tt> is optional, gives the % chance of this level existing in any given game. | *<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. | *<tt>nlevels</tt> is the number of different special level layout version for this particular level. | ||
[[Category:Annotations]] | [[Category:Annotations]] |
Revision as of 18:39, 7 March 2007
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
Contents
Comments
All lines beginning with # are comments and are ignored by the compiler.
Example:
# 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 previously defined DUNGEON. You can use as many DESCRIPTION lines as you want.
flag is one of the following flags:
- town
- hellish
- mazelike
- roguelike
Example:
DESCRIPTION: mazelike
ALIGNMENT
ALIGNMENT: flag
Sets the alignment for the previously defined DUNGEON. Only one of these per dungeon allowed.
flag is one of the following flags:
- unaligned (or it's synonym noalign)
- lawful
- neutral
- chaotic
Example:
ALIGNMENT: lawful
PROTOFILE
PROTOFILE: "str"
Sets the special level prototype filename. This is used when loading the lev-file from disk. See MAZE in Des-file format.
Example:
PROTOFILE: "tower"
BRANCH
BRANCH: "name" @ (base, range) type dir
Adds a branch to the previously defined DUNGEON.
- "name" is the name of the branch. You must later define a DUNGEON with the same name.
- base and range define the depth where the branch occurs.
- type is optional (defaults to stair), or one of the following:
- stair, a two-way stair
- no_up, no up staircase
- no_down, no down staircase
- portal, portal connection
- dir is optional (defaults to down), or is one of the following:
- up
- down
Example:
BRANCH: "Vlad's Tower" @ (9, 5) up
CHAINBRANCH
CHAINBRANCH: "name" "chain" + (base, range) type dir
Adds a branch to the previously defined DUNGEON. This is similar to BRANCH, except the depth depends where a LEVEL occurs in the previously defined DUNGEON.
- name is the name of the branch. You must later define a DUNGEON with the same name.
- chain is a name of a previously defined LEVEL in this DUNGEON.
- base and range define the branch depth, relative to chain.
- type and dir as in BRANCH
Example:
CHAINBRANCH: "Gehennom" "castle" + (0, 0) no_down
LEVEL
LEVEL: "name" "bonetag" @ (base, range) chance
Adds a special level to the previously defined DUNGEON. See also RNDLEVEL.
- name is the name of this special level, and is used for loading the special levels from disk. You must define a special des-level with the same name.
- bonetag is a single character used in a filename when this level leaves a bones. This should be unique among all special levels.
- base and range define the branch depth
- chance 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
Adds a special level to the previously defined DUNGEON, with several variants for the des-level. See also LEVEL.
- name is the name of this special level. used for loading the special levels from disk. The name format will be name-num, where num is the variant of the level to be loaded. For example, bigrm-3. See also MAZE in Des-file format.
- bonetag is a single character used in a filename when this level leaves a bones. This should be unique among all special levels.
- base and range define the branch depth
- chance is optional, gives the % chance of this level existing in any given game.
- nlevels is the number of different special level layout version for this particular level.
Example:
RNDLEVEL: "bigrm" "B" @ (10, 3) 40 5
LEVELDESC
LEVELDESC: flag
Defines flags for a previously defined LEVEL or RNDLEVEL.
flag is the same as DESCRIPTION has.
Example:
LEVELDESC: town
LEVALIGN
LEVALIGN: flag
Defines alignment of a previously defined LEVEL or RNDLEVEL.
flag is the same as ALIGNMENT has.
Example:
LEVALIGN: chaotic
CHAINLEVEL
CHAINLEVEL: "name" "bonetag" "chain" + (base, range) chance
Adds a special level to the previously defined DUNGEON. This is similar to LEVEL, except the depth depends where another LEVEL occurs in the previously defined DUNGEON.
- name is the name of this special level. used for loading the special levels from disk.
- bonetag is a single character used in a filename when this level leaves a bones. This should be unique among all special levels. Can also be "none".
- chain is a name of a previously defined LEVEL in this DUNGEON.
- base and range define the level depth, relative to chain.
- chance is optional, gives the % chance of this level existing in any given game.
Example:
CHAINLEVEL: "wizard2" "X" "wizard1" + (1, 0)
RNDCHLEVEL
RNDCHLEVEL: "name" "bonetag" "chain" + (base, range) chance nlevels
Adds a special level to the previously defined DUNGEON, with several variants for the des-level. This is similar to CHAINLEVEL, except the depth depends where another LEVEL occurs in the previously defined DUNGEON.
- name is the name of this special level. used for loading the special levels from disk. The name format will be name-num, where num is the variant of the level to be loaded. For example, bigrm-3. See also MAZE in Des-file format.
- bonetag is a single character used in a filename when this level leaves a bones. This should be unique among all special levels. Can also be "none"
- chain is a name of a previously defined LEVEL in this DUNGEON.
- base and range define the level depth, relative to chain.
- chance is optional, gives the % chance of this level existing in any given game.
- nlevels is the number of different special level layout version for this particular level.