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] Draw ellipses on the dynamic lighting layer

1492979312

Edited 1492979523
Timothy M.
Pro
API Scripter
Hey everyone- I made a simple script that allows me to draw circles on the dynamic lighting layer and automatically convert them to a polygonal representation of the ellipse. This is designed to address the issue with dynamic lighting without requiring you to manually trace a circle using line segments. Great for making forest maps, columns, etc! To use, just enable the script and draw circles on the dynamic lighting layer- it defaults to generating 20-sided polygons, but you can adjust this by typing "!treehugger &lt;desired # of sides&gt;". E.g., for a 10-sided approximation of circles instead, just type "!treehugger 10" and any new circles will be converted to 10-sided polygons.&nbsp; Hope you all like it, and let me know if you have any questions! <a href="https://gist.github.com/tmatchen/ddc83483f818910c8f91b59f45e2c854" rel="nofollow">https://gist.github.com/tmatchen/ddc83483f818910c8f91b59f45e2c854</a>
1492984031
The Aaron
Pro
API Scripter
Nice!
1492994355
Ada L.
Marketplace Creator
Sheet Author
API Scripter
Sounds handy. Does it handle ellipses that are rotated or scaled?
Very cool, thank you Timothy!
This is so great -- thanks! I didn't realize how much I like incorporating round things until I had this!
1493602682
Timothy M.
Pro
API Scripter
Currently, it does not handle rotate or scaled ellipses since it's designed to work on draw- it should be an easy thing to fix though as it'll just mean pulling those values from the original ellipse. I'll try it out and make sure there's no wonkiness and post back!
1493606808
Timothy M.
Pro
API Scripter
Update: tweaked slightly so it handles ellipses that are scaled. It turns out there's no good way to handle rotated ellipses the way it's set up now; this is because rotations don't work on the DL layer (and any objects placed on the DL layer, regardless of their appearance visually, have their rotation set to "0"). To get it to work with rotations would require a major overhaul, unfortunately.