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

Calling Values from Multiple Tokens?

Hi All, Here is what I am trying to do: Bar 1 values from Token A, Token B, Token C, through Token n go to Character Sheet 1 and get added together to make up Bar 1 on Token 1 (which is associated with a Character Sheet 1).  Token A, Token B, Token C, through Token n have no character sheets associated with them.  Using the “selected” function is too tedious for what I am trying to do, because there could be dozens of tokens involved. Is this even possible without API? Is it possible with API? If Token A, Token B, Token C, through Token  n had character sheets would it be possible? (not an ideal solution but workable) Thanks in advance for any tips or advice!
1647853757

Edited 1647855897
Ziechael
Forum Champion
Sheet Author
API Scripter
You won't be able to set any values without the API, at the very least you'll need something like tokenMod in order to set the values on CS1's token bars with something like: ! token - mod - - set bar1_value | [[@{target|A|bar1} + @{target|B|bar1} + @{target|C|bar1}]] --ids @{selected|token_id} With the desired token (CS1's token) selected you'll get a prompt to select each other token to sum the bars of... of course that is a simplistic example for A through C. For a variable amount of token bars to add you'd need to make it a query with n  amount of options! ! [[?{Source Tokens|1,@{target|A|bar1}|2,@{target|A|bar1} + @{target|B|bar1}|3,@{target|A|bar1} + @{target|B|bar1} + @{target|C|bar1}}]] !token-mod --set bar1_value|[[?{Source Tokens}]] --ids @{selected|token_id} Actually the above won't work too well due to the order of operations not playing nice with queries and attribute calls using targets :(