MangoFVTT / fvtt-ready-set-roll-5e

A module for faster, easier, and more dynamic rolling in the D&D 5th Edition system for Foundry VTT.
GNU General Public License v3.0
38 stars 18 forks source link

[BUG] Cards for diceless damage rolls are not initially displayed when Dice So Nice is enabled #476

Open ScoflWorks opened 1 month ago

ScoflWorks commented 1 month ago

Description (Compatibility issue with Dice So Nice 4.6.10)

When rolling an item with a damage formula that has no dice (such as the spell Heroism's healing formula being @mod), RSR's item card and damage roll are not displayed in chat, and an error is thrown in the console. Items with diceless damage formulas but with attack rolls are not affected. Damage enrichers are also unaffected (when "Enable Content on Vanilla Rolls" is enabled).

When using the item with vanilla rolls by holding Alt, the damage button works as expected. But when "Enable Content on Vanilla Rolls" is enabled, the damage button causes the card to disappear and the same error is thrown in the console.

If the browser is refreshed, all of these non-displaying cards reappear. Using inspect element on chat when the cards fail to display reveals that they are all still hidden because of the rsr-hide class.

If DSN's "Enable 3D Dice" is disabled, an error is still thrown in the console, but the cards are nevertheless displayed. This issue does not occur when either module is disabled.

Steps to Reproduce

  1. Set RSR's "Roll Damage Manually" setting to "Never" and enable DSN's "Enable 3D Dice"
  2. Using a character/NPC sheet, use an item that has no attack roll and a damage formula without dice (e.g. Heroism)
  3. See that no chat card appears
  4. Open console and see an error has been thrown

image

Versions

Other Modules

Notes I am unsure whether this is a DSN or RSR issue, though I suspect it being a DSN issue. Presumably the card is not initially displayed because RSR hides the card until the DSN dice resolve, but is interrupted from unhiding it because of the error being thrown?

Regardless, I am reporting this issue here just in case it is an RSR issue. I am hesitant to report it on DSN at the moment because the current newest version (5.0.5) is still incompatible with RSR, and this issue does not occur when using DSN 5.0.5 and RSR 3.1.4 (but the 3D dice also aren't rolled in the first place).

For those also having this issue in their games, changing the formula to consist of d1s rather than being purely numerical seems to prevent this issue from happening (e.g. change Heroism's damage formula from @mod to (@mod)d1).

MangoFVTT commented 1 month ago

This is likely tied to #472 but since it is so detailed (thanks for that btw) I'm keeping it open until that is fixed so I can see if this still occurs.,