| Latest version | 2.2.1 |
|---|---|
| Minimum Core | |
| Compatible Core | |
| Last updated | 6 days ago |
| Created | 1 month ago |
| Authors | |
| Languages |
English |
| Systems |
Dnd5e |
| Project source | Project URL |
Encounter Forge is a Foundry VTT (v12) module for D&D 5e that builds brand-new, balanced NPCs on demand, sized to your party, not a generic XP table or basic CR.
Instead of pulling a stat block from a compendium and hoping the CR math works out, Encounter Forge assembles a creature from a chassis, traits, actions, and (optionally) spells, then tunes its HP, AC, and damage so the resulting encounter actually lands at the difficulty you asked for.
Most CR generators (and most homebrew stat blocks) work backwards from the Dungeon Master's Guide CR/XP tables: pick a CR, look up its "expected" HP and damage, and build (or pull) a creature around those numbers. The problem is that those tables assume a "standard" party, and most parties aren't standard. A CR 5 monster can be a joke or a TPK depending on who's sitting at the table.
Encounter Forge flips that process around:
In short: a "Hard" fight with two generated enemies and a "Hard" fight with four generated enemies should both feel like a Hard fight for your specific table, just split up differently. That's not something CR-table-driven generators do well enough, because they're matching a number on a chart, not your party, and not by output.
Encounter Forge contains no AI, no language model, and no network calls of any kind. Every creature is assembled procedurally from local JSON content pools (chassis archetypes, traits, actions, spells, names) using deterministic math you can read in plain JavaScript. There's nothing to configure, no API key, no tokens, no internet connection required (other than being online to play obviously), and no data ever leaves your machine. Generation is instant and fully reproducible from the same inputs (though actions, traits, etc are randomizes via the pool of said items, so that differs or fights would be boring).
This section is a summary, see the Wiki for the full breakdown with worked examples.
A party estimate is { dpr, hp }:
Each difficulty maps to a target "rounds to defeat the enemy" and "rounds the enemy needs to threaten the party":
| Difficulty | Rounds to Defeat | Rounds to Threaten | Outlook |
|---|---|---|---|
| Easy | 2 | 6 | Easy |
| Medium | 3 | 5.4 | Manageable |
| Hard | 4 | 4.4 | Risky |
| Deadly | 5 | 3.5 | Dangerous |
groupHP = party.dpr * roundsToDefeat
groupDPR = (party.hp / roundsToThreaten) * economyFactor
economyFactor is a small multiplier (1 + 0.04 * (enemyCount - 1), capped at 1.2) that accounts for more attackers contributing slightly more total damage per round. Both totals are then divided by the enemy count to get each creature's HP/DPR target. Solo Boss further multiplies its single creature's targets by HP x1.5 / DPR x1.3.
The per-creature HP/DPR target is matched against a CR baseline table to find the closest CR. That CR drives only the chassis stat tier, trait/action/spell availability, and AC/save-DC baseline, it is not the creature's final HP or DPR.
Every generated creature is then tuned to hit its envelope target exactly:
The result: the pre-generation readout and the post-generation results should track closely, regardless of party size, level, enemy count, or Solo Boss status.
A world setting (`combatIntensity`, integer -3 to +3, default 0) scales the `roundsToThreaten` target before the envelope is computed:
adjustedRoundsToThreaten = roundsToThreaten / (1 + offset * 0.12)
Positive offset = shorter drain time = enemies built to hit harder. Negative = longer drain = softer enemies. roundsToDefeat is never changed. Set from Module Settings -> Combat Intensity Calibration; changes take effect immediately for the next generation.
In Foundry's Add-on Modules tab, click Install Module.
Paste the manifest URL:
https://github.com/ElemorSeru/encounter-forge/releases/latest/download/module.json
Enable GM Tools: Encounter Forge in your world's module list.
Or find it on the Foundry package list: https://github.com/ElemorSeru/encounter-forge/releases/latest/download/module.json
Add your own homebrew feats, weapons, and spells to the randomization pools without editing JSON:
See the Wiki for the full field-by-field reference.
Encounter Forge exposes game.modules.get("encounter-forge").api with generate(), openDialog(), and openDialogFor(overrides) for generating creatures from your own module, plus encounterForge.generationStarted, encounterForge.creatureCreated, and encounterForge.encounterComplete hooks for reacting to generation.
The API also exposes exportCustomContent() and importCustomContent(payload), the same machinery behind the Custom Content manager's Export/Import buttons. If your module ships its own bestiary, item pack, or homebrew content, you can bundle an Encounter Forge content pack (JSON) alongside it and call importCustomContent() to drop those traits, actions, and spells straight into the randomization pools, no manual setup for the GM. This works well both ways: a lore/compendium module can feed Encounter Forge new content, and Encounter Forge's openDialogFor() can hand a freshly generated NPC straight back to that module's UI.
If you're building a module that could pair well with Encounter Forge, feel free to reach out, I'd be happy to help with integration or cross-promote.
Full API reference, options tables, hook payloads, and code samples live in the Wiki.
To install this package, open your Foundry Setup screen and navigate to your Module tab and click the Install Module button.
From there, you can either search for the package unique name: encounter-forge or copy its manifest URL:
And paste it to the input box at the bottom of your window.

You can install this package directly to your Forge account.