# File: ui_entry_renderer.txt

# Configure how a quantity is rendered in the user interface.  Currently only
# used for the parts of the second character screen and the equippable
# comparison.

# The name is used to link the renderer with a user interface element in
# ui_entry.txt so changes here would have to be mirrored there to keep the
# link.
# code binds the renderer to a specific backend in the executable.  It must
# be one of the values listed in list-ui-entry-renderers.h.
# combiner controls how multiple values are combined when displaying the
# combined value or choosing how to color the label.  Possible values are
# limited by the code and must be one of ADD, BITWISE_OR, FIRST, LOGICAL_OR,
# LOGICAL_OR_WITH_CANCEL, LARGEST, LAST, RESIST_0, or SMALLEST.  Those are the
# same (and have have the same meanings) as those described in ui_entry.txt.
# If not set, the default combiner for the backend is used.
# colors and labelcolors configure the palette of colors used for either the
# value or the label.  How indices into the palette are used depends on the
# backend the renderer is bound to.  Changes to colors and labelcolors can
# affect usability.  Both are optional; if not set, default values from the
# backend are used.
# symbols defines the palette of symbols the renderer uses if it converts
# values to symbols (some of the rendering functions won't use the symbols
# field).  How indices into the palette are used depends on the backend the
# renderer is bound to.  Changes to symbols can affect usability.  It is
# optional.  If not set, default values from the backend are used.
# ndigit is the number of digits to display for a numeric value.  That is
# only used by some renders and does not need to be set.  If set it must be a
# positive integer.  If not set, the default value from the backend will be
# used.
# sign configures whether a sign indicator is shown with numeric values.  That
# is only used by some renderers and does not need to be set.  If set, it
# must be one of the following:  NO_SIGN, ALWAYS_SIGN, or NEGATIVE_SIGN.
# NO_SIGN specifies that no sign indicator will be shown.  ALWAYS_SIGN
# specifies that a sign indicator will always be shown (+ will be used for
# zeros).  NEGATIVE_SIGN specifies that a sign indicator will only be shown
# for negative values.  If not set, the default value from the backend will be
# used.
# units configures whether a label is shown immediately after numeric values.
# This is only used by some renderers and does not need to be set.  By default,
# numeric values will not be labeled with units.
# combined-renderer sets name of the renderer to use if the renderer is asked
# to display the combined value.  That name must be one of the renderers
# configured in this file for the combined value to be shown.  If
# combined-renderer is omitted, the renderer will not show a combined value.

# COMPACT_RESIST_RENDERER_WITH_COMBINED_AUX renders one or more resistance
# values with the label colored by the combined resistance.  The auxiliary
# values are treated as timed resistances.  The default combiner is RESIST_0.
# One of twenty-two symbols (unknown, not present, none, resist, vulnerable,
# immune, timed resist + none, timed resist + resist, timed resist +
# vulnerable, timed vulnerability + none, timed vulnerability + resist,
# timed immunity + none, timed immunity + resist, timed immunity +
# vulnerable, resist + vulnerable, timed resist + resist + vulnerable,
# timed vulnerability + resist + vulnerable, timed immunity + resist +
# vulnerable, timed resist + timed vulnerability + none, timed resist +
# timed vulnerability + resist, timed resist + timed vulnerability + vulnerable,
# timed resist + timed vulnerability + resist + vulnerability) are used for
# each resistance value.  Each of those symbols has a corresponding color
# (from the first 22 colors) and alternate color (from the second 22 colors).
# The alternate color is used for every other resist.  A palette of 13 colors
# is used for the label.  They are:
# unknown rune
# no net permanent resistance or immunity and no net timed effects
# net permanent resistance and no net timed effects
# net permanent vulnerability and either timed vulnerability or no net timed
#     effects
# permanent immunity with or without any timed effects
# a net timed resistance with no net permanent effects
# a net timed resistance with net permanent resistance
# a net timed resistance with net permanent vulnerability
# timed vulnerability with no net permanent effects
# timed vulnerability with net permanent resistance
# timed immunity with no net permanent effects
# timed immunity with net permanent resistance
# timed immunity with net permanent vulnerability

