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

Help: Need help with targeting and roll result subtraction.

Hey, everyone. Having a bit of trouble getting my head around how I subtract a certain value, from a roll result using @{target|Attribute}. Basically, what I want to achieve is the player is able to press the macro button, the macro rolls 1D20, and then subtracts the attribute from the result of the roll. For example, in this case if the result from the roll is 10, I want the macro to automatically subtract the attribute from 10, and show the result. Sorry, if that does not make much sense, but any help would be appreciated.
1409190331

Edited 1409190447
[[1d20 - @{target|Attribute}]] or /roll 1d20 - @{target|Attribute} as long as the targeted token is linked to a character sheet with the specified attribute assigned to it there should be no issues.
I keep getting a error when using the macro, "No attribute was found for targeted token by the name of DT". ["DT" being the attribute.] The obvious answer would be I don't have DT set an attribute, except that I do, and it does the same for all the other attributes too.
1409208492
The Aaron
Roll20 Production Team
API Scripter
Are you certain the token you are targeting (clicking on) represents a character, and one that has that attribute? Represents must be set on the token, it is not sufficient that the character has the token set as it's token. Double click the token and make sure it has the expected value for represents.
1409208738

Edited 1409208805
Ahh. Now I feel like an idiot. For some reason, the token I was using to test was one of the only token's of it's kind that was not linked to a character sheet. Thanks guys .
Everyone stumbles over that topic at some point or another. I'll save Phnord the trouble and link the wiki article for it: <a href="https://wiki.roll20.net/Linking_Tokens_to_Journals" rel="nofollow">https://wiki.roll20.net/Linking_Tokens_to_Journals</a>