Modding:Colors & Object Rendering

From Caves of Qud Wiki
Jump to navigation Jump to search
This page is about modding. See the modding overview for an abstract on modding.
This page is about modding. See the modding overview for an abstract on modding.

Overview

Colors are defined in Display.txt.

Each color is defined by a single letter. & means to set the foreground color, ^ means to set the background color.

Only the preset letter codes are allowed, adding new colors isn't totally trivial at the moment.

Code Name Hex
r dark red / crimson #a64a2e
R red / scarlet #d74200
o dark orange #f15f22
O orange #e99f10
w brown #98875f
W gold / yellow #cfc041
g dark green #009403
G green #00c420
b dark blue #0048bd
B blue / azure #0096ff
c dark cyan / teal #40a4b9
C cyan #77bfcf
m dark magenta / purple #b154cf
M magenta #da5bd6
k #0f3b3a
K dark grey / black #155352
y grey #b1c9c3
Y white #ffffff

To get a palette file for these colors, refer to Visual_Style#Palette.

In XML files, such as ObjectBlueprints.xml, the ampersand (&) must be replaced by the encoded ampersand (&)

Prefix Text Xml
Foreground &<code> &amp;<code>
Background ^<code> ^<code>

Render Part

ColorString contains the foreground and (optionally) the background string for the ascii and tiles. Examples: &B or &B^r

TileColor is identical to ColorString, but applies only to tiles. If this is not specified, a tile falls back to using the ColorString.

DetailColor changes the "third" color used only for tiles, not the ascii. DetailColor is always just a single character. Example: g

So ColorString="&M^g" would be foreground bright magenta with a background color of green, Like this!

If you want to color an item's display name, you enter color codes directly in the display name itself, for example the beaded bracelet:

<part Name="Render" DisplayName="&amp;Cb&amp;Be&amp;ba&amp;cd&amp;Ce&amp;Bd&amp;y bracelet" ColorString="&amp;C"></part>

The qud-colorgen utility (created by crayon) is an external tool that can help you create these complex color strings, however the newer Markup language the game uses might be good enough for your purposes.

Note that if a detail color is not specified, it will default to the background viridian color.

Color Markup Language

Most default text in the game is colored grey (&y), so you'll often see an &y at the end of strings to reset the color back to normal. When putting strings using the basic color codes together to make sentences extremely confusing color bleed becomes possible. Because of this there is new system which parses text in double curly braces: {{color|text}}. If you want to ensure colors "return" to what they were set to, you can leave out the color. "{{|&RThis text is red}} and this will be whatever the color was before red"

In general, every string for rendering, except the color string/detail color on render part should use the new Markup language.

Text can also be colored as follows using any of the color templates defined in StreamingAssets\Base\Colors.xml.

{{color template|your text to color here}}

List of possible templates

