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

Struggling to understand why this macro is behaving this way

1670141655
Ying O.
Plus
Marketplace Creator
This is an elemental Adept Macro, which doesn't usually behave incorrectly, however, It's behaving weirdly right now. 2+2+3+5+6=18 (which is correct) 5+6+2+5+6=24 not 26 The macro seems to be adding 2 to the roll if it does not use any of the d2 rolls but it shouldn't be doing that...?
1670150719

Edited 1670151279
I may be completely misunderstanding this (that's my get out of jail free played), but 4d2r1 will re-roll any 1s, so that second entry looks good to me, although it will keep rolling d2s until it doesn't get 1s.  If you only want it to re-roll once then use ro1... if that's what you want though?? so, assuming D&D 5e by Roll20 character sheet I have [[4d6+4d2ro1k4]]+@{selected|intelligence_mod}
Judging by the kh4 you're wanting to roll 4d6 but treat 1's as 2's. To do so you need to use {braces} rather than (parenthesises). So your damage dice should be {4d6+4d2r1}kh4 As for what is currently happening: The kh4 after the parenthesis causes the rest of the roll to be treated as a comment. It's effectively doing 4d6+2+2+2+2 and not including the +6[int]. The reason the first example seems correct is because when you roll precisely two 1's the +8 from the 4d2 'corrects' the 1's and lack of +6[int].
1670188384

Edited 1670226656
Ignore the waffle about ro - I hadn't checked elemental adept before chucking in my two penneth ,but The Aaron also gives a nice way of doing this via rollable tables "the way to handle this in Roll20 is by creating a Rollable Table with the values 2345678, where each is weighted as 1, except for 2, which is weighted 2"  for a d6 obviously you would amend this to 23456.  If you called the table EA6 for Elemental Adept using a d6 then the inline roll would be [[ 4t[EA6] +@{selected|intelligence_mod} ]]  or if going in the damage section on attacks and spellcasting, leave out the @{selected bit and just choose INT as the attribute
1670376461
Ying O.
Plus
Marketplace Creator
RainbowEncoder said: Judging by the kh4 you're wanting to roll 4d6 but treat 1's as 2's. To do so you need to use {braces} rather than (parenthesises). So your damage dice should be {4d6+4d2r1}kh4 As for what is currently happening: The kh4 after the parenthesis causes the rest of the roll to be treated as a comment. It's effectively doing 4d6+2+2+2+2 and not including the +6[int]. The reason the first example seems correct is because when you roll precisely two 1's the +8 from the 4d2 'corrects' the 1's and lack of +6[int]. Thank you so much, I had no Idea there was a different used for braces, solved the issue 100%