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

[macro help] One roll for multiple things

1426629620

Edited 1426629707
I'm looking at Circle of Hands. Characters have their Offence and Deffence stats (simplification here). Attack is resolved in one 2d6 roll and than adding same roll to both stats. Is it possible in Roll20? I'm thinking of macro but can't find a way to do one roll applying to both seperate stats.
1426630240

Edited 1426630292
Ziechael
Forum Champion
Sheet Author
API Scripter
Rolls are one shot only... however you could do something like: /me Att: [[@{selected|attack}]] / Def: [[@{selected|defence}]] + [[2d6]] would give you your tokens attack and defence (you'd have to change their names to suit the character sheet used) plus the roll to add, some manual math would give you your numbers with little effort. Failing that, with mentor level status you could use the API which can call back rolls and reuse them...
Sounds like easiest solution. Thank you very much.
I actually resolve this with two macros. It'd be pretty quick and easy if you had two simple buttons that that you clicked in succession. For example: Macro #1 Stat Roll: [[2d6]] Macro #2 Attack: [[?{2d6 Result}+@{selected|attack}]] Defense: [[?{2d6 Result}+@{selected|defense}]]
1426636178
Ziechael
Forum Champion
Sheet Author
API Scripter
^^ would have been my second suggestion, i'm just too lazy to type the result of another roll into a query lol =D
1426640867
The Aaron
Pro
API Scripter
If you don't mind doing it with two macros and you're not using the turn tracker for initiative, you can actually use it as a limited memory storage area. You'd roll your 2d6 into the tracker, then reference it in the second macro to add to both skills. :). I posted about that somewhere a few months ago... =D
1426641993

Edited 1426642556
The Aaron
Pro
API Scripter
Another idea, depending on your threshold of math pain, is to play a bit with decimals.. Assuming your values are always positive and in a know range, you could do something like this: [[ ( @{attack} + ( @{defense} * .001 )) + ( 2d6 * 1.001 ) ]] Assuming attack of 5 and defense of 8, and a roll of 7, you'd have: ( 5 + ( 8 * .001) ) + ( 7 * 1.001 ) ( 5 .00 8 ) + ( 7 .00 7 ) 12 .0 15 For a 12 attack and 15 defense. It breaks down a bit if you have an even multiple of 10 as the insignificant 0 is truncated, but definitely doable and a single macro. =D Edit : You will have to deal with rounding errors on occasion... You can instead use something like this: [[ ( ( @{attack} * 1000 ) + @{defense} ) + ( 2d6 * 1001 ) ]] If you don't mind an intervening 0, and it fixes both those issues. ( ( 5 * 1000 ) + 8 ) + ( 7 * 1001 ) ( 5 00 8 + ( 7 00 7 ) 12 0 15 Tada!
You guys are amazing. I'll try all of your suggestions in a minute. Thank you so much.
1426700860
The Aaron
Pro
API Scripter
Cool, hope you find it useful!