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

A Macro that reuses a Roll

Hello I have a small question but I could not find the answer by my own Research. I did find that using the API can do this. However I want something that if possible works for non pro users as well. I am also willing to accept that the user may has to push a second button and put in values from previous roles themselves if its easy and obvious. (If it cant be automated, someone half asleep should still be able to do it ;) ) The thing I want to build is the following: (This is for the Shadowrun System, the Action is Agent assisted Decking) Roll 12d6>5 dice with a Success limit that I can put in as a value, then the Successes(within the Limit) from that roll will be added to a second Roll where the user again puts in a variable value (Previous Successes + Additional Dice)d6>5 against a limit as high as the Previous one. Any help is greatly appreciated.
1746743559
Gauss
Forum Champion
Hi Hi-Fi,  If you use a template you can hold it all in a single calculation then call elements of that calculation.  Example:  &{template:default} {{name=Shadowrun test}} [[{([[{12d6>5,?{Success Limit?}}kl1]]+?{Additional Dice})d6>5,?{Success Limit?}}kl1]] {{Successes #1=$[[0]]}} {{Successes #2=$[[1]]}} Note, this is not tested and is based on my incomplete understanding of what you want.  If you can go into greater detail of what is your variables etc that would help. For example, it seems like the success limit is a maximum value of the number of successes. Such as rolling 5 successes but 4 successes is the limit. However, perhaps I misunderstood and what you really meant was the success threshold (ie: >5). 
1746745090

Edited 1746745361
Hi Gaus, thanks for the Reply. To help you understand a bit better. In Shadowrun you roll d6 dice in a poll, the number of dice according to your skill (mostly), a 5 or 6 is a Success. Rolls normally have limits in Shadowrun 5e which is the relevant edition here, meaning that because of for example how good your gear is or how skilled your character this, that there is a Maximum of how many Success you can actually use. In this case because the Action is to have a little helper, called an Agent, assist you in an action we need to add the Limit to determine the maximum of Dice it can add to the next roll, and because the limit is determined by the action itself, the same limit applies to the second roll as well. The second roll then being the character performing the actual action with their own dice pool plus the success the agent achieved before. I hope this clears things up :)  Also right now the macro produces nothing as far as I can tell :)
1746747134

Edited 1746747200
Gauss
Forum Champion
Here you go:  &{template:default} {{name=Shadowrun test}} [[{[[([[{[[12d6>5]],?{Success Limit?}}kl1]]+?{Additional Dice})d6>5]],?{Success Limit?}}kl1]] {{Successes #1=$[[1]]}} {{Successes #2=$[[3]]}} Rename the name and the successes as desired. If you want to see what is being rolled you can add the following to the above:  {{rolls #1=$[[0]]}} {{rolls #2=$[[2]]}} Let me know if you'd like me to explain the elements. 
1746761602
Pat
Pro
API Scripter
The one way - the ONE WAY and I'm not sure it still works - for Macro users to "store" and "recall" a number later that I found was using the turn order to store a value. This can foul with the turn order if you're using it, but ... as far as I could tell at the time - it was the only way I found to store a value when not using mods/api. 
1746773219

Edited 1746775541
Thank you Gauss, that works perfectly, just as I need for this case! Thank you very much! I do have realized that there is one more thing here, I forgot and a friend reminded me of it. The Second rolls limit will be one higher than the Previous Limit. So if the the first roll had a limit set of 2 the next roll (with the added dice from the first) has a limit of 3. Can we add that as well? Sorry Pat, but this Template Trick does seem to actually do work, at least as far as I need it. Thank you for the Interest though. 
I modified it a little bit, I think it works.  &{template:default} {{name=Shadowrun test}} [[{[[([[{[[12d6>5]],?{Success Limit?}}kl1]]+?{Additional Dice})d6>5]],?{Success Limit?} +1 }kl1]] {{Successes #1=$[[1]]}} {{Successes #2=$[[3]]}}