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 .
×

Macro help needed: Calculate extra success based on lower attribute value

I have the following macro that adds two attributes to create the target number, rolls xd20 against it and displays the number of successes. This works fine.  /roll ?{Number of Dice|2}d20<?{target|[[@{attribute1}+@{attribute2}]]} Now I want to add a condition that displays an extra success for each die result that is equal to or lower than the lower of the two attributes. Is there a simple way to do this? Many thanks in advance!
1557580042
GiGs
Pro
Sheet Author
API Scripter
If you want to compare the dice roll to both the total or the two attributes, and the lower of the two attributes, I have bad news for you. It can't be done without a pro subscriber perk (API scripting). If you want to compare the roll to just the lower of the two, instead of the total of the two, that can be done.  By the way, does that macro you showed actually work? This part  ?{target|[[@{attribute1}+@{attribute2}]]} seems to be incorrect syntax to me, I think that should be /roll ?{Number of Dice|2}d20<[[@{target|foe|attribute1}+@{target|foe|attribute2}]] Rolling against the lowest of the two attributes would be /roll ?{Number of Dice|2}d20<[[{@{target|foe|attribute1},@{target|foe|attribute2}}kl1]]
1557580788

Edited 1557580940
Ah, that's unfortunate. Thanks for that. It needs to be both, unfortunately and I don't have Pro access. We'll just have to look at the results to see if there is an extra success then. This is the syntax I use that works: /roll ?{Number of Dice|2}d20<?{target|[[@{Daring}+@{Cunning}]]} 
1557581873

Edited 1557582020
GiGs
Pro
Sheet Author
API Scripter
Are you sure that's doing what it's supposed to be doing? The syntax is definitely wrong. When I try that it pops up a text entry box in place of the target selector, which is then ignored in the output. It doesnt prompt to choose a target. The total for the target number is calculated from the source characters stats, not the target character. That might be intended, but it's an accident that it works at all - the ?{target|} part in your macro should be removed if that's the case. It's not actually doing anything except causing a popup to appear that isn't used. Try the version I posted: /roll ?{Number of Dice|2}d20<[[@{target|foe|Cunning}+@{target|foe|Daring}]]  or a bit shorter /roll ?{Number of Dice|2}d20<[[@{target|Cunning}+@{target|Daring}]]  If it's an ability and you intend to use the acting character's stats, this is the proper syntax /roll ?{Number of Dice|2}d20<[[@{Cunning}+@{Daring}]]  And selected is an alternative to using target, like so /roll ?{Number of Dice|2}d20<[[@{selected|Cunning}+@{selected|Daring}]] 
It seems to work for me... and it is an ability of the source character testing against its own stats. I've just clicked through the second prompt that contains the two values (I fiddled the macro together from various codes I found...). Your solution circumvents that so is more elegant. Many thanks for the suggestions! 
1557589037
GiGs
Pro
Sheet Author
API Scripter
You're welcome!