| Name | Statuscolors 1.0 |
| 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 menucolors patch. Unlike menucolors, 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.0: - Initial release. --- Shachaf & Oren Ben-Kiki shachaf+nethack@gmail.com nethack-oren@ben-kiki.org | |
| Download | http://www.ben-kiki.org/oren/statuscolors/nh343-statuscolors.patch or Get it from us (17.9 Kb) |
| Added | July 10, 2005 20:40 |
| Changed | August 29, 2009 00:11 |
| Submit an update to this patch | |
| 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 | |
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] | ||
Check out the svn on slashem.de revision 6 and 7