Modding:Colors & Object Rendering: Difference between revisions

Jump to navigation Jump to search
 
(4 intermediate revisions by the same user not shown)
Line 3: Line 3:
Colors are defined in <code>Display.txt</code>.
Colors are defined in <code>Display.txt</code>.


Each color is defined by a single letter. &<nowiki><code> means to set the foreground color, ^<code> means to set the background color.</nowiki>
Each color is defined by a single letter. <code><nowiki>&</nowiki></code> means to set the foreground color, <code>^</code> means to set the background color.


Only the preset letter codes are allowed, adding new colors isn't totally trivial at the moment.
Only the preset letter codes are allowed, adding new colors isn't totally trivial at the moment.
Line 39: Line 39:
<part Name="Render" DisplayName="&amp;Cb&amp;Be&amp;ba&amp;cd&amp;Ce&amp;Bd&amp;y bracelet" ColorString="&amp;C"></part>
<part Name="Render" DisplayName="&amp;Cb&amp;Be&amp;ba&amp;cd&amp;Ce&amp;Bd&amp;y bracelet" ColorString="&amp;C"></part>
</syntaxhighlight>
</syntaxhighlight>
The [https://qud-colorgen.herokuapp.com/ 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.
Note that if a detail color is not specified, it will default to the background viridian color.


== Color Markup Language ==
== Color Markup Language ==
Most default text in the game is colored grey (&y), so you'll often see an <code>&y</code> at the end of strings to reset the color back to normal.  Because of this extremely confusing color bleed can happen when putting text strings together which use the simplified `&` and `^` color code schemes.  Because of this there is new system which parses text in double curly braces: <code>{{color|text}}</code>.  If you want to ensure colors "return" to what they were set to, you can leave out the color.  <code>"{{|&RThis text is red}} and this will be whatever the color was before red"</code>
Most default text in the game is colored grey (&y), so you'll often see an <code>&y</code> 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: <code><nowiki>{{color|text}}</nowiki></code>.  If you want to ensure colors "return" to what they were set to, you can leave out the color.  <code><nowiki>"{{|&RThis text is red}} and this will be whatever the color was before red"</nowiki></code>
 
In general, every string for rendering, except the color string/detail color on render part should use the new Markup language.


== 2.0.200.0+ Modding ==
Text can also be colored as follows using any of the color templates defined in StreamingAssets\Base\Colors.xml.
Text can also be colored as follows using any of the color templates defined in StreamingAssets\Base\Colors.xml.
<pre>
<pre>

Navigation menu