Working on the next iteration - attempting to link cross-page.
First getting the directed teleport to work - so if you select one or many characters, it can teleport cross-page to the destination you choose. I'll have to write a lot of checking for existing tokens, creating token attempts if available, checking for tokens that use the marketplace... once that's done (direct teleport) the auto-teleport should just be about linking and using existing functions to check for teleport and then invoking the manual teleport functions, that will be by then already defined, to auto-teleport a player to another page. Only consideration: if they appear back on the page later, not through teleport, their token will likely be in the gmlayer - and I don't have an auto-fix idea to force that... and I'm not sure I should.
Edit: and now I'm thinking for this to work, I'll have to track a global state setting called "teleport.limbo" - an object indexed by pageid - that tracks all player-tokens that were whisked to the gmlayer due to teleport, and auto-manifest them back in the world if the page changes and the controlling player is newly on the page they originally teleported *from*.
Edit Again: to make this user friendly, I'll be putting error messages in the chat, and providing a setting for the gm to set a preference to attempt creating a token or not. If the preference is set to "not" the gm will get a warning if they try and teleport a token and there is not a supporting token on the destination page (gm layer or token layer). If the preference is set to "attempt to create" the gm will get a warning if I can figure out if an image src is from the marketplace, and abandon the attempt.
I feel like these warning conditions should stop auto-teleport - and maybe notify the player and the gm in that case.
Edit Edit Edit: one final obstacle is the lack of API to move the GM - the players and player ribbons can be moved, but no API call exists to move the GM - so the players will all move, and maybe the SFX will fire and the pings will fire... but the GM will be left behind regardless.
