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 .
×
May your rolls be merry + bright! 🎄
Create a free account

Can Macros change Character Attributes?

Howdy! I'm new to Roll20 and have a question about macros. I'd like to roll damage and then decrease HP by that amount, for an arbitrary token. Q1: Can we re-use values (like the result of the last die roll) in macros? Q2: Can macros change attributes? I know that I can do this with the API, and I have a Mentor subscription. I was just wondering whether it was possible doing macros... I'd say 75% of what I want to do is just doing a roll/calculation, and then adding or subtracting the result from an attribute. If there's a slick way to macro that, I'd rather do that than program API scripts. Thanks!
1401777772
Nibrodooh
Pro
Sheet Author
no, that sort of thing would require an api script called by a macro.
More specifically; the only value that the Macro system can store or modify is a Token's Turn Order, via the Tracker roll option &{tracker} (and even that value is write-only, you can't pull the value in as a variable) Otherwise, as Nobrodooh mention, Macros are entirely read-only.
1401820101
Lithl
Pro
Sheet Author
API Scripter
You can , however, re-use the value of a roll query. /roll ?{Num Dice|1}d4 + ?{Num Dice} will only ask you for "Num Dice" once.