Fandom

Wikihack

Compile-time options

2,034pages on
this wiki
Add New Page
Talk0 Share

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 */

The above line enables the Keystone Kops. If it is commented out, then Kops no longer exist in the game, and a shopkeeper who is robbed will have to fend for himself:

/*#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 */

Some optionsEdit

SINKSEdit

SINKS is enabled by default. If it is turned off, sinks do not appear; this may make the game harder, as it is no longer possible to get a random ring or a dishwasher by kicking a sink.

WALLIFIED_MAZEEdit

WALLIFIED_MAZE is enabled by default. If it is turned off, walls cannot be drawn with the more attractive box drawing characters via IBMgraphics or DECgraphics.

REINCARNATIONEdit

REINCARNATION is enabled by default. If it is turned off, the Rogue level does not appear.

KOPSEdit

KOPS is enabled by default. If it is turned off, the Keystone Kops do not appear, and a shopkeeper who is robbed will have to kill you himself.

SEDUCEEdit

SEDUCE is enabled by default. If it is turned off, foocubi become level-draining monsters similar to vampires. Unlike most options, SEDUCE does not affect bones/save compatibility.

STEEDEdit

STEED is enabled by default. If it is turned off, it is no longer possible to ride horses and other steeds, and saddles do not exist.

TOURISTEdit

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.

ELBERETHEdit

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.

REDOEdit

REDO is enabled by default. If it is turned off, control-A does not repeat the last command.

EXP_ON_BOTLEdit

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_BOTLEdit

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.

GOLDOBJEdit

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_EXCEPTIONSEdit

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.

SHELLEdit

This can be found in unixconf.h. By default this is on, and it allows the user to escape to the command-line shell with !; Disabling this is a good idea on public servers.

Also on Fandom

Random Wiki