CrystalBall Lite Table Generator:
The table generator included with CrystalBall Lite allows for total customization. It is a very powerful tool for generating data from tables in many different ways. Below is a list of current table generation features. Use the menu on the right, or scroll down to see a more detailed example of each feature.
Table Generator Features:
- You can perform any dice roll syntax as an item in a generator table including rolling on other tables / subtables.
roll=13d6 "gp" - A table result can link to rolling another table roll on the current table or a different table roll=|"Extra Large Loot"|
- Generator Tables can be self contained. All the variables, menus, subtables, and templates required for the generator table can be stored in one file and easily shared with other players.
Table Generator Results:
- Generator results can be displayed as a normal dice roll OR templates can be used to give custom output.
Subtables:
Generator Table Creation
To create a generator table, click on the "Generate" menu and then on the "New Generator Table" menu item. The table editor opens with the default generator table subtables and columns. Fill in the information for the tables and results for your generator and save the generator table.
Generators have three possible subtables: Master, Variables, Menu_Main. These allow customization of the generator's user interface and powerful ways to get results from the generator.
The following is a description of these subtables and their fields:
- Master Subtable : The Master subtable is the default starting point of a roll. If no subtable is picked through Menu_Main's possible subtables, the roll will roll on the master table. The columns and format of the master table is the same as a standard random table.
Possible columns for this table:
- Weight (optional) : The weight that this item receives compared to the other items of the table.
- Value : The value to return as a result of this roll.
- "Custom Column Name" (optional) : Any name can be given to a custom column. Custom columns can be used for table 'lookups'. See standard table columns in the DiceFAQ for more information about Table Lookups.
- Weight (optional) : The weight that this item receives compared to the other items of the table.
- Variables (optional) : Variables are a way for the user to change how the generator works through the generator interface. Variables appear in the generator in the "Options" list. The type of variable determines what type of control is given to the user. A default value can be given for the option. When the generator is run, temporary variables are created with the values of these options. These variables can then be used in the generator tables to direct how the results are randomized.
Possible columns for this table:
- Name : This is the name of the variable to use in the generator table cells. If a ShowName is given for the variable, the user sees the ShowName in the generator window, but the actual variable name to use in the tables is the name given in this column.
- ShowName (optional) : This is the name of the variable shown to the user in the generator window. This defaults to the Name column if there is not a ShowName column or the ShowName column's value is blank.
- Type (optional) : This is the type of this variable. Defaults to an on/off checkbox set to the off state. Possible Types are:
- Checkbox : Shows a checkbox for the user to toggle on/off. To check the checkbox by default put either true or false in the Default column for this variable. When the table is generating, the variables value is either 0 (for false) or 1 (for true). So the variable can used like: roll=if $myoption$ == 1 then 2d6"gp" else 2d6 "dollars" end
- Number : Shows an editable field that the user can use to enter a number. The variable is then saved as a number for use in the generation tables. Defaults to blank.
- String : Shows an editable field that the user can use to enter a string. The variable is then saved as a string for use in the generation tables. Since it is a string, even if numbers are entered, it will not do math on the string value. Defaults to blank.
- Default (optional) : This is the default value that the option is set to when the user first opens the generator window. See the Types, listed above, to see what are valid default values for each type.
- Name : This is the name of the variable to use in the generator table cells. If a ShowName is given for the variable, the user sees the ShowName in the generator window, but the actual variable name to use in the tables is the name given in this column.
- Menu_(Name of Menu) (optional) : This subtable lists the different menus shown to the user. When the user selects a menu, the menu item's coresponding roll is made. This can be used to provide different ways to generate from a generator. ie. A Treasure Generator could also have a Coins and a Weapons subtable. By putting a Coins and a Weapons entry in the Main_Menu subtable, the generator window will show Coins and Weapons as optional ways to roll the generator.
- Roll : This is the roll to make if this menu item is chosen.
- ShowName : This is the menu's text shown to the user in the generator window.
- Roll : This is the roll to make if this menu item is chosen.
- Other Subtables (optional) : Other subtables can be setup in the generator file. This way, all the tables for a generator can be stored in the one generator file.
- Templates (optional) : Templates specific to just this generator can be stored in a templates subtable. When the table is loaded for rolling, its templates are loaded and will be used for the duration of the roll. This allows the generator to have all the information for its generating in one file for easy sharing. Using a Templates subtable allows templates to be in the same file as the generator so that they can be shared as one file.
Possible columns for this table:
- Template : This is the name of the template. Use this name when referencing this template from a roll.
- Value : This is the the format to use for this template. A roll will fill the template up with its values as the template specifies. When the roll shows, the template is shown instead of the actual roll's output. A template's value allows variables and text to be formatted ready for output. A template in a roll is specified by doing the following:
:template=[var]: <== This will show the roll held in the 'var' variable. Variables in a template can be shown in several different ways. These are specified by a comma and then the type after the variable name.
:template=[var,string]: <== This will show just the string part of the roll held in the 'var' variable.
- Normal : Showing a variable in "Normal" form will display the variable's result as it would normally appear if the roll was rolled normally in the dice roller.
- String : This will show just the strings in the variable. The variable's numeric result is not shown.
A variable named 'var' has the value of 1d20 "my d20 roll".
A template is setup to show this variable :template=[var,string]:
The output of this template applied to the var variable would be "my d20 roll".
- Number : This will show just the numeric result in the variable. If the variable's roll has any strings, they are not shown.
A variable named 'var' has the value of 1d20 "my d20 roll".
A template is setup to show this variable :template=[var,number]:
The output of this template applied to the var variable, if the 1d20 rolled a 15, would be 15.
- Normal : Showing a variable in "Normal" form will display the variable's result as it would normally appear if the roll was rolled normally in the dice roller.
- Template : This is the name of the template. Use this name when referencing this template from a roll.
- **HINT** : The full name of the current table does not need to be supplied to each table roll. If a roll is to be made on the current table, then the table name can be ommitted from the table roll.
- Standard syntax : |"The name of my table", "The name of the subtable"|
- Nested table rolling : |,"The name of the subtable"|
Examples:
coming