CrystalBall Lite Dice Roller FAQ

The dice roller included with CrystalBall Lite is no ordinary random number generator. It is a very powerful tool for rolling dice in many different ways. Below is a list of current dice rolling features. Use the menu on the right, or scroll down to see a more detailed example of each feature.

Dice Roller Features:

Dice Roller Results:

Buttons - Variables - Sets - Tables:

Examples:

Dice Buttons

Buttons appear on the main dice rolling window. You can setup your common rolls as a button and click the button to have it make the roll. Any roll can be placed inside a button. A button has a name and a roll value. The name is optional, but is useful for seeing what the button's roll does and for linking between buttons.

Rolling Dice:

Rolling dice is simple. Just type in the die rolls using "D" or "d" for the dice.

Reroll Min/Max:

Rerolling on a maximum or minimum result is done using "N" and "M". This is a quick way to add another roll if the result is minimum or maximum. For more complicated rolls or to reroll minimum or maximum rolls, please see the ScriptsFAQ

Use Math

You can use Multiply, Divide, Addition and Subtraction. ( * / + - )

Rolling Sets:

Use Brackets to enclose sets. You must have an opening and closing bracket. The number outside the opening bracket tells CB how many sets to roll:

Dropping Rolls:

You can drop rolls from a single roll or from a set using the tilde character: ( ~ )

Reroll Dice (Greater Than / Less Than)

You can force rolls to "reroll" until they obtain a desired result by using < and >. The dice roller will attempt a roll up to 1000 times. If it is unable to force the roll to be within the specified range, it will give up.

Comment Your Dice Rolls

You can add comments into your dice rolls. Just place your comments in quotes and they will show up in the final result. eg. "My Comment"

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 )

Multiple Rolls

You can make more than one roll in the same statement. Separate the rolls with a semicolon ( ; ). Each roll is treated as a separate roll. The results are separated so as to clearly see which roll rolled which result.

Use Logic

You can use IF, THEN, ELSE, END to control rolling. You must use the following test operators:

The LEFT test condition can be located inside the statement or directly to the left of the statement: If the left test condition is located inside the statement it is not added to the total result. Likewise, if the Left condition is located outside the statement it will be used in the total.

Conditions can be nested. The results and tests can be dice rolls.

Play Sounds

