RedReign / FoundryVTT-BetterRolls5e

A module for modifying certain sheet functions on Foundry VTT Character sheets for D&D 5th Edition.
GNU General Public License v3.0
37 stars 67 forks source link

Doesn't work with v9 #335

Open cs96and opened 3 years ago

cs96and commented 3 years ago

Better rolls doesn't currently work with v9. When I try to roll an attack from a sheet I get the following error...

Dice roll evaluation failed: roll.dice is undefined.

image

CarlosFdez commented 3 years ago

I mean, V9 isn't really actually out yet (I haven't even installed it yet, I'd need to maintain a separate installation). That said something to keep in mind to see if there's a way to get dice info in a backwards compatible way.

BlitzKraig commented 3 years ago

All of the .roll() and .reroll() calls must be changed to .roll({async:false}) and .reroll({async:false}) respectively Tested on v9 and appears to be working. You may be looking to take advantage of async rolls, in which case this isn't the way to go of course, but it's a quick fix to get this particular part of v9 working.

This should be backwards compatible, since any older versions should ignore the argument.

Tukurai commented 2 years ago

As BlitzKraig mentioned, it has to do with the async default of foundry as of V9. You can indeed pass async:false to all .roll, .reroll and .evaluate calls in order to "fix" it. It is somewhat of a quick fix to get the module working at least. I've attached a fixed zip as a workaround. This works for me.

betterrolls5e.zip - async:false workaround

SLinxTheFox commented 2 years ago

says core version is set to V9, is this issue fixed?

CarlosFdez commented 2 years ago

Should be unless there's a bug, aka a use case I didn't cover.