multiroll damage roll messages
Messing with multiroll chat message in v10
8 Replies
demoing the 'edge cases' this supports
"Maximize Dice" + "Situational Bonus" + "Extra Critical Damage" + Deselecting one of the damage parts for this damage roll
slap a
total
on the bottom and you've got everything you used to have, and more.What does this do under the hood? Render the rolls individually, then combine into one message, or is it a custom template?
Looks like a good addition to Roll Groups. It already has separate damage lines so it could be easy to add this in
Easy isn't the right word here... From the demo with the checkboxes of the damage lines, that's something that Roll Groups has already. Seems like this just fits with RG
Ideally (and maybe subjectively), rolls with multiple damage.parts should be split like this automatically in the system.
Do agree it would fit with RG otherwise
And additionally ideally it would use the system's dropdown for applying damage/healing/temp, which would need that github issue solved...
Under the hood it creates one DamageRoll instance per part provided to a new dice class: DamageGroupRoll.
That internally looks very similar to DamageRoll, but basically just curates and manages this group of individual rolls.
In this POC I was using the roll.render method on each individual roll, then stitching them into one message
I did this with a branch in the system code, it could probably be its own module in the interim though, might not interfere with roll groups
Which issue is this?
Yeah ideally it'd allow each individual roll to be right clicked, as well as the total
For how I actually implemented this, the entry point is a method that has the exact same call signature as damageRoll. Or at least one that's really close. Need to review the diff again to be sure
Instead of combining the provided
parts
, I keep them separate for longer in the process, and allow the configure roll dialog to filter those parts further, if the user wants.
Long story short, roll groups would "just work" because all it does is curate which parts
make it into the appropriate method (iirc)