Ad blocker interference detected!
Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers
Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.
Compile-time options are certain features of NetHack that can be enabled or disabled when the game is compiled, that is, built afresh from the source code. Most of these can be selected in config.h, in particular, at the end of this file.
This article is principally about those compile-time options that affect gameplay by adding or removing certain features of the game. Some features, such as compression of bones and save files, are enabled by similar means to the options described here, but do not have a highly visible effect on the user's experience.
Many compile-time options change the format of the bones and save files, and will render these incompatible if they are changed.
Enabling or disabling optionsEdit
The options are mainly controlled by certain lines in config.h, which may look like this one:
#define KOPS /* Keystone Kops by Scott R. Turner */
/*#define KOPS*/ /* Keystone Kops by Scott R. Turner */
The /* and */ marks define a comment, a part of the source code that the compiler is instructed to ignore. Most newer compilers also accept a single-line comment like so:
//#define KOPS /* Keystone Kops by Scott R. Turner */
REINCARNATION is enabled by default. If it is turned off, the Rogue level does not appear.
TOURIST is enabled by default. If it is turned off, the Tourist role is removed, along with Hawaiian shirts, T-shirts, credit cards (including the Platinum Yendorian Express Card), and expensive cameras.
ELBERETH is enabled by default. If it is turned off, engraving Elbereth does not repel monsters. Crowning is also removed, because the lawful crowned title is the Hand of Elbereth. There will still be engravings of Elbereth in the Castle and Sokoban levels, since level maps are defined outside the source code, but they will have no effect.
REDO is enabled by default. If it is turned off, control-A does not repeat the last command.
EXP_ON_BOTL is enabled by default. If it is turned off, the showexp option does not exist, and it is not possible to show the current experience points on the status display. This option sets a flag that is saved in the save file, and so EXP_ON_BOTL affects bones/save compatibility, even though one might expect that it would not.
SCORE_ON_BOTL is not enabled by default. If it is turned on, a showscore option is enabled, which shows the current score on the status display when set. Like EXP_ON_BOTL, this option sets a flag that is saved in the save file.
GOLDOBJ is not enabled by default. It enables an experimental feature, still being debugged, by which gold coins are considered an object like any other; currently your gold is stored separately from the rest of your inventory.
AUTOPICKUP_EXCEPTIONS is not enabled by default in the source code, though at least the official Linux binary includes it. If enabled, it is possible to specify, through options, certain objects that will or will not be automatically picked up in spite of the autopickup setting for their object type; using AUTOPICKUP_EXCEPTIONS, one can for instance specify that food rations are to be automatically picked up and cockatrice corpses are not. Without AUTOPICKUP_EXCEPTIONS, this distinction is not possible: either all food items are automatically picked up (by specifying % in pickup_types) or none are.