Sunday, March 30, 2008

.nethackrc and you

After playing NetHack and Slash'Em for a while, I have discovered what many other players have discovered: the helpfulness of having a good .nethackrc file.

.nethackrc is the user config file for NetHack and its many-flavored offspring. Under Windows, the file is called defaults.nh and should be in your NetHack directory. Under *NIX, it's either in your home directory or somewhere else; I found mine in /etc/Nethack. On Mac, it's just called Nethack Defaults.

In this file, you can set a number of options for the game, from what character set the game uses to items you can pick up just by walking over them. Many of these options can be set in-game by typing a capital O, but they will be set back to their defaults when you exit. Anything set in your config file will remain that way when you start the game.

As an example, here's my .nethackrc file from the Slash'Em server on Pallas:

# .nethackrc file for JackOClubs on Pallas
# Borrowed heavily from Kernigh, esp. menucolors
#----------GAME ENVIRONMENT----------
OPTIONS=color,hilite_pet,lit_corridor,menucolors,DECgraphics
OPTIONS=invweight,showdmg,showweight,showexp,showscore,time
OPTIONS=msg_window:f,sortloot=loot,disclose:+i+a+v+g+c
#------------------------------------
#----------CUSTOM ENVIRONMENT----------
OPTIONS=catname:Sylvester,dogname:Ma-Mutt,horsename:Falafel
OPTIONS:boulder:0,fruit:lime,pushweapon
#--------------------------------------
#----------CONTROLS----------
OPTIONS=autodig,!autopickup
#----------------------------
#----------CHARACTER(disabled)----------
#OPTIONS=role:Yeoman,race:Human,gender:male
#---------------------------------------
#----------MENU COLORS----------
MENUCOLOR="[Cc]ursed"=orange&bold&underline
MENUCOLOR="[Uu]ncursed"=yellow
MENUCOLOR="[Bb]lessed"=lightgreen
MENUCOLOR="-[0-9]"=orange
#-------------------------------

Anything after a # is commented out; this is nice if you want to put in labels or have options you don't always want to use, like the character options I have above.

Setting boulders to a character like 0 or 8, simple as it sounds, can actually save a lot of headaches, both in Sokoban and elsewhere in the dungeon. 0 is just a much easier character to see than '.

The menu color options are really nice also; they can help you see, at a glance, if you have blessed/cursed items in your inventory. You could also set them to highlight things like holy water or other potions, certain artifacts, useful tools that you want to be able to find quickly, etc.

WikiHack has a list of all of the options and what they do; they should also be in the NetHack user manual.

2 Comments:

Blogger XLShadow said...

[Cc]ursed is regular expression syntax. And don't boulders default to the grave accent, not single quote? Even if they do, I think they change for the Sokoban level.

2:51 AM  
Blogger Jack Of Clubs said...

Yeah, you can use regular expression syntax for the menu colors; I don't think anything else in the config makes real good use of it. And you're right, "`" is the default boulder character; "'" is reserved for golems. However, Sokoban does NOT change your boulders to 0 automatically.

9:55 PM  

Post a Comment

<< Home