Dungeon.def format

From NetHackWiki
Revision as of 18:41, 14 September 2006 by Paxed (talk | contribs) (first info. still lots TODO)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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:

# 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

Example:

DESCRIPTION: mazelike

ALIGNMENT

ALIGNMENT: flag

Sets the dungeon alignment.

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.

Example:

PROTOFILE: "tower"

BRANCH

BRANCH: "name" @ (base, range) type dir
  • "name" is the name of the branch
  • base and range define the branch depth
  • 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

TODO.

  • base and range define the branch depth
  • type and dir as in BRANCH

Example:

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

LEVEL

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

TODO

  • 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.
  • 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

TODO

  • 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.
  • 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

flag is the same as DESCRIPTION has.

Example:

LEVELDESC: town

LEVALIGN

LEVALIGN: flag

flag is the same as ALIGNMENT has.

Example:

LEVALIGN: chaotic

CHAINLEVEL

TODO

RNDCHLEVEL

TODO