ShaderColorsType
hologramb-B-C-csequence
ydfreeholdr-R-k-c-C-W-W-C-c-r-Rsequence
purplemsequence
paisleym-M-Y-M-msequence
issachariY-Y-Y-Y-Y-Y-rsequence
azureBsequence
camouflageg-g-G-g-K-g-g-G-G-Ksequence
rainbowr-R-W-G-B-b-malternation
metamorphicy-y-y-Y-Y-Y-M-M-M-m-m-m-msequence
dark redrsequence
ubernostrumc-g-G-W-w-c-C-G-g-w-Wsequence
desert camouflagew-w-W-w-K-w-w-W-W-Ksequence
rocketY-W-R-R-r-yalternation
rubbergumW-W-w-w-y-y-Y-W-Wsequence
visageR-r-b-B-Y-ysequence
snail-encrustedw-W-Y-ysequence
leafyg-g-Gsequence
polarizedK-y-Y-y-K-y-Y-y-Kalternation
ironshankK-y-Y-ysequence
goldWsequence
dark fieryr-R-W-R-ralternation
filthyw-w-K-w-K-w-Wsequence
sunW-R-Walternation
pearlyY-Y-ysequence
ciderrsolid
engravedY-y-c-Csequence
coated in plasmaK-K-y-g-G-Y-k-Y-Y-k-Y-G-g-y-K-Ksequence
gaslightg-g-w-W-w-g-galternation
entropicK-K-m-K-K-K-m-m-K-K-ysequence
neutronicB-b-K-y-Ysequence
lanternedy-y-y-y-Y-W-Y-y-yalternation
dark magentamsequence
scarletRsequence
overloadedy-y-w-W-R-W-w-y-yalternation
dark bluebsequence
redRsequence
patchworkW-w-r-R-W-w-b-B-Wsequence
nanotechK-K-y-Ksequence
brainbrineg-g-g-w-W-W-W-w-g-g-gsequence
tealcsequence
beeK-w-W-Y-W-w-Kalternation
cryogenicY-C-C-Y-c-c-K-y-Ysequence
eaterY-Y-M-Y-Y-Ysequence
CCsequence
BBsequence
GGsequence
dark orangeosequence
featheredC-B-b-g-G-g-b-B-Calternation
KKsequence
MMsequence
OOsequence
internalsWsolid
RRsequence
prismaticr-R-W-G-B-b-msequence
WWsequence
lovesicknessr-R-M-m-r-R-Msequence
YYsequence
fieryRsequence
urban camouflagey-y-K-y-K-y-y-K-y-Ksequence
crimsonrsequence
leopardW-W-w-w-W-K-K-w-w-W-Wsequence
glitteringK-K-y-M-y-K-Ksequence
ghostlyY-Y-y-y-K-Kalternation
tarnishedG-G-gsequence
ccsequence
bbsequence
shimmeringY-Y-y-y-K-K-y-ysequence
ggsequence
earthb-B-W-g-Gsequence
kksequence
mmsequence
oosequence
nectarW-w-g-Gsequence
rrsequence
plasmag-G-Y-Y-G-gsequence
loveY-R-Y-Ysequence
wwsequence
yysequence
blackKsequence
psychalfleshw-w-w-r-R-M-M-m-M-M-R-r-w-w-w-wsequence
yellowWsequence
whiteYsequence
zetachromem-M-Y-C-c-c-C-Y-M-malternation
wateryB-C-Y-C-Balternation
psymeridianK-K-y-y-y-m-M-M-M-M-m-y-y-y-K-Ksequence
turbowK-y-Y-Y-R-rsequence
extradimensionalM-M-m-m-y-y-Y-Y-O-Y-Y-y-m-m-M-Malternation
thermoR-R-r-c-b-B-Bsequence
blazer-r-R-W-Ysequence
telemetricK-y-c-C-Y-W-C-c-y-Kalternation
amorousr-R-M-malternation
tartany-K-g-G-K-R-r-K-ysequence
nanoneuror-R-G-g-K-K-g-G-R-r-gsequence
sunsetb-B-B-M-m-r-R-W-C-C-W-R-r-m-M-B-B-balternation
sunslagr-W-Y-Y-Y-W-rsequence
structuralY-y-K-y-Yalternation
starryK-Y-K-K-Y-Ksequence
magentaMsequence
sphynxC-c-m-Msequence
graffitiedR-r-w-W-Y-y-r-R-W-wsequence
shadey-K-c-b-B-y-C-y-Ksequence
spikedR-Ybordered
spaserK-g-G-G-g-Ksequence
dark grayKsequence
icyY-C-B-C-Yalternation
rustyr-r-Rsequence
playernotesYsolid
greenGsequence
fungicideM-M-R-r-K-r-Rsequence
slimygsolid
hotkeyWsolid
grayysequence
jungleg-g-w-G-g-m-g-w-w-K-g-m-G-G-wsequence
skulkb-b-B-b-bsequence
cloningY-Y-Y-Y-Y-Y-M-Y-M-Y-Y-Y-Y-Y-Ysequence
lacqueredY-y-K-y-Y-y-K-y-Y-ysequence
silveryYsequence
kaleidoslugK-C-y-m-M-r-c-C-Y-y-Ksequence
biog-G-W-M-W-G-g-g-g-g-gsequence
shemeshr-r-R-R-W-W-Ysequence
psionicb-B-C-c-b-B-Calternation
spring-turretc-c-C-C-y-y-y-y-y-C-C-c-csequence
glotrotK-K-r-R-rsequence
snakesking-c-C-Gsequence
scaledg-G-W-w-g-Gsequence
rulesCsolid
refractivey-Ysequence
resonancec-c-C-C-W-C-C-c-calternation
crochideg-g-g-g-g-Gsequence
plaidg-K-G-W-Gsequence
syphonc-c-c-C-W-Ysequence
putridKsolid
soulW-w-c-C-Y-C-c-w-Walternation
plastiferK-y-Y-ysequence
cloudyy-y-Y-y-Y-Ysequence
peridotG-g-w-W-Y-W-Gsequence
astralY-y-K-y-Yalternation
sparklingy-y-Ysequence
brownwsequence
arctic camouflagey-y-Y-y-K-y-y-Y-Y-Ksequence
hornedy-Wbordered
defoliantW-W-G-g-K-g-Gsequence
oliveg-g-G-W-wsequence
sicklyg-r-m-w-K-G-g-c-Ksequence
paintedr-R-W-w-g-G-Bsequence
ninefoldb-Bbordered
nervousg-g-w-W-w-g-gsequence
dark cyancsequence
dark greengsequence
radiantr-W-Y-Y-Y-W-rsequence
moonb-B-C-csequence
mercurialc-c-C-W-Y-W-C-c-calternation
mirrorshadesK-y-Y-Y-y-Ksequence
kesilm-m-M-Y-ysequence
normalishy-y-K-y-Y-y-y-y-K-y-Ysequence
lavaRsolid
levantr-r-y-y-Y-Ysequence
lahw-W-R-rsequence
beylahB-b-g-k-W-R-rsequence
illuminatedc-c-c-C-Y-W-Y-Csequence
normalK-K-y-y-Y-y-y-K-K-y-K-y-Ysequence
hypertractorr-R-W-w-c-C-B-bsequence
blueBsequence
freezingCsequence
forestg-g-w-G-g-g-w-w-g-G-G-wsequence
electricalWsequence
emotewsolid
crysteely-y-K-g-g-K-y-yalternation
phase-harmonicY-y-m-y-Ksequence
chiralB-b-c-C-M-m-k-m-M-C-c-bsequence
implantedr-r-r-r-r-r-r-Csequence
auroralK-g-G-Y-G-g-Ksequence
opalescentY-y-K-K-y-Ysequence
cyanCsequence
otherpearlM-m-y-Y-O-O-Y-y-m-Msequence
orangeOsequence

Anonymous Templates

To create a temporary template, the format is:

{{[color pattern delimited by -] [type]|[text]}}

For example:

{{R-R-R-R-R-M-M sequence|mumble mouth}}

The list of possible types are:

Type Pattern Example
sequence repeats the pattern. texttexttexttext
alternation stretches the pattern so it fits the entire word. texttexttexttext
chaotic chooses colors randomly out of the colors specified.
bordered texttexttexttext

See Also