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] Map Teleporters - Updated w/ Automated Demo Campaign

I am loathe to be that person but, any word on the updates for this script?
I have been using it for a while now, everything seems to be working.
So I'm having an issue where my PC's move onto a 2x2 teleporter square move to the new map fine onto a new 2x2 square but when they take a step forward they are still in the teleporter square and get sent back to where they just where, Anyone have a solution for this?
1528330910
The Aaron
Pro
API Scripter
Use a smaller landing pad. 
The Aaron said: Use a smaller landing pad.  But when they come back up the stairs the same thing will happen? how do other people handle stairs? I also noticed that once one token uses a teleporter you need to move them before that same 5ft square can be used again for someone else to teleport? is this by design?
1528339740

Edited 1528341375
FinalFrog said: Quick update: I identified the problem keithcurtis was having with gmlayer player tokens interfering with teleports. Turns out I was essentially grabbing the first overlapping token in the gmlayer, seeing if it had a coresponding destination teleporter, then returning! Apparently it works so long as the teleporters were added to the page before the tokens being teleported. I have a fix but looping through the overlapping tokens required a little restructuring of the code. I took the opportunity to add better logging and comments, plus a couple of other minor features which arose from the restructuring: 1. The collisions check detects if any part of the token and source teleporter overlap. Previously tokens would only teleport if their center overlapped with the source teleporter. 2. The improved collision detection now means that teleporters larger than 1x1 will function like you'd expect, so long as the source and destination are the same size. 3. "But won't I be teleported if I move my token within a teleporter larger than 1x1?" you ask. Not any more! Now the script checks the token's 'lastmove' value and only triggers a teleport if the token's previous position did not overlap the teleporter. 4. As part of the fix for the bug keithcurtis reported I now loop through all the overlapping gmlayer tokens with a name and check to see if there is a valid destination on a page with a corresponding token. 5. Changed handling of characters controlled by more than one player to be more consistent (previously it basically picked the first thing in the listi and ran with it). If all the players control a token and it is teleported to another page the players will be united onto the destination page. If more than one player controls a token then all controlling players will be moved to the destination page. I still need to test these changes and may need to make some adjustments to the collision check for maps which use hexes, but I'll leave you with some interesting potential applications of these changes: * Connecting 2 square wide hallways with matched 2x1 teleporters * Creating single teleporter which splits the party by teleporting different players to different maps (Use same destination name on multiple pages and place player tokens only on the maps to which you want the teleporter to take them) * Allow tokens significantly larger than teleporter to use it reliably (ex. 3x3 token and 1x1 teleporters) * Elevator encounters where players can move around inside of elevator without being teleported back. * Reliable and accurate teleportation if grid is disable Are these changes in effect yet? I've tried most of them, yet they seem to not be working
1528577615

