Environment variable

From NetHackWiki
Revision as of 21:19, 3 March 2008 by Paxed (talk | contribs) (improve the SHOPTYPE table)
Jump to navigation Jump to search

NetHack checks the following environment variables:

  • NETHACKOPTIONS - You can define configuration options here.
  • HACKOPTIONS - The same as NETHACKOPTIONS, but used only if NETHACKOPTIONS was not defined.
  • WIZKIT - Allow wizard mode games to start with extra items.
  • ROGUEOPTS - Set the ghost name in the Rogue level. For example, setting ROGUEOPTS's value to name=Foo would name the ghost to 'Foo'
  • SHOPTYPE - For wizard mode debugging, forces a creation of a special room. For example, setting this to z will make a Treasure zoo on every level.
SHOPTYPE values and their meanings
Letter Room
z or Z David's Treasure Zoo
m or M Graveyard
b or B Beehive
t or T or \ Throne room
s or S Barracks
a or A Anthole
c or C Cockatrice nest
l or L Leprechaun hall
_ Temple
} Swamp
g or G General store
Object symbol Shop that sells those objects
  • SPLEVTYPE - For wizard mode debugging, forces NetHack to use certain layouts for the special levels that have multiple layouts. For example: bigrm-2,minetn-5 would force the 2nd bigroom variant (with the dark and light areas), and the 5th minetown variant (the grotto town).
  • NH_HEAPLOG - If the value is a file name and NetHack can write to that file, all memory allocations and release information done by NetHack is written there. This is only available if the MONITOR_HEAP compile-time option is enabled, which by default it it is not.
  • HOME - Your home directory.
  • MAIL - On window ports that support reading mail, this should point to your mail box file.
  • MAILREADER - On window ports that support reading mail, NetHack will spawn this mailreader to read your mail.
  • TERM - Terminal type.


This page is a stub. Should you wish to do so, you can contribute by expanding this page.