FoundryVTT-BetterRolls5e icon indicating copy to clipboard operation
FoundryVTT-BetterRolls5e copied to clipboard

Issue with ammunition

Open jacobgrieninger opened this issue 3 years ago • 7 comments

When I add ammunition consumption to an item and then try to roll, nothing will occur. If I remove the ammunition consumption it will roll, or if I disable better rolls and have the item consume ammo, it will roll and consume. Any suggestions?

jacobgrieninger avatar May 01 '22 20:05 jacobgrieninger

Hi! I encountered this bug aswell. Luckily, it's an easy fix. I made a pull request here: https://github.com/RedReign/FoundryVTT-BetterRolls5e/pull/378

But you can also find the entire scripts/custom-roll.js file here (bugfix included) if you don't want to wait for the next BetterRolls release: https://gitlab.com/-/snippets/2309757

Zakkon avatar May 01 '22 22:05 Zakkon

Thanks! Dragged and dropped this in and everything works. Guess we'll wait for an update

jacobgrieninger avatar May 01 '22 22:05 jacobgrieninger

@jacobgrieninger Are you able to reopen this for visibility for the devs, even though there is a workaround?

erlendaakre avatar May 02 '22 19:05 erlendaakre

Sure. Good idea

jacobgrieninger avatar May 02 '22 20:05 jacobgrieninger

I've submitted a pull request that fixes this issue and #380. I think my pull request is slightly "more correct" than @Zakkon 's #378 as it calls correctly calls updateEmbeddedDocuments

cs96and avatar May 15 '22 19:05 cs96and

This problem is still going. Thanks for the fix cs96and. It works perfectly with it.

123mind123 avatar Jun 10 '22 22:06 123mind123

here's the console error for this

helpers.mjs:428 Uncaught (in promise) Error: The provided data is not an object! [Detected 1 package: betterrolls5e] at isObjectEmpty (helpers.mjs:428) at CustomItemRoll.roll (custom-roll.js:705) at async CustomItemRoll.toMessage (custom-roll.js:824) isObjectEmpty @ helpers.mjs:428 roll @ custom-roll.js:705 Promise.then (async) 🎁call_wrapper @ libWrapper-wrapper.js:630 🎁CONFIG.Item.documentClass.prototype.roll#0 @ libWrapper-wrapper.js:189 _onItemRoll @ base.js:931 (anonymous) @ base.js:612 dispatch @ jquery.min.js:2 v.handle @ jquery.min.js:2

shecrio avatar Jun 30 '22 18:06 shecrio