Edited 1528578060
Edited : Pb fixed Anyway, i've a huge bug. I create my own battlemaps. When my players use a TP to switch between maps, my map on map layer is moving :o Any ideas?
Anthony V. said: FinalFrog said: Quick update: I identified the problem keithcurtis was having with gmlayer player tokens interfering with teleports. Turns out I was essentially grabbing the first overlapping token in the gmlayer, seeing if it had a coresponding destination teleporter, then returning! Apparently it works so long as the teleporters were added to the page before the tokens being teleported. I have a fix but looping through the overlapping tokens required a little restructuring of the code. I took the opportunity to add better logging and comments, plus a couple of other minor features which arose from the restructuring: 1. The collisions check detects if any part of the token and source teleporter overlap. Previously tokens would only teleport if their center overlapped with the source teleporter. 2. The improved collision detection now means that teleporters larger than 1x1 will function like you'd expect, so long as the source and destination are the same size. 3. "But won't I be teleported if I move my token within a teleporter larger than 1x1?" you ask. Not any more! Now the script checks the token's 'lastmove' value and only triggers a teleport if the token's previous position did not overlap the teleporter. 4. As part of the fix for the bug keithcurtis reported I now loop through all the overlapping gmlayer tokens with a name and check to see if there is a valid destination on a page with a corresponding token. 5. Changed handling of characters controlled by more than one player to be more consistent (previously it basically picked the first thing in the listi and ran with it). If all the players control a token and it is teleported to another page the players will be united onto the destination page. If more than one player controls a token then all controlling players will be moved to the destination page. I still need to test these changes and may need to make some adjustments to the collision check for maps which use hexes, but I'll leave you with some interesting potential applications of these changes: * Connecting 2 square wide hallways with matched 2x1 teleporters * Creating single teleporter which splits the party by teleporting different players to different maps (Use same destination name on multiple pages and place player tokens only on the maps to which you want the teleporter to take them) * Allow tokens significantly larger than teleporter to use it reliably (ex. 3x3 token and 1x1 teleporters) * Elevator encounters where players can move around inside of elevator without being teleported back. * Reliable and accurate teleportation if grid is disable Are these changes in effect yet? I've tried most of them, yet they seem to not be working Any word on updates for this? I find this useful for intramap teleports with it's current implementation, but at least for me intermap teleports are unreliable at best even when using 1 way teleports.
Believe this script is no longer being updated, I use it as is and it seems to work well, what issues are you having?
Anthony V. said: Believe this script is no longer being updated, I use it as is and it seems to work well, what issues are you having? To cut a long story short the issue is essentially when using it to move tokens/players between actual map pages the token/s will not transition to/from the gm layer correctly. It will switch the player view, but I have experienced about a 1 in 3 chance the player token/s won't jump to the correct layer. I have tested this in my test games and it seems to work correctly but in my actual games it does not work flawlessly. I have checked all the maps that I can think of for extraneous teleport tokens that could be messing with this script but haven't found any.
What Token names are you using for the teleporters?
I have been using the example names that FinalFrog gave in the comments for the script, so the names TeleportToken02A and such.
1531334946
The Aaron
Pro
API Scripter
The names are special in a not so obvious way.  Have to be something like: Teleport<ANYTHING><Number of pads><A-J, the index of this pad> So: TeleportStairs1_02A, TeleportStairs1_02B TeleportMageLoop03A, TeleportMageLoop03B, TeleportMageLoop03C etc
what he said^ try using more unique names with _02A and _02B after them FrontBoatStairs_02A  FrontBoatStairs_02B RearBoatStairs_02A  RearBoatStairs_02B
1531336113
The Aaron
Pro
API Scripter
Ah, looks like it's just the last two letters that matter at this point. Second to last is a digit between 2 and 9, inclusive.  This is the number of pads there are. Last is a Capital Letter from A-I, inclusive.  This is the ordering for this pad.  A, B, C, D, etc The rest of the name is used to construct and find the other pads and should be unique for a given cycle of teleport pads.
1531336201

Edited 1531336395
The Aaron said: The names are special in a not so obvious way.  Have to be something like: Teleport<ANYTHING><Number of pads><A-J, the index of this pad> So: TeleportStairs1_02A, TeleportStairs1_02B TeleportMageLoop03A, TeleportMageLoop03B, TeleportMageLoop03C etc Anthony V. said: what he said^ try using more unique names with _02A and _02B after them FrontBoatStairs_02A  FrontBoatStairs_02B RearBoatStairs_02A  RearBoatStairs_02B The Aaron said: Ah, looks like it's just the last two letters that matter at this point. Second to last is a digit between 2 and 9, inclusive.  This is the number of pads there are. Last is a Capital Letter from A-I, inclusive.  This is the ordering for this pad.  A, B, C, D, etc The rest of the name is used to construct and find the other pads and should be unique for a given cycle of teleport pads. The below gif is very appropriate with this revelation. Thank you both for that wonderful revelation it certainly clears up a few things.
1531336469
The Aaron
Pro
API Scripter
No problem.  I've spent many WTF!? hours with this script in the past. =D
1531336503
The Aaron
Pro
API Scripter
I always intend to write a better one, but it's never bad enough that I get around to it.  (And I have way too much to do already...)
I really appreciate the help you and Anthony gave me on this. Now I must spend an inordinate amount of time making a teleport maze with this information.
1531337626
The Aaron
Pro
API Scripter
I made the best teleport maze with my modified version of this. =D  Had several side by side hallways with teleport pads, and the destinations far removed all over the place. So when they popped out and back, they wouldn't know there were multiple identical hallways.  (my version doesn't show the token as it moves, and supports random destinations.)  Hilarity ensued. They started drawing markings to show where they'd been.  I considered having helpful tidying magic clean up the chalk (it was the sort of place where that would make sense) but I didn't want to be TOO mean. =D
The Aaron said: I made the best teleport maze with my modified version of this. =D  Had several side by side hallways with teleport pads, and the destinations far removed all over the place. ....... So when they popped out and back, they wouldn't know there were multiple identical hallways.  (my version doesn't show the token as it moves, and supports random destinations.)  Hilarity ensued. They started drawing markings to show where they'd been.  I considered having helpful tidying magic clean up the chalk (it was the sort of place where that would make sense) but I didn't want to be TOO mean. =D That is so evil, I like it! Thanks again!