You can have the Dice Roller play any sounds you have in the CrystalBallData/User_Data/Sounds/ folder. To play a sound use the Pound ( # ) symbol to specify the name of the file to play. You can use MP3 or WAV files.

Button Linked Rolls

You can link a roll to an existing button's name. If you had a button named "Critical Damage" you could make a roll that linked to this button if you rolled a critical hit. To link to a button, place the button's name between underscores ( _ ).

Variables

A Variable is similar to a Button in that it has a name and a roll / value. The main difference is that when a Variable is referenced during a roll, it doesn't change it's value until the roll is finished. So, if a variable's value is 1d6 and a roll references it three times, all three references will be the same value.

This is extremely useful for determining the results of a roll where the effects are dependent on more than a single "IF THEN ELSE END" statement. Variables are also an excellent location to store non-rolled values like Ability Modifiers and other static values that are useful to other rolls.

To link to a variable in a roll, enclose the variable's name in dollar signs ( $ ).

Click the "Edit Variables" button on the Dice Roller window to edit the current Dice Set's Variables.

GM Forced Rolls

A player flagged as GM can force other players to make a roll and have the results of the roll seen by everyone or just show it to the GM.

The syntax has three parts (comma separated) and surrounded in question marks.

*Roll

The roll that the other player(s) should make. This could be any valid roll and can include text, button name links, variables, sounds, pretty much anything that a roll can do. All links and sounds will be relevant to the machine making the roll, and not the GM's machine. If a player is missing a variable name that is requested, the player will be prompted to enter a value for that variable.

*Send (single/all)

*Return (public/private)

The last two parts (Send & Return) are optional, so a forced roll could be made like: ?1d20?
This roll would make all the other users roll 1d20 and return the result back just so the requesting GM can see it (they'll never know they rolled it).

Forced Rolls become exceptionally powerful for surprise checks and similar spot, listen, "you didn't see it coming" types of checks. Note: If a variable is requested to be rolled, and the player doesn't have that variable, a dialog will open on the player's machine asking for the value of the variable that will then be added as a variable for the player and the value returned to the roll requester.

Roll Across Sets

You can make a roll on a non-active dice set without having to change to that dice set. This can be helpful if tracking more than one character at a time by using different sets. Use an At symbols ( @ ) around the dice set name to make the roll on.

If a variable or button is told to roll in a specific dice set, any variables or buttons referenced from that button or variable will also roll in that same dice set unless it specifically says not to later in the chain. This way, a roll will stay in the specified dice set to resolve all linked rolls.

Complex Rolls (Please Note)

If your rolls are very complex and require too much time to render in colors it will be shown in plain text to speed things up. Also if your rolls are very long and large it may take a while for the results field to update. The roll will be done in less than a second, it just takes a while for the field to update. (For large rolls)

Table - Random Rolling

There are two types of ways to get information from a table. The first is randomly returning a result and the second is to detail which data to get. Random rolling on a table allows for random generation of names, treasure, encounters, hit locations, and any other random selection from a list of items. The dice roller looks in the "TableData" folders for a requested table to roll on. Use the "pipe" character ( | ) to enclose a table-roll.

To create a new table for table-rolling use the menu: Customize > Table Editor > New Table.

There are two columns names used in table-rolling: "Weight" and "Value". Any extra columns are ignored.

The "Weight" column can be used for giving each row a certain chance to be rolled. If an item is the result of a roll between 76 -> 82, then its weight is 7, since 7 chances would result in the item. The total weights are added and the random item is picked using these weights. The total of the weights need not equal 100. The "Weight" column is optional if you wish each row to have the same chance to be rolled.

For example, a Hit Location table has 5 rows in a Value column: head, arm, leg, torso, and back. This same table also has a Weight column with rows with the values of 1, 7, 5, 3, and 2. So the weights of the values are head = 1, arm = 7, leg = 5, torso = 3, and back = 2. The total of the weights is 1 + 7 + 5 + 3 + 2 = 18. So, head has a 1 in 18 chance of being rolled. Arm = 7/18, leg = 5/18, torso = 3/18, and back = 2/18.

Weight Value
1 head
7 arm
5 leg
3 torso
2 back


If no column has the name "Value" then the first non-Weight column is automatically chosen as the Value column. The "Value" is what is returned by the roll.

The cell's value is considered a string. But, if the cell's value starts with "Roll=" then the cell is treated as a dice-roll. A new dice-roll is made using the text following "Roll=" as the dice-roll's text.


Instead of providing a return number value, a table cell can also be defined as a roll. Normally, the value of a cell is returned as is. Instead if the cell's value starts with [b]roll=[/b] then the value of the cell is rolled and the result returned. This is a great way to have a cell link to other tables or for a treasure generator to reroll on a table.

Table - Lookups

Tables can also be used to lookup values. There are 2 special column names that can be used for table look up: key and value.
The "key" column of the table contains the "keys". These are matchable values that define a row and should be unique. If there is more than one matching value than it is undefined which will be used on a lookup.
The "value" column is the column of the value to return if the column name isn't given.
So, given a specific key, the lookup returns the associated value. This allows stats, data, character information and other data to be stored in a table and accessed by a roll. Use the "pipe" character ( | ) to enclose a table-lookup.
There are four parameters for looking up a table value. The first is the table name which is the table's name to be getting values from. The second parameter is the subtable name of the table. The third is the "key" to lookup the value from the subtable's "key" column. The fourth column is optional. If not used, then the "value" column is used for returning the value. If used, it defines which column to return the value from. This can be used if a row is a character or monster and the lookup is to return a value from that character's/monster's row.

Setting a Variable in a Roll

The results of a roll can be placed in a variable for later access. The variable gets the result of the roll. The next time the variable is called, the new value is returned.

Roll Directives

Directives allow the functionality of rolling to change. They are an inline way to handle dice preferences. Directives can be applied to separate parts of a roll. Nesting directives is a powerful way to customize the results of a roll.

The defaults for the directives can be modified in the "DefaultDiceDirectives.xml" table. Just open the table in the table editor window (accessible by clicking on the "DefaultDiceDirectives.xml" file in the Menu: Customize > Table Editor > User_Data > Table_File). Find the directive whose value needs changed, and change to the new default value.

Directives are not case sensitive. SORT is the same as sort which is the same as SoRt.

Directives apply to the whole roll, and not to any single part when used inline with dice rolls.

The following is a list of directives and their function:

Dice Functions

Dice Functions are operations that can be performed on a part of a dice roll that will effect the display and/or result of the Roll contained in the function.

Dice Functions are useful because they can be applied to any part of the dice roll, similar to Dice Sets. Dice Functions are called by name, while the dice roll the function is going to operate on is enclosed in parenthesis. Such as Round(1d6 * 0.33). Dice Fuctions can also be nested.

The following is a list of Dice Functions and what they do.