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 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.
`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 |
`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.
`dice: #npc|-` picks one random note and shows a part of it.`dice: #npc|link` gives just a link to one random note.`dice: 2d#npc` takes two parts of each note.It needs no other plugin installed.
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.
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.