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] AOE Drawer (Beta)

1440246107

Edited 1441504008
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
a. (S) Spell effect: Any token representing a character sheet will have this follow icon. A short drag-n-drop will trigger the menu. b. Menu: Across the top token centered (and follow) circle, rectangle, square, and cone. Bottom move to place for the same. Again short drag-n-drop. c. Control: Sizing control with measurement. d. Center: Move and place control. e. Angle: Cone angle is set by rotation of the control point (5 degrees to 175 degrees.) v0.2 - Improved toFront() (hopefully and improved how I am getting the charcter recordsheet controlby. v0.3 - Changed the graphic events, should behave better with other scripts; and wil reduce crashes. (There is a side effect that cause "center moves" to trigger a change to the realtive control point location, but will clean that up.) v0.4 - Issue with "center moves" fixed. v0.5 - Changed state (required to make further updates.) v0.6 - Setting for each token and default option (more settings to come but this is a important one to make the script more immediately useful.) v0.7 - Basic color picking is in place for players. v0.8 - Straight lines added. v0.81 - LOS issues improved. GIST Link Will be making some updates; however its fairly useful as it is. PS: TY to Aaron for the icecream cone.... with his help maybe this gets a Vince "SOA" badge.
1440246834

Edited 1440247550
Ziechael
Forum Champion
Sheet Author
API Scripter
I love the fact that is only the beta release and it is already looking awesome! Two little notes: The (S) icon sits partially behind tokens (mine are circular portraits) *edit - seems linked to the issue below, running this script alone doesn't display the same behaviour* I'm also getting the following error when I move a token with the icon: *edit - possible conflict with another script (works fine on its own), testing now* /home/symbly/www/d20-api-server/node_modules/firebase/lib/firebase-node.js:1 orts, require, module, __filename, __dirname) { function g(a){throw a;}var j=v ^ TypeError: Cannot call method 'get' of undefined at evalmachine.<anonymous>:835:17 at eval ( The error results in little (S) icons being left on the map when i restart the API and it adds a new one to the token *EDIT* After disabling all scripts and enabling one by one it looked to be a conflict with it'saTrap but then i disabled that and re-abled it again to be sure and everything works fine now... my head hurts but otherwise all is right with the world =) At the risk of jumping the gun would it be possible to implement an on-off toggle so that I could have the follow icon only when needed? Not all of my players are spell casters and those that are only use AoE spells occasionally so having the icon ALL of the time might be a bit overkill for my group.
1440247400
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
This is why I threw it out there... to find stuff. 1) There is a "toFront(slider);" in there but, might need to add a timer (or set further to the side.) 2) Need to allow for "on/off" settings. 3) I think the pathing might need to be on the object layer, but hoping to avoid that. 4) It will agressively try to place those (s), so I need to clean up any orphaned ones. 5) Need to avoiding crahes by looking to see if I have an object before any "get" is used.
1440247660
Ziechael
Forum Champion
Sheet Author
API Scripter
Have edited my post with updates, i managed to find the conflicting script but then it went away lol... this script is going to be a lifesaver for my annoying spell users by the way!
1440247920
Ziechael
Forum Champion
Sheet Author
API Scripter
Hmm, might have figured out the issue... the token representing a character assigned to a player works fine but when i move a token linked to a sheet with no player assigned it crashes the API as in my first bug report... thereby potentially eliminating my conflict assumption lol: Rini works fine and i can move the token with no crash but even though the ogre inherits the icon as it is assigned to a sheet, once i move that token it crashes.
1440254145
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
I will fix that. Shouldn't be an issue. GMs  will need that for sure. The controlby is just really needed so players can control the drawing.
1440260544
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Which trap script are you using?
1440269022
Ziechael
Forum Champion
Sheet Author
API Scripter
a slightly customised ItsATrap! although i now think it was my other idea rather than a conflict. Ziechael said: Hmm, might have figured out the issue... the token representing a character assigned to a player works fine but when i move a token linked to a sheet with no player assigned it crashes the API as in my first bug report... thereby potentially eliminating my conflict assumption lol: Rini works fine and i can move the token with no crash but even though the ogre inherits the icon as it is assigned to a sheet, once i move that token it crashes.
1440273221
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
v0.2 - Improved toFront() (hopefully and improved how I am getting the charcter recordsheet controlby. GIST Link
This looks fantastic but I have a question. Is this script dependent on another script in order to work? I have it turned on and can get the spell effect icon but when I drag and drop it, it's not bringing up the menu and I wonder if there is possibly a reason why? I only ask because this looks so neat to use.
1440274193
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
No other script is needed. Does the spell icon snap back into place when you drag and drop it?
No, it doesn't.
OK, so I trurned off all my other scripts and it's working now... I will have to turn the others on one at a time to see what is causing the problem.
1440275730
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Let me know. Also making some changes to that pathing... thiniking of using the player owner color and tinted icons to the player color.
OK, it appears that the Blood and Honor script that I am using is causing interference. 
1440278277
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Which one? Think there are few versions out there.
1440288322
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
I do have an issue I need to clear up. Working on it now. 
1440288472
Kryx
Pro
Sheet Author
API Scripter
James W. said: OK, it appears that the Blood and Honor script that I am using is causing interference.  Maybe try my most recent version? I cleaned up a fair amount of it that was causing errors for me.
1440290152
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
v0.3 - Changed the graphic events, should behave better with other scripts; and wil reduce crashes. (There is a side effect that cause "center moves" to trigger a change to the realtive control point location, but will clean that up.) This sort of change... allowed way to many events to the script . on("change:graphic: left ", myfunction);
Sadly, it doesn't work when I use the Blood and Honor script. This one is more useful as the other just adds flavor to the game when combat is taking place of after combat has occured. 
1440318793
Kryx
Pro
Sheet Author
API Scripter
Again you did not specify which version. The original version was buggy for me too. Maybe try my revamped version:  [Script] Blood Spatter and Status Markers
1440327237

Edited 1440327419
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
v0.4 posted in the lead thread. Need to work on Ziechael's requests.... otherwise Ziechael will just go on and on and on about it (if I placed him and Vince on a venn chart there would be a lot of overlap.) On a serious note, Ziechael's requests are needed.... I just want to avoid an API command. However, not sure I can. 
1440334467
Ziechael
Forum Champion
Sheet Author
API Scripter
Stephen S. said: v0.4 posted in the lead thread. Need to work on Ziechael's requests.... otherwise Ziechael will just go on and on and on about it (if I placed him and Vince on a venn chart there would be a lot of overlap.) On a serious note, Ziechael's requests are needed.... I just want to avoid an API command. However, not sure I can.  Harsh... but fair ;) Speaking of which, any progress on having your dungeon tile sets auto update DL based on the side of a rollable table yet... (that's right, i went there)
This needs official support. Its an awesome tool and I love it like no other!
1440343084
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Ziechael said: Stephen S. said: v0.4 posted in the lead thread. Need to work on Ziechael's requests.... otherwise Ziechael will just go on and on and on about it (if I placed him and Vince on a venn chart there would be a lot of overlap.) On a serious note, Ziechael's requests are needed.... I just want to avoid an API command. However, not sure I can.  Harsh... but fair ;) Speaking of which, any progress on having your dungeon tile sets auto update DL based on the side of a rollable table yet... (that's right, i went there) I am hoping the next big update includes API access to market content. If we get that I plan to re-write all of the my tile scripts.
1440346408
The Aaron
Pro
API Scripter
Riley did say that was coming at the GenCon Panel. :)
Really cool Stephen. It always bugged me that Roll20 didn't have something like this (or the FG equivalent).
1440353235

