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

Doesn't work with v9

Open cs96and opened this issue 4 years ago • 5 comments

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

cs96and avatar Oct 14 '21 20:10 cs96and

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.

CarlosFdez avatar Oct 16 '21 03:10 CarlosFdez

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.

BlitzKraig avatar Nov 24 '21 20:11 BlitzKraig

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

Tukurai avatar Dec 08 '21 01:12 Tukurai

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

SLinxTheFox avatar Dec 23 '21 04:12 SLinxTheFox

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

CarlosFdez avatar Dec 23 '21 07:12 CarlosFdez