Modding:Colors & Object Rendering

From Caves of Qud Wiki
Jump to: navigation, 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[edit | edit source]

Colors are defined in display.text.

Each color is defined by a single letter. &<code> means to set the foreground color, ^<code> 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 #a64a2e
R bright red #d74200
o dark orange #f15f22
O bright orange #e99f10
w brown #98875f
W yellow #cfc041
g dark green #009403
G bright green #00c420
b dark blue #0048bd
B bright blue #0096ff
c dark cyan #40a4b9
C bright cyan #77bfcf
m dark magenta #b154cf
M bright magenta #da5bd6
k black #0f3b3a
K dark grey #155352
y bright 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 (&amp;)

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

Render Part[edit | edit source]

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>

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

Additional Notes[edit | edit source]

Most default text in the game is colored with the bright grey (&y) color, so you'll often see an &y at the end of strings to reset the color back to normal.

For help formatting a string with colors, check out the super-useful qud-colorgen utility (created by crayon).

2.0.200.0+ Modding[edit | edit source]

Text can also be colored as follows using any of the color templates defined in StreamingAssets\Base\Colors.xml. Insert non-formatted text here

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

List of possible templates[edit | edit source]

ShaderColorsType
hologramb-B-C-csequence
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
sunsetb-B-B-M-m-r-R-W-C-C-W-R-r-m-M-B-B-balternation
leafyg-g-Gsequence
polarizedK-y-Y-y-K-y-Y-y-Kalternation
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
wateryB-C-Y-C-Balternation
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
fieryr-R-W-Y-W-R-rsequence
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
zetachromem-M-Y-C-c-c-C-Y-M-malternation
loveY-R-Y-Ysequence
wwsequence
yysequence
blackKsequence
yellowWsequence
whiteYsequence
extradimensionalM-M-m-m-y-y-Y-Y-O-Y-Y-y-m-m-M-Malternation
blazer-r-R-W-Ysequence
amorousr-R-M-malternation
magentaMsequence
graffitiedR-r-w-W-Y-y-r-R-W-wsequence
turbowK-y-Y-Y-R-rsequence
telemetricK-y-c-C-Y-W-C-c-y-Kalternation
dark grayKsequence
tartany-K-g-G-K-R-r-K-ysequence
rustyr-r-Rsequence
playernotesYsolid
greenGsequence
fungicideM-M-R-r-K-r-Rsequence
shadey-K-c-b-B-y-C-y-Ksequence
structuralY-y-K-y-Yalternation
grayysequence
jungleg-g-w-G-g-m-g-w-w-K-g-m-G-G-wsequence
starryK-Y-K-K-Y-Ksequence
cloningY-Y-Y-Y-Y-Y-Y-M-M-Y-Y-Y-Y-Y-Ysequence
lacqueredY-y-K-y-Y-y-K-y-Y-ysequence
slimygsolid
spikedR-Ybordered
biog-G-W-M-W-G-g-g-g-g-gsequence
sphynxC-c-m-Msequence
psionicb-B-C-c-b-B-Calternation
spring-turretc-c-C-C-y-y-y-y-y-C-C-c-csequence
skulkb-b-B-b-bsequence
silveryy-Ysequence
arctic camouflagey-y-Y-y-K-y-y-Y-Y-Ksequence
shemeshr-r-R-R-W-W-Ysequence
scaledg-G-W-w-g-Gsequence
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
snakesking-c-C-Gsequence
soulW-w-c-C-Y-C-c-w-Walternation
rulesCsolid
refractivey-Ysequence
putridKsolid
astralY-y-K-y-Yalternation
sparklingy-y-Ysequence
plastiferK-y-Y-ysequence
electricalW-W-Y-Y-W-Wsequence
hornedy-Wbordered
defoliantW-W-G-g-K-g-Gsequence
peridotG-g-w-W-Y-W-Gsequence
sicklyg-r-m-w-K-G-g-c-Ksequence
paintedr-R-W-w-g-G-Bsequence
oliveg-g-G-W-wsequence
moonb-B-C-csequence
dark cyancsequence
dark greengsequence
lahw-W-R-rsequence
ninefoldb-Bbordered
nervousg-g-w-W-w-g-gsequence
inventoryhotkeyWsolid
nanoneuror-R-G-g-K-K-g-G-R-r-gsequence
normalishy-y-K-y-Y-y-y-y-K-y-Ysequence
mercurialc-c-C-W-Y-W-C-c-calternation
levantr-r-y-y-Y-Ysequence
mirrorshadesK-y-Y-Y-y-Ksequence
kesilm-m-M-Y-ysequence
lavaRsolid
normalK-K-y-y-Y-y-y-K-K-y-K-y-Ysequence
crysteely-y-K-g-g-K-y-yalternation
blueBsequence
illuminatedc-c-c-C-Y-W-Y-Csequence
icyY-C-B-C-Yalternation
hypertractorr-R-W-w-c-C-B-bsequence
freezingC-c-C-Y-Ysequence
forestg-g-w-G-g-g-w-w-g-G-G-wsequence
phase-harmonicY-y-m-y-Ksequence
emotewsolid
implantedr-r-r-r-r-r-r-Csequence
cloudyy-y-Y-y-Y-Ysequence
opalescentY-y-K-K-y-Ysequence
cyanCsequence
brownwsequence
orangeOsequence

Anonymous Templates[edit | edit source]

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[edit | edit source]