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

[D&D5E] ChatSetAttr - Having multiple attributes modified by single input

I wish to inquire if it's at all possible to have ChatSetAttr set the value of several attributes with a single input As it is currently, a normal example of ChatSet is: !setattr  --charid @{player|character_id} --silent --att1|value1 --att2|value2 (example): !setattr  --charid @{Vergil|character_id} --silent --HP||250 --temp_HP|250 You can also do [[1d4]] in the input sections as well if you want it to change to something unique. However, say you want a single [[1d4]] roll to affect multiple attributes, say --hp and --temp_hp, if I run --hp|[[1d4]] --temp_hp|[[1d4]], Both may have differing results. What I want to know is, can you make it so that one [[1d4]] can affect multiple attributes? say ie --hp&temp_hp|[[1d4]], and both hp and temp_hp share the result of the singular 1d4?
1728879931
timmaugh
Pro
API Scripter
Yes. You'll need to re-use rolls . !setattr  --charid @{Vergil|character_id} --silent --hp |[[1d4]] --temp_HP|$[[0]]
timmaugh said: Yes. You'll need to re-use rolls . !setattr  --charid @{Vergil|character_id} --silent --hp |[[1d4]] --temp_HP|$[[0]] I appear to be struggling with this, as when I did the example above (using test attributes (current and max), this is the result: !setattr --charid @{Vergil|character_id} --silent --Test|[[1d4]] --Test||$[[0]] @Test    2    |    $[[0]] I tried this in both the character sheets Macros and in the VTT Chatbar, both had the same result