Modding:Colors & Object Rendering: Difference between revisions
(Added information about the newer way to color things via templates.) |
Syntaxaire (talk | contribs) (→Additional Notes: added note about beta content) |
||
Line 39: | Line 39: | ||
Note that if a detail color is not specified, it will default to the background viridian color. | Note that if a detail color is not specified, it will default to the background viridian color. | ||
== Additional | == Additional notes == | ||
Most default text in the game is colored with the bright grey (&y) color, so you'll often see an <code>&y</code> at the end of strings to reset the color back to normal. | Most default text in the game is colored with the bright grey (&y) color, so you'll often see an <code>&y</code> at the end of strings to reset the color back to normal. | ||
For help formatting a string with colors, check out the super-useful [https://qud-colorgen.herokuapp.com/ qud-colorgen] utility (created by crayon). | For help formatting a string with colors, check out the super-useful [https://qud-colorgen.herokuapp.com/ qud-colorgen] utility (created by crayon). | ||
== Beta Modding == | |||
{{betamoddingcontent}} | |||
Text can also be colored as follows using any of the color templates defined in StreamingAssets\Base\Colors.xml<syntaxhighlight> | Text can also be colored as follows using any of the color templates defined in StreamingAssets\Base\Colors.xml<syntaxhighlight> | ||
{{color template|your text to color here}} | {{color template|your text to color here}} |
Revision as of 18:50, 6 May 2020
This page is about modding. See the modding overview for an abstract on modding. |
Overview
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 / 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 | █ |
In XML files, such as ObjectBlueprints.xml, the ampersand (&) must be replaced by the encoded ampersand (&)
Prefix | Text | Xml |
---|---|---|
Foreground | &<code> | &<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
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!
TileColor overrides ColorString when tiles are being used.
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="&Cb&Be&ba&cd&Ce&Bd&y bracelet" ColorString="&C"></part>
Note that if a detail color is not specified, it will default to the background viridian color.
Additional notes
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).
Beta Modding
This section contains modding information that is only applicable to the in-development beta branch of Caves of Qud on Steam. |
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}}
See Also
|