# Closet
A closet is a single square located behind a door. Often the door is a secret door. 
Closets are referred to as niches in the source code[1].
One in seven closets (14%) are generated without doors leading to them. The only way to get to these is for a corridor to be generated adjacent to them, or to teleport or dig in. Such closets always have a scroll of teleportation inside, and a potion of object detection will reveal its presence. Every closet has either a door or a scroll of teleportation. Occasionally a closet is connected with a corridor, so if you find a scroll in a corridor next to a room before monsters could have dropped it, it is teleportation. When an inaccessible closet is generated, there is an additional 33% chance of a random item being generated there.
In Nethack 3.6.0, such inaccessible closets have a 20% chance of having iron bars generated where the door would be[2]. If this occurs, there is a 66% chance that a human or elf corpse will be generated in the closet. As this is the only time iron bars are randomly generated, this will give away the location of the closet with a guaranteed scroll of teleportation inside.
There is sometimes writing in the dust outside. The engraving ad aerarium (from the Latin "to the treasure") indicates that the closet contains a vault teleporter, and the engraving Vlad was here indicates that there is a trap door inside. On deeper levels, a closet marked with ad aerarium may have a level teleporter instead. This is a pun on a supposed secondary meaning[3] of "aerarium" as sky.
Monsters can be generated inside closets just like on any other square.

References

↑ mklev.c in NetHack 3.4.3, line 462

↑ src/mklev.c in NetHack 3.6.0, line 529

↑ This does not appear to be an actual secondary meaning. It may be an error on the part of the DevTeam, which could be due to confusion between the prefixes aes- relating to money, from which 'aerarium' derives, and aer-, which relates to air/sky/flight.

This page may need to be updated for the current version of NetHack.
It may contain text specific to NetHack 3.6.0. Information on this page may be out of date.
Editors: After reviewing this page and making necessary edits, please change the {{nethack-360}} tag to the current version's tag or {{noversion}} as appropriate.