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

Make calculations in macro ?

Hi everyone, I have some characters with a lot of infos, some of them are auto-calculated by theirs sheets. I want to do a macro that tell me (the GM) all of thoses infos. I have thoses calculated numbers that my macro can't seem to calculate. For example : Physical evasion is (DEF+ADDEDDEF)/5, DEF and ADDEDDEF are attributes. I started with this, it give me the numbers but doesn't calcule it : /w gm {@{selected|DEF}+@{selected|ADDEDDEF}}/5 What it gives me:  {5+9}/5 What do i do wrong? Also, i can select some variables from my character sheet for my bars wich are not in my attributes, can i call them for my macro too?
There's no roll involved so no math. Put the whisper in curly brackets to do calculations. /w gm [[ {@{selected|DEF}+@{selected|ADDEDDEF}}/5 ]] What you can select depends on the sheet you're using, though all the data in the sheets is ultimately stored in Attributes.  If there isn't an attribute with the data ( or attributes containing what the value is derived from ), then there's probably nothing to call.
1443188158
Lithl
Pro
Sheet Author
API Scripter
You need parentheses, not brackets, around the sum: [[(@{selected|DEF}+@{selected|ADDEDDEF})/5]]