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

elemental adept macro

In fifth edition dungeons and dragons there is a feat that among other things allows you to turn all 1s on a roll with many dice into 2s. I need a way to write an if 1 then 2 statement but after looking at the dice reference page the closest I got was if 1 then reroll. Help?
1552001038
The Aaron
Roll20 Production Team
API Scripter
There are two main ways to handle this: 1)  Rollable Table -- You can set up a rollable table with all the values of the die you need, but with no 1 and with 2 having a weight of 2. 2) Group statements -- you can use a formula of the type [[ {1d20, 2d1}kh1 ]] to give you a minimum of 2.
1552003032

Edited 1552003367
Okay here is my current macro: /roll {1d6,2d1,1d6,2d1,1d6,2d1,1d6,2d1,1d6,2d1,1d6,2d1,1d6,2d1,1d6,2d1}kh8. It isn't pretty but it rolls 8d6 and 1s are replaced with 2s. In this dungeons and dragons game in addition to being able to turn all 1s into 2s I can reroll four dice of my choosing every time I rolI and I always choose to reroll numbers that are 3 or lower. I found the reroll once section on the dice reference page and initially thought of doing something like: /roll {1d6ro<3,2d1,1d6ro<3,2d1,1d6<ro3,2d1,1d6<ro3,2d1,1d6,2d1,1d6,2d1,1d6,2d1,1d6,2d1}kh8 but the problem with this macro is that if these first four roll over 3 then I would have wasted my rerolls. Help?
I assume that my current structure will not allow me to implement this addition but I don't know how to restructure it to make it work.
1552004244

Edited 1552004557
The problem stated clearly: I am rolling 8 times There is a 50% chance any roll would prompt a reroll I can reroll a maximum of 4 times I can only reroll the original 8 rolls (no rerolling rerolls) If there aren't 4 original rolls that need a reroll all additional rerolls need to be wasted This needs to fit with one of the two provided if 1 then 2 statements
There are no if/then statements without getting into scripting. For your basic feat effect, you need /roll {1d6, 2d1}kh1  + {1d6, 2d1}kh1  + {1d6, 2d1}kh1  + {1d6, 2d1}kh1  + {1d6, 2d1}kh1  + {1d6, 2d1}kh1  + {1d6, 2d1}kh1  + {1d6, 2d1}kh1 Do your discretionary rerolls manually, perhaps with a macro button prompt.
1552047565
GiGs
Pro
Sheet Author
API Scripter
As you are a Pro user, if you are the GM you could do this with a script. The Power Cards API script might be able to do it - I'd ask in that thread. 
1552171796

Edited 1552171836
In case anyone might be interested... To solve this issue in my came, I use a modified version of Adept, where 1s are re-rolled.  My simple script example is: [[(?{Spell Slot Level|3})d10r<1 ]] or for cantrips with damage driven by caster level I use: [[[[ 1+floor((@{selected|level}+1)/6) ]]d8r<1 ]] The formulas are not exactly as the players describe the feat, but this is simple, and I believe more worthy of a feat use. Also, this solution does NOT require a Pro subscription. Cheers, Barry Smith