Foundry VTT module for D&D 5e (2024 rules): builds encounters against the 2024 DMG's per-character XP budget, and generates 2024 DMG-style loot — both a per-monster "Individual Treasure" purse and a full Treasure Hoard — with a fully editable preview before creating anything.
Features
Encounter tab
- XP budget per 2024 DMG rules (Low/Moderate/High, no group multipliers)
- Browse monsters from ANY loaded Actor compendium (SRD + your own homebrew)
- Filters: search, CR, size, subtype, creature type, habitat (speculative, only shown if your dnd5e version actually has habitat data)
- Party Level/Size can be synced from Foundry's own designated Party actor (dnd5e's Group/Party feature) via a "Sync from Party" button — auto-pulled once when the app opens, never silently overwritten mid-session
- Auto-Fill Remaining (randomized variety + repeat cap, respects every active filter) and Boss Encounter mode (one strong creature + supporting adds — targets the full budget instead of leaving a chunk unspent when there's no room left for adds)
- Boss-ify: mark any monster (auto-picked or added by hand) as the boss, then scale its HP, damage, AC, and ability scores up by a chosen tier — RAW / Moderate / High / Deadly — so a single boss can actually threaten a full party. Fully reversible per-monster
- Minion: convert any monster to MCDM-style Minion stats (Flee, Mortals!) — fixed low HP and fixed, non-random damage per hit, at a fraction of its normal XP cost — for fast, disposable group fights. Also reversible
- Elite: a lighter, no-configuration alternative to Boss-ify — mark any number of monsters as Elite to scale them at a fixed Moderate tier (130% HP/damage, +1 AC, +2 to ability scores), without the "only one boss per encounter" restriction. Boss, Elite, and Minion are mutually exclusive per monster
- Encounter Composition: classify monsters into roles (Brute/Tank/ Skirmisher/Cleric/Caster) based on HP/AC/damage/spellcasting relative to other monsters of the same CR — a homebrew heuristic, not from any book. "Compute Roles" scores the currently-filtered monster list (narrow by CR/ type first to keep it fast), then a Role filter joins the other search filters, and Auto-Fill gains optional per-role slot counts (e.g. "2 Brute + 2 Skirmisher + 2 Caster") on top of its normal budget-fitting
- Encounter HP mode (RAW / Minroll / Maxroll) controls how every monster's HP is set when placed, independent of Boss-ify/Minion
- Boss-ify's tier percentages/AC/ability bonuses, Minion's XP discount, and Boss Encounter mode's budget split between the boss and its adds are GM-tunable per-user under Settings > Configure Settings > Module Settings > "Configure Values" (defaults match the numbers above); the starting Encounter HP mode and whether Boss Encounter starts checked are separate per-user settings right in the main Module Settings list
- In-app Help button (next to the tabs) explains every button and field in plain language
- Lair Actions: monsters that have them get a per-encounter "Lair" toggle, adjusting their XP to CR+1 for budget purposes — matches the 2024/2025 Monster Manual's fix for a 2014-era oversight where lair-fighting monsters got no XP bump at all
- Click a monster's name to open its stat block; a separate "+" button adds it — same pattern everywhere a monster or item is listed in this module
- Drag a monster straight from the search list onto the canvas to place a single, plain (un-scaled) token immediately — a quick-and-dirty alternative to the encounter list for a one-off placement; Boss-ify/ Minion-ify still require adding it to the encounter list below instead
- Click-to-place token spiral formation on the canvas
- Creates a real Combat encounter when you're happy with the picks
- Compendium selection is remembered per-user across sessions
- Encounter Presets: save the current Party Level/Size/Difficulty, the full monster list (including per-monster Boss-ify/Minion settings), and the current Treasure Hoard plan (if one's been rolled) as a named, world-shared preset — Save As… / Load / Delete, right above the encounter list
Individual Treasure tab
- The 2024 DMG's smaller, separate "Individual Treasure" table: the incidental coin a single non-hoarding monster carries, as opposed to a full Treasure Hoard
- Rolled once per creature currently selected in the Encounter tab, summed into one purse — coins only (including electrum, which Treasure Hoard never rolls), fully editable afterward
- Search + manually add specific items from your own compendiums, on top of or instead of the rolled coins
- Filter the item browser by DMG-style category (Weapon, Armor, Ring, Rod, Wand, Wondrous Item, and more) — also available on the Treasure Hoard tab
- Customize…: turn any weapon or armor entry into a named magic find before it's materialized — see the dedicated section below
Treasure Hoard tab
- The 2024 DMG's detailed Treasure Hoard tables — coins, gems/art, and resolved magic items with real names, not a blind roll
- Coin formulas for all four CR tiers (0-4, 5-10, 11-16, 17+) are
cross-verified against independent sources and treated as confirmed; the
gems/magic-item band shape is a restructured (probability-preserving,
not row-by-row) approximation — see the confidence note in
treasure-tables.js - Hoard tier is based on party level, not monster CR — deliberate
choice, matches common practice among experienced DMs more closely than
strict RAW (see comments in
encounter-builder-app.js) - Loot Basis dropdown: "Tier (RAW)" (default, follows Party Level) or a
specific character level 1-20, which uses an opt-in homebrew table that
smooths out the DMG's 4 wide tier bands into a per-level curve —
magnitudes interpolated log-linearly, magic-item rarity mix interpolated
from the DMG's own "Magic Items Awarded by Level" table with a hard
floor (very rare impossible below level 5, legendary below level 11) —
see
smoothed-loot-tables.jsfor the full methodology - Reroll all magic items at once using your own hand-edited rarity counts, or 🎲 a single rolled item in place (same rarity, fresh pick, everything else in the plan left untouched)
- Search + add specific items from your own compendiums; rarity filter is ordered common→artifact, not alphabetically, and mundane (non-magical) gear is excluded from the loot browser entirely
- Creates a real Actor with real Items, placed as a hidden, non-combat token (never added to the Combat tracker — it doesn't fight)
Item Customize dialog
Available from any weapon or armor entry (rolled or manually added) in either the Individual Treasure or Treasure Hoard tab — turns a generic loot-list item into this encounter's specific magic find before it's materialized:
- Custom name and description — the description replaces the base item's text wholesale rather than appending to it
- A flat magic bonus (+1/+2/+3), correctly targeting
system.magicalBonusfor weapons/wands/rings/wondrous items vs. the differently-nestedsystem.armor.magicalBonusfor armor/shields (a real dnd5e schema quirk — using the wrong one is a silent no-op for AC). Never lets you accidentally downgrade an item that already has a higher bonus - Up to two extra damage types (weapons) or resistance types (armor) — each adds its own weapon damage-roll entry or armor Active Effect
- A Requires Attunement toggle
- Rarity auto-suggests from what you picked (each point of bonus, plus each extra damage/resistance type, counts as a rarity step; armor lands one step higher than a weapon with the same inputs, matching the real DMG's own asymmetry) but is always manually overridable — pick a different one and it sticks, even if you keep changing other fields
- The suggested name updates live as you pick options, right up until you type your own — then it stops overwriting you
- Homebrew throughout, clearly flagged as such in the dialog — not an official DMG magic item generator
Install (local dev)
- Clone this repo into your Foundry
Data/modules/folder asencounter-builder-2024(folder name MUST matchmodule.json'sid) - Enable it in a world under Settings > Manage Modules
- Open the Combat tab — a button labeled "Encounter Builder" appears
Releasing
- Bump
versioninmodule.json, commit - Tag and push:
git tag -a vX.Y.Z -m "..."thengit push origin master --tags - A GitHub Actions workflow (
.github/workflows/release.yml) automatically rewritesdownloadto point at this specific tag (see below), buildsmodule.zip(module.json, LICENSE, README.md, scripts/, styles/, templates/ — matches exactly what Foundry needs to run the module) and opens it as a draft release with the built assets attached - Write the real release notes and publish:
gh release edit vX.Y.Z --notes "..." --draft=false(or finish it in the GitHub web UI)
manifest and download serve different purposes and must NOT both
point at releases/latest: manifest should float there — it's the URL
Foundry re-fetches to check for updates, so it always needs to resolve to
whatever's newest. download is different: it lives inside one
specific version's manifest and must point at that SAME version's
module.zip, not "latest" — otherwise picking an older version from
Foundry's package browser (or an "Add Version" entry on the package admin
page) silently downloads whatever is currently newest instead of the
version you asked for. The committed module.json keeps download
pointing at releases/latest as a source-tree placeholder; the release
workflow rewrites it to releases/download/<tag> in the built artifacts
only, never committing that change back.
Status
Actively developed. See module.json for the compatibility range
(V13 minimum, tested against V13 and V14). Foundry-dependent code (canvas
placement, Actor/Item creation and mutation, the Boss-ify dialog app)
can't be unit-tested outside a live Foundry session — everything else (all
pure-logic scripts/*.js files, including the treasure/loot tables, the
smoothed-level math, and the Boss-ify/Minion-ify stat math) has been
checked with plain Node, and probability/gating claims are verified with
simulated rolls before being called done. The Minion stat table is
transcribed from MCDM's Flee, Mortals!; Boss-ify's tier percentages are
an original house rule, not sourced from any book.
Midi QoL compatibility: Boss-ify's and Minion-ify's damage scaling has
been live-verified against Midi QoL
(v13.0.64, Foundry v13.351, dnd5e 5.3.3) — Midi subclasses dnd5e's own
Activity classes rather than replacing them, so it reads the same scaled
damage data as a normal roll, including weapons with "Include Base
Damage" enabled. Both the dice-based Boss-ify scaling and Minion-ify's
fixed custom.formula damage rolled correctly through Midi's own
MidiAttackActivity class.
Support
This module is free and will stay free. If it saved you some prep time and you feel like buying me a coffee, that's always appreciated — but never expected: ko-fi.com/elmimage