Difference between revisions of "User:Kernigh/nethackrc"

From NetHackWiki
Jump to navigation Jump to search
(Update: include Slash'EM.)
m (Update this page; I never updated it when I first had MENUCOLOR!)
Line 1: Line 1:
This is a page about my '''[[nethackrc]] of [[User:Kernigh|Kernigh]]''', the configuration which I use at [[nethack.alt.org]].
+
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]].
  
At 19 May 2005, I am testing some modifications to my nethackrc. In addition to changing my [[option]]s, I plan to deploy [[menucolors]] for the first time.
+
These configurations are at:
 +
* http://alt.org/nethack/rcfiles/Kernigh.nethackrc (19 May 2006)
 +
* http://slashem.crash-override.net/rcfiles/Kernigh.nethackrc (25 May 2006)
 +
* ~/.brassrc (22 September 2006)
  
Once the test is finished, I will describe my new configuration here. Now follow the old configurations.
+
== 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..
  
=== Old nethackrc (6 September 2005) ===
+
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..".
  # This is an example nethackrc file. You should edit this to suit the needs
+
 
  # of your personal nethack build and add some reasonable default options
+
I have exploited the [[menucolors]], [[showborn]] and [[sortloot]] options available at nethack.alt.org.
# for your users.
+
 
 +
=== 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).
 
   
 
   
  # If you compiled dgamelaunch with the `vi' editor enabled instead of ee,
+
  # === OPTIONS ===
  # perhaps a helpful blurb such as this might help:
+
# 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
 
   
 
   
  # This editor is vi-like. Type ESC a couple times, then ':q!' (without quotes)
+
  # === OPTIONS ===
  # to exit if you get stuck. To save, hit ESC and then ZZ or type ':wq'
+
  # character
  # (without quotes.) To insert text, hit 'i' to enter insert mode.
+
OPTIONS=race:elf
   
+
  # appearance
# Here are some examples of reasonable defaults:
+
  OPTIONS=color,hilite_pet,lit_corridor,boulder:8
   
+
  OPTIONS=showexp,showscore,time,msg_window:f,disclose:+i+a+v+g+c
#OPTIONS=showexp,showscore,time,color,!autopickup
+
# controls
  #OPTIONS=autodig,fruit:slime mold,boulder:0
+
OPTIONS=autodig,!autopickup
   
+
  # names
  # added at 19 May 2005
+
OPTIONS=catname:Morris,dogname:Fido,fruit:slime mold. You die..
  #OPTIONS=showexp,showscore,time,color,!autopickup,autodig
+
  # brass
  #OPTIONS=hilite_pet,lit_corridor,DECgraphics,fruit:honey shroom,boulder:8
+
  OPTIONS=showdamage,showrexp,showweight
  #OPTIONS=race:elf
+
# interface patches
   
+
OPTIONS=menucolors,showborn,sortloot=loot,statuscolors
  # added at 6 September 2005
+
  OPTIONS=dump:/home/kernigh/misc/dump/brass/%n.txt
  #OPTIONS=!autopickup,autodig
+
 
  #OPTIONS=color,hilite_pet,lit_corridor,DECgraphics,boulder:8
+
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.
  #OPTIONS=showexp,showscore,time,msg_window:f
+
 
  #OPTIONS=fruit:salad,catname:Morris,dogname:Fido
+
== MENUCOLOR ==
  #OPTIONS=race:elf,disclose:+i+a+v+g+c
+
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.)
 
+
 
  # For more information on what you can set in your nethackrc file, refer to:
+
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 [[gem]]s, but that has no effect on my menucolors. I also have not made menucolors except for menus that list objects.
  #   http://www.nethack.org/v343/Guidebook.html#_TOCentry_42
+
 
  # Happy hacking!
+
  # === 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 {{orange|cursed}} {{yellow|uncursed}} {{brightgreen|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 [[charge]]s or [[enchantment]]s 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
  
=== Slash'EM ===
+
Finally, I have a few rules simply to mark some good food. I ignore the [[BUC]] status of the food.
On [[slashem.crash-override.net]] I use a very similar configuration, as of 25 May 2006. The differences are that:
 
# I enable showdmg and showweight and disable showborn, because the two games have different options.
 
# I change my race of [[elf]] to [[drow]], in order that I remain [[chaotic]] in both games.
 
# I have made other changes but I hope to port them back to NAO.
 
  
My old Slash'EM configuration (9 September 2005) was:
+
== 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.
  
  #OPTIONS=showexp,showscore,time,color,!autopickup
+
  # === STATUSCOLOR ===
#OPTIONS=autodig,fruit:slime mold,boulder:0
+
  # defaults from http://bilious.homelinux.org/?142
 
  # 3 June 2005: copied these from nethack.alt.org (orig 19 May 2005)
 
#OPTIONS=showexp,showscore,time,color,!autopickup,autodig
 
#OPTIONS=hilite_pet,lit_corridor,DECgraphics,fruit:honey shroom,boulder:8
 
#OPTIONS=race:elf
 
 
   
 
   
  # 9 September 2005: this is like nethack.alt.org
+
  # HP
  # specific to Slash'em: showdmg, showweight, drow instead of elf
+
  STATUSCOLOR=hp%100=green,hp%66=yellow,hp%50=orange
  OPTIONS=!autopickup,autodig
+
  STATUSCOLOR=hp%33=red&bold,hp%15:red&inverse,hp%0:red&inverse&blink
  OPTIONS=color,hilite_pet,lit_corridor,DECgraphics,boulder:8
+
  # Pw
  OPTIONS=showexp,showscore,showdmg,showweight,time,msg_window:f
+
STATUSCOLOR=pw%100=green,pw%66=yellow,pw%50:orange,pw%33=red&bold
  OPTIONS=fruit:salad,catname:Morris,dogname:Fido
+
# Carry
  OPTIONS=race:drow,disclose:+i+a+v+g+c
+
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

Revision as of 01:29, 24 September 2006

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.homelinux.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