|Name||Statuscolors and hitpointbar 2|
|Description||Custom rule-based coloring for status fields and visual bar for hit points|
|This is a full rewrite of the old statuscolors and hitpointbar patches for NetHack 3.6.0, replacing 3.6.0's statushilites system. For the uninitiated, statuscolors allows status fields to be colored according to player-defined rules, e.g. show HP in green at 100%, yellow at 50% and red at 25%, highlight Hungry status, etc. whilst hitpointbar displays a bar behind the player's name filled according to the amount of HP remaining. Both features are bundled into a single patch because they share infrastructure, and almost everybody that wants one wants the other.
Why a rewrite? I noticed that the old patches were omitted from NetHack 3.6.0 by the DevTeam despite universal praise for them. My guess as to why is because of their TTY-centric design that made it hard to extend to other window ports. As such, this patch is designed to be easily extended to other window ports.
NOTE: This patch only implements these features for TTY, but with work could be extended to other window ports.
### TO COMPILE ###
For statuscolors, add -DSTATUS_VIA_WINDOWPORT and -DSTATUS_COLORS to your CFLAGS, then compile the game as usual.
For hitpointbar, only -DSTATUS_VIA_WINDOWPORT is needed.
### USING HITPOINTBAR ###
### USING STATUSCOLORS ###
First, statuscolors need to be enabled.
Next, statuscolor rules need to be defined. Rules for the old statuscolor patch are compatible, as are the new rule types added by NAO-3.4.3.
Basic example that colors hit points with multiple rules:
Conditions can be colored:
Support for NAO-3.4.3-style less than, equal and greater than rules:
Like 3.6.0's statushilites, all numeric fields can be highlighted, and change rules are supported:
Change amounts can be colored differently:
Like 3.6.0's statushilites, this patch features an in-game statuscolors customization menu for adjusting rules, under the options menu. Rules set this way can even be copy-pasted back into a configuration file!
For the full lists of status field names, rule types, color and attribute names, consult the changes to the Guidebook:
|Download||https://github.com/tung/nethack360-statuscolors/compare/master...statuscolors2.diff (162.7 Kb)|
|Added||January 28, 2016 10:35|
|Submit an update to this patch|
|5||Elronnd||March 16, 2017 05:31|