dragonflagon-fvtt
dragonflagon-fvtt copied to clipboard
DF Template Enhancements: Help with improving compatibility with Walled Templates module
Module Walled Templates v 0.2.3 DF Template Enhancements v 1.6.1 Foundry v 9.269 dnd5e 1.6.0
Describe the issue Hi! I am the author of the Walled Templates module. As pointed out in this issue on my GitHub site, Walled Templates and DF Template Enhancement don't play well together. Which is a shame, because the two are very complementary—I would love to have autotargeting of templates that are also blocked by walls. (See also your #324)
To Reproduce Steps to reproduce the behavior:
- Install both modules.
- Draw a template on a scene with walls.
- In the template config, select "Blocked by Walls."
- Drag a template near a wall. Notice how the grid squares are highlighted on the other side of the wall, which does not happen with just Walled Templates module. Notice also the black outline suggesting that the template knows a wall is there and is being drawn correctly, but the grid squares are highlighted when they should not be.
I am not sure at the moment where the two modules start to conflict. I am not seeing anything helpful in the console.
I can tell you that, in simple terms, Walled Templates retrieves the line-of-sight polygon from the origin point using ClockwiseSweep, and then intersects that polygon against the default token shape. It substitutes in this new polygon shape for whatever the template shape was, and then it lets Foundry take over and pick grid squares accordingly. So I am thinking that DF Template Enhancements could pretty much take over at that point, given a polygon of a certain shape, and do whatever it wants to identify grid squares after that.
More complex interactions are possible, such as adding a flag to change the default polygon shape used to intersect the sweep polygon. Within reason, I could intersect basically any polygon shape you want. Not sure exactly where DF Template Enhancement is stepping into the template creation process.
I am on Discord at caewok#9192 if you would like to chat about this.
To add to this, while the two modules are enabled, even when there are no walls around it makes square templates hollow in the middle: