      A DGN_COMP(6)                   1995                    DGN_COMP(6)        NAME(      dgn_comp - NetHack dungeon compiler   SYNOPSIS      dgn_comp [ file ]  8      If no arguments are given, it reads standard input.   DESCRIPTION A      Dgn_comp is a dungeon compiler for NetHack version  3.2  and A      higher.  It takes a description file as an argument and pro- A      duces a dungeon "script" that is to be loaded by NetHack  at 
      runtime.   A      The purpose of this tool is to provide  NetHack  administra- A      tors and implementors with a convenient way to create a cus- A      tom dungeon for the game, without having  to  recompile  the       entire world.   GRAMMAR 7      DUNGEON: name bonesmarker ( base , rand ) [ %age ]   A      where name is the dungeon name, bonesmarker is a letter  for A      marking  bones  files, ( base , rand ) is the number of lev- A      els, and %age is its percentage chance  of  being  generated       (if absent, 100% chance).        DESCRIPTION: tag   A      where tag is currently one of HELLISH, MAZELIKE,  or  ROGUE- 
      LIKE.  A      ALIGNMENT |  LEVALIGN:  [  lawful  |  neutral  |  chaotic  |       unaligned ]  A      gives  the  alignment  of  the  dungeon/level  (default   is       unaligned).        ENTRY: level   A      the dungeon entry point.  The dungeon connection attaches at A      this  level  of the given dungeon.  If the value of level is A      negative, the entry level is calculated from the  bottom  of A      the  dungeon, with -1 being the last level.  If this line is A      not present  in  a  dungeon  description,  the  entry  level       defaults to 1.         PROTOFILE: name  A      the prototypical  name  for  dungeon  level  files  in  this A      dungeon.   For  example,  the PROTOFILE name for the dungeon       Vlad's Tower is tower.       A Dec                      Last change: 12                        1             A DGN_COMP(6)                   1995                    DGN_COMP(6)       7      LEVEL: name bonesmarker @ ( base , rand ) [ %age ]   A      where name is the level name, bonesmarker is  a  letter  for A      marking  bones  files,  (  base , rand ) is the location and 1      %age is the generation percentage, as above.   A      RNDLEVEL: name bonesmarker @ (  base  ,  rand  )  [  %age  ]       rndlevs  A      where name is the level name, bonesmarker is  a  letter  for A      marking  bones  files, ( base , rand ) is the location, %age A      is the generation percentage, as above, and rndlevs  is  the 7      number of similar levels available to choose from.   A      CHAINLEVEL: name bonesmarker prev_name + ( base , rand  )  [       %age ]   A      where name is the level name, bonesmarker is  a  letter  for A      marking  bones  files,  prev_name  is  the  name  of a level A      defined previously, ( base , rand ) is the offset  from  the A      level being chained from, and %age is the generation percen- 
      tage.  A      RNDCHAINLEVEL: name bonesmarker prev_name + ( base , rand  )       [ %age ] rndlevs   A      where name is the level name, bonesmarker is  a  letter  for A      marking  bones  files,  prev_name  is  the  name  of a level A      defined previously, ( base , rand ) is the offset  from  the A      level being chained from, %age is the generation percentage, A      and rndlevs is the number of  similar  levels  available  to       choose from.         LEVELDESC: type  A      where type is the level type, (see DESCRIPTION, above).  The A      type  is used to override any pre-set value used to describe -      the entire dungeon, for this level only.   A      BRANCH: name @ ( base , rand ) [ stair | no_up |  no_down  |       portal ] [ up | down ]   A      where name is the name of the dungeon to branch  to,  and  ( A      base  ,  rand ) is the location of the branch.  The last two A      optional arguments are the branch type and branch direction. A      The  type  of  a branch can be a two-way stair connection, a A      one-way stair connection, or  a  magic  portal.   A  one-way A      stair  is  described  by  the  types no_up and no_down which A      specify which  stair  direction  is  missing.   The  default A      branch  type  is  stair.   The  direction for a stair can be A      either up or down; direction is not applicable  to  portals. #      The default direction is down.       A Dec                      Last change: 12                        2             A DGN_COMP(6)                   1995                    DGN_COMP(6)       A      CHAINBRANCH: name prev_name + ( base ,  rand  )  [  stair  | -      no_up | no_down | portal ] [ up | down ]   A      where name  is  the  name  of  the  dungeon  to  branch  to, A      prev_name  is  the  name of a previously defined level and ( A      base , rand ) is the offset from  the  level  being  chained A      from.   The  optional branch type and direction are the same       as described above.  
 GENERIC RULES A      Each dungeon must have a unique bonesmarker , and each  spe- A      cial level must have a bonesmarker unique within its dungeon A      (letters may be  reused  in  different  dungeons).   If  the A      bonesmarker  has  the  special  value "none", no bones files /      will be created for that level or dungeon.   A      The value base may be in the range  of  1  to  MAXLEVEL  (as       defined in global.h ).   :      The value rand may be in the range of -1 to MAXLEVEL.  A      If  rand  is  -1  it  will  be  replaced  with   the   value A      (num_dunlevs(dungeon)  -  base) during the load process (ie. *      from here to the end of the dungeon).  :      If rand is 0 the level is located absolutely at base.  A      Branches don't have  a  probability.   Dungeons  do.   If  a A      dungeon  fails  to  be generated during load, all its levels       and branches are skipped.  A      No level or branch may be chained from a level with  a  per- A      centage  generation  probability.   This  is to prevent non- A      resolution during the load.  In addition, no branch  may  be A      made from a dungeon with a percentage generation probability       for the same reason.   2      As a general rule using the dungeon compiler:  A      If a dungeon has a protofile name associated  with  it  (eg. #      tower) that file will be used.   A      If a special level is present, it will  override  the  above 2      rule and the appropriate file will be loaded.  A      If neither of the above are present, the standard  generator .      will take over and make a "normal" level.  A      A level alignment, if present, will override  the  alignment *      of the dungeon that it exists within.          A Dec                      Last change: 12                        3             A DGN_COMP(6)                   1995                    DGN_COMP(6)        EXAMPLE A      Here  is  the  current  syntax  of  the  dungeon  compiler's       "language":          #E      #       The dungeon description file for the "standard" original       #       3.0 NetHack.       #7      DUNGEON:        "The Dungeons of Doom" "D" (25, 5) -      LEVEL:          "rogue" "none" @ (15, 4) -      LEVEL:          "oracle" "none" @ (5, 7) /      LEVEL:          "bigroom" "B" @ (12, 3) 15 .      LEVEL:          "medusa" "none" @ (20, 5)/      CHAINLEVEL:     "castle" "medusa" + (1, 4) 5      CHAINBRANCH:    "Hell" "castle" + (0, 0) no_down ;      BRANCH:         "The Astral Plane" @ (1, 0) no_down up   '      DUNGEON:        "Hell" "H" (25, 5)       DESCRIPTION:    mazelike       DESCRIPTION:    hellish0      BRANCH:         "Vlad's Tower" @ (13, 5) up/      LEVEL:          "wizard" "none" @ (15, 10) +      LEVEL:          "fakewiz" "A" @ (5, 5) ,      LEVEL:          "fakewiz" "B" @ (10, 5),      LEVEL:          "fakewiz" "C" @ (15, 5),      LEVEL:          "fakewiz" "D" @ (20, 5),      LEVEL:          "fakewiz" "E" @ (25, 5)  .      DUNGEON:        "Vlad's Tower" "T" (3, 0)      PROTOFILE:      "tower"      DESCRIPTION:    mazelike       ENTRY:          -1   2      DUNGEON:        "The Astral Plane" "A" (1, 0)      DESCRIPTION:    mazelike       PROTOFILE:      "endgame"        NOTES: 6      Lines beginning with '#' are considered comments.A      A special level must be explicitly aligned.   The  alignment A      of  the  dungeon it is in only applies to non-special levels       within that dungeon.    AUTHORA      M. Stephenson (from the level  compiler  by  Jean-Christophe 
      Collet).    SEE ALSO      lev_comp(6), nethack(6)          A Dec                      Last change: 12                        4             A DGN_COMP(6)                   1995                    DGN_COMP(6)        BUGS      Probably infinite.                                                                                                           A Dec                      Last change: 12                        5       