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

Save a roll result to variable

Hello, I'm running a Shadowrun game, and for combat intiative, you only roll at the beginning of a Round. Then, after each Initiative pass, the current Initiative value is reduced by 10. The Round ends when every character has an Initiative of 0. With the new &{tracker} feature, I can manage the initial Initiative really easily (thanks roll20 team!) but I'm trying to figure out if I could create a Macro that could automatically decrease a selected token's current Initiative value in the tracker by 10. Re-rolling with a lower value is easy, but getting the current value (that was determined by a dice roll) and substracting from it is a problem. It seems to me the only way would be to save the roll to a variable (or Attribute, I guess) after the initial roll, and then grabbing that value when substracting, but that does not seem to be possible right now, or am I missing something? Is there a way to do this, or is substracting 10 by hand in the tracker the only way to go right now?
1380075530
Lithl
Pro
Sheet Author
API Scripter
There's not way to get exactly what you're asking for without resorting to the API (which requires that the person who created the campaign has a Mentor subscription). However, the dice roller is capable of doing math. So, for example, start the round with /r d100+15 &{tracker} . You put up an initiative of 42. You can reduce it by 10 by putting in /r 32 &{tracker} . It's not automatic or some generalized macro you can write, but it's faster than clicking around in the turn order window. You could create a macro with the body /r ?{Init} &{tracker} . When you hit the macro, it'll ask you for an input value, which will be rolled and put into the turn order. When you hit the macro again, you can type the previous result minus 10.
Thanks, Brian! I figured the API would be the place to go for that, sadly I can't afford Mentor level Subscription right now. I'll definitely give the second option a try - it seems at least easier to handle than typing it in each time by hand. Thanks again for the quick reply! You guys are amazing.
This seemed to be a very frequent request for Shadowrun players, so I pushed out a new feature to address it: <a href="https://app.roll20.net/forum/post/361734/#post-363829" rel="nofollow">https://app.roll20.net/forum/post/361734/#post-363829</a>
1380120244

Edited 1380120263
Oh, wow! Thanks so much, Riley!