PDA

View Full Version : Damage message (with dice) - 5E



jkeller
December 15th, 2025, 16:36
In 5E, does anyone know what code creates the highlighted part of this message?

Thanks!

https://i.ibb.co/tMZc190T/2025-12-15-11-29-27-Fantasy-Grounds.png

jharp
December 15th, 2025, 16:41
To anyone blind like myself, the highlighted portion is on the right of the picture.
Jason

jkeller
December 15th, 2025, 16:44
Yep sorry - this part:

https://i.ibb.co/B5qQyCxY/2025-12-15-11-41-19-workspace-bot-src-fg-jpk-Crit-Damage-Options-extension-crit-damage-options-lua.png

Trenloe
December 15th, 2025, 17:01
Can you clarify please? Are you looking for the code that puts together the various dice dX and gX for a critical? Or are you looking for the code that just lists the dice in the chat dice result frame?

jkeller
December 15th, 2025, 17:45
I'm looking for the code that creates the text "header" in the panel that shows the roll results.

I'm developing an extension that supports various house rules for crit damage. For example, here's a crit roll with the "cascading" option - max die rolls grant another (smaller) die.

https://i.ibb.co/4ZWswhtj/2025-12-15-12-36-46-Fantasy-Grounds.png

To do this, I'm modifying the rRoll table (adding new clauses and new dice).

Ideally, the text would be something like "3d6+3g6+2x4+6". If it's purely cosmetic, I'm not too concerned since the dice icons are correct, and the total is correct. But, if the text means I'm not updating rRoll properly, then I'd like to fix it.

I *am* updating the rRoll.sDesc and rRoll.aDice.expr fields:
- [sDesc] string => [DAMAGE (M)] Vorpal Scimitar, +3 [CRITICAL] [TYPE: slashing,magic (3d6+6=22)] [TYPE: slashing,magic,critical (3d6=8)] [TYPE: slashing,magic,cascading (2d4=4)]
- [expr] string => 3d6+3g6+2x4

Moon Wizard
December 15th, 2025, 22:49
That portion of the roll output is driven by the rRoll.aDice.expr, which is passed into the Comm.throwDice call in ActionsManager.

Regards,
JPG