Rich Text

Introduction

Rich Text is a form of text that can contain information in various formats. Rich text syntax allows you to define text formatting more flexibly. It can be used in in-game displays, such as text objects, UI text widgets, or floating text.

Rich Text Formatting

Rich Text Format Tag Syntax Example Visual Example
Bold [b][/b] text
[b]text[/b]
image
Italic [i][/i] text
[i]text[/i]
image
Underline [u][/u] text
[u]text[/u]
image
Strikethrough [s][/s] text
[s]text[/s]
image
Color [color][-] text
[FF0000FF]text[-]
image
Superscript [sup][/sup] text
text[sup]textsup[/sup]
image
Subscript [sub][/sub] text
text[sub]textsub[/sub]
image

Rich text supports nesting. For example, if you want to make a piece of text both bold and italicized, you can write it as [b][i]text[/i][/b].

Color Values

When specifying a text color in rich text, you can use one of the following formats:

  1. Hexadecimal RGBA format: 8 characters long, where each pair represents a channel (red, green, blue, alpha) as a hexadecimal number from 00 to FF (0 to 255). Example: [FF0000FF] — red is at maximum intensity, green and blue are 0, and the alpha is also at maximum (fully opaque red).

  2. Hexadecimal RGB format: Similar to RGBA, but only 6 characters (without alpha). The transparency (alpha) is assumed to be FF (fully opaque). Example: [00FF00] — green is at maximum intensity, red and blue are 0, resulting in fully opaque green.

  3. INT32 format: An integer between -2147483648 and 2147483647, representing a color value converted from the RGBA format. You can use a script to convert a given color value to its corresponding INT32 representation.