From: PatR Date: Tue, 9 Apr 2019 22:46:19 +0000 (-0700) Subject: Guidebook update X-Git-Tag: NetHack-3.6.2_Released~20^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2724c881917b2a860dc14f1e91e44049d299649d;p=nethack Guidebook update Tweak the status hilites section. Add a bit of detail about how to specify both color and attribute and/or multiple attributes. Also, change the Guidebook's table of status fields to be column-oriented. With the exception of 'score', reading down the three columns now matches going across the status lines. The previous ordering started row-oriented but then became scrambled compared to the usual display. As usual, Guidebook.tex is best guess.... --- diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index 5992a75c0..d7dcd76c4 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -1,4 +1,4 @@ -.\" $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.303 $ $NHDT-Date: 1554134322 2019/04/01 15:58:42 $ +.\" $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.304 $ $NHDT-Date: 1554849951 2019/04/09 22:45:51 $ .\" .\" This is an excerpt from the 'roff' man page from the 'groff' package. .\" NetHack's Guidebook.mn currently does *not* adhere to these guidelines. @@ -24,7 +24,7 @@ .ds vr "NetHack 3.6 .ds f0 "\*(vr .ds f1 -.ds f2 "March 24, 2019 +.ds f2 "April 9, 2019 . .\" A note on some special characters: .\" \(lq = left double quote @@ -4112,9 +4112,12 @@ If no attribute is defined, no attribute is used. The pattern should be a regular expression. .lp "" Allowed colors are black, red, green, brown, blue, magenta, cyan, gray, -orange, lightgreen, yellow, lightblue, lightmagenta, lightcyan, and white. +orange, light-green, yellow, light-blue, light-magenta, light-cyan, and white. +And \f(CRno-color\fP, the default foreground color, which isn't necessarily +the same as any of the other colors. .lp "" Allowed attributes are none, bold, dim, underline, blink, and inverse. +\(lqNormal\(rq is a synonym for \(lqnone\(rq. Note that the platform used may interpret the attributes any way it wants. .lp "" @@ -4179,36 +4182,62 @@ If so, you can customize your game display by setting thresholds to change the color or appearance of fields in the status display. .pg The format for defining status colors is: -.si -.lp "OPTION=hilite_status: field-name/behavior/color&attributes" -.ei +.SD n +\f(CROPTION=hilite_status:\fIfield-name\fP/\fIbehavior\fP/\fIcolor\fP&\fIattributes\fP\fP +.ED .pg -For example, the following line in your config file will cause +For example, the following line in your configuration file will cause the hitpoints field to display in the color red if your hitpoints drop to or below a threshold of 30%: -.si -.lp "OPTION=hilite_status: hitpoints/<=30%/red/normal" -.ei +.SD n +\f(CROPTION=hilite_status:hitpoints/<=30%/red/normal\fP +.ED +(That example is actually specifying \f(CRred&normal\fP for <=30% +and \f(CRno-color&normal\fP for >30%.) .pg -For another example, the following line in your config file will cause -wisdom to be displayed red if it drops and green if it rises. -.si -.lp "OPTION=hilite_status: wisdom/down/red/up/green" -.ei +For another example, the following line in your configuration file will cause +wisdom to be displayed red if it drops and green if it rises: +.SD n +\f(CROPTION=hilite_status:wisdom/down/red/up/green\fP +.ED .pg -You can adjust the display of the following status fields: +Allowed colors are black, red, green, brown, blue, magenta, cyan, gray, +orange, light-green, yellow, light-blue, light-magenta, light-cyan, and white. +And \(lqno-color\(rq, the default foreground color on the display, which +is not necessarily the same as black or white or any of the other colors. +.pg +Allowed attributes are none, bold, dim, underline, blink, and inverse. +\(lqNormal\(rq is a synonym for \(lqnone\(rq; they should not be used in +combination with any of the other attributes. +.pg +To specify both a color and an attribute, use \(oq&\(cq to combine them. +To specify multiple attributes, use \(oq\+\(cq to combine those. +For example: \(lqmagenta&inverse\+dim\(rq. +.pg +Note that the display may substitute or ignore particular attributes +depending upon its capabilities, and in general may interpret the +attributes any way it wants. +For example, on some display systems a request for bold might yield +blink or vice versa. +On others, issuing an attribute request while another is already +set up will replace the earlier attribute rather than combine with it. +Since NetHack issues attribute requests sequentially (at least with +the \f(CRtty\fP interface) rather than all at once, the only way a +situation like that can be controlled is to specify just one attribute. +.pg +You can adjust the appearance of the following status fields: .TS S center; c c c. .\"TABLE_START -title strength dexterity -constitution intelligence wisdom -charisma alignment score -carrying-capacity gold power -power-max experience-level armor-class -HD time hunger -hitpoints hitpoints-max dungeon-level -experience condition +title dungeon-level experience-level +strength gold experience +dexterity hitpoints HD +constitution hitpoints-max time +intelligence power hunger +wisdom power-max carrying-capacity +charisma armor-class condition +alignment score .\"TABLE_END Do not delete this line. .TE .lp "" @@ -4274,20 +4303,14 @@ and \(lqtitle\(rq. For title, only the role's rank title is tested; the character's name is ignored. .ei -.lp "" -Allowed colors are black, red, green, brown, blue, magenta, cyan, gray, -orange, lightgreen, yellow, lightblue, lightmagenta, lightcyan, and white. -.lp "" -Allowed attributes are bold, inverse, underline, blink, dim, and normal. -Note that the platform used may interpret the attributes any way it -wants. -.lp "" +.pg The in-game options menu can help you determine the correct syntax for a config file. -.lp "" -The whole feature can be disabled by setting option -statushilites to 0. -.lp "" +.pg +The whole feature can be disabled by setting option +.op statushilites +to 0. +.pg Example hilites: .sd .si diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index 9230ac309..2f9e17bb0 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -45,7 +45,7 @@ %.au \author{Original version - Eric S. Raymond\\ (Edited and expanded for 3.6 by Mike Stephenson and others)} -\date{March 24, 2019} +\date{April 9, 2019} \maketitle @@ -4582,12 +4582,15 @@ The pattern should be a regular expression. %.lp "" Allowed colors are {\it black}, {\it red}, {\it green}, {\it brown}, {\it blue}, {\it magenta}, {\it cyan}, {\it gray}, {\it orange}, -{\it lightgreen}, {\it yellow}, {\it lightblue}, {\it lightmagenta}, -{\it lightcyan}, and {\it white}. +{\it light-green}, {\it yellow}, {\it light-blue}, {\it light-magenta}, +{\it light-cyan}, and {\it white}. +And {\itno-color}, the default foreground color, which isn't necessarily +the same as any of the other colors. %.lp "" Allowed attributes are {\it none}, {\it bold}, {\it dim}, {\it underline}, {\it blink}, and {\it inverse}. +{\it Normal\/} is a synonym for {\it none}. Note that the platform used may interpret the attributes any way it wants. @@ -4657,40 +4660,68 @@ The pattern should be a regular expression. \subsection*{Configuring Status Hilites} %.pg -Your copy of {\it NetHack\/} may have been compiled with support for {\it Status Hilites}. +Your copy of {\it NetHack\/} may have been compiled with support +for {\it Status Hilites}. If so, you can customize your game display by setting thresholds to change the color or appearance of fields in the status display. -%.pg -The format for defining status colors is: + +The format for defining status colors is:\\ \begin{verbatim} - OPTION=hilite_status: field-name/behavior/color&attributes +OPTION=hilite_status:field-name/behavior/color&attributes \end{verbatim} -%.pg -For example, the following line in your config file will cause + +For example, the following line in your configuration file will cause the hitpoints field to display in the color red if your hitpoints -drop to or below a threshold of 30%: +drop to or below a threshold of 30%:\\ \begin{verbatim} - OPTION=hilite_status: hitpoints/<=30%/red/normal -\end{verbatim} -%.pg -For another example, the following line in your config file will cause -wisdom to be displayed red if it drops and green if it rises. +OPTION=hilite_status:hitpoints/<=30%/red/normal +\end{verbatim}\\ +(That example is actually specifying {\tt red\&normal} for <=30\% +and {\tt no-color\&normal} for >30\%.)\\ + +For another example, the following line in your configuration file will cause +wisdom to be displayed red if it drops and green if it rises:\\ \begin{verbatim} - OPTION=hilite_status: wisdom/down/red/up/green +OPTION=hilite_status:wisdom/down/red/up/green \end{verbatim} + +Allowed colors are black, red, green, brown, blue, magenta, cyan, gray, +orange, light-green, yellow, light-blue, light-magenta, light-cyan, and white. +And {\it no-color}, the default foreground color on the display, which +is not necessarily the same as black or white or any of the other colors. + +Allowed attributes are none, bold, dim, underline, blink, and inverse. +``Normal'' is a synonym for ``none''; they should not be used in +combination with any of the other attributes. + +To specify both a color and an attribute, use `\&' to combine them. +To specify multiple attributes, use `+' to combine those. +For example: {\tt magenta\&inverse+dim}. + +Note that the display may substitute or ignore particular attributes +depending upon its capabilities, and in general may interpret the +attributes any way it wants. +For example, on some display systems a request for bold might yield +blink or vice versa. +On others, issuing an attribute request while another is already +set up will replace the earlier attribute rather than combine with it. +Since nethack issues attribute requests sequentially (at least with +the {\it tty} interface) rather than all at once, the only way a +situation like that can be controlled is to specify just one attribute. + You can adjust the display of the following status fields: %.sd \begin{center} \begin{tabular}{lll} %TABLE_START -title & strength & dexterity\\ -constitution & intelligence & wisdom\\ -charisma & alignment & score\\ -carrying-capacity & gold & power\\ -power-max & experience-level & armor-class\\ -HD & time & hunger\\ -hitpoints & hitpoints-max & dungeon-level\\ -experience & condition\\ +title & dungeon-level & experience-level\\ +strength & gold & experience\\ +dexterity & hitpoints & HD\\ +constitution & hitpoints-max & time\\ +intelligence & power & hunger\\ +wisdom & power-max & carrying-capacity\\ +charisma & armor-class & condition\\ +alignment & & score\\ %TABLE_END Do not delete this line. \end{tabular} \end{center} @@ -4764,26 +4795,11 @@ is tested; the character's name is ignored. %.ei \elist -%.lp "" -Allowed colors are {\it black}, {\it red}, {\it green}, {\it brown}, -{\it blue}, {\it magenta}, {\it cyan}, {\it gray}, {\it orange}, -{\it lightgreen}, {\it yellow}, {\it lightblue}, {\it lightmagenta}, -{\it lightcyan}, and {\it white}. - -%.lp "" -Allowed attributes are {\it bold}, {\it inverse}, {\it underline}, -{\it blink}, {\it dim}, and {\it normal}. -Note that the platform used may interpret the attributes any way it -wants. - -%.lp "" The in-game options menu can help you determine the correct syntax for a config file. -%.lp "" The whole feature can be disable by setting option {\it statushilites} to 0. -%.lp "" Example hilites: \begin{verbatim} OPTION=hilite_status: gold/up/yellow/down/brown