How to configure colors
Colors are strings in the format r,g,b
where each of r, g, b is a number between 0 and 255. If any of the numbers are greater than 1, it is assumed to be an integer between 0 and 255 with 255,255,255 corresponds with white. If none of the values are above one (ie they are all decimals) it is assumed to be a decimal between 0 and 1 with 1,1,1 corresponding to white.
Examples
255,255,255
for white
1,0.5,0
for orange
How to configure text
The actual formatting of the text is handled by two variables: digit rounding and the format string.
Digit rounding rounds numbers to the listed number of decimal points. Additionally, if the damage taken is small enough to round to zero, it will instead be rounded up to the smallest non-zero number. For example, if the setting is set to 2 decimal points, then a number between 0 and 0.01 would display as 0.01. If the setting is set to a negative number, it will instead round to multiples of 10.
Lua text formatting is identical to that used by printf in C. In short, it replaces each instance of a format specifier with the value of the corresponding variable. In this case, the first format specifier will be replaced with the damage amount and the second will be replaced with the damage type. Other characters are displayed as is. For most users, it is recommended to use %s
since it works best with the rounding option.
Examples
Consider the case of shooting a medium biter with a piercing firearm magazine. This deals 3.6 damage to the biter after damage reduction:
%s
with at least 1 decimal of rounding would display3.6
. Setting rounding to 0 decimals will display4
. Setting it to -1 will display10
because numbers that round to zero instead round up.%s %s damage
would display3.6 physical damage
.ow
would display the word "ow" above their head when hurt (but won't display how much damage was taken).