# COMPACT_FLAG_RENDERER_WITH_COMBINED_AUX renders one or more boolean flags
# with the label colored by the combined (logical or) value.  The auxiliary
# values are treated as timed effects.  The default combiner is LOGICAL_OR.
# One of five symbols (unknown, not present, off, on, timed on) is used for
# each flag.  The symbol for the timed effect is only used if the permanant
# effect is known and is off.  Each of five symbols has a corresponding color
# (from the first five colors) and alternate color (from the second five
# colors).  The alternate color is used for every other flag.  A palette of
# four colors is used for the label.  They are unknown rune, no flags are
# known to be on and there is no timed effect, at least one flag is on, and no
# flags are known to be on but there is at least one timed effect.

# COMPACT_FLAG_WITH_CANCEL_RENDERER_WITH_COMBINED_AUX renders one or more
# flags (off (0), on (positive), or cancel (negative)) with the label colored
# by the combined value.  The auxiliary values are treated as timed effects.
# The default combiner is LOGICAL_OR_WITH_CANCEL.  One of eleven symbols
# (unknown, not present, off, on, cancel, timed on + off, timed on + on, timed
# on + cancel, timed cancel + off, timed cancel + on, timed cancel + cancel) is
# used for each flag.  Each of the symbols has a corresponding color (from the
# first eleven colors) and alternate color (from the second eleven colors).
# The alternate color is used for every other flag.  A palette of seven colors
# is used for the label.  They are unknown rune, the combined effect is off with
# at least one permanent cancel, the combined effect is off with at least one
# timed cancel and no permanent on flags, the combined effect is off with at
# least one permanent on flag and one timed cancel, the combined effect is off
# and doesn't fall in one of the earlier categories, the combined effect is on
# with at least one permanent on flag, and the combined effect is on with no
# permanent on flags.

# NUMERIC_AS_SIGN_RENDERER_WITH_COMBINED_AUX renders one or more integer
# modifiers with the label colored by the combined (by addition) value.  The
# auxiliary values are treated as timed effects.  The default combiner is ADD.
# One of seven symbols (unknown, not present, zero, positive, negative, timed
# positive, timed negative) is used for each modifier.  The symbols for the
# timed effects are only used if the permanent effect is known and is zero.
# Each of the symbols has a corresponding color (from the first seven colors)
# and alternate color (from the second seven colors).  The alternate color is
# used for every other modifier.  A palette of six colors is used for the
# label.  They are:
# unknown rune
# the sum of the known effects is zero and the sum of the timed effects is zero
# the sum of the known effects is positive
# the sum of the known effects is negative
# the sum of the known effects is zero; the sum of the timed effects is
#     positive
# the sum of the known effects is zero; the sum of the timed effects is
#     negative

# NUMERIC_RENDERER_WITH_COMBINED_AUX renders one or more integer values
# as decimal integers with the label colored by the combined value.  The
# auxiliary values are treated as timed effects.  The default combiner is ADD.
# One of seven colors (unknown, not present, zero, positive, negative, timed
# positive, timed negative) or an alternate set of seven colors for those same
# conditions is used for each modifer.  The alternate colors are used for every
# other value.  The colors for the timed effects are only used if the permanent
# effect is known and is zero.  There are seven symbols that may be used.  The
# first symbol is used when the value is unknown.  The second symbol is used
# when the value is not present.  The third symbol is used when both the value
# and the auxiliary value are zero.  For the first three symbols, if the
# symbol is '0', it may be shown with a sign depending on the setting for the
# sign indicator described below.  The fourth symbol is used in place of
# digits when the known permanent effect is positive and the value is too
# large to display with the given number of digits.  The fifth symbol is used
# in place of digits when the known permanent effect is negative and the value
# is too large to display with the given number of digits.  The sixth symbol
# is used in place of digits when the known permanent effect is zero and the
# timed effect is positive but too large to display with the given number of
# digits.  The seventh symbol is used in place of digits when the known
# permanent effect is zero and the timed effect is negative but too large to
# display with the given number of digits.  A palette of six colors is used
# for the label.  They are:
# unknown rune
# the sum of the known effects is zero and the sum of the timed effects is zero
# the sum of the known effects is positive
# the sum of the known effects is negative
# the sum of the known effects is zero; the sum of the timed effects is
#     positive
# the sum of the known effects is zero; the sum of the timed effects is
#     negative
#
# The number of digits is used to configure the number of digits shown for
# each value.  The default value for the number of digits is one.  The sign
# display is used to configure whether the digits are shown with a sign
# indicator.  By default, a sign indicator will not be shown.  The units label
# configures whether that label is shown after each numeric value.  By
# default, no such label is shown.

