A random table roller for Obsidian that rolls right in your notes

Dice Tray is a free plugin for Obsidian. Keep your random tables as ordinary notes, then point a roll at one: a lookup table with dice ranges lands on the matching row, a plain table or list gives a random row or item, and a heading gives a random section under it. The result shows in your note as a small chip, and a click rolls again.

Get Dice Tray, freeIn Obsidian: Settings, Community plugins, Browse, search Dice Tray, then Install and Enable. Try it in your browser first: it runs the real plugin code over a sample note.

A note called Session 12 prep with dice results shown as chips inline, then results rolled from an Encounters note: a forest encounter, weather from a lookup table, loot and its value, three encounters with no repeats, and a whole section at random
Lookup tables and random encounters rolled inside a note.

Lookup tables

A table whose first column holds dice ranges is a lookup table: name the dice in its header and the roll lands on the matching row.

| d20   | Weather |
| ----- | ------- |
| 1-5   | Rain    |
| 6-15  | Clear   |
| 16-20 | Fog     |
^weather

`dice: [[Tables^weather]]` rolls a d20 and shows that row. Results render as Markdown; add |norender for plain text.

Rolling on a note

`dice: [[Encounters]]`a random section (paragraph, list, table) of that note
`dice: 3d[[Encounters]]`three different sections
`dice: [[Encounters#Forest]]`a section under that heading
`dice: [[Loot^gems]]`a random row of the table (or item of the list) with block id ^gems
`dice: [[Loot^gems]]|Item`just the Item column of that row
`dice: [[Rumours]]|line`a random line

Rolling on a tag

`dice: #npc` rolls on every note tagged #npc (or a tag nested under it, like #npc/elf) and shows a part of each, led by a link to its note. Tags in the text and in the note's properties both count, and the note the roll is in is left out.

It needs no other plugin installed.

Results that stay

Most rolls roll again each time the note opens. `dice+: ...` rolls once and writes the result after it, so the chip shows the same result every time; click it to roll again. `dice-mod: ...` rolls once and replaces itself with the result, for loot that should not change.

Notes written for Dice Roller

Dice Tray reads the same notation as the Dice Roller plugin's dice: blocks, so notes written for that plugin keep working here. For the dice themselves (keep and drop, exploding dice, Fate and narrative dice), see the dice roller page.

With Session Log installed, a roll you click lands in your session log, as in Rolled [[Encounters#Forest]]: Wolves. Dice Tray does not use the network, has no accounts, and collects nothing.

Get Dice Tray, free