Edited 1440360413
Ziechael
Forum Champion
Sheet Author
API Scripter
With regards to my wish list on this script, which i'm liking more the more i play (still got the 'represents but not assigned to a player' crash issue at 0.3 (haven't had time to play with .4 yet ;) )), the on/off toggle would be great, also if there was a way to use gm notes for tokens or an attribute or some other clever method to define which tokens should get the (S) when 'on' is in effect, that would be awesome!
1440355019
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
I think the "represents" issue is fixed with v0.4 Debating the UI for On/Off.... "Off" is easy... likely dismiss with "rotation" of the (s)... and it will remember to never show for that token again (unless turned back on.) "On" is looking like it will need an token select API command (which will just toggle "On" or back "Off.")  Also going let the players "set" their line color using the player color. Your player color is "red", it will default to "red" but you could draw a "green" line or set "blue" as you default color while still having "red" as your player color. And adding poly lines like those found in this script:  Dungeon Connects
1440360495
Ziechael
Forum Champion
Sheet Author
API Scripter
Stephen S. said: I think the "represents" issue is fixed with v0.4 Still getting: /home/symbly/www/d20-api-server/node_modules/firebase/lib/firebase-node.js:1 orts, require, module, __filename, __dirname) { function g(a){throw a;}var j=v ^ TypeError: Cannot call method 'get' of undefined at evalmachine.<anonymous>:835:17 at eval ( Sorry Let me know if you want a join link to my test area to see if you can figure out the issue in case i'm misleading you but it seems to be only linked to represents.
Is there a way to keep it from adding a spell drawer to certain tokens? For example, on an overview map of the world, I use a target-like token to mark on the map where the players are located in relation to the rest of the world: Normally, I have the target a lot smaller than it is currently shown. When it is smaller though, the (S) covers up most of the target, making it a pain in the butt to move.
1440369718
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
SeanOG said: Is there a way to keep it from adding a spell drawer to certain tokens? For example, on an overview map of the world, I use a target-like token to mark on the map where the players are located in relation to the rest of the world: Normally, I have the target a lot smaller than it is currently shown. When it is smaller though, the (S) covers up most of the target, making it a pain in the butt to move. Yes. Working on that as an update for the script.
1440371288

Edited 1440391054
Why thank you sir. The only other request I would have, is for the shapes that are centered on, or anchored to, the casting token, is there a means to deduct half the grid size away for the size label? As an example, a token casts a Burning Hands, which produces a 15-foot cone. If I draw out the 15-foot cone anchored on the originating token, in order to get the proper amount of squares in size, I need to draw it out 2.5-ft larger, for a 17.5-ft length. The size overlay says it's 17.5-ft in length, but in reality, it wouldn't start until it is outside of the squares controlled (1x1, 2x2, etc.), thus the 2.5-ft additional amount added (exact versus where it "should" begin). While I can easily deduct the 2.5-ft, I know some of my players may not even think of that when they are drawing circles, rectangles and/or cones. I can beat it into them like a Drill Sergeant pissed off because a private farted in formation, but this would be nice to have. I feel like an ass asking for things on this script, but I do really like it... EDIT: Actually, completely disregard this. I just spent the better part of the night trying to figure this situation out, and the way it is now, works perfectly, as long as everyone remembers any square that is more than half covered by the cone, is affected -- point of origin does not count.
1440371878

Edited 1440372189
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Its cool, ideas like that are why it's thrown out here "half-baked." That "offset" for token is sort of GM preference, so I should provide a "padding" option (1/2 token width or something.) PS: Grid snapping as well, 1/2, 1/4, on line, on grid center, etc.
Oh yes, grid snapping would be epic to have, that is for certain. Not sure if the option is (overall) available, but perhaps a Shift-Drag combination would automagically grid-snap, whereas just dragging is free-form, so to speak. Granted, just having the ability to snap to the grid would be enough for me, regardless of how one would turn it on/off.
1440375048
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
SeanOG said: Oh yes, grid snapping would be epic to have, that is for certain. Not sure if the option is (overall) available, but perhaps a Shift-Drag combination would automagically grid-snap, whereas just dragging is free-form, so to speak. Granted, just having the ability to snap to the grid would be enough for me, regardless of how one would turn it on/off. I think we bump against interface limitiations. We would need to use the native snapping which doesn't lend itself to small tokens for this applicaiton. 
1440376602
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Stephen S. said: Its cool, ideas like that are why it's thrown out here "half-baked." I take back the part of "its cool".... cuz now you got "The Aaron" started on the topic.
1440376678
The Aaron
Pro
API Scripter
I just want you to "be all that you can be."  =D
That's it! Thank you guys for working out the bug and pointing me to the updated script for the blood and status markers. They are working together and that's fantastic!
It might be difficult, I'm not sure, but it would also be beneficial if rectangles (not sure about squares, since I haven't considered a spell that would need it that is square/cube) could be rotated, at the very least to 45 degrees. Some spells (e.g.: Wall of Fire) are a "rectangular" effect area (e.g.: up to 60' long by 10' wide -- when considering the damage area, not the physical wall), and they can be placed at angles other than 90º.
1440409765

Edited 1440411791
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
SeanOG said: It might be difficult, I'm not sure, but it would also be beneficial if rectangles (not sure about squares, since I haven't considered a spell that would need it that is square/cube) could be rotated, at the very least to 45 degrees. Some spells (e.g.: Wall of Fire) are a "rectangular" effect area (e.g.: up to 60' long by 10' wide -- when considering the damage area, not the physical wall), and they can be placed at angles other than 90º. That should be supported. Will likely have to "tree" the menu.
Its a great script. Though what I strangely love most about it is the S icon. It can be used as a lighting tool, as well as an Icon with a nameplate that displays directly underneath your PC...
1440412780
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
You could use nudge rotation to cylce through several menu options. /->-------->---------->----------------\ | | \-<-(S)...(A)...(B)...(C)...(D)..(E)<--/
1440424513

