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

Drawing Circles and Cones on the Token Layer

Hi all! I'm looking to find or write a very simple script that takes a command like: !Circle 15 or  !Cone 40 The script would then draw a circle (with that radius) or a cone on the token layer in the same way it would appear if you had to draw it yourself. I've seen many scripts that contain whole dungeon designers that handle things like this but there's so many additional features I'm surprised there's nothing as simple as this already out there that I can find. Do any of you know if such a script already exists out there or have any advice on how to start about creating one? I have some Javascript experience but little relating to Roll20 aside from altering existing scripts. Thanks guys!
1560279985
Ziechael
Forum Champion
Sheet Author
API Scripter
This isn't quite what you are looking for but if I remember correctly it was easy to use and effective for the same kind of effect that you want.
1560293123

Edited 1560293180
GiGs
Pro
Sheet Author
API Scripter
I'm trying that out Ziechael, and I must be missing something. The instructions make no sense to me. I can get it to get the little set of 8 icons to appear (even that wasnt obvious to me and took a while), but have no idea how to get the larger circles and cones etc to appear from them. Can you give a step by step instruction on how to make it work, as if you are talking to a five-year-old? :)
I would also appreciate a step-by-step Ziechael. I think I'll try it out tomorrow. As you said it packs a bunch more features into it than I need but it does seem to have the potential to be an easy-to-use tool once it's all set up.
1560300912

Edited 1560300983
The Aaron
Roll20 Production Team
API Scripter
This image shows some of it: The basic idea is that you run the command to toggle on support for a given token: !aoedrawer menu then click the Toggle Icon for Selected button. That gives you the little (S) spot on the lower left corner.  you can then grab that and move it to somewhere else to toggle the palette on.  Then grab a shape on the palette and drag it off to create it.  One row are token centered, the other row are free moving.  The center spot or corner spot moves the drawing, the edge spot can adjust the size by rotation or moving.  Rotating the (S) spot should change the palette menu, if I remember correctly.
1560302931
GiGs
Pro
Sheet Author
API Scripter
Very helpful image. How do you get the cones, etc to appear? I click the little icons, or give them a little drag, and the icon/token moves. I dont see a drawn circle or cone or whatevr appear.
1560303831
The Aaron
Roll20 Production Team
API Scripter
Looks like time hasn't been kind to this script, try dragging the icon twice, in the meantime, I'll see if I can fix it.
1560303889
GiGs
Pro
Sheet Author
API Scripter
I did wonder if API changes had left it behind.
1560304155
The Aaron
Roll20 Production Team
API Scripter
That double drag thing seems to be the only issue, so far.  I always liked this script. I think I'll poke Stephen about it. =D
1560305034
GiGs
Pro
Sheet Author
API Scripter
It does seem pretty nifty.
I've been trying it out now and whilst it has way more features than I initially wanted it's pretty dang nifty! I haven't been able to find any other weird quirks aside from that clicking/dragging thing either. Think I might end up using this in my sessions. Thanks for pointing this script out to me :D
1560329775
Ziechael
Forum Champion
Sheet Author
API Scripter
Thanks Aaron, I planned to do a full, detailed, user guide this morning rather than my day job but you've saved me the effort! I haven't used the script personally for a couple of years but it's good to see it get some love as it was a staple for a long time in my recently ended game. I always found the measured resizing of the templates to be particularly useful.
1560361532
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Rotating the cone dot was how you increased/decreased angle of the cone. Dragification and rotation (angles) where the main UI ideas being used here.  I also have a way of presenting volume of shapes on a 2d plane (the canvas) I will have find it, no sure where I put that.