Name | Statuscolors 1.2 |
Rating | |
Author | Shachaf & Oren Ben-Kiki |
For | NetHack 3.4.3 |
Description | Customizable coloring for the status (bottom) lines |
Statuscolors is a patch for Nethack (version 3.4.3) that attempts to generalize the hpmon patch to be more like the menucolor patch. As of v1.2, the statuscolors patch may be applied after the menucolor patch (but not before it). Unlike menucolor, it does not use regexps. Instead, it provides the following options:
To enable statuscolors: OPTIONS=statuscolors To specify statuscolor options, write: STATUSCOLOR=<option>,<option> Numeric options have the format <field>%<max-percent>:<color-option>. For example: STATUSCOLOR=hp%15:red&bold,pw%100=green Text options have the format <text>:<color-option>. Text is case-insensitive. For example: STATUSCOLOR=hallu:orange,foodpois:red&inverse&blink A color option is a <color> followed by an optional sequence of &<attr>. Color and attribute names are case insensitive. Valid colors are: black blue brown cyan gray green lightblue lightcyan lightgreen lightmagenta magenta none orange red white yellow Valid attributes are: blink bold dim inverse none underline A reasonable set of defaults might be: # 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 Changelog: * v1.2: o Menucolor compatibility. * v1.1: o Fixed several shameful bugs. * v1.0: o Initial release. --- Shachaf & Oren Ben-Kiki shachaf+nethack@gmail.com nethack-oren@ben-kiki.org | |
Download | http://ben-kiki.org/oren/assets/nh343-statuscolors.patch (18.6 Kb) |
Added | July 10, 2005 20:40 |
Changed | September 04, 2018 16:55 |
Submit an update to this patch |
5 | alex | August 23, 2018 17:52 |
Internet Archive has a cached version https://web.archive.org/web/20080918110701/http://ben-kiki.org/oren/statuscolors/nh343-statuscolors.patch[Quote] | ||
5 | Li | September 12, 2017 23:45 |
Please, the link is DEAD !!![Quote] | ||
5 | xenosoz | December 30, 2012 10:24 |
Updated with Chr15's (and loh's) comment:
https://raw.github.com/xenosoz/xenosoz-overlay/master/games-roguelike/nethack/files/nethack-3.4.3-statuscolors.patch[Quote] | ||
loh | December 20, 2012 11:50 | |
Duh, sorry for redundant comment. I should have scrolled further down before commenting.[Quote] | ||
loh | December 20, 2012 11:47 | |
Regarding errors with XXXgraphics options ...
The patch to files.c is off by one line; it should be *below* this statement: assign_graphics(translate, len, .... not above it. The assign_graphics() is part of the "GRAPHICS" option, but the patch makes it part of the STATUSCOLOR option, so 1) GRAPHICS option is a no-op and STATUSCOLOR overwrites any previous changes to the glyphs.[Quote] | ||
4 | Amr | December 30, 2010 17:24 |
If you want to download NetHack with this patch and Menucolors 1.5 already applied, just go to http://helmpcb.com/?p=203.
I too had the same problem with graphics corruption using IBMgraphics. Placing "OPTION=IBMgraphics" under the Statuscolors options as suggested by John does work, but if you remove it in order to play in ASCII mode, it doesn't work. Does ASCII mode have an explicit OPTION?[Quote] | ||
Karl | April 25, 2010 01:25 | |
It looks like a 1.2 version of the patch is available on the authors' website, although the link above is broken (needs to have "www" removed). This version fixes the issues noted in comments, and more:
readme: http://ben-kiki.org/oren/statuscolors/index.html link to patch: http://ben-kiki.org/oren/statuscolors/nh343-statuscolors.patch[Quote] | ||
Karl | April 24, 2010 12:25 | |
Karl wrote:
Nice patch. Does anyone else get a crash upon exit if the percentage fields (hp or pw) are defined? Found my own answer misplaced in the comments of the menucolors patch: After patching, go into src/options.c, find the line: struct percent_color_option *percent_color_option = (struct percent_color_option *)alloc(sizeof(*percent_color_option)); and, add in right after, percent_color_option->next = NULL;[Quote] | ||
4 | Karl | April 24, 2010 12:16 |
Nice patch. Does anyone else get a crash upon exit if the percentage fields (hp or pw) are defined?[Quote] | ||
Q | November 20, 2009 05:15 | |
The burdened crash bug is not specific to Windows.
Line 332 of the August 29 patch: + add_colored_text(enc_stat[cap]); should be: + add_colored_text(enc_stat[cap], newbot2);[Quote] | ||
0 | sdf | September 15, 2009 02:06 |
In the windows tty version, this makes the game crash when my characters is burdened[Quote] | ||
paxed | August 29, 2009 00:12 | |
Enabled local download.[Quote] | ||
MC Dirty | August 28, 2009 17:46 | |
I tried to download it, but the website seems to be down. Could you upload it somewhere else, because it seems to be pretty awesome.[Quote] | ||
5 | DHowett | June 27, 2009 05:35 |
This patch is AMAZING.[Quote] | ||
Dargor | April 15, 2009 17:11 | |
airmack wrote:
Check out the svn on slashem.de revision 6 and 7 Works nicely, thanks you ! I made a clean diff, available here : http://athanatos.free.fr/OpenBSD/se007-statuscolors-option.diff[Quote] | ||
airmack | April 14, 2009 20:24 | |
Dargor wrote:
I would love to have a port of this patch to SlashEM. I am only aware of http://bamgames.free.fr/Slashem/patches/S0.0.7E7F1/S0.0.7E7F1-Statuscolor_1.0.txt but it is broken (near line 381 of the diff). Some servers such as http://slashem.de/ have it, but I did not found any working diff. Does somebody have one ? Check out the svn on slashem.de revision 6 and 7[Quote] | ||
5 | Dargor | April 12, 2009 21:44 |
I would love to have a port of this patch to SlashEM. I am only aware of http://bamgames.free.fr/Slashem/patches/S0.0.7E7F1/S0.0.7E7F1-Statuscolor_1.0.txt but it is broken (near line 381 of the diff). Some servers such as http://slashem.de/ have it, but I did not found any working diff. Does somebody have one ?[Quote] | ||
5 | Chr15 | February 06, 2009 12:48 |
I could post the whole corrected diff, but anyone capable of using patch ought to be able to correct this themselves. Just to make things clear, the section of the diff for src/files.c ought to look like this:
------ @@ -1798,6 +1798,10 @@ char *tmp_levels; len = get_uchars(fp, buf, bufp, translate, FALSE, MAXPCHARS, "GRAPHICS"); assign_graphics(translate, len, MAXPCHARS, 0); +#if defined(STATUS_COLORS) && defined(TEXTCOLOR) + } else if (match_varname(buf, "STATUSCOLOR", 11)) { + (void) parse_status_color_options(bufp); +#endif } else if (match_varname(buf, "DUNGEON", 4)) { len = get_uchars(fp, buf, bufp, translate, FALSE, MAXDCHARS, "DUNGEON"); -------[Quote] | ||
5 | Chr15 | February 05, 2009 12:06 |
This is lovely.
I also had to do a bit of tweaking to get the patch in along with some others I wanted, but it wasn't difficult.[Quote] | ||
3 | Derek Ray | December 28, 2007 22:07 |
There is a problem with this patch at line 369 of the diff, related to the changes in files.c.
The new "else if" clause you added is one line too high, causing assign_graphics() to be called for every STATUSCOLORS= line, instead of every GRAPHICS= line in the option file. Moving the assign_graphics() line directly above your #ifdef/#endif pair, instead of below, will correct the problem -- this is what everyone is experiencing with DECgraphics and IBMgraphics.[Quote] | ||
5 | John | February 27, 2007 17:04 |
I have no idea why your graphics are screwy, but all I had to do to fix it for myself was make sure the IBMgraphics line was below the SATUSCOLOR line(s) in the config/defaults file.[Quote] | ||
4 | Tartley | December 14, 2006 13:15 |
Me again. I tried once more, applying to a clean source tree (no previous patches). This applied cleanly, as expected, but still initially messes up my graphics if I have IBMGraphics on, as described below.
In addition, I have also noticed that if this patch is enabled, then custom assignments to OPTIONS:dungeon are ignored - it always uses the default value for this option. Not sure of the cause.[Quote] | ||
4 | Tartley | December 13, 2006 23:49 |
For the record, before applying this patch I had applied 'menucolors' only.[Quote] | ||
4 | Tartley | December 13, 2006 23:48 |
Love this patch, but I have a problem with it. I'm far from sure what the cause is.
I have OPTIONS=IBMGraphics set. As soon as I start Nethack TTY with this patch enabled, then my font is screwed: -¿"""""""¿"""""= ÷...$..........÷ ÷...@d.........÷ ÷..............÷ ÷..............+ ♠""""""""""""""- If I hit 'O' and toggle IBMGraphics off, then normal tty graphics display fine. If I then hit 'O' again and turn IBMGraphics back on, then they display fine. If I remove or comment out all occurences of 'STATUSCOLOR=' from my config file, then all is fine, regardless of whether 'OPTIONS:statuscolors' is enabled, disabled, commented out or removed. Anyone got any clues why this might be?[Quote] | ||
5 | Tartley | December 13, 2006 23:38 |
Brill.
The diffs in this patch overlap with diffs in 'dump', in the file 'bot1.c', mentioned above. That's what causes it to not apply cleanly (I had the reverse problem, 'statuscolors' applied fine, but then the 'dump' patch needed manual editing.) Thanks![Quote] | ||
5 | Lenz | March 19, 2006 12:23 |
Yes, it doesn't apply cleanly. But, I finally get it working manually! :-) Nice patch![Quote] | ||
3 | Kiyoshi Aman | November 06, 2005 12:38 |
Nice patch, but unfortunately it doesn't apply cleanly [hunk 3 fails for src/botl.c], but this might be due to my applying the dump, extborn, sortloot, and paranoid patches prior to applying this one.[Quote] |
Please, the link is DEAD !!!