# NUMERIC_RENDERER_WITH_BOOL_AUX renders one or more integer values
# as decimal integers with the label colored by the combined value.  The
# auxiliary values are treated as booleans (one use would be for sustains).
# The default combiner is ADD.  One of eight colors (unknown, not present,
# zero with the auxilary flag off, zero with the auxiliary flag on, positive
# with the auxiliary flag off, positive with the auxiliary flag on, negative
# with the auxiliary flag off, negative with the auxiliary flag on) or an
# alternate set of eight colors for those same conditions is used for each
# modifier.  The alternate colors are used for every other value.  There are
# six symbols that may be used.  The first symbol is used when the value is
# unknown.  The second symbol is used when the value is not present.  The
# third symbol is used when the value is zero and the auxiliary flag is off.
# The fourth symbol is used when the value is zero and auxiliary flag is on.
# For the first four symbols, if the symbol is '0', then it may be shown with
# a sign, depending on the the setting for the sign indicator described below.
# The fifth symbol is used in place of digits when the value is positive and
# too large to display with the given number of digits.  The sixth symbol is
# used in place of digits when the value is negative and too large to display
# with the given number of digits.  A palette of seven colors is used for the
# label.  They are:
# unknown rune
# the sum of the known values is zero and none of the auxiliary flags are on
# the sum of the known values is zero and at least one auxiliary flag is on
# the sum of the known values is positive and none of the auxiliary flags is on
# the sum of the known values is positive and at least one auxiliary flag is on
# the sum of the known values is negative and none of the auxiliary flags is on
# the sum of the known values is positive and at least one auxiliary flag is on
#
# The number of digits is used to configure the number of digits shown for
# each value.  The default value for the number of digits is one.  The sign
# display is used to configure whether the digits are shown with a sign
# indicator.  By default, a sign indicator will not be shown.  The units label
# configures whether that label is shown after each numeric value.  By default,
# no such label is shown.

name:char_screen1_resist_renderer
code:COMPACT_RESIST_RENDERER_WITH_COMBINED_AUX
colors:wwwwwwGGGrrGGGwGrGwwrwWWWWWWGGGrrGGGWGrGWWrW
labelcolors:swBrgwBrwBwBr
symbols:?..+-*!^.=.%%%~!=%~+=~

name:char_screen1_flag_renderer
code:COMPACT_FLAG_RENDERER_WITH_COMBINED_AUX
colors:wwwwGWWWWG
labelcolors:swBw
symbols:?..+!

name:char_screen1_flag_with_cancel_renderer
code:COMPACT_FLAG_WITH_CANCEL_RENDERER_WITH_COMBINED_AUX
colors:wwwwwGwwGGwWWWWWGWWGGW
labelcolors:swwwwBw
symbols:?..+-!+-=.-

name:char_screen1_numeric_as_sign_renderer
code:NUMERIC_AS_SIGN_RENDERER_WITH_COMBINED_AUX
colors:wwwwwGwWWWWWGW
labelcolors:swBrww
symbols:?..+-!=

# Currently, labelcolors has no impact on what's shown in the character screen
# and what uses this internally expects ndigit to be one, sign to be NO_SIGN,
# and nothing to be set for units.
name:char_screen1_stat_mod_renderer
code:NUMERIC_RENDERER_WITH_BOOL_AUX
colors:sdsgGgrRsdsgGgrR
labelcolors:wwwwwww
symbols:? .s*=
ndigit:1
sign:NO_SIGN
