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] Path Splitter

April 02 (9 years ago)

Edited April 02 (9 years ago)
Ada L.
Marketplace Creator
Sheet Author
API Scripter
Have you ever drawn an elaborate polygonal path for dynamic lighting and realize later that you need to change it because you forgot about a door or one of the PCs blew a hole in one of the walls? Normally, paths cannot be edited once they've been created, and in one of these situations, you'd be forced to redraw your path.

With the Path Splitter script, you can cut holes in a polygonal path just by drawing another pink polygonal path on top of it! Just draw the splitting path over your original path, select the two paths, then enter the '!pathSplit' command to cut the original path where it intersects the splitting path.

If you don't want to use pink as the color for your splitting paths, you can change this color by changing the splitting path's color, selecting it, and then entering the '!pathSplitColor' command.

Although I created this primarily for editing dynamic lighting, it can be useful for other situations where a polygonal path needs to be split up.

Demo:


Requirements:
* Matrix Math 1.0
* Path Math 1.1
* Vector Math 1.0

Pull request pending. Get it here for now:
https://github.com/Cazra/roll20-api-scripts/tree/m...
April 03 (9 years ago)
Ziechael
Forum Champion
Sheet Author
API Scripter
Amazing script... often been frustrated by this myself and finally having a solution to it is truly game changing!!

Also, nice touch with the colour change option, being colour deficient myself I instantly balked at the idea of having to use a particular colour for the split path... now i can set it to black or white and get splitting with ease =D
This is amazing!  I too know the pain of having to redo complex DL paths.  I got into the habit of doing one line at a time.  This changes the need for that mentality.
Very awesome!
April 04 (9 years ago)
Ravenknight
KS Backer

Josh Stotz said:

Very awesome!

+1
April 04 (9 years ago)

Edited April 04 (9 years ago)
chris b.
Pro
Sheet Author
API Scripter
OMGOMGOMG thank you so much!

(for some reason I keep picking modules with circular rooms and winding corridors)
April 05 (9 years ago)
Ada L.
Marketplace Creator
Sheet Author
API Scripter
Glad everyone's finding this useful. :)