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

Referencing previous dice rolls

Trying to make a macro for Dragon Age RPG. Every roll uses 3d6 but 1 of them is a special dice called the Dragon Die. Its result determines outcomes and sometimes needs to be added to damage rolls. So, the roll looks like: 1d6[DD] +2d6 But! on the next roll, I would like to add the value of the 1st die from the previous roll. 2d6+[DD] What would be the best way to write that?
1500947831
The Aaron
Pro
API Scripter
The only way to do it with pure macros would be to prompt in the second roll for it: Attack: [[ 1d6 [DD] + 2d6 ]] Damage: [[ 2d6 + ?{DD} ]] And you'd have to run them as two separate macros.  You could do this with a Custom Roll Template or with an API Script, but both required a Pro Level Subscription. 
Thank you! I love you!
1500985075
The Aaron
Pro
API Scripter
=D No worries. Happy Rolling!
Hey The Aaron, I had no idea this was possible.  How would you reference previous rolls with a roll template?
1501166941

Edited 1501166964
The Aaron
Pro
API Scripter
Hmmm.. I may have misspoken.  You can certainly access rolls in multiple places in a Roll Template, but you may be right to call attention to what I said as not strictly possible.  You'd probably have to have some construct like: &{template:something}{{bonus=[[1d6]]}} {{#rollTotal() bonus 1}}   [[1 [DD] + 2d6]] Attack   [[2d6 + 1 [DD] ]] Damage {{/rollTotal bonus 1}} {{#rollTotal() bonus 2}}   [[2 [DD] + 2d6]] Attack   [[2d6 + 2 [DD] ]] Damage {{/rollTotal bonus 2}} {{#rollTotal() bonus 3}}   [[3 [DD] + 2d6]] Attack   [[2d6 + 3 [DD] ]] Damage {{/rollTotal bonus 3}} {{#rollTotal() bonus 4}}   [[4 [DD] + 2d6]] Attack   [[2d6 + 4 [DD] ]] Damage {{/rollTotal bonus 4}} {{#rollTotal() bonus 5}}   [[5 [DD] + 2d6]] Attack   [[2d6 + 5 [DD] ]] Damage {{/rollTotal bonus 5}} {{#rollTotal() bonus 6}}   [[6 [DD] + 2d6]] Attack   [[2d6 + 6 [DD] ]] Damage {{/rollTotal bonus 6}} Probably fine for a 1d6, but tedious as you add more things you care about...
That's so cool. Thanks for scripting it. But it would only work in a Pro account, right? Now as a macro?
1501176613
Jakob
Sheet Author
API Scripter
The Aaron said: Hmmm.. I may have misspoken.  You can certainly access rolls in multiple places in a Roll Template, but you may be right to call attention to what I said as not strictly possible.  You'd probably have to have some construct like: &{template:something}{{bonus=[[1d6]]}} {{#rollTotal() bonus 1}}   [[1 [DD] + 2d6]] Attack   [[2d6 + 1 [DD] ]] Damage {{/rollTotal bonus 1}} {{#rollTotal() bonus 2}}   [[2 [DD] + 2d6]] Attack   [[2d6 + 2 [DD] ]] Damage {{/rollTotal bonus 2}} {{#rollTotal() bonus 3}}   [[3 [DD] + 2d6]] Attack   [[2d6 + 3 [DD] ]] Damage {{/rollTotal bonus 3}} {{#rollTotal() bonus 4}}   [[4 [DD] + 2d6]] Attack   [[2d6 + 4 [DD] ]] Damage {{/rollTotal bonus 4}} {{#rollTotal() bonus 5}}   [[5 [DD] + 2d6]] Attack   [[2d6 + 5 [DD] ]] Damage {{/rollTotal bonus 5}} {{#rollTotal() bonus 6}}   [[6 [DD] + 2d6]] Attack   [[2d6 + 6 [DD] ]] Damage {{/rollTotal bonus 6}} Probably fine for a 1d6, but tedious as you add more things you care about... It should be noted that you cannot hardcode dice rolls into a roll template. You would have to send all the dice rolls with the command every single time.
1501182293
The Aaron
Pro
API Scripter
Yeah.  Pro account required to play with it, and what I posted is by far not what I'd consider a workable solution, just a demonstration of what you might be able to do...