Skip to content

RollDice

Referee: roll a dice expression through the seeded session.

Full documentation: RollDice. Wire type: roll_dice.

Legal session modes: battle, encounter, exploring, game_over, town

JSON Schema

{
  "description": "Referee: roll a dice expression through the seeded session.\n\nAn authorial roll for freeform adjudication \u2014 the referee resolves a *chance*\noutcome the content model can't express (a puzzle, a bluff, \"does the frayed\nrope hold?\") by rolling through the engine rather than inventing a number, so\nthe result is logged, replayable, and grounded in a typed event. Referee\ncommands are legal in every mode. The roll draws from the dedicated\n[`ADJUDICATION_STREAM`][osrlib.crawl.session.ADJUDICATION_STREAM], so an ad-hoc\nreferee roll never perturbs the draw sequence of keyed mechanics. A malformed\n`expression` is rejected at construction, exactly as\n[`SpawnMonsters`][osrlib.crawl.commands.SpawnMonsters]'s `count_dice` is, so it\nnever reaches the session and consumes no draw.\n\nModes:\n    `town`, `exploring`, `encounter`, `battle`, `game_over`\n\nRejections:\n    None.\n\nEvents:\n    [`DiceRolledEvent`][osrlib.crawl.events.DiceRolledEvent] with the\n    expression, the total, and the individual die results.",
  "properties": {
    "command_type": {
      "const": "roll_dice",
      "default": "roll_dice",
      "title": "Command Type",
      "type": "string"
    },
    "expression": {
      "title": "Expression",
      "type": "string"
    }
  },
  "required": [
    "expression"
  ],
  "title": "RollDice",
  "type": "object"
}