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

Issue Modifying rtype on r1

I am trying to use rtype to output a roll that has r1 as 2d20k1 and r2 as 2d20k1 aswell.  So when I use it I'd like it to output like advantage usually does, but each of the 2 rolls selects the highest of 2d20. I'm very ignorant on the language/syntax on the 5gOGL sheet. I tried to use an edit intended to simulate elven accuracy and experiment to find the first roll to no success. {{query=1}} ?{Advantage?|Normal Roll,&#123&#123normal=1&#125&#125 &#123&#123r2=[[0d20|Advantage,&#123&#123advantage=1&#125&#125 &#123&#123r2=[[2d20k1|Elven Accuracy,&#123&#123advantage=1&#125&#125 &#123&#123r2=[[2d20k1|Disadvantage,&#123&#123disadvantage=1&#125&#125 &#123&#123r2=[[1d20} How can I change this to output so that it affects the first roll of the two? I know I can change the 2d20k1 to 3d20k1 to simulate the best of 4 rolls, but I need each roll to be the best of 2. Thanks for any time and help rendered.
1599533618

Edited 1599534197
Oosh
Sheet Author
API Scripter
@{rtype} doesn't modify {{r1}}, as there is always at least one roll. @{d20} modifies your base d20 roll, and I think is now called everywhere on the sheet for both {{r1}} and {{r2}}. This effects, ability rolls, attacks and saves. So you can either modify the particular abilities that need the super duper advantage to use @{d20adv}, then create that Attribute as 2d20k1, or you can modify @{d20} then change it back, which is a pain without API. If it's a permanent change, that's easy - just edit @{d20} and leave it. You could modify @{rtype} to overwrite the first roll by adding {{r1=[[2d20k1]]}} to it, but you'd need to manually add a modifier to it - none of the sheet macros will be able to do this. It would also be unreliable, as it wouldn't work if the calling macro has its {{r1}} field after the @{rtype} call.