Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Referencing roll results to an output on the same button

Working on a custom character sheet and wondering if anyone has an idea if this is possible and, if so, how one would go about it? To give an idea, I'd like all of the following to be done in one button press: Damage: 2d10+15 Crit: {DamageResult}*1.5 Not proper formatting, but hopefully that gets the idea across. Thank you for any insight on the matter
1672743107

Edited 1672743502
Gauss
Forum Champion
I don't know about custom character sheets but in a macro I'd write it like this:  Damage: $[[0.computed]] Crit: [[2d10+15]]*1.5 It would display the damage, and calculate the crit.  Note that they'd have to be on the same line in a macro. That can be achieved (while displaying them separately) via a line return command (%NEWLINE%) between the Damage and the Crit damage, or via a template.  Not sure if this is helpful to you or not, being for macros, but it might point you in the right direction. 
That's definitely something I can play around with and possibly work off of. Thanks a ton!
1672750785
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
This is possible but: Requires JavaScript. Has some limitations. A while ago, R20 released a char sheet feature called custom roll parsing . This uses an action button instead of a roll button, and triggers a sheetworker that you code into the sheet. The limitation is that you can easily display the damage*1.5, but the hover text for the crit value will just say something like 0 .
Mmm, seems lightly more complex that what I'm used to, but the documentation makes it plain enough. Thank you for the answer and resource, it's a great help!