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 .
×
Advertisement Create a free account

How to subtract 2 from Selected|Intelligence in an attribute macro?

1465286896
Gold
Forum Champion
Hopefully a simple macro question, I just don't recall how to write this simple subtraction math into an Attribute macro. Here's what I have that already works nicely, My character has Intelligence Score @{Selected|Intelligence}. How can I make this show the Intelligence Score Minus 2?  Something like this example, My character currently has a reduced Intelligence Score of @{Selected|Intelligence MINUS 2}. I don't want to modify the Intelligence Score attribute on the Character, I just want to make a Chat Macro that calculates their INT -2 and prints the result in the chat.
1465287921
Ziechael
Forum Champion
Sheet Author
API Scripter
It will add the inline formatting which I'm assuming you are trying to avoid otherwise you'd have done this off the bat but for completions sake: My character currently has a reduced Intelligence Score of [[@{Selected|Intelligence}-2]].
1465308032
Silvyre
Forum Champion
If you're wanting to avoid the yellow Inline Roll box (and are not using a Roll Template that mitigates it), you could use PowerCards ' [TXT] feature: !power --!|My character currently has a reduced Intelligence Score of [[ [TXT] @{selected|intelligence} - 2 + 0d0 ]].
1465350043
Gold
Forum Champion
Thank you both. I used the Ziecheal inline-rolling way. That is what I needed.  (I'm using Color-Emote API with this, but not Power Cards). The only thing that messed up is where some Characters have a special notation in their Strength or Intelligence like 18(76) or 16/18.  In those cases the macro kind of did some funny math, like taking the slash as a division I think.  No big deal though. I realized the way to fix this would be to standardize the Values that are in their attribute fields, and move their special notations to another field.