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 .
Advertisement Create a free account Compendium in Game, Join Today

[Script] UDLWindows -- Dynamic Lighting Paths that block movement but not vision or light. [WARNING: Updated Dynamic Lighting only]

1606067451

Edited 1606068211
The Aaron
Forum Champion
API Scripter
Windows v0.1.0 Thanks to&nbsp; ᐰndreas J. &nbsp;for discovering that Freehand drawings (quadratic Bézier curves) don't block vision but do block movement.&nbsp; This script uses that information to recreate other drawings as optimal Freehand drawings with the same shape, but no light or sight blocking! UDLWindows converts path objects to paths that don't block vision but do block movement. Commands !to-window [--help] --help &nbsp;-- Displays this help Usage Select path objects on the Dynamic Lighting Layer and run the&nbsp; !to-window &nbsp;command. Each of the path objects will get replaced with a version that won't block vision or light, but will block movement. The original objects are removed in the process. This works with poly lines, boxes, and circles. This should be in the 1-click on Tuesday. Github:&nbsp; <a href="https://github.com/shdwjk/Roll20API/blob/master/UDLWindows/UDLWindows.js" rel="nofollow">https://github.com/shdwjk/Roll20API/blob/master/UDLWindows/UDLWindows.js</a> Support my work on If you use my scripts, want to contribute, and have the spare bucks to do so , go right ahead. However, please don't feel like you must contribute just to use them! I'd much rather have happy Roll20 users armed with my scripts than people not using them out of some sense of shame. Use them and be happy, completely guilt-free! Disclaimer: This Patreon campaign is not affiliated with Roll20; as such, contributions are voluntary and Roll20 cannot provide support or refunds for contributions.
1606068679

Edited 1606069222
ᐰndreas J.
Forum Champion
Sheet Author
Translator
It's fantastic how quickly you created this from to moment I brought it up alongside API interaction. This have probably nice synergy with DoorKnocker, as now it would be easy to create windows, and then just with DoorKnocker open/close the window to let people move through them. Using UDLWindow can also be used to convert larger maps with height differences, and enable to easily block movement between height differences such as between the street and the rooftop of a house. Performance-wise, I wonder if these window-segments impacts Roll20 or UDL performance, if used on a larger scale(compared to regular normal lines).
1606075300
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Almost makes we want to adopt UDL. Almost... I want UDL finished.
1606076000
I'm pretty sure this is a bug, not a feature.&nbsp; Hopefully token vision and movement will be separated somehow in future design of dynamic lighting page elements.&nbsp; I would love it if there was a way to set a specific color on the dynamic lighting tab to only block light &amp; vision, another to only block movement, and another to block both.&nbsp; Then getting crazy there could be drawn elements that basically have two lines together to create one-way dynamic lighting.
1606077271
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Jarren K. said: I'm pretty sure this is a bug, not a feature. I'd call it an emergent feature, since it fills a useful purpose. That doesn't mean it won't be removed if it gets in the way of something else. :)
1606080346
The Aaron
Forum Champion
API Scripter
Yeah, I'd say it's an emergent feature based on the implementation choices in both the collision system (seems to be based on 2d physics against pixel rendered lines) and vision/light (seems to be based on vector line intersections which ignore Cubic Bézier Curves (circles) and Quadratic Bézier Curves (freehand drawings)).&nbsp; My guess is that it will be here to stay, though we may get a more purpose built replacement in the future.&nbsp; Given my druthers, I'd prefer a means to take individual line segments with blocks sight and blocks movement, and which directions those individually affect.
1606080671
∇ince
Pro
Sheet Author
All in favor of an "un-mentioned" company hiring Aaron?&nbsp; Salary is unnegotiable. Whatever Aaron asks. ;-P
1606081269

Edited 1606081311
The Aaron
Forum Champion
API Scripter
Hahahahaha!&nbsp; =D For your suggestions, we offer the Suggestions and Ideas Forum... =D
1606083764
∇ince
Pro
Sheet Author
The Aaron said: Hahahahaha!&nbsp; =D For your suggestions, we offer the Suggestions and Ideas Forum... =D <a href="https://app.roll20.net/forum/post/9522317/please-hire-the-aaron/?pageforid=9522317#post-9522317" rel="nofollow">https://app.roll20.net/forum/post/9522317/please-hire-the-aaron/?pageforid=9522317#post-9522317</a> ;-P
1606085604
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I know it's a joke, but I had a vote lying around...
1606091305

Edited 1606091423
That sounds upside down to me. Can't they just hand him the keys instead? I mean, what if they employ him, then suddenly we've got "Updated Dynamic Aaron" posting busted scripts everywhere? With all that knowledge, if he becomes corrupted... it would be like giving the One Ring to Gandalf.
Is it possible to flip this script to do the inverse: create a light/sight barrier that can be moved through by players?&nbsp;
1606182229
The Aaron
Forum Champion
API Scripter
It isn't. This script exploits a discrepancy between the collision and lighting systems that allows only the collision system to "see" the wall. I've not found a way to do the inverse.&nbsp; That said, you could use one of the teleport scripts to move a token through a dynamic lighting wall, giving you the same effect.&nbsp;
1607791942
Ian
Pro
This is great, and I'm almost certainly going to use it. I presume this makes two-way windows?&nbsp;
1607800661
The Aaron
Forum Champion
API Scripter
Correct. It makes lines that can be seen through, but block movement.&nbsp;