ing upon it, depending on your user interface). For the
non-boolean choices, a further menu or prompt will appear
once you've closed this menu. The available options are
- listed later in this Guidebook. Options are usually set be-
- fore the game rather than with the `O' command; see the sec-
- tion on options below.
- ^O Show overview.
+ NetHack 3.6 November 27, 2019
+ NetHack 3.7 November 17, 2019
+ NetHack 3.7 November 17, 2019
+ NetHack Guidebook 15
^T Teleport, if you have the ability.
- v Display version number.
- V Display the game history.
- w Wield weapon.
+ NetHack 3.6 November 27, 2019
+ NetHack 3.7 November 17, 2019
Z Zap (cast) a spell.
- Z. - to cast at yourself, use `.' for the direction.
-
-
-
- __________
- (R)UNIX is a registered trademark of The Open Group.
- NetHack 3.6 November 27, 2019
+ NetHack 3.7 November 17, 2019
` Show discovered types for one class of objects.
- ! Escape to a shell.
- # Perform an extended command.
+ __________
+ (R)UNIX is a registered trademark of The Open Group.
+ NetHack 3.6 November 27, 2019
+ NetHack 3.7 November 17, 2019
If the tool used acts on items on the floor, using the `m'
prefix skips those items.
- If used on a wand, that wand will be broken, releasing its
- magic in the process. Confirmation is required.
- #attributes
- Show your attributes. Default key is `^X'.
+ NetHack 3.6 November 27, 2019
+ NetHack 3.7 November 17, 2019
Advance or check weapon and spell skills. Autocompletes.
Default key is `M-e'.
- #exploremode
- Enter the explore mode.
-
- Requires confirmation; default response is n (no). To real-
- ly switch to explore mode, respond with y. You can set the
- paranoid_confirmation:quit option to require a response of
+ NetHack 3.6 November 27, 2019
+ NetHack 3.7 November 17, 2019
Show discovered types for one class of objects. Default key
is ``'.
- #levelchange
- Change your experience level. Autocompletes. Debug mode
- only.
-
- #lightsources
- Show mobile light sources. Autocompletes. Debug mode only.
- NetHack 3.6 November 27, 2019
+ NetHack 3.7 November 17, 2019
ited level will be included regardless of annotations. Au-
tocompletes. Default keys are `^O', and `M-O'.
- #panic
- Test the panic routine. Terminates the current game. Auto-
- completes. Debug mode only.
- Asks for confirmation; default is n (no); continue playing.
- To really panic, respond with y. You can set the para-
- noid_confirmation:quit option to require a response of yes
- instead.
- NetHack 3.6 November 27, 2019
+ NetHack 3.7 November 17, 2019
really quit, respond with y. You can set the paranoid_con-
firmation:quit option to require a response of yes instead.
- #quiver
- Select ammunition for quiver. Default key is `Q'.
-
- #read
- Read a scroll, a spellbook, or something else. Default key
- is `r'.
- #redraw
- Redraw the screen. Default key is `^R', and also `^L' if
- number_pad is on.
- NetHack 3.6 November 27, 2019
+ NetHack 3.7 November 17, 2019
#seetools
Show the tools currently in use. Default key is `('.
- #seetrap
- Show the type of an adjacent trap. Default key is `^'.
- #seeweapon
- Show the weapon currently wielded. Default key is `)'.
- #shell
- Do a shell escape. Default key is `!'.
+ NetHack 3.6 November 27, 2019
- #sit
- Sit down. Autocompletes. Default key is `M-s'.
+ NetHack 3.7 November 17, 2019
+ NetHack Guidebook 24
Travel to a specific location on the map. Default key is
`_'. Using the "request menu" prefix shows a menu of inter-
esting targets in sight without asking to move the cursor.
- When picking a target with cursor and the autodescribe op-
- tion is on, the top line will show "(no travel path)" if
- your character does not know of a path to that location.
+ When picking a target with cursor and the autodescribe
- #turn
- Turn undead away. Autocompletes. Default key is `M-t'.
- #twoweapon
- Toggle two-weapon combat on or off. Autocompletes. Default
- key is `X', and also `M-2' if number_pad is off.
+ NetHack 3.6 November 27, 2019
- Note that you must use suitable weapons for this type of
- combat, or it will be automatically turned off.
+ NetHack 3.7 November 17, 2019
+ NetHack Guidebook 25
#wizgenesis
Create a monster. May be prefixed by a count to create more
-
-
+ NetHack 3.7 November 17, 2019
-
-
-
-
-
- NetHack Guidebook 26
-
-
-
than one. Autocompletes. Debug mode only. Default key is
`^G'.
behavior. On other systems, if typing "Alt" plus another key
transmits a two character sequence consisting of an Escape fol-
lowed by the other key, you may set the altmeta option to have
-
-
+ NetHack 3.7 November 17, 2019
-
-
-
-
-
- NetHack Guidebook 27
-
-
-
NetHack combine them into meta+key.
M-? #? (not supported by all platforms)
M-q #quit
- M-r #rub
- M-R #ride
- M-s #sit
- M-t #turn
+ NetHack 3.6 November 27, 2019
- M-T #tip
- M-u #untrap
- M-v #version
- M-w #wipe
+ NetHack Guidebook 28
+ NetHack 3.7 November 17, 2019
+ M-r #rub
+ M-R #ride
+ M-s #sit
+ M-t #turn
- NetHack Guidebook 28
+ M-T #tip
+
+ M-u #untrap
+ M-v #version
+ M-w #wipe
+ NetHack 3.7 November 17, 2019
+ NetHack Guidebook 29
Ordinarily when you climb a set of stairs, you will arrive
on the corresponding staircase at your destination. However,
- pets (see below) and some other monsters will follow along if
- they're close enough when you travel up or down stairs, and occa-
- sionally one of these creatures will displace you during the
- climb. When that occurs, the pet or other monster will arrive on
- the staircase and you will end up nearby.
-
- Ladders serve the same purpose as staircases, and the two
- types of inter-level connections are nearly indistinguishable
- during game play.
-
+ NetHack 3.6 November 27, 2019
+ NetHack 3.7 November 17, 2019
* The price of a given item can vary due to a variety of factors.
- * A shopkeeper treats the spot immediately inside the door as if
- it were outside the shop.
- * While the shopkeeper watches you like a hawk, he will generally
- ignore any other customers.
- * If a shop is "closed for inventory," it will not open of its
- own accord.
- * Shops do not get restocked with new items, regardless of inven-
- tory depletion.
+ NetHack 3.6 November 27, 2019
+ NetHack 3.7 November 17, 2019
feed it, too, by throwing it food. A properly trained pet can be
very useful under certain circumstances.
-
+ NetHack 3.7 November 17, 2019
-
-
-
-
-
- NetHack Guidebook 32
-
-
-
Your pet also gains experience from killing monsters, and
can grow over time, gaining hit points and doing more damage.
Initially, your pet may even be better at killing things than
more will result in it disappearing from your map, similarly if
it is the one who moved rather than you.
-
+ NetHack 3.7 November 17, 2019
-
-
-
-
-
- NetHack Guidebook 33
-
-
-
However, if you encounter a monster which you can't see or
sense -- perhaps it is invisible and has just tapped you on the
noggin -- a special "remembered, unseen monster" marker will be
When you use one of these objects, if its effect is obvious,
NetHack will remember what it is for you. If its effect isn't
extremely obvious, you will be asked what you want to call this
-
-
+ NetHack 3.7 November 17, 2019
-
-
-
-
-
- NetHack Guidebook 34
-
-
-
type of object so you will recognize it later. You can also use
the "#name" command, for the same purpose at any time, to name
all objects of a particular type or just an individual object.
exception; they normally do more damage with bare (or gloved)
hands than they do with weapons.
-
-
+ NetHack 3.7 November 17, 2019
-
-
-
-
-
- NetHack Guidebook 35
-
-
-
There are wielded weapons, like maces and swords, and thrown
weapons, like arrows and spears. To hit monsters with a weapon,
you must wield it and attack them, or throw it at them. You can
+ NetHack 3.7 November 17, 2019
+ NetHack Guidebook 36
in the same direction; if the first ones kill a monster, the oth-
ers can still continue beyond that spot.
- 7.2.2. Weapon proficiency
- You will have varying degrees of skill in the weapons avail-
- able. Weapon proficiency, or weapon skills, affect how well you
- can use particular types of weapons, and you'll be able to im-
- prove your skills as you progress through a game, depending on
- your role, your experience level, and use of the weapons.
- For the purposes of proficiency, weapons have been divided
- up into various groups such as daggers, broadswords, and
- polearms. Each role has a limit on what level of proficiency a
- character can achieve for each group. For instance, wizards can
- become highly skilled in daggers or staves but not in swords or
-
+ NetHack 3.7 November 17, 2019
+ NetHack 3.6 November 27, 2019
you stop -- or before you begin, for that matter -- wielding two
weapons at once. The primary is your wielded weapon and the sec-
ondary is just an item in your inventory that's been designated
- as alternate weapon.)
-
- If your primary weapon is wielded but your off hand is empty
- or has the wrong weapon, use the sequence `x', `w', `x' to first
- swap your primary into your off hand, wield whatever you want as
- secondary weapon, then swap them both back into the intended
- hands. If your secondary or alternate weapon is correct but your
- primary one is not, simply use `w' to wield the primary. Lastly,
- if neither hand holds the correct weapon, use `w', `x', `w' to
- first wield the intended secondary, swap it to off hand, and then
- wield the primary.
+ NetHack 3.6 November 27, 2019
+ NetHack 3.7 November 17, 2019
would give you better protection than normal chain mail, lowering
your armor class one unit further to 4. When you put on a piece
of armor, you immediately find out the armor class and any
-
-
+ NetHack 3.7 November 17, 2019
-
-
-
-
-
- NetHack Guidebook 39
-
-
-
"plusses" it provides. Cursed pieces of armor usually have nega-
tive enchantments (minuses) in addition to being unremovable.
or "THANX MAUD" backwards). Scrolls disappear after you read
them (except for blank ones, without magic spells on them).
- One of the most useful of these is the scroll of identify,
- which can be used to determine what another object is, whether it
- is cursed or blessed, and how many uses it has left. Some ob-
- jects of subtle enchantment are difficult to identify without
- these.
-
- A mail daemon may run up and deliver mail to you as a scroll
- of mail (on versions compiled with this feature). To use this
- feature on versions where NetHack mail delivery is triggered by
- electronic mail appearing in your system mailbox, you must let
- NetHack know where to look for new mail by setting the "MAIL" en-
- vironment variable to the file name of your mailbox. You may
- NetHack 3.6 November 27, 2019
+ NetHack 3.7 November 17, 2019
+ NetHack 3.7 November 17, 2019
+ NetHack Guidebook 41
slots are shared with weapons skills. (See also the section on
"Weapon proficiency".)
-
+ NetHack 3.7 November 17, 2019
-
-
-
-
-
- NetHack Guidebook 42
-
-
-
Casting a spell also requires flexible movement, and wearing
various types of armor may interfere with that.
Like rings, amulets have various magical properties, some benefi-
cial, some harmful, which are activated by putting them on.
- Only one amulet may be worn at a time, around your neck.
- The commands to use amulets are the same as for rings, `P'
- (put on) and `R' (remove).
- 7.12. Gems (`*')
- Some gems are valuable, and can be sold for a lot of gold.
- They are also a far more efficient way of carrying your riches.
- Valuable gems increase your score if you bring them with you when
- you exit.
+ NetHack 3.6 November 27, 2019
- Other small rocks are also categorized as gems, but they are
- much less valuable. All rocks, however, can be used as
+ NetHack 3.7 November 17, 2019
+ NetHack Guidebook 43
action which breaks a challenge, it will no longer be listed.
This gives players extra "bragging rights" for winning the game
with these challenges. Note that it is perfectly acceptable to
-
-
+ NetHack 3.7 November 17, 2019
-
-
-
-
-
- NetHack Guidebook 44
-
-
-
win the game without resorting to these restrictions and that it
is unusual for players to adhere to challenges the first time
they win the game.
"fruits", although they could be anything from "cherries" to
"pork chops", are also assumed to be vegan.
-
-
+ NetHack 3.7 November 17, 2019
-
-
-
-
-
- NetHack Guidebook 45
-
-
-
An atheist is one who rejects religion. This means that you
cannot #pray, #offer sacrifices to any god, #turn undead, or
#chat with a priest. Particularly selective readers may argue
NetHack should do things, there are options you can set to change
how NetHack behaves.
-
+ NetHack 3.7 November 17, 2019
-
-
-
-
-
- NetHack Guidebook 46
-
-
-
9.1. Setting the options
Options may be set in a number of ways. Within the game,
"no" or `!' to turn it off. For compound options, the option
name and value are separated by a colon. Some options are per-
sistent, and apply only to new games. You can specify multiple
-
-
+ NetHack 3.7 November 17, 2019
-
-
-
-
-
- NetHack Guidebook 47
-
-
-
OPTIONS statements, and multiple options separated by commas in
a single OPTIONS statement. (Comma separated options are pro-
cessed from right to left.)
Change the key bindings of some special keys, menu accelera-
tors, or extended commands. You can specify multiple bindings.
Format is key followed by the command, separated by a colon.
-
-
+ NetHack 3.7 November 17, 2019
-
-
-
-
-
- NetHack Guidebook 48
-
-
-
See the "Changing Key Bindings" section for more information.
Example:
names, one per line, up to a maximum of 128 lines. Each line
is processed by the function that handles wishing.
-
+ NetHack 3.7 November 17, 2019
-
-
-
-
-
- NetHack Guidebook 49
-
-
-
Example:
WIZKIT=~/wizkit.txt
The NETHACKOPTIONS value is effectively the same as a single
OPTIONS statement in a configuration file. The "OPTIONS=" prefix
is implied and comma separated options are processed from right
-
-
+ NetHack 3.7 November 17, 2019
-
-
-
-
-
- NetHack Guidebook 50
-
-
-
to left. Other types of configuration statements such as BIND or
MSGTYPE are not allowed.
This option controls what happens when you attempt the `f'
(fire) command when nothing is quivered or readied (default
false). When true, the computer will fill your quiver or
-
-
+ NetHack 3.7 November 17, 2019
-
-
-
-
-
- NetHack Guidebook 51
-
-
-
quiver sack or make ready some suitable weapon. Note that it
will not take into account the blessed/cursed status, enchant-
ment, damage, or quality of the weapon; you are free to manual-
dark_room
Show out-of-sight areas of lit rooms (default on). Persistent.
-
+ NetHack 3.7 November 17, 2019
-
-
-
-
-
- NetHack Guidebook 52
-
-
-
disclose
Controls what information the program reveals when the game
ends. Value is a space separated list of prompting/category
Name your starting dog (for example "dogname:Fang"). Cannot be
set with the `O' command.
-
-
+ NetHack 3.7 November 17, 2019
-
-
-
-
-
- NetHack Guidebook 53
-
-
-
extmenu
Changes the extended commands interface to pop-up a menu of
available commands. It is keystroke compatible with the tradi-
the `/' command, ask if you want to see it (default on). Turn-
ing help off makes just looking at things faster, since you
aren't interrupted with the "More info?" prompt, but it also
-
-
+ NetHack 3.7 November 17, 2019
-
-
-
-
-
- NetHack Guidebook 54
-
-
-
means that you might miss some interesting and/or important in-
formation. Persistent.
lootabc
When using a menu to interact with a container, use the old
`a', `b', and `c' keyboard shortcuts rather than the mnemonics
-
-
+ NetHack 3.7 November 17, 2019
-
-
-
-
-
- NetHack Guidebook 55
-
-
-
`o', `i', and `b' (default off). Persistent.
mail
Menu character accelerator to invert all items in a menu. Im-
plemented by the Amiga, Gem, X11 and tty ports. Default `@'.
-
-
+ NetHack 3.7 November 17, 2019
-
-
-
-
-
- NetHack Guidebook 56
-
-
-
menu_invert_page
Menu character accelerator to invert all items on this page of
a menu. Implemented by the Amiga, Gem and tty ports. Default
+ NetHack 3.7 November 17, 2019
+ NetHack Guidebook 57
specifying 1 and negating number_pad is the same as specifying
0. (Settings 2 and 4 are for compatibility with MS-DOS or old
PC Hack; in addition to the different behavior for `5', `Alt-5'
- acts as `G' and `Alt-0' acts as `I'. Setting -1 is to
-
-
+ acts as `G' and `Alt-0' acts as `I'. Setting -1 is to accommo-
+ date some QWERTZ keyboards which have the location of the `y'
+ and `z' keys swapped.) When moving by numbers, to enter a
- count prefix for those commands which accept one (such as "12s"
+ NetHack 3.7 November 17, 2019
-
-
-
-
-
- NetHack Guidebook 58
-
-
-
- accommodate some QWERTZ keyboards which have the location of
- the `y' and `z' keys swapped.) When moving by numbers, to en-
- ter a count prefix for those commands which accept one (such as
- "12s" to search twelve times), precede it with the letter `n'
+ to search twelve times), precede it with the letter `n'
("n12s").
packorder
+ NetHack 3.7 November 17, 2019
+ NetHack Guidebook 59
Cannot be set with the `O' command.
pickup_burden
- When you pick up an item that would exceed this encumbrance
- level (Unencumbered, Burdened, streSsed, straiNed, overTaxed,
- or overLoaded), you will be asked if you want to continue.
+ When you pick up an item that would exceed this encumbrance
+ level (Unencumbered, Burdened, streSsed, straiNed, overTaxed,
+ or overLoaded), you will be asked if you want to continue.
(Default `S'). Persistent.
- pickup_thrown
- If this option is on and autopickup is also on, try to pick up
- things that you threw, even if they aren't in pickup_types or
- match an autopickup exception. Default is on. Persistent.
-
- pickup_types
- Specify the object types to be picked up when autopickup is on.
- Default is all types. You can use autopickup_exception config-
- uration file lines to further refine autopickup behavior. Per-
- sistent.
-
+ NetHack 3.6 November 27, 2019
+ NetHack 3.7 November 17, 2019
fault off). Persistent.
role
- Pick your type of character (for example "role:Samurai"); syn-
- onym for "character". See "name" for an alternate method of
- specifying your role. Normally only the first letter of the
- value is examined; `r' is an exception with "Rogue", "Ranger",
+ Pick your type of character (for example "role:Samurai"); syn-
+ onym for "character". See "name" for an alternate method of
+ specifying your role. Normally only the first letter of the
+ value is examined; `r' is an exception with "Rogue", "Ranger",
and "random" values. If you prefix the value with `!' or "no",
- you will exclude that role from being picked randomly. Cannot
+ you will exclude that role from being picked randomly. Cannot
be set with the `O' command. Persistent.
- roguesymset
- This option may be used to select one of the named symbol sets
- found within "symbols" to alter the symbols displayed on the
- screen on the rogue level.
-
- rlecomp
- When writing out a save file, perform run length compression of
- the map. Not all ports support run length compression. It has
- no effect on reading an existing save file.
+ NetHack 3.6 November 27, 2019
+ NetHack 3.7 November 17, 2019
Show your approximate accumulated score on bottom line (default
off). Persistent.
- silent
- Suppress terminal beeps (default on). Persistent.
-
- sortloot
- Controls the sorting behavior of the pickup lists for inventory
- and #loot commands and some others. Persistent. The possible
- values are:
- full - always sort the lists;
+ NetHack 3.6 November 27, 2019
+ NetHack 3.7 November 17, 2019
off). Persistent.
timed_delay
- When pausing momentarily for display effect, such as with ex-
- plosions and moving objects, use a timer rather than sending
- extra characters to the screen. (Applies to "tty" interface
- only; "X11" interface always uses a timer based delay. The de-
- fault is on if configured into the program.) Persistent.
+ When pausing momentarily for display effect, such as with ex-
+ plosions and moving objects, use a timer rather than sending
+ extra characters to the screen. (Applies to "tty" interface
+ only; "X11" interface always uses a timer based delay. The
- tombstone
- Draw a tombstone graphic upon your death (default on). Persis-
- tent.
- toptenwin
- Put the ending display in a NetHack window instead of on stdout
- (default off). Setting this option makes the score list
+ NetHack 3.6 November 27, 2019
+ NetHack 3.7 November 17, 2019
standing on a doorway, it will consider the area on the side of
the door you were last moving towards.
- Filtering can also be changed when getting a location with the
- "getpos.filter" key.
-
- whatis_menu
- When getting a location on the map, and using a key to cycle
- through next and previous targets, use a menu instead to pick a
- target. (default off)
- whatis_moveskip
- When getting a location on the map, and using shifted movement
- NetHack 3.6 November 27, 2019
+ NetHack 3.7 November 17, 2019
command.
align_message
- Where to align or place the message window (top, bottom, left,
+ Where to align or place the message window (top, bottom, left,
or right)
- align_status
- Where to align or place the status window (top, bottom, left,
- or right).
- ascii_map
- If NetHack can, it should display an ascii character map if it
- can.
- color
- If NetHack can, it should display color if it can for different
+ NetHack 3.6 November 27, 2019
+ NetHack 3.7 November 17, 2019
font_size_text
If NetHack can, it should use this size font for text windows.
- fullscreen
- If NetHack can, it should try and display on the entire screen
- rather than in a window.
-
- guicolor
- Use color text and/or highlighting attributes when displaying
- some non-map data (such as menu selector letters). Curses in-
- terface only; default is on.
+ NetHack 3.6 November 27, 2019
+ NetHack 3.7 November 17, 2019
it starts up (default yes).
statuslines
- Number of lines for traditional below-the-map status display.
- Acceptable values are 2 and 3 (default is 2). Curses and tty
- interfaces only.
+ Number of lines for traditional below-the-map status display.
- term_cols and
- term_rows
- Curses interface only. Number of columns and rows to use for
- the display. Curses will attempt to resize to the values spec-
- ified but will settle for smaller sizes if they are too big.
+ NetHack 3.6 November 27, 2019
+ NetHack 3.7 November 17, 2019
(80+2+26+2) is needed for align_status set to left or right.)
windowcolors
- If NetHack can, it should display windows with the specified
+ If NetHack can, it should display windows with the specified
foreground/background colors. Windows GUI only. The format is
- OPTION=windowcolors:wintype foreground/background
- where wintype is one of "menu", "message", "status", or
- "text", and foreground and background are colors, either a hexa-
- decimal \'#rrggbb', one of the named colors (black, red, green,
- brown, blue, magenta, cyan, orange, brightgreen, yellow, bright-
- blue, brightmagenta, brightcyan, white, trueblack, gray, purple,
- silver, maroon, fuchsia, lime, olive, navy, teal, aqua), or one
- of Windows UI colors (activeborder, activecaption, appworkspace,
- background, btnface, btnshadow, btntext, captiontext, graytext,
- NetHack 3.6 November 27, 2019
+ NetHack 3.7 November 17, 2019
+ NetHack 3.7 November 17, 2019
+ NetHack Guidebook 69
- NetHack Guidebook 69
+ flush
+ (default off, Amiga NetHack only).
+ MACgraphics
+ (default on, Mac NetHack only).
+ page_wait
+ (default on, Mac NetHack only).
rawio
- Force raw (non-cbreak) mode for faster output and more bullet-
- proof input (MS-DOS sometimes treats `^P' as a printer toggle
- without it) (default off, OS/2, PC, and ST NetHack only).
- Note: DEC Rainbows hang if this is turned on. Cannot be set
+ Force raw (non-cbreak) mode for faster output and more bullet-
+ proof input (MS-DOS sometimes treats `^P' as a printer toggle
+ without it) (default off, OS/2, PC, and ST NetHack only).
+ Note: DEC Rainbows hang if this is turned on. Cannot be set
with the `O' command.
- soundcard
- (default on, PC NetHack only). Cannot be set with the `O' com-
- mand.
-
subkeyvalue
(Win32 tty NetHack only). May be used to alter the value of
keystrokes that the operating system returns to NetHack to help
9.7. Regular Expressions
Regular expressions are normally POSIX extended regular ex-
- pressions. It is possible to compile NetHack without regular
-
+ pressions. It is possible to compile NetHack without regular ex-
+ pression support on a platform where there is no regular expres-
+ sion library. While this is not true of any modern platform, if
+ your NetHack was built this way, patterns are instead glob pat-
- terns. This applies to Autopickup exceptions, Message types, Menu
- colors, and User sounds.
-
+ 9.8. Configuring Autopickup Exceptions
-
+ You can further refine the behavior of the autopickup option
+ beyond what is available through the pickup_types option.
-
+ By placing autopickup_exception lines in your configuration
+ file, you can define patterns to be checked when the game is
-
- NetHack 3.6 November 27, 2019
+ NetHack 3.7 November 17, 2019
- 9.8. Configuring Autopickup Exceptions
-
- You can further refine the behavior of the autopickup option
- beyond what is available through the pickup_types option.
-
- By placing autopickup_exception lines in your configuration
- file, you can define patterns to be checked when the game is
+ expression support on a platform where there is no regular ex-
+ pression library. While this is not true of any modern platform,
+ if your NetHack was built this way, patterns are instead glob
+ patterns. This applies to Autopickup exceptions, Message types,
+ Menu colors, and User sounds.
+
about to autopickup something.
autopickup_exception
by using BIND stanzas in the configuration file. Format is key,
followed by the command to bind to, separated by a colon. The
key can be a single character ("x"), a control key ("^X", "C-x"),
- a meta key ("M-x"), or a three-digit decimal ASCII code.
-
- For example:
-
+ BIND=^X:getpos.autodescribe
+ BIND={:menu_first_page
+ BIND=v:loot
+ Extended command keys
+ You can bind multiple keys to the same extended command. Un-
+ bind a key by using "nothing" as the extended command to bind
+ to. You can also bind the "<esc>", "<enter>", and "<space>"
+ keys.
+ NetHack 3.6 November 27, 2019
-
+ NetHack 3.7 November 17, 2019
+ NetHack Guidebook 71
- NetHack Guidebook 71
+ a meta key ("M-x"), or a three-digit decimal ASCII code.
+ For example:
- BIND=^X:getpos.autodescribe
- BIND={:menu_first_page
- BIND=v:loot
-
- Extended command keys
- You can bind multiple keys to the same extended command. Un-
- bind a key by using "nothing" as the extended command to bind
- to. You can also bind the "<esc>", "<enter>", and "<space>"
- keys.
-
Menu accelerator keys
The menu control or accelerator keys can also be rebound via
OPTIONS lines in the configuration file. You cannot bind ob-
fault is `s'.
getpos.autodescribe
- When asked for a location, the key to toggle autodescribe. De-
- fault is `#'.
-
- getpos.all.next
+ When asked for a location, the key to toggle autodescribe.
+ When asked for a location, the key to go to next closest inter-
+ esting thing. Default is `a'.
+ getpos.all.prev
+ When asked for a location, the key to go to previous closest
+ interesting thing. Default is `A'.
- NetHack 3.6 November 27, 2019
+ getpos.door.next
+ When asked for a location, the key to go to next closest door
+ or doorway. Default is `d'.
- Default is `#'.
+ NetHack Guidebook 72
- getpos.all.prev
- When asked for a location, the key to go to previous closest
- interesting thing. Default is `A'.
+ getpos.all.next
+ When asked for a location, the key to go to next closest inter-
+ esting thing. Default is `a'.
+
- getpos.door.next
- When asked for a location, the key to go to next closest door
- or doorway. Default is `d'.
getpos.door.prev
When asked for a location, the key to go to previous closest
Toggles between no filtering, in view only, and in the same
area only. Default is `"'.
- getpos.pick
+ When asked for a location, the key to choose the location, and
- possibly ask for more info. Default is `.'.
-
+ getpos.pick.once
+ When asked for a location, the key to choose the location, and
+ skip asking for more info. Default is `,'.
+
+ getpos.pick.quick
+ When asked for a location, the key to choose the location, skip
+ asking for more info, and exit the location asking loop. De-
+ fault is `;'.
- NetHack 3.6 November 27, 2019
+ NetHack 3.7 November 17, 2019
- NetHack Guidebook 73
+ NetHack Guidebook 73
- getpos.pick.once
- When asked for a location, the key to choose the location, and
- skip asking for more info. Default is `,'.
+ getpos.pick
+ When asked for a location, the key to choose the location, and
+ possibly ask for more info. Default is `.'.
+
- getpos.pick.quick
- When asked for a location, the key to choose the location, skip
- asking for more info, and exit the location asking loop. De-
- fault is `;'.
getpos.pick.verbose
When asked for a location, the key to choose the location, and
repeat
Key to repeat previous command. Default is `^A'.
- reqmenu
- Prefix key to request menu from some commands. Default is `m'.
-
+ run
+ Prefix key to run towards a direction. Default is `G'.
-
+ run.nopickup
+ Prefix key to run towards a direction without picking up items
+ on the way. Default is `M'.
-
- NetHack 3.6 November 27, 2019
-
+ run.numpad
+ Prefix key to run towards a direction. With number_pad only.
+ Default is `5'.
+ NetHack 3.7 November 17, 2019
- NetHack Guidebook 74
- reqmenu
+ NetHack Guidebook 74
+ Prefix key to request menu from some commands. Default is `m'.
+
- run
- Prefix key to run towards a direction. Default is `G'.
- run.nopickup
- Prefix key to run towards a direction without picking up items
- on the way. Default is `M'.
- run.numpad
- Prefix key to run towards a direction. With number_pad only.
- Default is `5'.
rush
Prefix key to rush towards a direction. Default is `g'.
matching rule is used. Put the general case first, exceptions
below them.
- 9.11. Configuring Menu Colors
- Some platforms allow you to define colors used in menu lines
+ when the line matches a user-defined pattern. At this time the
- tty, curses, win32tty and win32gui interfaces support this.
+ In general, the configuration file entries to describe the
+ menu color mappings look like this:
-
+ MENUCOLOR="pattern"=color&attribute
+ NetHack 3.6 November 27, 2019
+ pattern - the pattern to match;
+ color - the color to use for lines matching the pat-
+ tern;
+ attribute - the attribute to use for lines matching the
+ pattern. The attribute is optional, and if
+ NetHack 3.7 November 17, 2019
- NetHack Guidebook 75
- 9.11. Configuring Menu Colors
+ NetHack Guidebook 75
- In general, the configuration file entries to describe the
- menu color mappings look like this:
+ Some platforms allow you to define colors used in menu lines
+ when the line matches a user-defined pattern. At this time the
+ tty, curses, win32tty and win32gui interfaces support this.
+
- MENUCOLOR="pattern"=color&attribute
- pattern - the pattern to match;
- color - the color to use for lines matching the pat-
- tern;
- attribute - the attribute to use for lines matching the
- pattern. The attribute is optional, and if
left out, you must also leave out the preced-
ing ampersand. If no attribute is defined,
no attribute is used.
plicit_uncursed option off so that all items known to be uncursed
are actually displayed with the "uncursed" description.
- 9.12. Configuring User Sounds
- to the message window. At this time the Qt port and the win32tty
- and win32gui ports support the use of user sounds.
+ Some platforms allow you to define sound files to be played
+ when a message that matches a user-defined pattern is delivered
+ The following configuration file entries are relevant to
+ mapping user sounds to messages:
+ SOUNDDIR
+ The directory that houses the sound files to be played.
- NetHack 3.6 November 27, 2019
+ SOUND
+ An entry that maps a sound file to a user-specified message
+ pattern. Each SOUND entry is broken down into the following
+ parts:
- 9.12. Configuring User Sounds
+ NetHack Guidebook 76
- The following configuration file entries are relevant to
- mapping user sounds to messages:
+ Some platforms allow you to define sound files to be played
+ when a message that matches a user-defined pattern is delivered
+ to the message window. At this time the Qt port and the win32tty
+ and win32gui ports support the use of user sounds.
+
- SOUNDDIR
- The directory that houses the sound files to be played.
+
- SOUND
- An entry that maps a sound file to a user-specified message
- pattern. Each SOUND entry is broken down into the following
- parts:
MESG - message window mapping (the only one supported in
3.6);
OPTION=hilite_status:wisdom/down/red/up/green
Allowed colors are black, red, green, brown, blue, magenta,
- cyan, gray, orange, light-green, yellow, light-blue, light-magen-
+ cyan, gray, orange, light-green, yellow, light-blue, light-
+ ta, light-cyan, and white. And "no-color", the default fore-
- ground color on the display, which is not necessarily the same as
- black or white or any of the other colors.
-
+ Allowed attributes are none, bold, dim, underline, blink,
+ and inverse. "Normal" is a synonym for "none"; they should not
- be used in combination with any of the other attributes.
+ To specify both a color and an attribute, use `&' to combine
+ them. To specify multiple attributes, use `+' to combine those.
+ For example: "magenta&inverse+dim".
- NetHack 3.6 November 27, 2019
+ Note that the display may substitute or ignore particular
+ attributes depending upon its capabilities, and in general may
+ interpret the attributes any way it wants. For example, on some
+ display systems a request for bold might yield blink or vice ver-
+ sa. On others, issuing an attribute request while another is al-
+ ready set up will replace the earlier attribute rather than
+ NetHack 3.7 November 17, 2019
- NetHack Guidebook 77
+ NetHack Guidebook 77
- To specify both a color and an attribute, use `&' to combine
- them. To specify multiple attributes, use `+' to combine those.
- For example: "magenta&inverse+dim".
+ magenta, light-cyan, and white. And "no-color", the default
+ foreground color on the display, which is not necessarily the
+ same as black or white or any of the other colors.
+
+ Allowed attributes are none, bold, dim, underline, blink,
+ and inverse. "Normal" is a synonym for "none"; they should not
+ be used in combination with any of the other attributes.
+
- Note that the display may substitute or ignore particular
- attributes depending upon its capabilities, and in general may
- interpret the attributes any way it wants. For example, on some
- display systems a request for bold might yield blink or vice ver-
- sa. On others, issuing an attribute request while another is al-
- ready set up will replace the earlier attribute rather than com-
- bine with it. Since NetHack issues attribute requests sequen-
+
+ combine with it. Since NetHack issues attribute requests sequen-
tially (at least with the tty interface) rather than all at once,
the only way a situation like that can be controlled is to speci-
fy just one attribute.
* "up", "down" set the field attributes for when the field
value changes upwards or downwards. This attribute times
- out after statushilites turns.
- * "changed" sets the field attribute for when the field val-
+ ue changes. This attribute times out after statushilites
+ turns. (If a field has both a "changed" rule and an "up"
+ or "down" rule which matches a change in the field's val-
- ue, the "up" or "down" one takes precedence.)
- NetHack 3.6 November 27, 2019
+ * percentage sets the field attribute when the field value
+ matches the percentage. It is specified as a number be-
+ tween 0 and 100, followed by `%' (percent sign). If the
+ percentage is prefixed with `<=' or `>=', it also matches
+ when value is below or above the percentage. Use prefix
+ `<' or `>' to match when strictly below or above. (The
+ numeric limit is relaxed slightly for those: >-1% and
+ <101% are allowed.) Only four fields support percentage
+ rules. Percentages for "hitpoints" and "power" are
+ straightforward; they're based on the corresponding
+ NetHack 3.7 November 17, 2019
+ NetHack Guidebook 78
- NetHack Guidebook 78
+ out after statushilites turns.
+ * "changed" sets the field attribute for when the field val-
+ ue changes. This attribute times out after statushilites
+ turns. (If a field has both a "changed" rule and an "up"
+ or "down" rule which matches a change in the field's val-
+ ue, the "up" or "down" one takes precedence.)
- * percentage sets the field attribute when the field value
- matches the percentage. It is specified as a number be-
- tween 0 and 100, followed by `%' (percent sign). If the
- percentage is prefixed with `<=' or `>=', it also matches
- when value is below or above the percentage. Use prefix
- `<' or `>' to match when strictly below or above. (The
- numeric limit is relaxed slightly for those: >-1% and
- <101% are allowed.) Only four fields support percentage
- rules. Percentages for "hitpoints" and "power" are
- straightforward; they're based on the corresponding maxi-
- mum field. Percentage highlight rules are also allowed
- for "experience level" and "experience points" (valid when
- the showexp option is enabled). For those, the percentage
- is based on the progress from the start of the current ex-
- perience level to the start of the next level. So if lev-
- el 2 starts at 20 points and level 3 starts at 40 points,
- having 30 points is 50% and 35 points is 75%. 100% is
- unattainable for experience because you'll gain a level
- and the calculations will be reset for that new level, but
- a rule for =100% is allowed and matches the special case
- of being exactly 1 experience point short of the next lev-
- el.
+ maximum field. Percentage highlight rules are also al-
+ lowed for "experience level" and "experience points"
+ (valid when the showexp option is enabled). For those,
+ the percentage is based on the progress from the start of
+ the current experience level to the start of the next lev-
+ el. So if level 2 starts at 20 points and level 3 starts
+ at 40 points, having 30 points is 50% and 35 points is
+ 75%. 100% is unattainable for experience because you'll
+ gain a level and the calculations will be reset for that
+ new level, but a rule for =100% is allowed and matches the
+ special case of being exactly 1 experience point short of
+ the next level.
* absolute value sets the attribute when the field value
matches that number. The number must be 0 or higher, ex-