Skip to content

feat: add D&D 5.5e encounter difficulty system - #356

Open
CozKun wants to merge 1 commit into
Obsidian-TTRPG-Community:mainfrom
CozKun:agent/dnd-55e-encounter-difficulty
Open

feat: add D&D 5.5e encounter difficulty system#356
CozKun wants to merge 1 commit into
Obsidian-TTRPG-Community:mainfrom
CozKun:agent/dnd-55e-encounter-difficulty

Conversation

@CozKun

@CozKun CozKun commented Jul 21, 2026

Copy link
Copy Markdown

Summary

Add a separate D&D 5.5e RPG system for the revised encounter-building rules while leaving the existing D&D 5e system unchanged.

This is a focused, current-main follow-up to #323 by @Tarrayna. It preserves the original proposal's intent while correcting the revised threshold table and covering several edge cases. It intentionally excludes package, lockfile, version, changelog, and release-tooling changes.

Changes

  • Add the revised Low, Moderate, and High XP thresholds for character levels 1–20.
  • Calculate encounter difficulty from raw monster XP totals without creature-count multipliers.
  • Preserve explicit creature XP values of 0 instead of falling back to CR-derived XP.
  • Preserve bestiary XP lookup and CR-derived XP fallback when XP is absent.
  • Treat encounters without a valid party as Trivial instead of matching zero-valued High thresholds.
  • Map Low, Moderate, and High to the existing encounter UI color classes.
  • Reuse the existing CR-to-XP table rather than duplicating it.
  • Register the system in the existing enum-driven XP System dropdown as D&D 5.5e.

The threshold values come from the official revised XP Budget per Character table.

Compatibility

  • Existing D&D 5e calculations are unchanged.
  • Existing statblocks, creature XP values, bestiary lookup, CR fallback, and encounter UI remain supported.
  • Existing saved settings continue to use their current RPG system unless the new option is selected.

Validation

  • npm ci
  • npx tsc --project tsconfig.json --noEmit
  • npm run build
  • Runtime assertions for all 20 threshold rows, Low/Moderate/High boundaries, raw multi-creature XP, empty-party behavior, explicit xp: 0, and CR fallback
  • Manual testing in Obsidian, including encounter builder and tracker behavior

All checks passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant