Summary: Have you ever made a complex dynamic lighting path and realized after the fact that you wanted to tweak it, or you made some mistake that needed correcting after the path was already committed? Previously, your options included (1) delete the path and start over, or (2) live with it. [Sad trombone] This simple path editing tool allows GMs to alter the characteristics of an already existing path directly on the VTT! A chat menu interface (a macro that is installed automatically) contains all of the commands necessary to edit your paths. Code: The code is currently found here for manual install: <a href="https://github.com/djmoorehead/PathEditor/blob/main/PathEditor.js" rel="nofollow">https://github.com/djmoorehead/PathEditor/blob/main/PathEditor.js</a> !!Note!!: due to some annoying interaction with object creation and the object change listener, when you first install it you will get a pink error message in your api console. Just restart the sandbox and should go away and never return. I suspect this is a timing issue, but I'm currently stumped. If one of the script gurus has an idea, I'm all ears! Example Animation: Here's an example of the script in action with a simple path element (click to play gif) How it works "under the hood": On install, the script will create a character named PathEditPt , and a collections macro named PathEditMenu . The character has a multi-sided default token (black & white circles), and a bunch of macro abilities that control script behavior. When you select an existing path and click on the " Edit " button in the chat menu, the script identifies all of the vertices of the path and spawns copies of the PathEditPt token at each point. (values are written tot he state object that links the path with its associated control points). The color (side) of the point is chosen automatically based on the color of the path for enhanced contrast. The script then listens for movement of these control points and/or the path itself and redraws a new path with the new point locations. This is required because the actual "path" property of a path object is only editable at object creation and read-only any time later. When you are done editing, just click the " Done " button and the control points will be deleted. Note: before somebody asks about Bezier curves, they unfortunately aren't supported by the Roll20 Dynamic Lighting engine as of now. Ovals are the only exception (UDL only). However, Oval editing is not currently supported by this script! If you try, the script will turn them into straight-edged polygons based on the bezier pt locations. You have been warned. Note 2: Technically the script will work with freehand paths, but I wouldn't recommend it. Freehand paths create a lot of points! It will be difficult to manipulate the right point even at the smallest control pt size. That gives me an idea for a future feature, though: A way to simplify a path by reducing the number of points by some amount or percentage. Hmm... Features: Add point - Select any two adjacent control pts and click " Add " Delete point - Select one or more control pts and click " Delete " Split path - Two modes: For a closed path (start pt connected to end pt), select any two control pts and click " Split ". For an open path (start pt not connected to end pt), you can click any number of control pts and click " Split ". Control point management - Resize - the " Shrink ", " Grow ", and " Set Size " buttons do the work. The latter is in pixels. The default size is 20 pixels. Shrink & grow alter the size by 10px up or down. Toggle Color - This button flips the side of all control pts to show black or white circles Toggle Grid Snapping - Turning on grid snapping will make the control pts snap to grid intersections when moved . Note this setting is stored in the state object and will be remembered across sessions! Open/close Polygon - This will attach/detach the first and last points of the path. It may not be obvious at first when opening a path, as the control pts will overlap each other. This feature is useful for the current LDL bug that causes a phantom diagonal line on the map when closed paths are used. That's about it! There are a host of api commands that run this show, but I won't go into them quite yet. I'll reserve the next post to include at a later date if needed. I think the chat menu is going to be the easiest way to navigate though. This has been a fun project. I hope somebody gets some use out of it! Version log: v0.1 - Initial release v0.2 - prevents ctrl pt resizing, deleting path deletes ctrl pts, entering edit mode for new path while editing old path will delete ctrl pts of old path editing v0.3 - added path simplification capability. Useful for freehand paths with a ton of pts!