RollTable

RollTable

The RollTable entity which implements randomized rollable tables

Constructor

new RollTable()

Source:

Members

(static) config

Source:

results :Array.<Object>

Source:

A convenience accessor for the array of TableResult embedded documents

Type:

Methods

(async) createTableResult()

Source:
Deprecated:
  • Yes

(async) deleteTableResult()

Source:
Deprecated:
  • Yes

(async) draw(roll, result, rollMode) → {Promise.<Object>}

Source:

Draw a result from the RollTable based on the table formula or a provided Roll instance

Parameters:
Name Type Description
roll Roll | null

An existing Roll instance to use for drawing from the table

result Object | null

A roll table result or null, to draw randomly based on the roll

rollMode string | null

The chat roll mode to use when displaying the result

Returns:

A promise resolving to the selected Table Result object

Type
Promise.<Object>

getTableResult()

Source:

(async) normalize() → {Promise}

Source:

Normalize the probabilities of rolling each item in the RollTable based on their assigned weights

Returns:
Type
Promise

prepareEmbeddedEntities()

Source:

(async) reset() → {Promise}

Source:

Reset the state of the RollTable to return any drawn items to the table

Returns:
Type
Promise

roll() → {Array}

Source:

Evaluate a RollTable, returning a the drawn result

Returns:

An Array, containing the Roll and the result

Type
Array

(async) updateTableResult()

Source:
Deprecated:
  • Yes