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

Teleport message formatting

1706040127

Edited 1706064718
This is perhaps a new API user or even new roll20 user question. I have tried searching the wikis and forums, but have been unable to find the answer. If this has been asked and answer, please accept my apologies and provide a link.&nbsp; This post <a href="https://app.roll20.net/forum/post/9436375/script-teleport-from-scratch-teleport-token/?pageforid=9493124#post-9493124" rel="nofollow">https://app.roll20.net/forum/post/9436375/script-teleport-from-scratch-teleport-token/?pageforid=9493124#post-9493124</a> explains the features of the teleport script. I have setup one-way, two-way and cross page teleporters without any issues. This is great! It allows the players to choose when they move and I don't have to do anything, except follow them. I am trying to setup the pit trap idea and I have most of it working - it teleports and plays an fx. Issue #1 - I cannot get the message from the destination to display. In my case, I was manually performing the teleport, which triggers the FX, but not the message. If I have a source portpad, and I put the message there, it works. Because this particular trigger is determined by role play, I didn't want it to automatically trigger, but that's the only way I seem to be able to get a message.&nbsp; Issue #2 -&nbsp; Using a source portpad, I cannot seem to figure out the syntax for adding a die or dice roll to the message. I can get the source pad to display a message and noticed in that thread that [target]&nbsp; displays the token name and that works. I have tried [target] fell and takes [[2d6]] damage but that becomes [target] fell and takes $[[0]] damage in the pad configuration window and&nbsp; " &lt;token name&gt; fell and takes $[[0]] damage" in the output. I found mention of this here, <a href="https://wiki.roll20.net/Reusing_Rolls" rel="nofollow">https://wiki.roll20.net/Reusing_Rolls</a> &nbsp;, but am unsure how to get this to work (or if it even does?)
1706127763

Edited 1706128192
In case anyone else comes across this, I got this working, but using different tools.&nbsp; In my case, I have several stairs, some on different pages and some on the same page, so using the Teleport script from the mod library works great to setup two-way teleport pads. I also had several traps that would drop the victim to a different part of the map. To accomplish that, I ended up using two different tools. I added It's A Trap from the mod library and TokenMod. I tried using Teleport with It's a Trap, but that didn't really work well. Since TokenMod has an --ids argument, I could pass that VICTIM_ID and use&nbsp; !token-mod --ids VICTIM_ID --set top|700 left|490 to get the token to the correct part of the map as well as handle the detection and damage. I still added a portal pad so if they detect the trap, but decide to "travel" to the "bottom", I could do that as well. It's kind of a pain figuring out where to put the token. I miss MapTool's coordinates in the status bar.&nbsp; I ran into several issues, so I thought I'd explain them here. # One The It's A Trap script depends on a character sheet having at least some of the values set in the token's character sheet or you get cryptic&nbsp; "TypeError: Cannot read properties of undefined (reading 'get') It would be nice if the error specified what property couldn't be read. It would also be nice if this was handled and the rest of the behavior worked anyway. In my case, the token I was testing had HP, but not MAX HP. I also found it would error on saving throws, even though those had valid values. Weird part was, I fixed this by checking and unchecking all of the saving throw proficiencies.&nbsp; # Two If you change Core Properties to Show GM only , it will not execute the TokenMod command on the token.&nbsp; # Three The FX don't seem to work very reliably for the player, and not at all if you move them. I used the offset to put the FX at where the token would end up, and I could only see them from the GM view. Not a big deal for me - I prefer to narrate over FX.&nbsp; Otherwise, this works fine. Yay! I have not tried cross map teleports from It's a Trap using TokenMod, but I imagine it should work.&nbsp;