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

The macro to treat a rolled number as something else

Hey there people, so i have a question for a macro as the title states. Im playing an only war game and have found myself always operating a Sentinel Walker and there is this thing called proven (3). The damage roll is 5d10 but the rules with proven is that any 1 or 2 rolled by any of the d10 is treated as a 3. I would appreciate it if someone can get me the macro to help ease the process rather than look at the numbers rolled and modifying the damage. Thanks!
1501514110

Edited 1501514165
The Aaron
Pro
API Scripter
The easiest way to handle that is with a  Rollable Table .  Create one with the numbers 3 through 10.  Weight 3 with a weight of 3 and everything else with a weight of 1.  Assuming you named the table d10min3, this would be how you'd roll it: [[ 5t[d10min3] ]] or /roll 5t[d10min3] You'll get the correct weighted output that way.
This is possible to accomplish, but it is going to require a rework of your macro. Instead of being able to specify [[5d10]], you will need to make look at each roll individually and add them together, e.g. [[1d10+1d10+1d10+1d10+1d10]]. You can take a look at each roll individually, and if the roll is less than 3, substitute the roll for a 3 like so {1d10, 3+0d0}kh1. The +0d0 is necessary when comparing a die roll (1d10) to a flat number (3). If both sides were flat numbers the +0d0 would not be necessary. So now we can add this calculation back into your macro for each die roll. [[{1d10, 3+0d0}kh1+{1d10, 3+0d0}kh1+{1d10, 3+0d0}kh1+{1d10, 3+0d0}kh1+{1d10, 3+0d0}kh1]]
The fast responses are very much appreciated! I will be exploring both options to see which will suit me better! Thanks!