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

Seemingly simple conditional macro

May 21 (4 years ago)

Edited May 21 (4 years ago)

My goal is for one of the following equations to occur:

If 3d6>10 then subtract 10 from the original (3d6) roll.

If 3d6>10 then divide original (3d6) roll by 2 and round down. 

So far I don't understand how to do it. 

May 22 (4 years ago)
GiGs
Pro
Sheet Author
API Scripter

Note: you have done > in both cases above, should they be different?

It doesnt matter though, because you cant do conditional branching in roll20 macros. 

There's no way to modify a roll based on that roll's value without using the API (a Pro subscriber perk). If your GM has Pro, a script could be written to do the above, but it's not as easy as creating a macro.


For really simple conditionals, you can sometimes fake it with roll20s keephighest and other functions, but this isnt one of those cases.

Could you use !hitormiss and $[[0]]?


May 26 (4 years ago)
GiGs
Pro
Sheet Author
API Scripter

OP isnt a pro user so i didnt suggest that, but if they were pro users hitormiss is one way to do it.

The $[[0]] trick wouldnt work because you cant do anything with the object, you cant halve it or subtract 10 from it.