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

Trying for Macro: Roll 3d6 then list each combination of 2d6.

1787328124

Edited 1787328156
I am a complete noob to macros but I've been able to get by with a few simple ones. I am currently using a game system that sometimes uses 3d6, allowing you to use the most favorable combination of 2d6. I know there is a way to 'drop the lowest' but that it not always favorable in this system. I am just trying to make a button to Roll 3d6 and see every combination of 2d6 in order.
When you say 'combination', do you mean that you want to see the sum of each 2d6, or that you want to see each individual die roll paired together?  E.g. if you roll 3d6 and get a 1, 2, and 6 do you want to see: 3, 7, and 8 or 1 & 2, 1 & 6, 2 &6 or  1 & 2 = 3, 1 & 6 = 7, 2 & 6 = 8 I'm pretty sure that in any of those cases a Mod script is going to be required. The first one might  be possible with some obscure dice mechanics that RainbowEncoder can come up with, but that will also not likely be possible to be sorted. If you just want to see the three dice rolls paired together (but not summed or in order) then that can be done pretty easily. The hard part is you can't really do anything with an individual result and also use that individual result in other results using the standard Roll20 dice roller syntax. [[ [[1d6]] [[1d6]] [[1d6]] ]] = $[[0]] & $[[1]]; $[[0]] & $[[2]]; $[[1]] & $[[2]]
Thanks for the reply, specifically that first example.  Like if i roll a 1, 3, and 4 on my dice, I want to see: 7, 5, 4 Hopefully this is possible at all.
1787336055
Gauss
Forum Champion
You will most likely need an API Script (a Pro or Elite feature) for this.  While Roll20 can perform A+B it cannot then do A+C and B+C if A, B, and C are dice rolls.  That said, RainbowEncoder might see a way to do it, so I'll forward this to them and see what they come up with. (RainbowEncoder is from a different dimension where the rules are different.)
Guess I'm gonna try to learn a little html tonight, thanks for the help and wish me luck!
1787374469

Edited 1787374531
Gauss
Forum Champion
Scriptcards can do it, if you are going to go the API route I'd use that.&nbsp; The author of the Scriptcards API Script has created a Discord server where you can get help:&nbsp;<a href="https://discord.gg/c5BDbYjUrJ" rel="nofollow">https://discord.gg/c5BDbYjUrJ</a>
I thought this would require a (much) more complex technique but found a way to hide everything I needed between the gaps of precision &amp;{template:default} {{name= [[0]] [[0]] [[ round( [[ round([[ [[1d6]] * (1+2*10**-13) + [[1d6]] * (1+10**-14) + [[1d6]] * (2*10**-13 + 10**-14) ]] % 1 * 10**14) * 10**13 % (2*10**14-1) / 10**13 ]] %1 * 10**13) ]] }} {{Rolls=$[[2]] $[[3]] $[[4]]}} {{Combos=$[[5]] $[[7]] $[[6]]}} {{name}} The results aren't sorted just shown in A+B, A+C, B+C order. Ordering would require a much bigger and slower macro
1787419097
Gauss
Forum Champion
RainbowEncoder to the rescue :)
That's gonna work perfectly, thank you so much for the help!&nbsp;
You wouldn't happen to know if there's any way to get this to work with the little button I set up in an html character sheet? &lt;td&gt;&lt;button type="roll" value="MACRO DID NOT WORK HERE" name"roll_vitRollADV"&gt;ADV&lt;/button&gt;&lt;/td&gt;
1787680130

Edited 1787680166
Gauss
Forum Champion
If you are coding a new character sheet then this becomes an entirely different issue.&nbsp; This may be doable in different ways if you are making a character sheet template.&nbsp; I suggest posting in either the Character Sheet forum or the r/Roll20 Discord server's Coding-Charsheets channel.&nbsp; Forum:&nbsp; <a href="https://app.roll20.net/forum/category/277980" rel="nofollow">https://app.roll20.net/forum/category/277980</a> r/Roll20 Discord:&nbsp; <a href="https://discord.gg/GH5tM2xUA3" rel="nofollow">https://discord.gg/GH5tM2xUA3</a>
1787683254

Edited 1787683313
vÍnce
Pro
Sheet Author
Make sure there are no line breaks in RainbowEncoder's macro and it should work in your button. example; &lt;td&gt;&lt;button type="roll" value="&amp;{template:default} {{name= [[0]] [[0]] [[ round( [[ round([[ [[1d6]] * (1+2*10**-13) + [[1d6]] * (1+10**-14) + [[1d6]] * (2*10**-13 + 10**-14) ]] % 1 * 10**14) * 10**13 % (2*10**14-1) / 10**13 ]] %1 * 10**13) ]] }} {{Rolls=$[[2]] $[[3]] $[[4]]}} {{Combos=$[[5]] $[[7]] $[[6]]}} {{name}}" name"roll_vitRollADV"&gt;ADV&lt;/button&gt;&lt;/td&gt;
vÍnce said: Make sure there are no line breaks in RainbowEncoder's macro and it should work in your button. example; &lt;td&gt;&lt;button type="roll" value="&amp;{template:default} {{name= [[0]] [[0]] [[ round( [[ round([[ [[1d6]] * (1+2*10**-13) + [[1d6]] * (1+10**-14) + [[1d6]] * (2*10**-13 + 10**-14) ]] % 1 * 10**14) * 10**13 % (2*10**14-1) / 10**13 ]] %1 * 10**13) ]] }} {{Rolls=$[[2]] $[[3]] $[[4]]}} {{Combos=$[[5]] $[[7]] $[[6]]}} {{name}}" name"roll_vitRollADV"&gt;ADV&lt;/button&gt;&lt;/td&gt; Worked perfectly! Thank you so much!