-
Notifications
You must be signed in to change notification settings - Fork 0
Managing the Compendium Roll Tables
Roll tables work differently from items, spells, and monsters: there's no fenced YAML block. Instead, a plain Markdown table is detected automatically as a roll table at build time — no separate file needed, unless you want one.
In the Compendium section's title bar, click Create Roll Table. A prompt asks for a name (pre-filled with "New roll table") — confirm it, and MPX creates tables/<slug>.json and opens it.
{
"id": "…",
"name": "Shipwreck Flotsam",
"slug": "shipwreck-flotsam",
"columns": [{ "name": "D6" }, { "name": "You find..." }],
"rows": [
["1", "A waterlogged logbook, most pages illegible."],
["2", "A brass spyglass, lens cracked."]
],
"descr": "What washes up on the rocks below the lighthouse.",
"sources": [{ "name": "The Sunken Lighthouse", "page": 3 }],
"tags": ["flavor"]
}Unlike items/spells/monsters, there's no attributes, data, or image — just id, name, slug, columns, rows, descr, sources, tags.
| Field | Required | Format | Purpose |
|---|---|---|---|
id |
Yes | UUID | Generated for you. |
name |
Yes | Text | |
slug |
Yes | lowercase, digits, hyphens only | |
columns |
Yes | Array of { name }
|
Column headers. |
rows |
Yes | Array of arrays of strings | One array per row, matching the number of columns. |
descr, sources, tags
|
No | Same as items |
A Markdown table whose header's first cell links to /roll/... — the dice notation — is picked up automatically:
Sounds Table {.table-title}
| [1d6](/roll/1d6) | Result |
|:---:|:---|
| 1 | A groan of settling stone far above |
| 2 | Dripping water, closer than it should be |
Type mpx-roll-table and accept the snippet suggestion to scaffold this — though nothing about detection itself requires the snippet; a table written entirely by hand works the same way.
-
Name defaults to
"{page name} — {result column header}". A heading or plain paragraph placed right above the table, carrying{.table-title}, overrides this — its own text becomes the table's full name (and it still renders normally on the page, as shown above). - The live preview shows a small caption under a detected table ("Detected as roll table —
{slug}") so you can tell at a glance it'll be included in the build. -
{.no-repeat}or{.each-row}right after the roll link sets the table's roll mode, same meaning as a standalone table's own (absent)rollModefield. - Turn detection off entirely with
mpx.autoDetectRollTables: falsein project settings — a table with a/roll/...header link then renders as a completely plain table.