diceRolled
Sent after dice are rolled — spinning the planar die, or a “roll a d20” effect like The Deck of Many Things. Informational only; the player acknowledges the result to continue.
Arguments
Section titled “Arguments”input.type is "diceRolled". The remaining fields:
interface DiceRolledInput { sides: number; rolls: Array<DiceRollEntry>; title?: string; sourceCardName?: string;}#[serde(rename_all = "camelCase")]pub struct DiceRolledInput { pub sides: i32, pub rolls: Vec<DiceRollEntry>, #[serde(default, skip_serializing_if = "Option::is_none")] pub title: Option<String>, #[serde(default, skip_serializing_if = "Option::is_none")] pub source_card_name: Option<String>,}
References: DiceRollEntry
Each entry in rolls is a DiceRollEntry:
| Field | Type | Description |
|---|---|---|
label? | string | Optional label for this roll. |
playerId? | string | Optional player the roll belongs to. |
naturalResults | number[] | The raw rolls before any modifiers. |
finalResults | number[] | The results after modifiers are applied. |
ignoredRolls | number[] | Rolls that were discarded, e.g. from advantage. |
highlighted | boolean | Whether to visually emphasize this entry. |
Response
Section titled “Response”type DiceRolledOutput = { type: "diceRolledAcknowledged" };This prompt is read-only — acknowledge to continue.
Example
Section titled “Example”Rolling a d20 with advantage, keeping the higher of two natural rolls:
{ "promptId": 7, "decidingPlayerId": "player-0", "input": { "type": "diceRolled", "sides": 20, "rolls": [ { "label": "Advantage", "playerId": "player-0", "naturalResults": [14, 8], "finalResults": [14], "ignoredRolls": [8], "highlighted": true } ], "title": "Roll a d20", "sourceCardName": "Wand of Wonder" }}{ "promptId": 7, "output": { "type": "diceRolledAcknowledged" } }