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

[BETA] Dynamic_Light_Helper

1476633843
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
<a href="https://gist.github.com/BaldarSilveraxe/28a1fb8456" rel="nofollow">https://gist.github.com/BaldarSilveraxe/28a1fb8456</a>... Still need to add circles..... but box, poly and reduced&nbsp;resolution freehand are in here. Sample GIF below.
1476639435
Lucian
Pro
API Scripter
Oh man, you continue to make the awesomest stuff. In the end my Dynamic Lighting Recorder script turned out to be less useful than I'd hoped - apart from the fact that I got bored fixing all the bugs, I found that I was customising the dynamic lighting paths a lot more than I'd anticipated, which made the script much less useful than anticipated.&nbsp; In particular, cutting doors into walls was something I did a lot, which meant redrawing the recorded paths. I guess a combination of your "handles" approach and a way of linking paths to tiles might be the best of both worlds....
1476640939
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
I started with the basic drawing tools and plan to add more tools (arc for example.) But I think your script can be leveraged to add other tools into something like this (your&nbsp;cutting in doors which has a lot of merit.) What I am really after here is a "sub" grid for DL snapping... it takes the basic 70px (canvas px units) grid an turns it into a 14 px grid (odd ratio so you have a "middle" square.) Then you can set how big a token in relation to its left/top.... Then you can do a lot of cool pathing walking stuff, dynamic token reveal based on LOS, etc.
My god, this script is amazing, just for the ability of speeding up doing dynamic lighting on walls and such.
1476698525
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Should have circles/ovlas&nbsp;out today.....&nbsp;That would be all the native drawing tools...&nbsp; For pathing polys.... want to create the ability to remove a points and insert point (likely using nudge rotation.) Ovals and Circles aren't really useful (or squares for that matter) because they are always a closed path... Great for a pillar I guess...&nbsp; What we really need is an arc tool.
1476698984
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
One problem with this script is I am currently highjacking the "show label" checkbox for the page. I really shouldn't do that.... but having a hard time resisting because 1) I am lazy and 2) I feel sorry for it since it has no purpose in life. Oh who am I am trying to kid, I have no sympathing and I am just lazy.
Would it be possible to allow rotation? I would love to be able to rotate the DL for a door.
1476707711
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
I know it can be done (GIF example above) Just need to have a good interface for binding a drawn path to a graphic.
1476708372
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Need to set the control points on the sides on the circle not the corners of the boxbound (right now using the same code or box controls.) Should have this added into the gist later today.
1476708985
The Aaron
Pro
API Scripter
Might be nice to have a way to tell it you want the circle constrained to being truly round. &nbsp;Same might be true for squares vs. rectangles. Could have different drag controls in alternate corners for constrained or unconstrained resizing. &nbsp;Or rotation activation to swap the mode.
1476709218
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
The Aaron said: Might be nice to have a way to tell it you want the circle constrained to being truly round. &nbsp;Same might be true for squares vs. rectangles. Could have different drag controls in alternate corners for constrained or unconstrained resizing. &nbsp;Or rotation activation to swap the mode. Stop helping Aaron.
1476709558
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Stephen S. said: The Aaron said: Might be nice to have a way to tell it you want the circle constrained to being truly round. &nbsp;Same might be true for squares vs. rectangles. Could have different drag controls in alternate corners for constrained or unconstrained resizing. &nbsp;Or rotation activation to swap the mode. Stop helping Aaron. Would color change be enough? I was thinking about this for poly's...... Black 90 degree, Green 45 degree, Orange 30/60 degree... Red any non-standard degree. Just a visual cue. Could do the same for square/circle and easy to hit on "square" and "degrees" since you have snapping.
1476710652
The Aaron
Pro
API Scripter
As opposed to a constraint? &nbsp;The problem would be you can't see the color when you're dragging, only after.
1476711311
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
The Aaron said: As opposed to a constraint? &nbsp;The problem would be you can't see the color when you're dragging, only after. Fine fine fine.... Not enough to be "right" you have to be "persistently right." We did this with the AOE drawer.... Oval/Rectangles had two edge point controls.... Circle/Squares had center and single edge control. I guess you would just default to one or the other and nudge rotate any control point to toggle between modes.
1476712310
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
V2 up.... We have circles.
1476712454
The Aaron
Pro
API Scripter
Stephen S. said: Fine fine fine.... Not enough to be "right" you have to be "persistently right." I don't HAVE to be.. it just happens naturally.. =D Stephen S. said: V2 up.... We have circles. Cool. =D