Using the UI

Getting started

  1. Open the app and wait for the status to read Dicelab WebAssembly ready.
  2. Choose your workspace:
    • Simple mode for one-off rolls.
    • Notebook for multiple cells, logging, and analysis. Use the header toggle to switch anytime.
  3. Type an expression and press Shift+Enter or click the run button in the cell toolbar.
  4. For D&D Beyond characters, open the Import drawer in the UI, paste the ID or share link, and click Import—no notebook command needed.

Modes and layout

  • Simple mode
    • One input field and a compact log area.
    • Perfect for quick checks (e.g., d20 adv + 6).
  • Notebook mode
    • Multiple cells with per-cell execution counts and logs.
    • Drag handles let you reorder cells; duplicate and delete buttons sit in each toolbar.
    • Logs can be shown/hidden per cell; clearing a log does not remove the cell content.

Logging and status

  • Status messages appear at the top (e.g., “Dicelab WebAssembly ready.”).
  • Log levels:
    • off - only final results
    • success - summaries
    • info - per-roll details (default)
    • debug - adds alias and assignment events
  • Change levels with the log button.

Analysis (PMFs)

  • Use analyze <expr> to see a probability mass function.
  • Provide comma-separated inputs to compare distributions:
    analyze 3d6, 2d20 kh 1 + 5
  • Results show mean, min/max, quantiles, and a chart in the cell log.

Aliases, presets, and imports

  • Aliases: let firebolt = 2d10 then reuse firebolt + 1d4.
  • Ability score helper: (4d6 dl 1)^6 is a handy roll for D&D or Pathfinder ability generation—save it to an alias if you use it often.
  • D&D Beyond import (UI): Open the import drawer, paste an ID or share link, and Dicelab seeds:
    • Abilities: str dex con int wis cha
    • Proficiency bonus: prof
    • Saving throws: <ability>_save (e.g., str_save)
    • Skills: <skill> (e.g., investigation)
  • All aliases and notebook cells persist automatically between visits.

Attacks and crits

  • Mark attacks with attack on a d20 roll.
  • Extend crit ranges with crit19..20 (any low..high between 1-20).
  • Control on-crit damage with:
    • oncrit double_dice (roll damage dice again)
    • oncrit double_all (double the whole damage expression)
    • oncrit max_second_dice (add max value of the extra dice)

Keep/drop and rerolls

  • Keep/Drop: kh/kl/dh/dl with a number.
    Example: 4d6 dl 1 (drop lowest), 3d20 kh 1 (keep highest).
  • Rerolls: rr rerolls until different, ro rerolls once.
    Example: 2d6 rr 1 rr 2, 4d6 ro 1.

Notebook controls at a glance

  • Add cell: plus button or Shift+Enter at end.
  • Duplicate: copy icon in the cell toolbar.
  • Delete: trash icon; if you delete the last cell, a fresh one is created for you.
  • Reorder: drag the left gutter of a cell.
  • Reset notebook: clears cells, logs, aliases, and stored context.

Help, theme, and accessibility

  • Help: “?” button opens a syntax and tips modal.
  • Theme: moon/sun pill toggles light/dark; preference is remembered.
  • Keyboard: editors accept standard shortcuts; Shift+Enter runs, Ctrl/Cmd+A selects.
  • Focus: all interactive controls support keyboard focus rings; status and logs use text you can copy.

Troubleshooting

  • If a command is empty, the cell gently asks you to type something.
  • Syntax errors highlight in red and show an error message in the log.
  • If something fails to load, refresh; persisted notebook and aliases will reload after the engine is ready.

Need the syntax rules?

Visit the Dice language reference for every keyword, operator, and example, or jump to the Quick reference for copy-paste snippets.