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] It's A Trap! (thread 2)

1540922272
Ada L.
Marketplace Creator
Sheet Author
API Scripter
It's A Trap! v3.9 Old thread:&nbsp; <a href="https://app.roll20.net/forum/post/3280344/script-its-a-trap-v2-dot-3/?pagenum=1" rel="nofollow">https://app.roll20.net/forum/post/3280344/script-its-a-trap-v2-dot-3/?pagenum=1</a> This is a script for setting up automated traps. The traps can also be interpreted with system-specific rules through Trap Theme scripts written for various character sheets. &nbsp; It's a Trap and the Trap Theme scripts are all available through Roll20's One-Click API library. General documentation and update logs can be found in its&nbsp; README &nbsp;on GitHub. Demo: Now available from One-Click: It's A Trap D&amp;D 3.5 Edition theme D&amp;D 4E D&amp;D 5E generic theme Gamma World 7E theme Pathfinder generic theme Roleplaying is Magic 4E theme Starfinder theme World of Darkness (classic) theme Requested Trap Themes Shadowrun (Need rules) Tails of Equestria Known issues: None, but please let me know if you encounter any! Known conflicts: Blood and Honor Future versions roadmap More generic system trap themes (Specify character attribute names through One-Click options to provide easy support for custom sheets or games that only use attributes in place of sheets) Active search/perception listening Better readme documentation/tutorials Having Trouble? If you're having problems setting up traps with this script, please post your problem to this thread and I will try to address it soon. When you do so, please be sure to also provide the JSON for the trap giving you trouble and let me know what trap theme you are using. This would greatly help me to diagnose what the issue is.
1540922389

Edited 1540922396
Ada L.
Marketplace Creator
Sheet Author
API Scripter
Update v3.9 This update includes the following new features: Implemented delayed activation for traps. When the 'Delay Activation' property is set for traps, the trap will delay going off until a set number of seconds after it is triggered. This works best with traps that affect an area and whose 'Stop Tokens At' property is set to None.
1543243304

Edited 1543299325
I've been trying to have the traps do a "Special FX", but so far been unsuccessful. I've typed things like "missile-fire" or "beam-fire" onto the first prompt, then "0,0" on the second and "5,0" on the third, what am I doing wrong? EDIT: I finally figured out what caused it, it was because I had the "GM Only" option set to "yes", I put that because I didn't want anything to appear in chat, I simply wanted the effect to play whenever someone stepped on the trap, is there a way to do that? Also, the effects seem to always face the same way no matter what I put there
1543335296
Ada L.
Marketplace Creator
Sheet Author
API Scripter
No, the trap will always display a message in the chat unless GM Only is "yes".&nbsp; For the Special FX vectors, enter them as "[X,Y]" instead of as "X,Y".
So, I installed It's a Trap! and It's a Trap! 5E - Generic theme (and associated required scripts).&nbsp; I can place a token on the GM layer, select it, and click the ItsATrap_trapCreationWizard macro, but I get no configuration options.&nbsp; I can see a net icon on the token, and the gm info for the token has a couple of json properties added, but I can't get any configuration menu to show up. The properties that are added are: {"effectShape":"rectangle","stopAt":"center"} The output console shows the following message after hitting the macro: {"who":"error","type":"error","content":"Unable to find a player or character with name: Roger (GM)"} Additionally, the trap does fire when a token moves over it (though it doesn't do anything but stop the token since I can't configure it).&nbsp; But if the player's movement includes going around a corner, it doesn't fire...&nbsp; (assuming it's graphing a line between the start point and the end point for collision testing?)
1547239285
Ada L.
Marketplace Creator
Sheet Author
API Scripter
Sounds like Roll20's whisper function isn't processing your name correctly for some reason. Does it work if you speak as a different character?
Aha! Yes, it does. Looks like it's because I had my display name as Roger (GM), which in chat was trying to be Roger (GM) (GM).
1549112313

Edited 1549115595
Hi, I was wondering If it was possible and if so how to place a trap back into the "Hidden GM layer" When Selecting "Other Traps Triggered" You see I'm trying to have it that if a token steps on a door for an outer building the inside of the building pops up.&nbsp; This is working very well with getting it to pop up as setting a trap the size of the door on the GM layer (normal trap stuffs) and having the "Other traps triggered" Option for the inside of the building to pop up.&nbsp; I'd like to have that in reverse though for a spot so it goes back into the GM Layer when stepping on an exit etc. ^^&nbsp; Thank you for your time.&nbsp; I'm not super great at API lol. But learning slowly but surely.&nbsp; Love this API so far btw.&nbsp; Also Having a hard time getting the "Token Mod Script" to Work.&nbsp; I've tried every different way of "!token-mod --order back" doesn't seem to work :/&nbsp;
1549128581

Edited 1549128684
Ada L.
Marketplace Creator
Sheet Author
API Scripter
This script doesn't currently have any options for putting other traps back onto the GM layer.&nbsp; I'm not sure how to help you with the TokenMod script, since that one's not mine. I would ask The Aaron about it. He's the TokenMod script's author.
Anyway to add SWRPG compatibility? I mean... "It's a Trap!" ;-)