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

D&D 5e (OGL Sheet) Elemental Adept Fire Bolt cantrip macro help

So I saw previous posts about elemental adept, and that the only way to make rolls see a nat1 rolled as a 2, was to do each line individually, so while a Fireball is 8d6, you instead have to do ({1d8,0d0+2}k1)+({1d8,0d0+2}k1)+({1d8,0d0+2}k1)+({1d8,0d0+2}k1)+({1d8,0d0+2}k1)+({1d8,0d0+2}k1)+({1d8,0d0+2}k1)+({1d8,0d0+2}k1) just to get the correct result. So I wanted to take this, and apply it to a cantrip, Fire Bolt [[round((@{level}+1)/6+0.5)d10]] I assumed incorrectly that all I'd have to do it substitute this in, so {round((@{level}+1)/6+0.5)d10,0d0+2}k1 however this was a syntax error. I thought maybe since the cantrip portion, which changes the xd was not enclosed, it was confusing the macro. {(round((@{level}+1)/6+0.5)d10),0d0+2}k1 that didnt work either. Maybe a different bracket? {{round((@{level}+1)/6+0.5)d10},0d0+2}k1 nope, last one I know of {[round((@{level}+1)/6+0.5)d10],0d0+2}k1. All of these are syntax errors. I dont know if it cant be done, or if i'm just doing it wrong, so looking for help.
Anyone have any idea on how to do this?
1525680347
Ziechael
Forum Champion
Sheet Author
API Scripter
You were close, there are a couple of ways to achieve this (i'll post as inline rolls to allow for specific use testing but simply remove the outer [[ ]] to add to a larger macro): [[ { [[ round((@{selected|level}+1)/6+0.5) ]]d10,0d0+2}k1 ]] Will allow you to hover and see the results of the x amount of d10s. [[ { [[ [[ round((@{selected|level}+1)/6+0.5) ]]d10 ]],2}k1 ]] Will prevent the need for including a 0d0 but will summarise the d10s into a single result with no breakdown available.
Make a rollable table, with even chances to produce 2, 2, 3, 4, 5, 6.  Then roll 8t(what ever you called your table)
1525764616

Edited 1525764796
Ziechael said: You were close, there are a couple of ways to achieve this (i'll post as inline rolls to allow for specific use testing but simply remove the outer [[ ]] to add to a larger macro): [[ { [[ round((@{selected|level}+1)/6+0.5) ]]d10,0d0+2}k1 ]] Will allow you to hover and see the results of the x amount of d10s. [[ { [[ [[ round((@{selected|level}+1)/6+0.5) ]]d10 ]],2}k1 ]] Will prevent the need for including a 0d0 but will summarise the d10s into a single result with no breakdown available. So I just tested both, the only thing I did differently was the selected|level I turned to base_level, since it currently doesnt have a token, yet. That being said, I tested out these macros you provided several times, the top and the bottom, both with and without the [[ ]]. What I found was it was still allowing Nat1's in instead of replacing them with a 2. Now, if its because I changed it from Selected|level to base_level, then I may need an explanation on how to incorporate the selected|level instead, but it does not seem to be quite working. As you can see, the 6,1 should be an 8 due to the 1 becoming a 2. Instead was a 7. The  3,2 somehow became a 3 instead. I can only assume that this means that only the first roll will change to a 2 if its rolled as a 1, but the second will be whatever is rolled, thus allowing the first number to be a minimum of a 2, and the second to be a 1, thus getting a 3.
AFAIK, the macros provided will only produce a 2, if the entire result of the other dice was less than 2, which means that you'll only get bumped to 2 if you only roll one dice and that comes up 1. So your first roll was 7 or 2, keep 1, which was 7 Your second roll was 3 or 2, keep 1, which was 3.
It was rolling 2d10 though, a 6 and a 1. The one should then be a 2, to make a total of 8 not 7. Same with the second, rolled a 3 and a 2, but somehow only got a 3 total instead of a 5?
Yes I know what you wanted it to be, I was commenting on what the code was actually doing. It seems to me you either have to use a roll-able table, with 2 occurring twice, or you have to use a query, which returns the right code for a specific quantity of adjusted dice.