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

advantage on initiative

1647338810

Edited 1647342369
Jon
Pro
I have set a player token action as: /me rolls for initiative! [[?{Initiative|Normal, 1d20 + @{Initiative_bonus} &{tracker}|Advantage, [[2d20kh1]] + @{Initiative_bonus} &{tracker}|Disadvantage, [[2d20dh1]] + @{Initiative_bonus} &{tracker}}]] ...what am I doing wrong?
1647342354

Edited 1647342429
At a glance, you have the d20's inside and outside of the rolls so they wind up being super mega advantages or maybe they aren't I dunno but there are definitely too many d20's being rolled.  Unless a player is poisoned or exhausted its very rare that you get a disadvantage initiative roll.  Just use the sheets advantage system for initiative and those 1 in 1000 times you have a disadvantage initiative just manually resolve it.  Its not worth the effort and added token actions clutter.  If you must use this button, I'd take the query outside the brackets so its not in a roll.  Then put the brackets on the inside in each option result.  Also you may have to escape the trackers bracket I do not remember if that counts as an attribute or not.  
I just noticed the spare d20 rolls.  We have a priest who can throw out advantage on initiative rolls and I was hoping for a faster system.
Thanks, thats useful, it's not coming up with an error anymore. I'm sort of using this to help understand the scripting generally. I'm now using /me rolls for initiative! ?{Initiative|Normal, [[1d20 + @{Initiative_bonus}|Advantage, [[2d20kh1 + @{Initiative_bonus}|Disadvantage, [[2d20dh1 + @{Initiative_bonus}}&{tracker}]] Which works... but confuses my maths brain alot.
Anything that is shared between all the rolls can be moved outside of the query: /me rolls for initiative! [[?{Initiative|Normal,1d20|Advantage,2d20kh1|Disadvantage,2d20dh1}+@{Initiative_bonus}&{tracker}]]
Jarren said: Anything that is shared between all the rolls can be moved outside of the query: /me rolls for initiative! [[?{Initiative|Normal,1d20|Advantage,2d20kh1|Disadvantage,2d20dh1}+@{Initiative_bonus}&{tracker}]] Isn't that against their order of operations?
DM Eddie said: Isn't that against their order of operations? <a href="https://wiki.roll20.net/Dice_Reference#Order_of_Operations" rel="nofollow">https://wiki.roll20.net/Dice_Reference#Order_of_Operations</a> Not for this example - if the initiative bonus was 2, you selected 'Advantage', and you got a 9 and 18 for your advantage roll it would resolve like this: [[?{Initiative|Normal,1d20|Advantage,2d20kh1|Disadvantage,2d20dh1}+@{Initiative_bonus}&amp;{tracker}]] 3. Attribute calls are resolved [[?{Initiative|Normal,1d20|Advantage,2d20kh1|Disadvantage,2d20dh1}+ 2 &amp;{tracker}]] 5. Roll queries are executed up to 99 levels deep&nbsp; [[ 2d20kh1 +3&amp;{tracker}]] 6. Inline rolls are executed, starting with the most deeply nested inline roll working upward.&nbsp; [[ ( 9+ 18) +2&amp;{tracker}]] [[ 18 +2&amp;{tracker}]] [[ 20 &amp;{tracker}]] I just tested it out and it works perfectly fine for me.