Difference between revisions of "Room"

From NetHackWiki
Jump to navigation Jump to search
(clear out most of 2007-era original article text since it was poorly written, was documented elsewhere, or was pointless (e.g. describing the anatomy of a room); rewrite strategy section)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{todo|what is the probability distribution how many rooms will appear on a given level? Also, how likely are dark rooms?}}
+
'''Rooms''' are a feature ubiquitous in [[NetHack]]. A room is an area, usually rectangular, that is separated from other areas by [[wall]]s and is typically paved with [[floor]] terrain.  
'''Rooms''' are a feature ubiquitous in [[NetHack]] - their purpose is analogous to those of real life: eg "An area separated by walls or partitions from other similar parts of the structure or building in which it is located".
 
 
 
In the [[Dungeons of Doom]], your first room of each [[level]] is reached by [[stairs]]. Exploring Dungeon of Doom levels, you will encounter a number of rooms by way of [[corridor]]s.
 
  
 +
The [[Dungeons of Doom]] consist mostly of "room-and-corridor" levels, containing a number of rooms connected by [[corridor]]s. Some rooms contain [[stairs]], which connect different levels to each other. They also may contain [[dungeon feature]]s, [[monster]]s, [[objects]], and [[traps]], or may be turned into a [[special room]].
  
  
 
       ------      --------        -------
 
       ------      --------        -------
       #....$.#######|.......########+....!|                ------    -------
+
       #......#######|.......########+.....|                ------    -------
       #|....|      #|.....<|        |>....|              ##..?.(|    |.....|
+
       #|....|      #|.....<|        |>....|              ##.....|    |.....|
       #|.....#    #|......|        |....[|                |...!|  #+..$..|
+
       #|.....#    #|......|        |.....|                |....|  #+.....|
       #|....|#    #|....`.|        ---.-.-              #+....|  #|...@.|
+
       #|....|#    #|......|        ---.-.-              #+....|  #|.....|
 
       #------#    #|......|          # #              ###----|-  #|.....|
 
       #------#    #|......|          # #              ###----|-  #|.....|
 
       # #    #    #---.----          # ###            #    ####  #-------
 
       # #    #    #---.----          # ###            #    ####  #-------
Line 16: Line 14:
 
       #      #          #              # #####      #    ### ###    #
 
       #      #          #              # #####      #    ### ###    #
 
       #      #          #              -.-----+----###    #    #    #
 
       #      #          #              -.-----+----###    #    #    #
       #      ###        #              |...[......|#      ########  #
+
       #      ###        #              |..........|#      ########  #
 
       #        #        #              |...........#      ------.-.---#
 
       #        #        #              |...........#      ------.-.---#
 
  -----#        ###    #  #              |..........|      |...........#
 
  -----#        ###    #  #              |..........|      |...........#
 
  |....#          # ------.----          ------------      |..........|
 
  |....#          # ------.----          ------------      |..........|
 
  |...|          ##+.........|                            |..........|
 
  |...|          ##+.........|                            |..........|
  |$..|            |..........################            ------------
+
  |...|            |..........################            ------------
  -----            |.).......|                              #
+
  -----            |.........|                              #
   #                |.%.......|
+
   #                |.........|
 
                   -----------
 
                   -----------
  
  
  
== Strategy ==
+
== Generation ==
Finding rooms is not always straight-forward. The key is to be persistent in [[search]]ing, and be aware that rooms can be as small as 2x3 and hence tucked into places you would not expect them. Knowing the extent of the Dungeon on your screen helps. A [[Vault]] is never accessible by corridor or stairs, and must be reached by some other way.
+
This section covers only typical non-special, room-and-corridor levels in the [[Dungeons of Doom]]. Rooms also appear in special levels and certain [[Quest]] filler levels, but those typically do not have the random generation described below.
  
