Modding:Colors & Object Rendering: Difference between revisions

No edit summary
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>
[[qud-colorgen https://qud-colorgen.herokuapp.com/]] 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.
Line 44: Line 46:
== 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.  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>{{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>{{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>
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.
Text can also be colored as follows using any of the color templates defined in StreamingAssets\Base\Colors.xml.