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

Modified roll + "cs" against the natural roll

1631046832

Edited 1631046863
Grinning Gecko
Pro
Sheet Author
I'm trying to send a dice roll to a template. Essentially I want to say "roll d20 and add the strike bonus, critical is on a natural 18+". I've tried a number of things but they just won't work: Sends the right total to the roll template, but doesn't indicate a critical on 18+: {{strikeroll=[[ [[d20cs>18]]+@{strike} ]]}} {{strikeroll=[[ [[d20+@{strike}]]cs>(18-@{strike}) ]]}} Indicates a critical on 18+ but sends `strike` value as text: {{strikeroll=[[d20cs>18]]+@{strike}}} Sends everything including and after "cs" as text: {{strikeroll=[[d20+@{strike}]]cs>(18-@{strike})}} Suggestions?
Try {{strikeroll=[[d20cs>18+@{strike}]]}}
RainbowEncoder said: Try {{strikeroll=[[d20cs>18+@{strike}]]}} Perfect! Thanks!
1631047627

Edited 1631047667
Kraynic
Pro
Sheet Author
Using the double brackets causes what is in between to be resolved to a number.  Using nested double square brackets means that whatever is in the inner set will be resolved to a number before being used in the outer calculation. Basically, your very first one will work if you remove the brackets around the roll itself.  It generates the crit there, but then that is stripped out before hitting chat, because it is being used in another calculation.  Crit fail/success colors will only be generated for dice that are in the outer or last to be processed part of the roll. [[d20cs>18+@{strike}]] If you want people to be able to set the cs value, then you can use an attribute call in place of the 18. Edit: And I took way too long to reply it seems!