Once in a room you could find any of the [[monsters]] or [[items]] in the game, but there are basic features in every room.
+
On each level, a number of rooms will be generated, and then they will be connected up by [[corridor]]s and [[door]]s. The algorithm for placing rooms makes it difficult to predict how many rooms a level will contain, but most levels contain between 5 and 10 rooms, with occasional appearances of levels with as few as 4 or as many as 12. On these levels, one room may be selected to become a [[special room]].
  
== The Way In ==
+
[[Vault]]s are a special case: they do not count as a special room despite technically being one, and they are not connected to the rest of the level by corridors.
The non-magical entrances to a room can be by open passageway, [[door]], [[locked]] door, [[stairs]] or [[hole]]. Press '''o''' to open a door, '''c''' to close it. Apply an unlocking [[tool]] to open a locked door (or [[zap]] via a [[spellbook of knock]] or [[wand of opening]]). Without an unlocking method a door needs to be destroyed to gain entry. Options are to [[kick]] the door down or to '''a'''pply an [[axe]] or [[pick axe]]. (or [[zap]] via a [[spellbook of force bolt]] or [[wand of striking]])
 
  
Caution: destroying a [[shop]] door will anger the [[shopkeeper]] and probably result in [[YASD]] if you don't pay 400 zorkmids for it. A closed shop will have the words "closed for inventory" written in the dust next to it's entrance.
+
{{upcoming|NetHack 3.7.0|Each level will also generate up to two [[themed room]]s, which can be irregularly shaped or contain interesting contents and terrain.}}
  
== The Floor ==
+
There tends to be a fixed rather than area-based chance of generating dungeon features, monsters, objects, and traps in each non-special room. Therefore, a level with more rooms will contain more of these things.
The [[floor]] in the parts of a room you can see are marked with a {{lightgray|.}} . Dark areas are blank. It is possible for a room to be a [[swamp]], where [[pool]]s {{blue|<nowiki>}</nowiki>}} alternate with {{lightgray|.}} . Although the floor can have a vast variety of things on it, the only feature of the floor itself are stairs, certain [[traps]] and any [[engraving]]s on the ground.
 
  
 +
=== Lit rooms ===
 +
<!-- Math:
 +
"Lit check 1": rnd(1 + depth) < 11. Always true above level 10. On level 10, there is a 10/11 chance of passing this check; on level 11 there is a 10/12 chance, etc.
 +
"Lit check 2": rn2(77). Fixed 76/77 chance.
 +
Both lit checks must pass in order for a room to be lit.
 +
-->
 +
Rooms generate either as lit or unlit, meaning that every square in a room will be lit up or dark. The chance of a room being lit depends solely on the [[level difficulty]], with fewer lit rooms deeper into the dungeon:{{refsrc|src/sp_lev.c|1154|nethack=3.6.6}}
  
== The Walls ==
+
Level 9 or above: <math>\frac{76}{77}</math>
The [[wall]]s are marked by vertical and horizontal lines. Often these can be [[ASCII]] characters (eg {{lightgray|<nowiki>|</nowiki>}} and {{lightgray|<nowiki>-</nowiki>}}). At other times these will be drawn lines, complete with corners. Walls have no features, except for doors and secret doors.
 
  
 +
Level 10 or below: <math>\frac{76}{77}\cdot\frac{10}{\text{difficulty} + 1}</math>
  
== The Ceiling ==
+
== Strategy ==
Due to the position altering effects of gravity, you tend to have little to do with the ceiling and it is not visible on the map. Sometimes rocks from the ceiling drop on you by traps or other player actions. A [[levitation|levitating]] character can sometimes hit the ceiling. Other features include stairs and certain other [[trap]]s.
+
Finding rooms is not always straightforward. If you see no obvious way forward, common tactics include:
 +
* Be persistent in [[search]]ing. If you can identify a large unexplored area of the map, more rooms may be hidden there. Search along the edges of this area, especially the walls of known rooms. Failing that, be aware that rooms can be as small as 2x3 and hence tucked into places you would not expect them.
 +
