User:Kernigh/nethackrc

From NetHackWiki
Jump to navigation Jump to search

This page describes my nethackrc configuration files. They have become more complex since at 19 May 2005 when I first configured menucolors. At 22 September 2006, I finished my configuration for NetHack brass.

These configurations are at:

OPTIONS

NetHack 3.4.3 (nethack.alt.org)

# === OPTIONS ===
# character
OPTIONS=race:elf
# appearance
OPTIONS=color,hilite_pet,lit_corridor,menucolors,DECgraphics,boulder:8
OPTIONS=showborn,showexp,showscore,time
OPTIONS=msg_window:f,sortloot=loot,disclose:+i+a+v+g+c
# controls
OPTIONS=autodig,!autopickup
# names
OPTIONS=catname:Morris,dogname:Fido,fruit:slime mold.  You die..

I always play as an elf and take names from Dudley's dungeon. I call my cat Morris and my dog Fido. At 19 May 2006 I started calling my fruit "slime mold. You die..".

I have exploited the menucolors, showborn and sortloot options available at nethack.alt.org.

SLASH'EM 0.0.7E7F2 (slashem.crash-override.net)

# Unlike my nethackrc at nethack.alt.org, this file has showdmg
# and showweight (but not showborn), and sets race to drow (not elf).

# === OPTIONS ===
# character
OPTIONS=race:drow
# appearance
OPTIONS=color,hilite_pet,lit_corridor,menucolors,DECgraphics,boulder:8
OPTIONS=showdmg,showweight,showexp,showscore,time
OPTIONS=msg_window:f,sortloot=loot,disclose:+i+a+v+g+c
# controls
OPTIONS=autodig,!autopickup
# names
OPTIONS=catname:Morris,dogname:Fido,fruit:slime mold.  You die..

My Pallas config of 25 May 2006 is a copy of my nethack.alt.org configuration with as few changes as possible. So I use showdmg and showweight, but showborn is not recognised. In my 52nd and 53rd games, I started using the invweight option, so I might want to add that to my nethackrc.

NetHack brass

# This version requires NetHack brass 040923 + interface patch 0.1

# === OPTIONS ===
# character
OPTIONS=race:elf
# appearance
OPTIONS=color,hilite_pet,lit_corridor,boulder:8
OPTIONS=showexp,showscore,time,msg_window:f,disclose:+i+a+v+g+c
# controls
OPTIONS=autodig,!autopickup
# names
OPTIONS=catname:Morris,dogname:Fido,fruit:slime mold.  You die..
# brass
OPTIONS=showdamage,showrexp,showweight
# interface patches
OPTIONS=menucolors,showborn,sortloot=loot,statuscolors
OPTIONS=dump:/home/kernigh/misc/dump/brass/%n.txt

When I created the brass interface patch, I became more aware of which options are from patches. My config is a reorganisation of my nethack.alt.org configs, with brass-specific and patch-specific options separately listed. I might backport this reorganisation to my other configs.

MENUCOLOR

I use the same menucolors in all three configs, with the exception of some rules not yet backported from Pallas. (The NAO and Pallas configs have some leading + signs in their regular expressions. This matches + in GNU's regular expression parser, but causes an error in OpenBSD's parser, because + is normally a special character. For NetHack brass I escaped + to \+ as shown below.)

I designed these configs myself to match how I use the #name command. My convention is to #name "cursed" if it fails the pet test or "safe" if it passes. I also #name gems, but that has no effect on my menucolors. I also have not made menucolors except for menus that list objects.

# === MENUCOLOR ===
# lightcyan - good food
# orange - cursed (or under +0)
# yellow - not cursed
# lightgreen - blessed
MENUCOLOR="safe"=yellow
MENUCOLOR="[0-9]:[0-9]"=yellow
MENUCOLOR="\+[0-9]"=yellow
MENUCOLOR="[Cc]ursed"=orange
MENUCOLOR="[Uu]ncursed"=yellow
MENUCOLOR="[Bb]lessed"=lightgreen
MENUCOLOR="-[0-9]"=orange

These are the basic expressions to produce cursed uncursed blessed. The order is important, as later lines override earlier ones for items that match twice. The rule for "safe" is first to correctly handle mistakes like "cursed crude dagger named safe". Next, I assume that objects with identified charges or enchantments are uncursed, but the wording "cursed" or "blessed" can override it. Finally, anything with a negative enchantment is orange even if I remove its curse.

# underline objects "(wielded)", "(in quiver)", "(being worn)", ...
MENUCOLOR="safe .* ([a-z]"=yellow,&underline
MENUCOLOR="+[0-9] .* ([a-z]"=yellow&underline
MENUCOLOR="[Cc]ursed .* ([a-z]"=orange&underline
MENUCOLOR="[Uu]ncursed .* ([a-z]"=yellow&underline
MENUCOLOR="[Bb]lessed .* ([a-z]"=lightgreen&underline
MENUCOLOR="-[0-9] .* ([a-z]"=orange&underline

These lines are only at Pallas (thus the unescaped +); they help me spot objects that I am using by matching phrases such as "(weapon in hand)". If I just write one regular expression and specify underline, then it will match but cancel the colors from the previous section. So I need six rules to maintain the color. My NAO config still has 18 rules here "# underline weapons in use"; they only match "(weapon in hand)", "(alternate weapon; not wielded)" and "(in quiver)". My brass config using a copy of the older rules from NAO.

# lightcyan - good food
# lightgreen - lichen corpse
# lightmagenta - lizard corpse
MENUCOLOR="ration"=lightcyan
MENUCOLOR="lembas wafer"=lightcyan
MENUCOLOR="lichen corpse"=lightgreen
MENUCOLOR="lizard corpse"=lightmagenta

Finally, I have a few rules simply to mark some good food. I ignore the BUC status of the food.

STATUSCOLOR

The brass interface patch bundles in statuscolors, while NAO and Pallas still use hpmon. Therefore, my NetHack brass config is the only one with STATUSCOLOR lines. These lines are a simple copy of the suggestion in the patch documentation.

# === STATUSCOLOR ===
# defaults from http://bilious.alt.org/?142

# HP 
STATUSCOLOR=hp%100=green,hp%66=yellow,hp%50=orange 
STATUSCOLOR=hp%33=red&bold,hp%15:red&inverse,hp%0:red&inverse&blink 
# Pw 
STATUSCOLOR=pw%100=green,pw%66=yellow,pw%50:orange,pw%33=red&bold 
# Carry 
STATUSCOLOR=burdened:yellow,stressed:orange,strained:red&bold 
STATUSCOLOR=overtaxed:red&inverse,overloaded:red&inverse&blink 
# Hunger 
STATUSCOLOR=satiated:yellow,hungry:orange,weak:red&bold 
STATUSCOLOR=fainting:red&inverse,fainted:red&inverse&blink 
# Mental 
STATUSCOLOR=hallu:yellow,conf:orange,stun:red&bold 
# Health 
STATUSCOLOR=ill:red&inverse,foodpois:red&inverse,slime:red&inverse 
# Other 
STATUSCOLOR=held:red&inverse,blind:red&inverse