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

[SCRIPT] [expirimental] SyncPage

1524936825

Edited 1524995597
Robin
API Scripter
Someone on Discord asked me if there was a way to show/hide certain tokens for certain players. I ran some tests, and came up with a way to sync pages (and objects on them). This script is highly experimental at the moment. Please let me know if you encountered any errors, or have suggestions for the script. Also, due to API limitations, only tokens with an image that is in your library will get an image on the synced page, other tokens will get the default image. <a href="https://github.com/RobinKuiper/Roll20APIScripts/tr" rel="nofollow">https://github.com/RobinKuiper/Roll20APIScripts/tr</a>... How It Works I couldn't automatically handle the creation of synced pages, due to API limitations, so creating the pages needs to be done manually. First, have the initial page ready, and create a new pages, with exactly the same name as the page you want to sync, add '_synced' as a prefix to the name, eg.: After you renamed the new page 'something_synced' it will automatically start the syncing process and add every object on it to the new page. Every object that is added, changed or removed on one of these pages will also be on the other connected pages. After this you can bring up the SyncPage menu by typing !sync. With this you can show/hide objects on the different connected pages (the "show here" and "hide here" flags will always overwrite the "other" flags). Now you can drag specific players to one of the synced pages to show them only the things they need to see. Config Command&nbsp; - The command you want to use for this script. Reload Refresh - Refresh the synced pages on a reload. True Copy - Will really duplicate the page, with all the tokens, drawings, texts, etc. If enabled it will trigger on duplicating a page. Commands !sync - Shows the SyncPage Menu. !sync config - Shows the config menu. !sync show - Sets the `show here` flag to the selected token(s). !sync hide - Sets the `hide here` flag to the selected token(s). !sync show others - Sets the `show others` flag to the selected token(s). !sync hide others - Sets the `hide others` flag to the selected token(s). <a href="https://github.com/RobinKuiper/Roll20APIScripts/tree/master/SyncPage" rel="nofollow">https://github.com/RobinKuiper/Roll20APIScripts/tree/master/SyncPage</a> Changelog 28-04-2018 - 0.1.9 Added a "true copy" feature. Pages can be really duplicated now.
1524940680
GiGs
Pro
Sheet Author
API Scripter
Interesting concept. I suggest tweaking it so you can add a descriptor to the map page names, so you know that map A is for player A, map B is for Player B, etc.
1524943337
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Very nice. The initial page duplication feature is probably "worth the price of entry". Page duplication in Roll20 is pretty anemic. This looks like it would be a good companion to Token-sync.
1524944759
Robin
API Scripter
Yeh, I was thinking about adding a feature were (if you duplicate a page) this script would duplicate it the right way.
1524948295
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I think there was a page duplication script under development last year. IIRC, the most difficult part was the z-order of graphic elements. Does your script address objects on the GM or DL layers?
1524949053
The Aaron
Pro
API Scripter
PaprikaCC's True Page Copy:&nbsp; <a href="https://app.roll20.net/forum/post/4785895/slug%7D" rel="nofollow">https://app.roll20.net/forum/post/4785895/slug%7D</a>
1524953598
Robin
API Scripter
keithcurtis said: DL layers? DL?
1524953647
Robin
API Scripter
The Aaron said: PaprikaCC's True Page Copy:&nbsp; <a href="https://app.roll20.net/forum/post/4785895/slug%7D" rel="nofollow">https://app.roll20.net/forum/post/4785895/slug%7D</a> I tried that one a couple of weeks ago indeed, but it didn't copy the entire page with all of the objects. I don't know exactly what it didn't do anymore at the moment.
1524956892
GiGs
Pro
Sheet Author
API Scripter
Robin K. said: keithcurtis said: DL layers? DL? Dynamic Lighting
1524959289
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
G G said: Robin K. said: keithcurtis said: DL layers? DL? Dynamic Lighting Yes. Dynamic Lighting. Thanks, GG.
1524959523
Robin
API Scripter
Oh, off course. I'm not at my pc at the moment, but I think it should work. If not I can probably add that.
1524960067

Edited 1524960079
Robin
API Scripter
Forgot about this, but I've added the following line to the first post. " Also, due to API limitations, only tokens with an image that is in your library will get an image on the synced page, other tokens will get the default image."
1524995674
Robin
API Scripter
G G said: Interesting concept. I suggest tweaking it so you can add a descriptor to the map page names, so you know that map A is for player A, map B is for Player B, etc. Good idea indeed, will look at this for a future update. Update 28-04-2018 - 0.1.9 Added a "true copy" feature. Pages can be really duplicated now.