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

Help with doubles (and triples) in a roll template

Hi! I've started to run a CyberPunk RED campaign.  In this game when you are rolling for damage (Xd6) and you get double 6 you get to do a critical injury.  I've been looking in the forums but I can't find an answer. Is there a way to get a special message in the roll templates when you get doubles? They introduced a new optional rule about getting triples and adding effects to the injury, that would be great too. Thank you!
1636074403
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
I don't think this is going to be possible without either 1) the sheet supporting it and having logic in the roll template to support it, or 2) an API script
I'm editing my own sheet based on the cyberpunk-red-tabbed thats in the repository, so I can modify it but I don't know how to properly set up a template to do that. And if you know some API script that could help me please let me know. Thank you!
1636084115
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
If you are editing the sheet, the best way to do it is most likely via custom roll parsing. Then you could programmatically compare the results and output text to reflect the effect.
1636309278
Alan S.
Pro
Sheet Author
Here's a solution I came up with for a Forged in the Dark game (similar rule about double sixes) before custom roll parsing was introduced.  It doesn't actually report double-sixes, but it will add a message telling players to mouse-over their results to check when it's a possibility (when they rolled at least one six and rolled multiple dice). html roll button example: <button type="roll" value="&{template:bladesdice} {{rolltrait= Maneuver}} {{numdice= [[@{Maneuver}[Maneuver]+?{Modifier|0}[Modifier]]]}} {{result= [[[[@{Maneuver}+?{Modifier|0}]]d6kh1cf<3]]}} {{zeroroll= [[2d6kl1cf<3]]}}" name="roll_Maneuver"></button> html roll template: (relevant logic is in bold ) <rolltemplate class="sheet-rolltemplate-bladesdice">     <div class="sheet-template-container">     <h3>{{rolltrait}}</h3>     {{#rollGreater() numdice 0}}             {{#rollTotal() numdice 1}}                 <div>Rolling {{numdice}} die:</div>         {{/rollTotal() numdice 1}}         {{#^rollTotal() numdice 1}}                     <div>Rolling {{numdice}} dice:</div>                 {{/^rollTotal() numdice 1}}         <div>{{result}}</div>                 {{#rollLess() result 4}}                     <div><strong>Miss!</strong></div>                 {{/rollLess() result 4}}                 {{#rollBetween() result 4 5}}                     <div><strong>Weak Hit!</strong></div>                 {{/rollBetween() result 4 5}}                 {{#rollGreater() result 5}}                     <div><strong>Strong Hit!</strong></div>                     {{#rollGreater() numdice 1}}                         <div><small>Mouse over result to check for crit.</small></div>                     {{/rollGreater() numdice 1}}                 {{/rollGreater() result 5}}     {{/rollGreater() numdice 0}}     {{#rollLess() numdice 1}}             <div>Rolling {{numdice}} dice:</div>             <div>{{zeroroll}}</div>                 {{#rollLess() zeroroll 4}}                     <div><strong>Miss!</strong></div>                 {{/rollLess() zeroroll 4}}                 {{#rollBetween() zeroroll 4 5}}                     <div><strong>Weak Hit!</strong></div>                 {{/rollBetween() zeroroll 4 5}}                 {{#rollGreater() zeroroll 5}}                     <div><strong>Strong Hit!</strong></div>                 {{/rollGreater() zeroroll 5}}     {{/rollLess() numdice 1}} </div> </rolltemplate>