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 Macro (Looking to replace vlaue below 3 with 3's ie Deadly sneak)

Looking to see if there is a way to replace a value on a die with another value. So in deadly sneak it says that you replace every 1 or 2 rolled on a sneak attack with a 3, is there a way to make the macro do that for me? Thank you in advance. :3
1466822369
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
{1d6, 3}kh1 should replace each 1d6 roll.
1466822969

Edited 1466823058
Wes
Pro
Sheet Author
Except Roll groupings can only compare  rolls or  numbers not a roll and a number. You can work around this by using a fake die roll.   Formula for 2d6 replacing rolled 1s and 2s with a 3: [[ {1d6,1d1+2}kh1 + {1d6,1d1+2}kh1 ]] Wiki Roll20: Grouped Rolls
1466823011
Pat S.
Forum Champion
Sheet Author
Scott C. said: {1d6, 3}kh1 should replace each 1d6 roll. That is the cleanest way ( keep highest roll ) but you can also just setup a  reroll on anything 2 or less: 1d6r<2
Just getting errors with that, please can you further explain the process, likes lets say this is the part of the code {{Damage= [[3d6+7]]}} and lets say all 1's and 2's are 3 due to a feat , how would you write that and explain how it works >.< thanks :3 
ok got it sorry was like reading it and just saw the new posts. Thanks alot guys :3 Super useful info, and the whole Keep Hihest Roll thing will come in handy :3 THANKS AGAIN! 
1466824275
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Yeah, sorry, forgot to put the roll expression in the second argument
1466824429
Wes
Pro
Sheet Author
Try This: {{Damage=[[ {3d6,1d1+8}kh1 + 7]] }} 3d6 == [Normal damage roll] 1d1+8 == [Roll Comparison that equals your Minimum Possible damage roll, due to your Feat] The Curly Braces Denote that this roll is a Grouping. The 2 rolls are seperated by a comma. kh1 == Keeps the Highest Value between the 2 rolls. Then your modifier of 7 is added. For Example:  You roll your damage dice and come up with a 4,2,1. Total of 7. That roll is then compared to the other roll in the grouping which is 1+8 total of 9. Then Macro then takes the Highest of the rolls and then adds your modifier of 7 for a total of 16 damage.
1466831018
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Wes said: Try This: {{Damage=[[ {3d6,1d1+8}kh1 + 7]] }} 3d6 == [Normal damage roll] 1d1+8 == [Roll Comparison that equals your Minimum Possible damage roll, due to your Feat] The Curly Braces Denote that this roll is a Grouping. The 2 rolls are seperated by a comma. kh1 == Keeps the Highest Value between the 2 rolls. Then your modifier of 7 is added. For Example:  You roll your damage dice and come up with a 4,2,1. Total of 7. That roll is then compared to the other roll in the grouping which is 1+8 total of 9. Then Macro then takes the Highest of the rolls and then adds your modifier of 7 for a total of 16 damage. You can't do the 3d6 all together because the feat replaces all 1's or 2's with a 3, so if you roll 3d6 and get 1, 6, and 6 the macro won't fire because 6+6+1 is still higher than 9, but with the feat this should have been converted into 6+6+3.
1466858301
Wes
Pro
Sheet Author
Doh, see how good I am at maths!
1466862826
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hey, I'm great at macros. Just look at my totally error free suggestion above. ;)
1466866378

Edited 1466866387
How about: [[ [[{1d6, 3d1}kh1]] + [[{1d6, 3d1}kh1]] + [[{1d6, 3d1}kh1]] ]]