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

[Idea] Create Path for AOE Templates

1608770926
Pat
Pro
API Scripter
I've been experimenting with the API Create for path, and it's options... and in experimenting, I found out you can have multiple start-stops in a single path, and nested groups of paths that make for openings... and I experimented with a couple of extra characters on the end of the colors and found out it can do transparency - and now I'm wondering if I could code up some area-of-effect templates that could automatically be applied...  Is this a thing that was widely known, or am I in uncharted waters here? (Image shows curved cone template, partially transparent, overlaying an opaque normally drawn svg square) Essentially, this would be the same code as emojibubble but with a few variants and slightly different rules... 
That seems like a really interesting idea. Would there be a way to give control of the drawing to the player who sends the command to create it?
1608881018
Pat
Pro
API Scripter
Persephone said: That seems like a really interesting idea. Would there be a way to give control of the drawing to the player who sends the command to create it? I can look at that for sure! The early version might co-opt Emojibubble, giving them indirect control through their own rotation for self-range attacks - might use their player color for the template and given them control directly. 
1608904632

Edited 1608905890
Seems you found something not used/documented here before. How does such a .svg path technically look like? If a stop/start is a M (moveto), than that's according to the SVG standard and should be supported.
1608912568
Pat
Pro
API Scripter
Martijn S. said: Seems you found something not used/documented here before. How does such a .svg path technically look like? If a stop/start is a M (moveto), than that's according to the SVG standard and should be supported. Yes, it is supported and means you can make multi-part paths (shapes with internal cutouts, shapes with unattached pieces) meaning drawings with svg/path objects don't have to be solid boxes, circles, and simple shapes. 
1608919692
David M.
Pro
API Scripter
Neat. Aaron's WeaponArcs script  might have some relevant stuff for you for tying to tokens, user input direction/range, etc. 
1608921071
Pat
Pro
API Scripter
David M. said: Neat. Aaron's WeaponArcs script  might have some relevant stuff for you for tying to tokens, user input direction/range, etc.  Heck, he's done it already so I'll likely drop this one. 
any way to get these for cheap or free
1608941645
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
They would require a Pro subscription, being drawn programatically.
Pat said: David M. said: Neat. Aaron's WeaponArcs script  might have some relevant stuff for you for tying to tokens, user input direction/range, etc.  Heck, he's done it already so I'll likely drop this one. That one seems to only do specific arc-based shapes. Maybe yours could allow the user to create custom shapes so they conform to the grid, like this?
1609175409
The Aaron
Roll20 Production Team
API Scripter
Oh, don't drop it, I think you can do a much nicer version!  One thing I learned from weapon arcs that should be useful is that if you build and off-center path, like a cone, facing upward, you can set the size larger to force the rotation point to be at the tip of the cone.
1609176360

Edited 1609176444
Pat
Pro
API Scripter
The Aaron said: Oh, don't drop it, I think you can do a much nicer version!  One thing I learned from weapon arcs that should be useful is that if you build and off-center path, like a cone, facing upward, you can set the size larger to force the rotation point to be at the tip of the cone. Thanks - I may try and avoid sizing up, though - the other bug I reported seems to make an animation determine to clear shapes around it based on the original size of the shape: they short-cut the calculation by not taking into account the rendering of SVG shapes if the original size (not the enlarged size) doesn't intersect, which means animations cut chunks out of enlarged SVG shapes.  That's why when I did the dimmerswitch overlay, I was careful to size the SVG overlay exactly to the tabletop on creation. 
1609180208
The Aaron
Roll20 Production Team
API Scripter
Oh, I'll have to go look at that bug. And I'm not scaling the SVG, I'm just oversizing the bounding box: { "fill": "#99000099", "stroke": "#330000ee", "rotation": 0, "stroke_width": 3, "width": 209.99999999999997, "height": 420, "top": 665, "left": 595, "scaleX": 1, "scaleY": 1, "controlledby": "-MD2icbHE_6brissY0gB", "layer": "map", "_path": "[[\"M\",0,210],[\"L\",104.99999999999999,28.13466520526788],[\"L\",88.74983496554687,19.6753647223035],[\"L\",71.82423009839042,12.66454963495923],[\"L\",54.35199947152935,7.155576479295661],[\"L\",36.46611731005537,3.190371867436312],[\"L\",0,0],[\"L\",-36.46611731005537,3.190371867436312],[\"L\",-54.35199947152935,7.155576479295661],[\"L\",-71.82423009839042,12.66454963495923],[\"L\",-88.74983496554687,19.6753647223035],[\"L\",-104.99999999999999,28.13466520526788],[\"L\",0,210]]", "_id": "-MPeazjmvLX0HCk-o7wN", "_type": "path", "_pageid": "-MA-671dQeW8xAbMtsld" }
1609180442
The Aaron
Roll20 Production Team
API Scripter
Check this script out for some inspiration:&nbsp; <a href="https://app.roll20.net/forum/permalink/2331639/" rel="nofollow">https://app.roll20.net/forum/permalink/2331639/</a>
1609196277
Pat
Pro
API Scripter
The Aaron said: Check this script out for some inspiration:&nbsp; <a href="https://app.roll20.net/forum/permalink/2331639/" rel="nofollow">https://app.roll20.net/forum/permalink/2331639/</a> Wow, thanks! That is waaaaay more ambitious than I'm looking at - I'm looking at something like a combination of emojibubble (an attached cone for example that rotates with the token, combining two controls into one) and a way to spawn player-controlled shapes that can then highlight affected squares or hexes. So for instance, have a proxy shape that barely appears - and instead shows up as an affected area of squares (for square-using pages) or hexes (for hex-using pages) and raw shapes (for games that don't use hexes or squares)...&nbsp; So the player would pick raw shapes at preset sizes, or if there was a resize, I'd try and use the existing tools to resize - watching and correcting resizes that kicked it out of aspect ratio.&nbsp; I definitely don't think I'm up to making a separate set of drawing tools within Roll20.&nbsp;