Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Homebrew monster damage values carried over to another monster #1118

Open
lplayer12893 opened this issue Apr 30, 2024 · 5 comments
Open

Homebrew monster damage values carried over to another monster #1118

lplayer12893 opened this issue Apr 30, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@lplayer12893
Copy link

All of the following is done in the dndbeyond Combat Tracker.
When I select my homebrew monster (an NPC very similar to a drow mage) which has a Staff attack with one and two-handed damage values, then select another monster (a shadow demon which the NPC can summon) WITHOUT selecting the 'X' icon to close the first sheet, then the damage done by the second monster's attack is replaced with the damages from the first monster (the shadow demon's 2d6+3 becomes 1d6-1, and its 4d6+3 becomes 1d6-8). The attached images are what is displayed when the homebrew NPC is selected, when the shadow demon is selected without closing ('X') the NPC, and when the shadow demon is selected when you do close ('X') the NPC first. Finally, a short output from the browser console after the NPC and shadow demon were selected (w/o closing the NPC).
beyond20_bug1
beyond20_bug2
beyond20_bug3
beyond20_bug4

The problem also occurs using a non-homebrew drow mage with the shadow demon.

Browser:

  • Firefox 125.0.2

Beyond20 Version(s):

  • 2.9.2 and 2.9.1, untested with earlier versions
@lplayer12893 lplayer12893 added the bug Something isn't working label Apr 30, 2024
@jtbg
Copy link

jtbg commented May 1, 2024

Confirmed as reproducible. It's not consistent, though. I'll try to figure out what specifically about the monsters/encounters triggers it

simplescreenrecorder-2024-05-01_02.20.49.mp4

@jtbg
Copy link

jtbg commented May 1, 2024

looks like this occurs whenever you switch

  • from a statblock whose first-listed Action has a negative damage modifier eg 1d8 - 1

  • to a stat block whose first-listed action has any damage roll listed (ie, the first-listed action can't be Multiattack or something else without a damage roll)

@kakaroto
Copy link
Owner

kakaroto commented May 1, 2024

Hi,
Unfortunately, that's not a Beyond20 bug, but a DDB bug. When you switch tabs, it doesn't remove the statblock and put the new statblock in.. it looks like (likely for optimization reasons), it instead replaces the stats in the statblock and removes/edits the action texts, so as soon as Beyond20 modifies it (by adding the roll button), the ddb code can't find the blocks to edit and leaves them unmodified. You also get the issue between some other monsters where you'd get an action/attack from one monster remaining in the statblock of another monster which doesn't have that attack at all.
One use case I found last week is if you have a Ghoul and a Beholder in the same encounter, the "random" digital dice button to roll for the beholder eye rays will change from a 1d4 or whatever, into a 1d20 + 5 when you switch from the ghoul to the beholder.
I think the only solution for this might be that if we detect the statblock changed, we force the complete removal of the statblock and re-creation of it (by emulating clicking twice on the monster name to hide/show the statblock).
I'll need to test how we could achieve that and if it would work.
Ideally, DDB would fix the bug from their side.

@jtbg
Copy link

jtbg commented May 3, 2024

The fact that it only occurs with negative damage modifiers is what has me curious. Possibly a regex that is looking for \u002d but some statblocks send \u2212 (or vice versa)?

@kakaroto
Copy link
Owner

kakaroto commented May 4, 2024

The fact that it only occurs with negative damage modifiers is what has me curious. Possibly a regex that is looking for \u002d but some statblocks send \u2212 (or vice versa)?

yeah, that's weird, I never noticed something that triggers that bug, unless maybe two statblocks are similar enough that DDB modifies the html instead of replacing it. To investigate!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants