jpcranford232 downloadsDetects TTRPG dice notation (d6, 2d8, d100…) in the first column of table headers and auto-fills the first column with evenly distributed roll ranges.
A simple plugin that automatically calculates and fills the first column of a Markdown table with evenly distributed dice ranges.
As far as plugins go, this is about as simple and lightweight as you can get. Two total commands, one setting, and it only changes stuff when you tell it to.[^2]
Create a Markdown table whose first column's header is any standard dice notation. That is d4, d6, d8, d10, d12, d20, d100, d%, and anything matching XdX, e.g. 2d6, 3d10, 5d4. Case insensitive throughout.
Leave the first-column cells blank (or don't — they'll be overwritten). Fill in your table content in the other columns.
Then, run one of the included commands via the Command Palette (Ctrl/Cmd + P): "Fill dice column in table at cursor" or "Fill all dice columns in this file". They do what they sound like.
Before:
| d6 | Encounter |
|----|-------------------|
| | Goblin ambush |
| | Merchant caravan |
| | Empty road |
| | Bandit scouts |
| | Travelling mage |
| | Wild animal |
After running the "Fill dice column" command:
| d6 | Encounter |
|----|-------------------|
| 1 | Goblin ambush |
| 2 | Merchant caravan |
| 3 | Empty road |
| 4 | Bandit scouts |
| 5 | Travelling mage |
| 6 | Wild animal |
When the number of rows doesn't divide the range evenly — or you're using a dice pool — the plugin produces ranges. Remainder values are evenly spread across the rows so the distribution stays as even as possible.
For 2d6, the rollable range is 2–12 (11 values). A table with 5 rows gets:
| 2d6 | Result |
|------|--------------|
| 2-3 | Critical fail|
| 4-5 | Failure |
| 6-8 | Mixed |
| 9-10 | Success |
| 11-12| Critical hit |
| Setting | Default | Description |
|---|---|---|
| Distribution mode | Distributed (alternating) | Four different algorithms for dealing with remainders. Choose between top/bottom weighted, evenly distributing remainders throughout (or even subtly favoring the top of the table!) |
| Auto-fill on file modify | Off | Runs "fill all" automatically on every file save |
[^1]: In the event you experience frustrating and/or cataclysmic data loss, please create a PR so everyone wins.
[^2]: Unless you forgot that you told it to run every 300ms. But I'm a programmer, not a mind-reader.