6 nethack - Exploring The Mazes of Menace
9 nethack [ -d directory ] [ -n ] [ -p profession ] [ -r race ] [ -[DX] ]
10 [ -u playername ] [ -dec ] [ -ibm ]
12 nethack [ -d directory ] -s [ -v ] [ -p profession ] [ -r race ] [
16 NetHack is a display oriented Dungeons & Dragons(tm) - like game. The
17 standard tty display and command structure resemble rogue.
19 Other, more graphical display options exist for most platforms.
21 To get started you really only need to know two commands. The command
22 ? will give you a list of the available commands (as well as other
23 information) and the command / will identify the things you see on the
26 To win the game (as opposed to merely playing to beat other people's
27 high scores) you must locate the Amulet of Yendor which is somewhere
28 below the 20th level of the dungeon and get it out. Few people achieve
29 this; most never do. Those who have go down in history as heros among
30 heroes - and then they find ways of making the game even harder. See
31 the Guidebook section on Conduct if this game has gotten too easy for
34 When the game ends, whether by your dying, quitting, or escaping from
35 the caves, NetHack will give you (a fragment of) the list of top scor-
36 ers. The scoring is based on many aspects of your behavior, but a
37 rough estimate is obtained by taking the amount of gold you've found in
38 the cave plus four times your (real) experience. Precious stones may
39 be worth a lot of gold when brought to the exit. There is a 10%
40 penalty for getting yourself killed.
42 The environment variable NETHACKOPTIONS can be used to initialize many
43 run-time options. The ? command provides a description of these
44 options and syntax. (The -dec and -ibm command line options are equiv-
45 alent to the decgraphics and ibmgraphics run-time options described
46 there, and are provided purely for convenience on systems supporting
47 multiple types of terminals.)
49 Because the option list can be very long (particularly when specifying
50 graphics characters), options may also be included in a configuration
51 file. The default is located in your home directory and named
52 .nethackrc on Unix systems. On other systems, the default may be dif-
53 ferent, usually NetHack.cnf. On DOS or Windows, the name is
54 defaults.nh, while on the Macintosh or BeOS, it is NetHack Defaults.
55 The configuration file's location may be specified by setting NETHACK-
56 OPTIONS to a string consisting of an @ character followed by the file-
59 The -u playername option supplies the answer to the question "Who are
60 you?". It overrides any name from the options or configuration file,
61 USER, LOGNAME, or getlogin(), which will otherwise be tried in order.
62 If none of these provides a useful name, the player will be asked for
63 one. Player names (in conjunction with uids) are used to identify save
64 files, so you can have several saved games under different names. Con-
65 versely, you must use the appropriate player name to restore a saved
68 A playername suffix can be used to specify the profession, race, align-
69 ment and/or gender of the character. The full syntax of the playername
70 that includes a suffix is "name-ppp-rrr-aaa-ggg". "ppp" are at least
71 the first three letters of the profession (this can also be specified
72 using a separate -p profession option). "rrr" are at least the first
73 three letters of the character's race (this can also be specified using
74 a separate -r race option). "aaa" are at last the first three letters
75 of the character's alignment, and "ggg" are at least the first three
76 letters of the character's gender. Any of the parts of the suffix may
79 -p profession can be used to determine the character profession, also
80 known as the role. You can specify either the male or female name for
81 the character role, or the first three characters of the role as an
82 abbreviation. -p @ has been retained to explicitly request that a ran-
83 dom role be chosen. It may need to be quoted with a backslash (\@) if
84 @ is the "kill" character (see "stty") for the terminal, in order to
85 prevent the current input line from being cleared.
87 Likewise, -r race can be used to explicitly request that a race be cho-
90 Leaving out any of these characteristics will result in you being
91 prompted during the game startup for the information.
94 The -s option alone will print out the list of your scores on the cur-
95 rent version. An immediately following -v reports on all versions
96 present in the score file. The -s may also be followed by arguments -p
97 and -r to print the scores of particular roles and races only. It may
98 also be followed by one or more player names to print the scores of the
99 players mentioned, by 'all' to print out all scores, or by a number to
100 print that many top scores.
102 The -n option suppresses printing of any news from the game administra-
105 The -D or -X option will start the game in a special non-scoring dis-
106 covery mode. -D will, if the player is the game administrator, start
107 in debugging (wizard) mode instead.
109 The -d option, which must be the first argument if it appears, supplies
110 a directory which is to serve as the playground. It overrides the
111 value from NETHACKDIR, HACKDIR, or the directory specified by the game
112 administrator during compilation (usually /usr/games/lib/nethackdir).
113 This option is usually only useful to the game administrator. The
114 playground must contain several auxiliary files such as help files, the
115 list of top scorers, and a subdirectory save where games are saved.
118 Jay Fenlason (+ Kenny Woodland, Mike Thome and Jon Payne) wrote the
119 original hack, very much like rogue (but full of bugs).
121 Andries Brouwer continuously deformed their sources into an entirely
124 Mike Stephenson has continued the perversion of sources, adding various
125 warped character classes and sadistic traps with the help of many
126 strange people who reside in that place between the worlds, the Usenet
127 Zone. A number of these miscreants are immortalized in the historical
128 roll of dishonor and various other places.
130 The resulting mess is now called NetHack, to denote its development by
131 the Usenet. Andries Brouwer has made this request for the distinction,
132 as he may eventually release a new version of his own.
135 Run-time configuration options were discussed above and use a platform
136 specific name for a file in a platform specific location. For Unix,
137 the name is '.nethackrc' in the user's home directory.
139 All other files are in the playground directory, normally
140 /usr/games/lib/nethackdir. If DLB was defined during the compile, the
141 data files and special levels will be inside a larger file, normally
142 nhdat, instead of being separate files.
144 nethack The program itself.
145 data, oracles, rumors Data files used by NetHack.
146 quest.dat, bogusmon More data files.
147 engrave, epitaph, tribute Still more data files.
148 symbols Data file holding sets of specifications
149 for how to display monsters, objects, and
151 options Data file containing a description of the
152 build-time option settings.
153 help, hh Help data files.
154 cmdhelp, opthelp, wizhelp More help data files.
155 *.lev Predefined special levels.
156 dungeon Control file for special levels.
157 history A short history of NetHack.
158 license Rules governing redistribution.
159 record The list of top scorers.
160 logfile An extended list of games played
162 xlogfile A more detailed version of 'logfile'
164 paniclog Record of exceptional conditions
165 discovered during program execution.
166 xlock.nn Description of dungeon level 'nn' of
167 active game 'x' if there's a limit on the
168 number of simultaneously active games.
169 UUcccccc.nn Alternate form for dungeon level 'nn'
170 of active game by user 'UU' playing
171 character named 'cccccc' when there's no
172 limit on number of active games.
173 perm Lock file for xlock.0 or UUcccccc.0.
174 bonesDD.nn Descriptions of the ghost and belongings
175 of a deceased adventurer who met his
176 or her demise on level 'nn'.
178 save/ A subdirectory containing saved games.
180 sysconf System-wide options. Required if
181 program is built with 'SYSCF' option
182 enabled, ignored if not.
184 The location of 'sysconf' is specified at build time and can't be
185 changed except by updating source file "config.h" and rebuilding the
188 In a perfect world, 'paniclog' would remain empty.
191 USER or LOGNAME Your login name.
192 HOME Your home directory.
194 TERM The type of your terminal.
195 HACKPAGER or PAGER Replacement for default pager.
197 MAILREADER Replacement for default reader
198 (probably /bin/mail or /usr/ucb/mail).
199 NETHACKDIR or HACKDIR Playground.
200 NETHACKOPTIONS String predefining several NetHack
203 If the same option is specified in both NETHACKOPTIONS and .nethackrc,
204 the value assigned in NETHACKOPTIONS takes precedence.
206 SHOPTYPE and SPLEVTYPE can be used in debugging (wizard) mode.
207 DEBUGFILES can be used if the program was built with 'DEBUG' enabled.
210 dgn_comp(6), lev_comp(6), recover(6)
217 Dungeons & Dragons is a Trademark of Wizards of the Coast, Inc.
221 7 December 2015 NETHACK(6)