* Try using the [[terrain]] command to show the map without monsters or objects - the stairs may be hidden under a monster or object.
 +
* Use [[magic mapping]].
 +
* Fall down a [[pit]] or [[hole]] to go to a lower level, then explore back up.
  
 +
== References ==
 +
<references />
  
== Special Rooms and other Dungeon Features ==
 
Be sure to make yourself familiar with the various [[special room]]s and [[dungeon features]] found among the levels of NetHack which can make or break your game.
 
 
[[Category:Dungeon features]]
 
[[Category:Dungeon features]]
{{nethack-343}}
+
{{nethack-366}}

Latest revision as of 01:47, 27 July 2020

Rooms are a feature ubiquitous in NetHack. A room is an area, usually rectangular, that is separated from other areas by walls and is typically paved with floor terrain.

The Dungeons of Doom consist mostly of "room-and-corridor" levels, containing a number of rooms connected by corridors. Some rooms contain stairs, which connect different levels to each other. They also may contain dungeon features, monsters, objects, and traps, or may be turned into a special room.


      ------       --------        -------
     #......#######|.......########+.....|                ------    -------
     #|....|      #|.....<|        |>....|              ##.....|    |.....|
     #|.....#     #|......|        |.....|                |....|   #+.....|
     #|....|#     #|......|        ---.-.-               #+....|   #|.....|
     #------#     #|......|           # #              ###----|-   #|.....|
     # #    #     #---.----           # ###            #    ####   #-------
     #      #     #########           ### #          ###     # #   ####
     #      #           #               # #####      #     ### ###    #
     #      #           #              -.-----+----###     #     #    #
     #      ###         #              |..........|#       ########   #
     #        #         #              |...........#      ------.-.---#
-----#        ###    #  #              |..........|       |...........#
|....#          # ------.----          ------------       |..........|
|...|           ##+.........|                             |..........|
|...|             |..........################             ------------
-----             |.........|                               #
 #                |.........|
                  -----------


Generation

This section covers only typical non-special, room-and-corridor levels in the Dungeons of Doom. Rooms also appear in special levels and certain Quest filler levels, but those typically do not have the random generation described below.

On each level, a number of rooms will be generated, and then they will be connected up by corridors and doors. The algorithm for placing rooms makes it difficult to predict how many rooms a level will contain, but most levels contain between 5 and 10 rooms, with occasional appearances of levels with as few as 4 or as many as 12. On these levels, one room may be selected to become a special room.

Vaults are a special case: they do not count as a special room despite technically being one, and they are not connected to the rest of the level by corridors.

The following information pertains to an upcoming version (NetHack 3.7.0). If this version is now released, please verify that it is still accurate, then update the page to incorporate this information.

Each level will also generate up to two themed rooms, which can be irregularly shaped or contain interesting contents and terrain.

There tends to be a fixed rather than area-based chance of generating dungeon features, monsters, objects, and traps in each non-special room. Therefore, a level with more rooms will contain more of these things.

Lit rooms

Rooms generate either as lit or unlit, meaning that every square in a room will be lit up or dark. The chance of a room being lit depends solely on the level difficulty, with fewer lit rooms deeper into the dungeon:[1]

Level 9 or above: \frac{76}{77}

Level 10 or below: \frac{76}{77}\cdot\frac{10}{\text{difficulty} + 1}

Strategy

Finding rooms is not always straightforward. If you see no obvious way forward, common tactics include:

  • Be persistent in searching. If you can identify a large unexplored area of the map, more rooms may be hidden there. Search along the edges of this area, especially the walls of known rooms. Failing that, be aware that rooms can be as small as 2x3 and hence tucked into places you would not expect them.
  • Try using the terrain command to show the map without monsters or objects - the stairs may be hidden under a monster or object.
  • Use magic mapping.
  • Fall down a pit or hole to go to a lower level, then explore back up.

References