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

Carrying Token-Linked Initiative from Page to Page?

As-is, players are only able to see Token-Linked Initiatives if they are on the same page as the token. I want to start rolling initiative for the next combat at the end of the previous. This way, it eliminates the awkward pause between "The monsters attack" and the first turn of combat. However, if the next combat takes place on a new page, the previous initiatives won't be visible to players. Even copy/pasting the tokens from the other page will not allow the players to see their initiative on the tracker. I could manually add initiatives for each player and not have it be token-based. But that seems inelegant. Does anyone have a better solution to this?
1603825367
The Aaron
Roll20 Production Team
API Scripter
A script could be created that would carry the initiative to the new page whenever there is a token representing the same character there, but it starts to get complicated with NPCs and Monster tokens as those are probably unique instances of initiative.  
Thankfully, I won't need it for anything else other than the player characters! As someone who doesn't know much about coding, how difficult would it be do that?
1603831196
The Aaron
Roll20 Production Team
API Scripter
Moderately easy.  Basically, you'd watch some events corresponding to players moving pages, then find tokens and update the turn order. At its simplest, when you change the player page flag, it would do a migration of all tokens to matching tokens on the current page and trash the rest.  At its most complex, it would monitor the migration of individual players and only move their tokens, as well as watching for new tokens to be added and move to them if appropriate.
This is just making me realize how little I know about API coding in the first place, because I actually have no idea how to do what you said! I'll have to find some documentation/tutorials to look through. Thank you for your help, though! This is a good place to get started.
1603892202
The Aaron
Roll20 Production Team
API Scripter
Here are a few useful links: <a href="https://app.roll20.net/forum/post/6605115/namespaces-novice-seeks-help-exploring-the-revealing-module-pattern" rel="nofollow">https://app.roll20.net/forum/post/6605115/namespaces-novice-seeks-help-exploring-the-revealing-module-pattern</a> <a href="https://app.roll20.net/forum/post/6584105/creating-an-object-that-holds-specific-character-dot-id-and-character-name/?pagenum=1" rel="nofollow">https://app.roll20.net/forum/post/6584105/creating-an-object-that-holds-specific-character-dot-id-and-character-name/?pagenum=1</a> <a href="https://app.roll20.net/forum/post/6237754/slug%7D" rel="nofollow">https://app.roll20.net/forum/post/6237754/slug%7D</a> And Nick Olivo has a slew of API videos:&nbsp; <a href="https://www.youtube.com/playlist?list=PLqhGF2nCu23kPeaUV_zIGwPRBZYUlcTGv" rel="nofollow">https://www.youtube.com/playlist?list=PLqhGF2nCu23kPeaUV_zIGwPRBZYUlcTGv</a> And of course, ask questions here on the forum and we'll help you with it!