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 for summing success out of multiples rolls.

Hello guys ! I've tryed to find throught the forum but I couldn't find the answer, so sorry if the question already been asked. I'm trying to do a macro that will roll the sum of 2 attributes and calculate the number of success out of it. Let's say I've got a character that have 4 in strenght and 3 in Dexterity, I'm going to roll 7d10 and I want to know how many success I will get (Let's say a success would be 7 or more) What i've been doing is setting up attribute (strengh & Dex) and going for a macro. /r {@{Dex}+@{Str}}>7 But it just won't work. From what I can understand, I'm not supposed to put the >7 on more than one roll.. But then how would I do that properly ?
1584990151

Edited 1584990358
Ziechael
Forum Champion
Sheet Author
API Scripter
You are close: /r (@{Dex}+@{Str})d10>7
Oh.. thanks, I'll try this out :)
That's super neat ! Works like a charm, thank you. Now I'd like to go even deeper.. I've setted up a roll query that hold all the attribute. As in my games, player often need to roll a couple of attribute at once (like Stamina + strenght, for exemple). So the query make the player choose 2 attributs between all of them and roll them with the same formula you gave me. Now, I would like the maccro to also say in emote what attribute has been rolled. Since those attribute are under the ?{ | |} balisa, I can't put simply a name on the emote, how could I do that ?
1584993706
Ziechael
Forum Champion
Sheet Author
API Scripter
Adding in the emote will complicate things somewhat. Your basic selection macro would look like: /r (?{Attribute 1|Strength,@{Str}|Dexterity,@{Dex}|Stamina,@{Sta}} + ?{Attribute 2|Strength,@{Str}|Dexterity,@{Dex}|Stamina,@{Sta}})d10>7 With the emote labelling you'll need to get into the realm of html replacement characters because of the need to change the label value at that point and have the rest of the macro nested in it... trust me, it's a headache! What you could  do is label your rolls as part of the macro: /r (?{Attribute 1|Strength,@{Str} [Strength] |Dexterity,@{Dex} [Dexterity] |Stamina,@{Sta} [Stamina] } + ?{Attribute 2|Strength,@{Str} [Strength] |Dexterity,@{Dex} [Dexterity] |Stamina,@{Sta} [Stamina] })d10>7
1584994721

Edited 1584994953
And labels to those maccro would be seen in chat? Edit : I've just followed this syntax and here is the outcome : rolling (4 [Intelligence] +4 )d10>8 (4+4) =  8 So, basically, the label just unallow the d10 to proc..
1584998500
Ziechael
Forum Champion
Sheet Author
API Scripter
Huh, how odd... it does seem to break it, this works but you have to hover over the number of dice rolled to see the tags: /r [[ ?{Attribute 1|Strength,@{Str} [Strength]|Dexterity,@{Dex} [Dexterity]|Stamina,@{Sta} [Stamina]} + ?{Attribute 2|Strength,@{Str} [Strength]|Dexterity,@{Dex} [Dexterity]|Stamina,@{Sta} [Stamina]} ]] d10>7
1585003657
GiGs
Pro
Sheet Author
API Scripter
Try removing the spaces between the stat and the tag, @{Str} [Strength] I'm not sure if this'll work, but i seem to remember this problem being related to spaces somehow.
1585003840
Ziechael
Forum Champion
Sheet Author
API Scripter
It doesn't, tried every iteration... for some reason tags break () groupings but not [[]] ones.
1585003913
GiGs
Pro
Sheet Author
API Scripter
Weird. Thanks for trying.
1585004118
The Aaron
Roll20 Production Team
API Scripter
It's probably because of where the d10 is at the end. You get: @{Str} [Strength]d10>7 Try putting the tag in front. 
1585004427

Edited 1585004468
Ziechael
Forum Champion
Sheet Author
API Scripter
One iteration I hadn't tried but nope, no joy :( /r and () groups do NOT like tags lol Inline grouping works fine but isn't as useful for the OP out of the box.
Yeah.. Seems I won't get a solution for that ^^ nvm, that would have been polishing anyway. Thanks for all your replys !
1585163594

Edited 1585166063
Hey ! Coming to you for help again ;D So here is my actualy macro : /r (?{Attribut 1|Intelligence,@{Olwen|Int} |Force Mentale,@{Olwen|FM} |Astuce,@{Olwen|Ast} |Charisme,@{Olwen|Cha} |Manipulation,@{Olwen|Man} |Sang froid,@{Olwen|SF} |Force,@{Olwen|Vig} |Robustesse,@{Olwen|Robu} |Dextérité,@{Olwen|Dex} } +?{Attribut 2|Intelligence,@{Olwen|Int} |Force Mentale,@{Olwen|FM} |Astuce,@{Olwen|Ast} |Charisme,@{Olwen|Cha} |Manipulation,@{Olwen|Man} |Sang froid,@{Olwen|SF} |Force,@{Olwen|Vig} |Robustesse,@{Olwen|Robu} |Dextérité,@{Olwen|Dex} })d10>8 And everything is working like a charm. Thing is, I would like it to explode, but as soon as I put the "!" next to the d10, It won't show success anymore. Any suggestions?
1585167134

Edited 1585167182
Kraynic
Pro
Sheet Author
If you are rolling multiple exploding dice, I think you need to put your entire dice calculation before the >8 inside curly brackets.  See if this works: /r {(?{Attribut 1|Intelligence,@{Olwen|Int} |Force Mentale,@{Olwen|FM} |Astuce,@{Olwen|Ast} |Charisme,@{Olwen|Cha} |Manipulation,@{Olwen|Man} |Sang froid,@{Olwen|SF} |Force,@{Olwen|Vig} |Robustesse,@{Olwen|Robu} |Dextérité,@{Olwen|Dex} } +?{Attribut 2|Intelligence,@{Olwen|Int} |Force Mentale,@{Olwen|FM} |Astuce,@{Olwen|Ast} |Charisme,@{Olwen|Cha} |Manipulation,@{Olwen|Man} |Sang froid,@{Olwen|SF} |Force,@{Olwen|Vig} |Robustesse,@{Olwen|Robu} |Dextérité,@{Olwen|Dex} })d10}>8 If that doesn't work for you, hopefully someone else has a suggestion!
Thanks for the reply, it works perfectly :)