A D&D loot roller for my table
Hello @everyone
Been sitting on my ~1,000-item CSV catalog (the same one that powers my shop tools) and finally built the thing I've actually wanted for a while: a loot roller for handing out treasure without breaking my flow mid-session.
What it does
Single-file HTML app. Double-click, opens in the browser, no build step, no server, no accounts.
- Party Level slider (1–20) with the four tier names shown (Local Heroes → Masters of the World)
- Eight toggleable item groups: Armor & Shields, Weapons, Magic Items, Gear & Tools, Ingredients, Gemstones, Poisons, Vehicles & Mounts
- Rolls 2–5 items per hoard with a ~50% chance of a GP pile on top
- Rarity Odds panel shows the exact percentage chance of each rarity at the current level + filter combo, so I can sanity-check before I roll
- Loads my CSV via a file picker (works with Chromium's
file://security model)
The design process
Started with the usual four-group setup (Arms & Armor / Magic / Gear / Reagents). Rolled a few times, immediately hated it. A few problems:
Problem 1: Reagents was a junk drawer. Ingredients, Gemstones, and Poisons don't belong together. If I'm rolling a bandit stash I want gems and maybe poisons but not 40 varieties of mushroom. Split into eight groups so I can toggle exactly what fits the encounter. Also broke Arms & Armor into two because Weapons and Armor are different enough that DMs think of them separately.
Problem 2: The level curve was way too flat. First pass had a level 20 party still seeing ~91% Common items. Total nonsense — a party fighting a lich should not be rolling for signal whistles. Steepened the curve significantly. Now at level 20 you get 0% Common, ~43% Rare, ~36% Very Rare, ~13% Legendary, and a tiny sliver of Artifact chance. Level 5 stays humble: mostly Common with the occasional Uncommon.
Problem 3: price should matter within a rarity. A 25,000 gp Ring of Invisibility and a 5,000 gp Ring of Protection are both Legendary, but they shouldn't drop at equal rates. Added invisible log-damped price weighting: cheaper items in a rarity are somewhat more likely than expensive ones. The visible rarity bars stay clean (pure rarity math), but the actual roll biases toward lower price points within each tier. Feels great in practice — most gemstone rolls hit the mid-tier stones, but occasionally a Diamond or Star Ruby drops.
Bonus edge case caught during testing. Filter down to just Gemstones (all Common-rarity) at level 20 and the level curve zeroes out Common entirely, meaning the roll produces nothing. Added a fallback: if the current filter + level combo produces zero weight, ignore the level curve and roll by price weight alone. So single-category treasure rolls work at every level.
The aesthetic
Went with a dark parchment feel: mahogany and warm gold on near-black, Cinzel for headers, Crimson Pro for body. Item cards have a colored left border matching rarity (grey → green → blue → purple → gold → red for Artifact) with a subtle glow gradient bleeding in from that edge. The Roll button gets a rotating dice icon animation when firing. Small touches but they add up — feels like something that belongs on a DM screen.
What's next
Probably a "reroll one item" button so I don't have to redo the whole hoard when one thing doesn't fit. Maybe a copy-to-clipboard so I can drop the results straight into Discord. A "save this hoard" feature could be useful if I want to prep several encounters in advance.