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 .
×

PressurePlates

1771260089

Edited 1771260483
I was doing some vibe coding the other day with the roll20 API. I needed to have a series of pressure plates when depressed open locked door/secret doors. I ended up doing a little more than I originally thought I would, however was wondering if I should release something like this to the community or if there was any real interest in it. I'll post some screenshot and explain. FIrst you make a token on the token layer that is your pressure plate. Then click the ui button to make a plate. You then drag a roll20 door onto the map, then add the door to the plate as secret or locked. When a token is on the pressure plate token that is moved to the GM layer the door will open. Upon moving off the plate, the door will then close/lock/secret. For a single plate this results in Token leaves plate.  You can also create pressure plate groups. Where the K is the number of plate depressed required to trigger the door opening. So if your group has 5 plates and you require 3 to be pressed it will count those.  Here is a group plate value This is the token interaction requiring 2 plates for the door to open. You can add N doors to plate or a group. Anyways I figured I would post this, there could be other scripts that already do something similar (Teleport was one I looked a quite a bit). If this is remotely interesting to anyone I can clean it up and post the script in a few days. I've enjoyed using roll20 a bit and since I was writing this for myself figured maybe someone else could benefit.  !plate ui UI: YES !plate setpage UI: YES !plate check UI: YES --- SINGLE PLATES --- !plate make NAME UI: YES !plate add lock UI: YES !plate add secret UI: YES !plate checkplate PLATEID UI: YES !plate simopen PLATEID UI: YES !plate simclose PLATEID UI: YES !plate removeplate PLATEID UI: YES !plate ping PLATEID UI: YES --- PLATE MESSAGES --- !plate platemsgon PLATEID message... UI: YES !plate platemsgoff PLATEID message... UI: YES --- GROUPS --- !plate groupmake NAME [K] UI: YES !plate groupaddplates NAME UI: YES !plate groupadddoors NAME lock UI: YES !plate groupadddoors NAME secret UI: YES !plate groupsetall NAME UI: YES !plate groupsetk NAME K UI: YES --- GROUP LOCKING --- !plate grouplock NAME UI: YES !plate groupcfglock NAME UI: YES !plate groupoverride NAME UI: YES --- GROUP AUTOLOCK --- !plate groupautolock NAME UI: YES !plate groupreset NAME UI: YES --- GROUP REMOVE / DETACH --- !plate groupremove NAME UI: YES !plate groupdelplate NAME PLATEID UI: YES !plate groupdeldor NAME DOORID UI: YES It was built for what I was doing in particular, which was just doors. I was thinking about adding some other types of interactions. More than just plates/tokens. Maybe you can open a series of doors, that then open other doors and in some cominbation. I was going to add traps, but I think that is already available (It;s a trap). Not sure this is worthwhile to make a git repo out of, I was just going to post the script here and let folks have at it. Also one last thing I made a set current page, since sometimes the UI would be looking at a different page. Haven't seen this with other scripts, so maybe I am doing something wrong.
Yes, great use for puzzles and more creative ways to trigger traps
Seems like a fun one! I can think of a few interesting combinations with this for puzzles, so I would definitely be interested in trying what you've made.
Here is the git url <a href="https://github.com/derekb110/pressurePlate" rel="nofollow">https://github.com/derekb110/pressurePlate</a>