...
(string)
The description string
...
getDiceData
Code Block | ||
---|---|---|
| ||
function getDieListgetDiceData() |
Get the list of dice in the currently active slot in the top level data, as well as additional data about the dice expression. The result is an integer indexed table of table values specifying the data related to the dice. The subtable will contain the field type that is a string identifying the type of die, and a field named result containing the numeric result of the die roll if the dice have already been rolledindividual dice, as well as the “expr” key to contain the dice expression in which to apply the individual dice, as well as the “total” key to provide the current total (for dice that have been rolled already).
Return values
(table)
An integer indexed table of data containing the die types and possibly results, as well as expr/total keys and data.
getMetaData
Code Block | ||
---|---|---|
| ||
function getMetaData(key) |
...
description (string)
The description string
...
setDiceData
Code Block | ||
---|---|---|
| ||
function setDieListsetDiceData(dielist) |
Set the list of dice data in the currently active slot in the top level data. The existing dice in the slot will be removed and the set of held dice in all slots will be rebuilt.
Parameters
dielist See getDiceData for details of the dice data. If the individual dice list is missing, then it will be rebuilt from the dice expression key (“expr”). If the dice expression is missing, then it will be rebuilt as the addition of the individual dice.
Parameters
dicedata (table)
An integer indexed table of strings listing the types dice expression and total, as well as the details of the individual dice to be added to the slotused in the dice expression.
setIcon
Code Block | ||
---|---|---|
| ||
function setIcon(icon) |
...