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 .
×

Needing help with a difficult Macro

Hello, sorry to bother you but i need a hand to write a macro for my game. Basically it has to roll 2 dice that will be added together with a modifier (like 1d8+1d10+2) for the hit chance and then take the higher roll between the two for adding a modifier (like a +10) for the damage. How can i write something like that? I know that is probably very easy but i'm not too familiar with the system. Thank you in advance.
Macros that need to use numbers twice can actually be quite complex since there isn't an easy way to do so. This should do what you want &{template:default} {{Attack=$[[5.computed]]}} [[0]] {{Damage=$[[$[[7]].computed]]}} [[[2[{{ ] - floor([[ [[(?{Attack Mod|2}) + [[([ ][[1d8 +(?{Damage Mod|10})]]-(?{Damage Mod}))*(1+10**-14)]] + [[([ ][[1d10+(?{Damage Mod})]]-(?{Damage Mod}))*(1-10**-14) + 10**-12 [ ] ]] ]] ]]%1 * 10**12) }}]]] It works comparing tiny numbers that don't display in the chat except in the tooltip