Rolling Hooks

Aarbron7/27/2022
Rolling Hooks!
I am working on a couple of additions to one of the upcoming version of 5e to add hooks to all of the system's rolling functions with the intention of allowing modules to fully customize these systems without having to wrap any methods. I welcome an eye on this from any module developers who work on modules that modify or respond to rolling behavior in 5e. Here are the three PRs with the changes:
https://github.com/foundryvtt/dnd5e/pull/1670
https://github.com/foundryvtt/dnd5e/pull/1662
https://github.com/foundryvtt/dnd5e/pull/1671
Ccalego7/27/2022
Giving things a look as I can, probably can't actually test these but I can at least point things out in the PRs
UUUnknown User8/1/2022
2 Messages Not Public
Sign In & Join Server To View
Aarbron8/1/2022
What specifically were you thinking?
UUUnknown User8/1/2022
2 Messages Not Public
Sign In & Join Server To View
Aarbron8/1/2022
Well, the first one was easy enough
Aarbron8/1/2022
๐Ÿ˜ฎ
Aarbron8/1/2022
Is there an issue for adding an origin flag to templates? If not, why not throw one up so I have something to point to ๐Ÿ˜‡
UUUnknown User8/1/2022
Message Not Public
Sign In & Join Server To View
Aarbron8/1/2022
Whelp, it seems like MeasuredTemplateDocument doesn't like getting passed flags
Aarbron8/1/2022
But you can set them after it is created, odd
Aarbron8/1/2022
Hmm, it doesn't accept a flattened key for some reason
UUUnknown User8/1/2022
2 Messages Not Public
Sign In & Join Server To View
Aarbron8/1/2022
We are calling new MeasuredTemplateDocument(tempateData), so I'm not sure what the issue might be
Aarbron8/1/2022
Looks like the constructor doesn't take flattened objects, but the create method does
UUUnknown User8/1/2022
2 Messages Not Public
Sign In & Join Server To View
Aarbron8/1/2022
The hit die ones are in another PR: https://github.com/foundryvtt/dnd5e/pull/1670
Aarbron8/1/2022
No pre rest hook at the moment, but it could be added
UUUnknown User8/1/2022
2 Messages Not Public
Sign In & Join Server To View
Aarbron8/1/2022
Sure, that will remind me
Ccalego8/1/2022
this has some minor problems same as chatMessages which outlive their consumable items.
Ccalego8/1/2022
scroll of fireball for instance
Ccalego8/1/2022
speaking of wishlists, idk if you've already done this or not but including the spellLevel as a flag on the created chatcard is a very useful thing, so consumers (including the system itself) don't have to parse the DOM to get the spell level of an upcast spell (when rolling damage)
Ccalego8/1/2022
that's probably a different task though
UUUnknown User8/3/2022
2 Messages Not Public
Sign In & Join Server To View
Wwasp8/5/2022
A bit late to the party, but THANK GOD for the preRollHitDie additions, this will make my life so much easier in Rest Recovery โค๏ธ
Aarbron8/9/2022
Hooks have been merged! Hopefully there will be a new alpha branch soon so everyone can start testing them ๐Ÿ™‚
UUUnknown User8/9/2022
Message Not Public
Sign In & Join Server To View