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

How to affect a non-targeted token/character?

I have a PC-type character set up (The Hunt) to track a couple of values that impact the party. Its token usually lives on a landing screen so that everyone sees it at the start of a session. This macro lives in its abilities and as a GM I use it to increase that value during the course of a session.  !token-mod --ids -M9f8y2q50y6lS-DCA_k --set bar3_value|?{Increase Hunt by|+0|+1|+2|+3|+4} Worked great until recently when I recently ran into a case when it would be great to pull another copy of The Hunt onto a different map; that is when I learned that token ids are unique to the token, not to the character. Additionally..while trouble shooting I found that this macro will increase the bar3 value of any selected token in addition to the one that matches the token id. How do I replace that token id with something that will work on a specific character without targeting it ? (Since its token usually lives off page.) Maybe its not even token-mod I should be using to do this. I appreciate any advice!
1592047334
Oosh
Sheet Author
API Scripter
I believe ChatSetAttr would be easiest way to change the value of an Attribute on the character sheet and be independent of which map you're on.
Okay so I just found that I could use the character_id (discovered via @{selected|character_id} in chat) instead of the token_id to do what I wanted. Oosh said: I believe ChatSetAttr would be easiest way to change the value of an Attribute on the character sheet and be independent of which map you're on. Thanks Oosh! I'll look into that as well. Maybe I can figure out how to keep it from impacting an accidentally selected additional tokens at the same time.
Oosh said: I believe ChatSetAttr would be easiest way to change the value of an Attribute on the character sheet and be independent of which map you're on. That was definitely the better way. I settled on: !setattr --silent --mod --name The Hunt --hunt|?{Increase Hunt by|+0|+1|+2|+3|+4} Thanks again Oosh!
1592049668
Oosh
Sheet Author
API Scripter
Nice one!