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]Door Knocker

1599081469
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hmm, that should be it Bilbo. I might actually have time to get back to community API projects starting next week. I'll take a look then.
1599756283

Edited 1599756348
SIDE NOTE  about Door Knocker though.. I have tried to disable the aura's for the token, via the settings page on the token. And via the chat command to turn it off... Yet nothing seems to turn the aura off... What am I missing...??? FYI... It has something to do with me having the Grid for the map page disabled. When I enable it, the aura's do not show... But I rarely use the grid, so most of my map pages it is disabled.
Mission Accomplished! Added yet another awesome API to my game. BIG THX to Scott and this forum!!
Has anyone experienced lag or slow responsiveness after installing Doorknocker and related APIs?  Yesterday was my first campaign with those installed and gameplay was super slow so I'm trying to diagnose and rule out what may have caused or contributed to that.
1600714671
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Doorknocker shouldn't  cause a huge slow down. Can you be more specific with what type of lag you're experiencing? 
This script is the best thing I've added to my games in months! The players love it! Thanks so much! I do have a question, though, and I'm embarrased to ask because I'm sure the answer is obvious and I just can't figure it out. What are the close and far auras displaying the range to? The instructions say 'range to closest door' and 'range to furthest door,' but what does this mean? I see how the auras are behaving but I can't match them to the description.
1601741734
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
If you have two doors within range, the smaller aura extends to the nearer door, the larger aura to the farther door?
1601743287
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Yep, as Keith says. It's the range to the farthest door within detection range and the closest door. Note that it should be to the closest point on that door line.
Scott C. said: Yep, as Keith says. It's the range to the farthest door within detection range and the closest door. Note that it should be to the closest point on that door line. Great, thanks! And if there is only a single door within detection range it treats that door as both the closest and the farthest?
1601821731
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
That's right
Scott C. said: Doorknocker shouldn't  cause a huge slow down. Can you be more specific with what type of lag you're experiencing?  Thx! Lag during gameplay, in retrospect most noticeably when entering or calculating HP on character tokens. Been trying to troubleshoot and find root cause(s) and noticing not lagging like that day so fingers crossed!
1601831830
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Ah, ok, Doorknocker doesn't have anything in it that would affect that. Common causes of that sort of issue are 1) general internet issues 2) campaign bloat 3) a character sheet that is too complex
Scott C. said: Ah, ok, Doorknocker doesn't have anything in it that would affect that. Common causes of that sort of issue are 1) general internet issues 2) campaign bloat 3) a character sheet that is too complex Roger that thx! What contributes to campaign bloat? I may need to put mine on a diet!
1601836491
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Lots of pages, characters, just generally large campaigns.
I've also found Autofill settings in your browser can cause the VTT to freeze when interacting with those text boxes. I disabled mine and I haven't had that issue since.
1601852583

Edited 1601852596
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
This is most commonly encountered in Firefox. Try turning off your Autofill and Autocomplete functions.
Scott C. said: That's right Thanks again!
Is there a way to make the key function available to players so they can unlock locked doors?
1604073255
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Not currently, however, you can just change the doors to the unlocked color and then they can use the push command.
1604355915

Edited 1604357082
Kick
Pro
I was wondering, is there a way to increase the range of the doorknocker? I'm trying to use it as a lever rather than a key, and the setup I'm trying to create involves the lever being in a different room than the one the stone gateway is in. As the token has a deliberately limited range however, it doesn't work that way. I was hopeful that the map-wide commands might help with this, but they only seem to be able to change colours for the purpose of automating map setup. Whenever I try to use it as, say " !knock --push|toggle|page"  it only affects any adjacent doors, not the more distant ones. Am I getting that right, or did I miss something obvious? EDIT: Ah, it mentions that the "page"argument doesn't work with "push", presumably because it is intended to be GM-only. That is a shame, part of the usefulness of automating these things is to take busywork out of the GM's hands during roleplay. Either way, the script is still insanely useful, thank you so much for sharing!
1604869080
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Sorry it couldn't do quite what you were looking for Kick. There are a few scripts that more explicitly link a control token and a door dynamic lighting line, but the goal of Door knocker was to require the bare minimum of set up so that it could be used without a ton of prep time spent making it work. In other news, I was asked recently if there was a tutorial for how to use Door Knocker. As of about 5 minutes ago, I uploaded a tutorial video to Youtube under my Kurohyou Studios account for anyone who prefers audiovisual learning to text.
1606217845
Andreas J.
Forum Champion
Sheet Author
Translator
I have insider knowledge that an update is under works :D
1606229279
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
ᐰndreas J. said: I have insider knowledge that an update is under works :D Hey, no spoilers! ;)
1606324749

