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 .
×

Linking Unit Tokens Across Boards

Hello, So, what I'm trying to do is arrange a situation where the players are each viewing separate boards, and what's visible and what's on the GM layer [and thus hidden] is different for each board and players. However, the boards are representing the same thing, just from different places and points of view with different knowledge about the situation, and trying to mirror the updates to the board state across all the boards became rapidly unwieldly and overwhelmed me last session. So I was wondering if there was a way to do this, maybe using the API, so that if a unit was moved or updated on one board, it's corresponding linked marker on all the other boards would be moved or updated, regardless of whether it was on the GM layer or unit later and what attributes of it are visible. Thanks for the help!
1628550609
timmaugh
Roll20 Production Team
API Scripter
I am not aware of an API that does that already, but it is certainly within the realm of what you can do with the API. Much like the Bump script links a transparent token on the object layer to a token on the GM layer, you could create a token-entanglement across any given number of pages, so that when one updated, they all updated. There would probably be a LOT of testing around the player experience, too.
1628551260
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
The Aaron has a script called "Twins" that does that at least with two tokens, but the link to the code seems to have gone dry.
1628551620
The Aaron
Roll20 Production Team
API Scripter
It's here in my production repo: &nbsp; <a href="https://github.com/shdwjk/Roll20API/blob/master/Twins/Twins.js" rel="nofollow">https://github.com/shdwjk/Roll20API/blob/master/Twins/Twins.js</a> I also have this lightly tested version that supports UDL: &nbsp; <a href="https://gist.github.com/shdwjk/0fb306a778711bc34d24407bfc36003e" rel="nofollow">https://gist.github.com/shdwjk/0fb306a778711bc34d24407bfc36003e</a> I'd love some feedback on it, if you have the time.&nbsp;
Thanks, I'll try it out and let you know how it works.
1628571469
The Aaron
Roll20 Production Team
API Scripter
That only works for a pair of tokens, but something could be written that works across multiple pages and tokens, particularly if there is a limited subset of attributes to set and the relationships could be calculated instead of configured.&nbsp;
1628584578
Finderski
Pro
Sheet Author
Compendium Curator
Also a note...using API Scripts is a Pro subscriber perk, so...unless the GM account is different from the one posted from, an subscription may be required.
Finderski said: Also a note...using API Scripts is a Pro subscriber perk, so...unless the GM account is different from the one posted from, an subscription may be required. Yeah, I'm aware of that. I was just checking to make sure there was something that would work.
1628796887

Edited 1628796935
The Aaron said: It's here in my production repo: &nbsp; <a href="https://github.com/shdwjk/Roll20API/blob/master/Twins/Twins.js" rel="nofollow">https://github.com/shdwjk/Roll20API/blob/master/Twins/Twins.js</a> I also have this lightly tested version that supports UDL: &nbsp; <a href="https://gist.github.com/shdwjk/0fb306a778711bc34d24407bfc36003e" rel="nofollow">https://gist.github.com/shdwjk/0fb306a778711bc34d24407bfc36003e</a> I'd love some feedback on it, if you have the time.&nbsp; Thank you very much! I set my game up so that there were two boards instead of 4 [I don't really need a master board, and 2 players are together and can thus share one board], and modified your code so that it didn't mirror visibility and layer settings.&nbsp; So far, it's working. I'll provide any feedback if something breaks, or if it has issues when instead of like 5 linked tokens there's 500.
1628801124
The Aaron
Roll20 Production Team
API Scripter
Sweet. =D