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

Trying to make a simple macro...

But I am rather obtuse >.> I need a macro that rolls an extra d6 when a 6 is rolled, but subtracts 4 from the total when a 1 is rolled, on a d6. I can get the first part accomplished with a /roll 2d6! but is it possible to get the last half?
1564504822
GiGs
Pro
Sheet Author
API Scripter
The only way to do that would be to have a custom API script.  If you only ever roll one extra die on a 6, you could do it with a rollable table, having numbers 2-5 each having a weight of 6, and 7 (6+1), 8 (6+2), 9 (6+3), etc each having a weight of 1.   You'd then have a value of -3 instead of 1, with a weight of 6. If you can roll up more than one time, you can still do it, working out the needed weights, but it gets clunky, and you have to deice what the maximum number of dice you'll calculate the table for. You can use rollable tables like dice in macros, with 1t[table-name] for 1 roll, and /roll 1t[table-name] +3 will do a pseudo-dice roll.
Unfortunately it's not a single extra d6, if the bonus d6 rolls a 6 it adds another d6. So on and so forth...
1564507922
Kraynic
Pro
Sheet Author
That would just be exploding dice, right?&nbsp; You might want to check out the dice reference page of the wiki.&nbsp;&nbsp;<a href="https://wiki.roll20.net/Dice_Reference#Exploding_Dice" rel="nofollow">https://wiki.roll20.net/Dice_Reference#Exploding_Dice</a>
1564509830
GiGs
Pro
Sheet Author
API Scripter
Kraynic, the tricky part is handling the special result on 1, along with the exploding dice,&nbsp;
1564513656
Kraynic
Pro
Sheet Author
Well, I have to admit I don't know a way to do that automatically in a macro.&nbsp; However, if you do this as an inline roll: [[2d6!]] You will get a green outline if you have had at least one 6, but have not gotten a 1 on a following roll.&nbsp; You will get the result outlined in blue, if you got a 6 and then a 1 somewhere in the roll.&nbsp; And you will have a red outline if you just rolled a 1 with no 6s.&nbsp; While it isn't calculated for you, I would think the color code would be enough of a work around to just subtract 4 from the total if you get a result with a border that isn't green.&nbsp; It is pretty simple math, though maybe that is something I would be fine dealing with, but others wouldn't.
1564513969

Edited 1564514144
Finderski
Pro
Sheet Author
Compendium Curator
Kraynic said: Well, I have to admit I don't know a way to do that automatically in a macro.&nbsp; However, if you do this as an inline roll: [[2d6!]] You will get a green outline if you have had at least one 6, but have not gotten a 1 on a following roll.&nbsp; You will get the result outlined in blue, if you got a 6 and then a 1 somewhere in the roll.&nbsp; And you will have a red outline if you just rolled a 1 with no 6s.&nbsp; While it isn't calculated for you, I would think the color code would be enough of a work around to just subtract 4 from the total if you get a result with a border that isn't green.&nbsp; It is pretty simple math, though maybe that is something I would be fine dealing with, but others wouldn't. If multiple dice are involved, you may have to hover over the roll to see roll values, because subtracting 4 may not be enough, if more than one die came up 1... Edit: here's an example of what Kraynic was talking about: And here's what I was talking about with the Hover over the roll (in this case, I'm hovering over the 16):
Yeah, inline rolls are what I normally use. I was only saying /roll 2d6! as with no way to auto-subtract 4 from any 1 result, it's easier to just see any 1 showing and work from there. I was hoping it it would be easier if it was possible to automate it I could skip that step. I do appreciate yall looking into all this with me though. :-)