Coder Social home page Coder Social logo

Comments (5)

jtbg avatar jtbg commented on September 4, 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

from beyond20.

jtbg avatar jtbg commented on September 4, 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)

from beyond20.

kakaroto avatar kakaroto commented on September 4, 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.

from beyond20.

jtbg avatar jtbg commented on September 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)?

from beyond20.

kakaroto avatar kakaroto commented on September 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!

from beyond20.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.