Edited 1606359520
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hi Everyone! As Andreas alluded to, I've been working on a nice update to Door Knocker. I'm not ready to update the repo version yet as there's some features that aren't in yet and will require an update to some of Door Knocker's dependencies. However, I would like to see what people think of the next version of Door Knocker. So, if anyone is interested I'd like to invite you to the Door Knocker v1.2x "Windows" Beta Changed Features Search now shows the actual door line on the object or gm layer depending on who initiated the search Customizable search time allows you to make doors revealed for as long or as short as you like Dynamic range allows searching and manipulating doors in any range from the selected token. Ranges are taken in the unit of the map (e.g. ft, meters, km) New Features Windows! That's right, actual movement blocking without vision blocking! Thanks to some discoveries about UDL by Andreas and The Aaron, this long requested feature of dynamic lighting is now possible with the help of the API. This does require that you use the updated dynamic lighting. How it works As normal for Door Knocker, you'll set a path stroke color for what paths to consider as windows. Any time that you change a path on the DL layer to the window color (either manually via the color picker or with the --adapt script command), it will be recreated with encoding to make it function as a window. If you change what color the script is using for windows, it will deencode the existing windows so that they will function as regular DL lines, and will encode any existing DL lines of that color so that they become windows. v1.21 The GM can now open/close windows. Players are not able to. Newly created paths on the DL layer that have the window stroke color or window-colored paths that are moved to the DL layer will now be automatically encoded as windows. Known Issues Currently, the script does not recognize creation of paths with the window color, so you'll need to create them in one color and then change them after you've sketched them out.  Fixed in 1.21 The script cannot currently reveal windows as part of the search command (requires update to a dependency)  Fixed in 1.21 as long as Path Math 1.6* is being used. The script cannot currently open/close windows (requires update to a dependency) Fixed in 1.21 as long as Path Math 1.6* is being used. Full details on how to use the new features can be found in the help page of the script created character in your game. v1.21 code can be found in this gist . The v1.20 code can be found in this gist (deprecated) . Big thanks to Aaron and Andreas for their discoveries that allowed this update, and to Aaron for the window code! * Path Math should auto update next week when the repo is merged. In the meantime if you want to use the functionality that needs the 1.6 update you can get the code from Stephen L's gist
1606359390
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Small update to the Doorknocker 1.2x beta fixing the known issues. Let me know what you all think!
Should doors be operated only on ligthning layer ? I am getting this while trying to operate on any other Door Knocker v1.21  Error Handling The following error occurred: Cannot read property 'id' of undefined TypeError: Cannot read property 'id' of undefined at Object.keyTurn [as key] (a
1606405540
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hmm. Odd. Thanks for the report klobass
1606407327
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Klobass, can you tell me how you're using the script? I can't replicate this issue. Do you have a token selected? and what command are you running?
it was door toggle - and yeah no token was selected - that was the issue... sorry :) 
1606415383
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
No need to be sorry. That tells me that I need to have better protections in the script so it doesn't error out when an improper command is sent.
Scott C. said: Not currently, however, you can just change the doors to the unlocked color and then they can use the push command. Is there a way to Change these colors with an API or other macro interface? I really want thieves in my game to be able to open locked doors as part of their actions and not be me switching through different layers and selections. But maybe I'm just lazy.
1606531683
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
There isn't currently a way to do it from the object layer, however you could just make a global token action macro that you can use to trigger unlocking of a door. You'd have to select the token and run it yourself, but there'd be no layer switching.
Yeah, I have a toggle lock/unlock macro setup as a token action but hidden from my players. So whenever a player is in front of a door and wants to open it, I just select their token and click the macro. Very easy.
Love it!
1607446848

Edited 1607446970
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Minor update to the beta to fix a crash when creating paths. No version change. New code can be found in the link to the 1.21 code.
This is working really nice for me, Thanks. Door Knocker 1.211
1607551396
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
That's great to hear KoS! I'll probably push the code for live release next week.