Edited 1440424949
DK Heinrich
Marketplace Creator
Sheet Author
Stephen S. said: a. (S) Spell effect: Any token representing a character sheet will have this follow icon. A short drag-n-drop will trigger the menu. can it be used without character sheet? (for us slug games that have not build one because we are not out on the market yet) EDIT: appears the answer is yes, just have to 'associate' the token
1440425079

Edited 1440427936
DK Heinrich
Marketplace Creator
Sheet Author
ok - so 5 minutes in and I am in love. I have a few other things to try to break today, but this is now on my list. I am also 100% on board with a 'snap to grid' option if made available. EDIT: Can you toggle the (S) icon 'off' for tokens that do not have access to AOE things? (I tried delete and it pops back - good safety feature)
1440429961

Edited 1440430026
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
DK Heinrich said: Stephen S. said: a. (S) Spell effect: Any token representing a character sheet will have this follow icon. A short drag-n-drop will trigger the menu. can it be used without character sheet? (for us slug games that have not build one because we are not out on the market yet) EDIT: appears the answer is yes, just have to 'associate' the token The assocation keeps it from "poping" and (S) on door, or torch or treasure chest.
1440430147

Edited 1440430361
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
DK Heinrich said: ok - so 5 minutes in and I am in love. I have a few other things to try to break today, but this is now on my list. I am also 100% on board with a 'snap to grid' option if made available. EDIT: Can you toggle the (S) icon 'off' for tokens that do not have access to AOE things? (I tried delete and it pops back - good safety feature) Working the "on/off" toggle and snapping. And 5-mins to like it?... And I thought HB was sometimes hard to please (said with much affection and appreciation HB)
1440431167
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Just updated and posted v0.5 - Changed state (required to make further updates.) GIST Link Suggest using this one, I made changes to state needed for future updates... 
1440434550
Ziechael
Forum Champion
Sheet Author
API Scripter
I hate to continue being 'that' guy but updating to 0.5 has yielded the following, unclear-able, error for me (sorry): Cannot read property 'pathData' of undefined
1440436951

Edited 1440436970
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Ziechael said: I hate to continue being 'that' guy but updating to 0.5 has yielded the following, unclear-able, error for me (sorry): Cannot read property 'pathData' of undefined Is this in that test campaign  (game) you shared with me?
1440437485
Ziechael
Forum Champion
Sheet Author
API Scripter
Yes sir