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

Probably stupid question, but does using ChatSetAttr basically allow a workaround for the limitations of Reusing Rolls?

I haven't used ChatSetAttr yet, but I'm wondering, based on the way I read it, if it allows for the limitations of Reusing Rolls to be worked around? I'm thinking that, instead of having to keep everything in the same line (which is a requirement for the Reusing Rolls trick), I could have ChatSetAttr create an attribute in a macro - based on an attack roll, for example - and then I could call on that result later on in the macro without it having to be in the same line, such as if I wanted the macro to post the attack roll publicly, but then do further calculation based on that attack roll and post the results of that in a whisper to the GM. Additionally, since the Reusing Rolls trick doesn't allow the value to be used in any kind of calculation (it only allows it to be displayed again), I am thinking that if I made that value an attribute, then I could call on it in a formula, right? Again, I haven't used ChatSetAttr yet, so I could be misunderstanding how it works. Does this sound feasible to everyone else? Thanks
1599985921
GiGs
Pro
Sheet Author
API Scripter
No, unfortunately that wont work. When you run your macro, roll20 collects all the values for attributes listed in every part of the macro first, then it begins to process the macro So, chatsetattr can change an attribute value, but any following lines will use the attribute's value as it was before the macro started.
Damn, thanks for the response though. Appreciated, as always.
You should be able to do that using powercards though. Just set the rollID and reference the ID for any calculations you may wanna do afterwards.
Unfamiliar with those either. That may be a bit too much for me to try to get into to learn at this time, but thanks for the info. My brain is already getting clouded with all of this other Macro and API stuff I've been learning lately... LOL.