CrystalBall Lite uses templates to format a roll's results

CrystalBall Lite's dice roller performs very powerful rolls. As the rolls increase in complexity, the output of the roll may become long and hard to undestand. Templates make the output completely customizable allowing for quick understanding of the roll's results. Templates can be used to show the pertinent parts of a roll and for combining the results of a roll in an easy-to-read format.

Basic Usage

The following describes the basic usage of templates. Sections following this one will give more details about Named Templates, Optional Sections, and Text Formatting. This section focuses on the basic usage and principle of a template.
A template replaces a roll's text output. This way, the roll can be displayed however you want for easy reading yet still perform complex rolling.

Text Formatting

Text can also be formatted with colors, bold, italic, text size, and font. This is done using tags around the text to be formatted.

  • Bold uses <b> </b> tags For exmaple, <b>'The Text'</b> ('The Text' will appear bolded)
  • Italic uses <i> </i> tags For example, <i>'The Text'</i> ('The Text' will appear in italics)
  • Color uses <font color=red> </font> tags For example, <font color=yellow>'The Text'</font> ('The Text' will appear yellow)
  • Color can be defined by using Red Green Blue (RGB) hexadecimal values <font color=#00FF00>Green Text</font> This shows the "Green Text" comment in green. The first two numbers are how much red, second two are how much green, and the last two are how much blue. This allows custom creation of most any color desired.
  • Color can also use <color=red> </color> tags For example, <color=yellow>'The Text'</color> ('The Text' will appear yellow)
    CrystalBall Lite provides standard colors, but a color can also be described using Red, Green, and Blue parts in the form of #RRGGBB. Each two character part is a two character hexidecimal part. #FF0000 is solid red, #00FF00 is solid green, #0000FF is solid blue, and #08D214 is a combination of all three colors.
    To see a visual chart of color codes, please search Google for "html color chart".

    The much more easier method is to use a color from the following list of CrystalBall Lite's known colors. (If you'd like a color name added, please post on the forums at the CrystalBallSoft Messageboards).
    • aqua
    • black
    • blue
    • darkblue
    • green
    • lavendar
    • maroon
    • olive
    • orange
    • pink
    • purple
    • red
    • white
    • yellow
  • Size uses <font size=20> </font> tags (For example, <font size=10>'The Text'</font> 'The Text' will appear with a font size of 10)
  • Font uses <font face='arial'> </font> tags (For example, <font face="helvetica">'The Text'</font> 'The Text' will appear in the helvetica font)
  • Font attributes can be used in combination (For example, <font face="helvetica" color=green size= 20>'The Text'</font> 'The Text' will appear in the helvetica font, be green in color, and have a size of 20)
  • Tags can overlap each other as needed (For example, <b>First Section <i>Second Section</b> Third Section</i> => First Section appears bold, Second Section appears bold and italic, and Third Section appears italic.) Example:
    • "<b>ATTACK!</b> The result of the '<i>ATTACK!</i> Broad Sword' attack is <font color=red>20</font>"(Shows: ATTACK! The result of the 'ATTACK! Broad Sword' attack is 16 )

Optional Sections

Optional Sections are used to show information based on a condition. This way, only things that need to be shown are shown.

Named Templates

Templates may be used for any roll and can be nested in rolls called from other rolls (for example, a button rolling on a table). Some templates may be common between several rolls. Instead of having to copy the template between the multiple locations, a template can be given a name. The name is then used when putting the template in the roll. This also allows the template to be changed in one place and to effect all the rolls that use it.