Advertisement Create a free account

[Script] AOE Drawer (Beta)

1441232644
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
On right angles .... I can do it with two point control.... with the right angle control being the rotation points. But where would the token (as a cntrol point) default to? Is this for general drawing or is there an RPG application for right angles?
1441254573
Ed S.
Plus
The default cone shape for D&D is a right triangle with the corner set at the token base. i.e. the 60' cone would go 12 squares out.
1441275184
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
So we are looking for something like this.
1441285472
DK Heinrich
Pro
Marketplace Creator
Sheet Author
for my needs (the only needs that matter right? lol) a cone is always starts at one of the 4 corners of the square the caster is in. It is as long as it is wide at its furthest point. So a 3-yard-cone spell would be 1sq, then 2sqs, then 3sqs.  Having these snap to the grid will be the best for SotDL games but until then both triangle options are used.  Blue is examples of what is hit by the spell, Red is example of how either triangle would be used to show it. 
1441285525
DK Heinrich
Pro
Marketplace Creator
Sheet Author
the option with the arc would be fine also - as it would could be turned to better show coverage on the top example of mine above. 
1441290569
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Wonder if we just do it like this.... the dark blue lines are drawn anf the control points would be the dark blue dots.
1441295022
DK Heinrich
Pro
Marketplace Creator
Sheet Author
That will work for me!  and I have not mentioned it in a while so... thanks again for this work - this is great!
1441312602

Edited 1441312834
I wondered about a lot of this a bit early on, then I did some more research... Using the PHB and DMG, here is what I have come up with: For cones, p204 of the PHB says, "A cone's width at a given point along its length is equal to that point's distance from the point of origin." Thus, a 15' cone, cannot be wider than 15' at its widest point (the end of the cone). As such, the angle for a cone is not 90º, it must be between 55º and 60º, as shown below: Remember (also in the PHB, p204 under Cone), a cone's point of origin (usually the caster) is not included in the effect. Additionally, the guidance given, as far as what squares are affected then, is on p204 of the PHB, in the paragraph immediately preceding Cone, "A spell's effect expands in straight lines from the point of origin. If no unblocked straight line extends from the point of origin to a location within the area of effect, that location isn't included in the spell's area." In this case, you can use the ruler tool, and it centers on a given square. If you take it out to the edges of the (in this case, purple) cone, the ruler arrow will be covered from point of origin (caster) to the corner of the purple cone in all the squares marked in the red overlay. The only question becomes, why are those corners included in the spell effect? Well, using the previously referenced point preceding the Cone section on p204, the center of that square falls within the cone, thus it is affected. If we used the more traditional 90º, it would appear as such: The areas affected are significantly  more than 55º-60º, and it violates the rule that a cone's width (at a given point) is equal to its length (at the same point) from the point of origin. Cones, I think, are the hardest, but circles/spheres/cylinders have been done incorrectly also, insofar as where 5e is concerned (not with this script, it works perfectly, but the D&D community in general). Most templates have a crazy look to them, as to what is covered under a sphere. For example, this is how a traditional template for a 20' fireball appears: I've never thought anything of it, until I read in the DMG (p251) under the section for Areas of Effect, "If an area of effect is circular and covers at least half a square, it affects that square." If you look at how a circle actually appears when drawn out, it looks like this (deleted the fireball overlay, but kept the red border to show): The areas in blue are areas which should be covered under the area of effect for a circular area, which are not based upon "standard" template methodology. That's an accumulation of 8 more squares (at a 20' radius) beyond what previously occurred. I'm not saying this is a bad thing, nor am I saying it is a good thing. In truth, I'm merely mentioning these discrepancies because if you do plan on making overlays to work where you draw out the shape, and it highlights areas of effect (like the blue or red "overlays" above), accuracy in why and which squares are affected, is needed.
1441315648

Edited 1441316936
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
SeanOG said: I wondered about a lot of this a bit early on, then I did some more research... Using the PHB and DMG, here is what I have come up with: For cones, p204 of the PHB says, "A cone's width at a given point along its length is equal to that point's distance from the point of origin." Thus, a 15' cone, cannot be wider than 15' at its widest point (the end of the cone). As such, the angle for a cone is not 90º, it must be between 55º and 60º, as shown below: Remember (also in the PHB, p204 under Cone), a cone's point of origin (usually the caster) is not included in the effect. Additionally, the guidance given, as far as what squares are affected then, is on p204 of the PHB, in the paragraph immediately preceding Cone, "A spell's effect expands in straight lines from the point of origin. If no unblocked straight line extends from the point of origin to a location within the area of effect, that location isn't included in the spell's area." In this case, you can use the ruler tool, and it centers on a given square. If you take it out to the edges of the (in this case, purple) cone, the ruler arrow will be covered from point of origin (caster) to the corner of the purple cone in all the squares marked in the red overlay. The only question becomes, why are those corners included in the spell effect? Well, using the previously referenced point preceding the Cone section on p204, the center of that square falls within the cone, thus it is affected. If we used the more traditional 90º, it would appear as such: The areas affected are significantly  more than 55º-60º, and it violates the rule that a cone's width (at a given point) is equal to its length (at the same point) from the point of origin. Cones, I think, are the hardest, but circles/spheres/cylinders have been done incorrectly also, insofar as where 5e is concerned (not with this script, it works perfectly, but the D&D community in general). Most templates have a crazy look to them, as to what is covered under a sphere. For example, this is how a traditional template for a 20' fireball appears: I've never thought anything of it, until I read in the DMG (p251) under the section for Areas of Effect, "If an area of effect is circular and covers at least half a square, it affects that square." If you look at how a circle actually appears when drawn out, it looks like this (deleted the fireball overlay, but kept the red border to show): The areas in blue are areas which should be covered under the area of effect for a circular area, which are not based upon "standard" template methodology. That's an accumulation of 8 more squares (at a 20' radius) beyond what previously occurred. I'm not saying this is a bad thing, nor am I saying it is a good thing. In truth, I'm merely mentioning these discrepancies because if you do plan on making overlays to work where you draw out the shape, and it highlights areas of effect (like the blue or red "overlays" above), accuracy in why and which squares are affected, is needed. +1 PS: images removed from this quote.
1441316847
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
This is pretty much what Dungeon Draw does... 1) Box-bound the shape, 2) Find the center points for each square "inside" (yellow) a path and for each squares "outside" (orange) the path within the box-bound. 3) Dungeon Draw tiles them, but in this case we would trace the outside perimeter of the "inside" (yellow) squares. Nuances in shapes (your fireball example) would be handed with settings that control the differences in the defining what is “inside” and what is “outside” a path.
Outstanding. Believe me, I was having difficulty reconciling what we (empirical we) have been taught the areas of effect cover based upon previous editions, etc. It wasn't until I started using this, that I realized something wasn't right. So I spent a day or so finding everything I could in the rules for what areas are covered under an area of effect.
1441319275
Vince
Pro
Sheet Author
It would be cool if this script had an option to pull an overlay image from a rollable table that scaled to match the AoE.
1441323283
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Vince said: It would be cool if this script had an option to pull an overlay image from a rollable table that scaled to match the AoE. You know what else would be nice?... never mind... that is off topic. I would like to get to that point with images, its a good idea (there I said my one nice thing to Vince for 2015.)
1441324558
Vince
Pro
Sheet Author
I guess I won't be needing to upload my "Ray of Death" mockup.  ;-(
1441324902
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Vince said: I guess I won't be needing to upload my "Ray of Death" mockup.  ;-( LOL... seriously I am working on it. I went through and cleaned up all my handling of state and made the code easier to edit. 
1441372543
DK Heinrich
Pro
Marketplace Creator
Sheet Author
the discussion on d&d aoe is part of why the system i use switched from centering on a square to centering on an intersection. a 'burst 4' starts at an intersection and goes out 4 squares in all directions. Cone starts at intersection and grows 1 wider for each 1 it is long (see examples above). And everything fills squares (yards in the rules) as opposed to filing feet. It just makes it easier to use once you get used to the change from the norm. In either case - I really like where you are going with the + and the line draw. 
In all honesty DK, cones are the only things which are not centered on an intersection as the point of origin. Every other AOE is. The cone just becomes a pain based upon the damned angles. Even circles aren't too bad, once you know if it covers at least 50% of a square.
1441380566
DK Heinrich
Pro
Marketplace Creator
Sheet Author
oh, its been a bit since I have looked at D&D version - my bad. For me, it is still easier if everything is x squares away from point vs. x feet away from point, it removes all the partials from the work. But I am a very small fish in this big fish bowl of gaming :) (a loud fish yes, but still a small one).
No worries at all.
1441384485
Ed S.
Plus
So D&D 5e cones are equilateral, thanks for making that clear SeanOG!
No problem. I have no life. :)
Something I just ran into. Would you be able to set the drawer S icon to also have sight for the player? When using a strictly LOS (we use 170º), if you're facing NE, you can't see the drawer button.
1441468321
Vince
Pro
Sheet Author
SeanOG said: Something I just ran into. Would you be able to set the drawer S icon to also have sight for the player? When using a strictly LOS (we use 170º), if you're facing NE, you can't see the drawer button. Grid-based rpg problems. "As the enemy advances I quickly produce my masterwork protractor so that I may deduce the area affected by my Cone of Cold Hearted Bastardness™." lol
1441486900
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
v0.8 - Straight line added.
1441487111
Vince
Pro
Sheet Author
I never thought of that.  Great addition.  :-)
Vince said: SeanOG said: Something I just ran into. Would you be able to set the drawer S icon to also have sight for the player? When using a strictly LOS (we use 170º), if you're facing NE, you can't see the drawer button. Grid-based rpg problems. "As the enemy advances I quickly produce my masterwork protractor so that I may deduce the area affected by my Cone of Cold Hearted Bastardness™." lol Hehe I was having my players turn themselves so they could see the drawer token, but then they had to turn back to see the drawer. Grabbing your own handle to turn yourself, causes the drawer to disappear. Sucks.
1441496744
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
SeanOG said: Vince said: SeanOG said: Something I just ran into. Would you be able to set the drawer S icon to also have sight for the player? When using a strictly LOS (we use 170º), if you're facing NE, you can't see the drawer button. Grid-based rpg problems. "As the enemy advances I quickly produce my masterwork protractor so that I may deduce the area affected by my Cone of Cold Hearted Bastardness™." lol Hehe I was having my players turn themselves so they could see the drawer token, but then they had to turn back to see the drawer. Grabbing your own handle to turn yourself, causes the drawer to disappear. Sucks. Going to fix that.
1441503858

Edited 1441503975
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Aaron found the solution. v0.81 - LOS issues improved. Path is still 'darkened" not sure there is any fixing that.
That should be okay. As long as they can cast, they can spin their tokens to place the AOE as necessary. Thank you sir.
1443024078
Ziechael
Forum Champion
Sheet Author
API Scripter
Just wanted to report back that i've taken this into my live game and it is everything I could have hoped for and more. I've put a handy little button in the macro bar to toggle it on and off for players as needed and i'm ready to wow the spell hurlers when they next attempt a fireball! Fingers crossed for future image support ;)