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

Display a roll twice with a type of variable.

I would like to be able to make a macro that can display dice results twice. I made a macro that would roll inline that would look like this: Roll for flurry of blows: [4] + [2] = 6 The six being the two rolls added together. So maybe like: Command: Roll for flurry of blows: bar=[1d6], foo=[1d6]. Total is [[foo+bar]] Would output: Roll for flurry of blows: 4, 2. Total is 6 Does anyone know how to do this?
1603373786
Peter B.
Pro
Sheet Author
I asked this question before, and was told it wasn't possible without being a pro user <a href="https://app.roll20.net/forum/post/8349868/reuse-a-die-roll-multiple-times-in-an-output-text" rel="nofollow">https://app.roll20.net/forum/post/8349868/reuse-a-die-roll-multiple-times-in-an-output-text</a>
1603376404
Kraynic
Pro
Sheet Author
As long as you don't want to do further math with them, but just display individual rolls within a macro, there is a quirky way to get it to show.&nbsp; As mentioned in the Stupid Roll20 Tricks thread, we don't know if this is intended and if the behavior will stick around: <a href="https://app.roll20.net/forum/post/5899495/stupid-roll20-tricks-and-some-clever-ones/?pageforid=8747581#post-8747581" rel="nofollow">https://app.roll20.net/forum/post/5899495/stupid-roll20-tricks-and-some-clever-ones/?pageforid=8747581#post-8747581</a> And another one that might be of interest: <a href="https://app.roll20.net/forum/post/5899495/stupid-roll20-tricks-and-some-clever-ones/?pageforid=9091003#post-9091003" rel="nofollow">https://app.roll20.net/forum/post/5899495/stupid-roll20-tricks-and-some-clever-ones/?pageforid=9091003#post-9091003</a> The first post of that thread is an index.&nbsp; I think there are 5 entries for reusing rolls in some way or another.&nbsp; You might want to check them all out.
1603378890

Edited 1603378987
David M.
Pro
API Scripter
An example of what Kraynic mentioned. The rolls in this case are hidden from the template because not within double brackets. There are three inline rolls here, indexed from the deepest level outward, so $[[0]] and $[[1]] reference the interior d6's, and $[[2]] references the cumulative roll. Sometimes, the ordering within a given level is a mystery. In that case, you would have to play with it to see which roll gets which index. Note that you can't perform math operations on the roll references, so $[[0]]+$[[1]] doesn't work. It would just displays the text 1+6 if we tried it on the rolls below.&nbsp; &amp;{template:default} {{name=Example}} [[ [[1d6]] + [[1d6]] ]] {{Total roll= $[[2]] }} {{Individual rolls=$[[0]], $[[1]]}} EDIT - could have also done it without the "hidden" rolls outside of the brackets, in this case: &amp;{template:default} {{name=Example}} {{Total roll= [[ [[1d6]] + [[1d6]] ]] }} {{Individual rolls=$[[0]], $[[1]]}}
1603420920
GiGs
Pro
Sheet Author
API Scripter
Peter B. said: I asked this question before, and was told it wasn't possible without being a pro user <a href="https://app.roll20.net/forum/post/8349868/reuse-a-die-roll-multiple-times-in-an-output-text" rel="nofollow">https://app.roll20.net/forum/post/8349868/reuse-a-die-roll-multiple-times-in-an-output-text</a> The information you were given was correct back then. The Reusing Rolls method posted above by Kraynic and david was discovered after your post. It's very new, and likely a result of a bug, where information is being exposed in the roll20 interface that wasnt accessible before. Hopefully it won't get fixed, because it really is very useful.
Thanks a lot. This helped me very much. I wonder when Roll20 will implement this into their normal app.