Skip to content

fix: added hp support for legacy games#1397

Open
dmportella wants to merge 1 commit into
masterfrom
hp-legacy-fix
Open

fix: added hp support for legacy games#1397
dmportella wants to merge 1 commit into
masterfrom
hp-legacy-fix

Conversation

@dmportella

Copy link
Copy Markdown
Collaborator

Summary

Fix HP updates not working on Roll20 legacy game sheets by adding fallback detection for window.vttEngine === "legacy".

Type of change

  • 🐛 Bug fix (non-breaking change that fixes an issue)

⚠️ AI usage disclosure (required)

  • I did not use AI for this PR.

Motivation & context

Legacy Roll20 games don't have character.characterSheet set at all, so the existing check for ogl5e or dnd5e sheet short names never matched, causing HP updates to silently fail on legacy games.

What changed?

  • src/roll20/page-script.js: Added window.vttEngine === "legacy" as an additional condition in the character sheet check, falling back to the 2014 sheet handling for legacy games.

How to test

  1. Open a legacy Roll20 game
  2. Update a character's HP in D&D Beyond
  3. Verify the HP change appears correctly in Roll20

Reviewer notes

Legacy games have no characterSheet property at all, so there's no sheet version to check — the fallback to 2014 sheet logic is the safest default.

@dmportella dmportella marked this pull request as ready for review June 12, 2026 16:19
@dmportella dmportella self-assigned this Jun 12, 2026
@dmportella dmportella added the Roll 20 Anything related to Roll 20 label Jun 12, 2026
@dmportella dmportella added this to the 2.20.0 milestone Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Roll 20 Anything related to Roll 20

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant