trioderegion / dnd5e-helpers

Little helpers for little 5e tasks.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature Request: Make the 4-corner cover calculator a separate rules-free visual ruler

LonePaladin opened this issue · comments

There are at least four other RPG rulesets, other than 5E's optional rule, that use this method of determining cover -- starting at a grid intersection, and drawing out lines to all the corners of a target square. Some of them have differences in how they handle it, but they all rely on this process.

I'd like to have just a variant on the Measure Distance tool, that gives you a visual cue for determining cover. Activate the tool, select a grid intersection, and after that it'll pick whatever square the cursor is in and draw out four lines from that intersection to the square's corners. It doesn't need to have any interaction with drawn walls or tokens or anything, JUST be a ruler the user can see.

You already have a part of this module that does the math. It should just be a matter of trimming it down to only calculating where the lines go, and drawing them on the canvas. ("Should", given that we're talking about writing code here.)

You can enable the Debug Cover Visualization in Helpers to have this done whenever cover is computed.

Manual measuring/cover tools is outside the scope of this module and would be better suited for a module dependent on the exposed Helpers Cover Calculator api.