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 .
×
May your rolls be chill this holiday season!
Create a free account

Displaying 2 times the dice result, how to do ?

I have the following roll query {{Dice=[[1D6]]}} {{Dice+Modifier=_____ + formula with all modifiers}} For the _____, i would like to reuse Dice, but I don't know how to do ?{Dice} will ask for Dice input, @{Dice} is not an attribute of character Of course I could display only modifiers in the second bracket, but i would like to see the computation done on the chat
1612874026
David M.
Pro
API Scripter
To re-use the die rolls, you use the syntax $[[0]], $[[1]], etc., where the index of the roll is determined from the "inside-out", so $[[0]] is the most deeply nested roll. However, you can only treat the re-used roll as display text, so you can't do any math on it later. If you are ok with re-ordering your output, you can do the following &{template:default} {{Total=[[ [[1D6]]+3]] }} {{Base die Roll=$[[0]] }} or if you want to keep the order there is a trick when using a template to put the total roll in the beginning but outside of the double brackets, then display the re-used rolls, like this: &{template:default} [[ [[1D6]]+3]] {{Base die Roll=$[[0]] }} {{Total Roll=$[[1]] }}   
You rocks !! That is the perfect solution. Thanks a lot