caewok / fvtt-walled-templates

Foundry VTT templates that interact with walls
MIT License
9 stars 4 forks source link

Conflict between Walled template and Levels #100

Closed TheXeno30 closed 4 months ago

TheXeno30 commented 5 months ago

Unfortunately walled template doesn't work with the auto elevation of the modules Levels and volumetric template. Also it seems like there is a problem where it still recognizes "window" walls as blockades even when set to only blocked by wall that restrict sight.

hope it's possible to fix.

morepurplemorebetter commented 4 months ago

This is also an issue that I'm running into. Creatures on different levels being targeted is annoying but can be worked around. The fact that the template wants to wrap around walls on other levels is the main issue.

caewok commented 4 months ago

I made a change in v0.7.8 so that the template top/bottom is considered to be the template elevation. This should mean that walls below or above the template, as defined by Wall Height module, will not block the template.

"Window" walls by default block sight and movement. When I tested this, I could get a window to not block a template by changing the window wall settings accordingly for a given wall.

I am not going to change targeting at this time. It would require a lot of assumptions about the 3d shape of the template to know who should or should not be targeted in the vertical direction. This is particularly problematic for things like rays, for which there is no good Foundry interface to adjust the ray destination in the 3d direction. Nor is there any visual indication (besides the elevation marker that I added) of template elevation or 3d shape. So for now, I think it is far simpler to make templates target infinitely in the vertical direction. I might revisit this in the future.

TheXeno30 commented 4 months ago

just updated it to 0.7.8 - still not working. Sorry. Maybe its me. Still not setting template at token hight. The funny thing is that it seems that the elevation is set to 20 just not in the walled template area.

https://github.com/caewok/fvtt-walled-templates/assets/135822719/e3547175-acc6-40e7-ab10-00f32262b120 image image

TheXeno30 commented 4 months ago

actually seems to be working i think - just not displaying the height of the template.

TheXeno30 commented 4 months ago

It actually seems to target correctly now - but still display the template all wrong. It seems to take into account walls on a lower level. But not when resolving the spell.

https://github.com/caewok/fvtt-walled-templates/assets/135822719/1570a10b-dacd-4ca9-94da-5043fb2ed082 https://github.com/caewok/fvtt-walled-templates/assets/135822719/e9022249-8abe-4199-9687-31dd2ee8136d https://github.com/caewok/fvtt-walled-templates/assets/135822719/9a594fa7-0794-486d-9e1e-621ffa510bfc

TheXeno30 commented 4 months ago

Hope all this helps :)

morepurplemorebetter commented 4 months ago

The e1b4cc1 change to use this.template.elevationE is also not working for me. Its value always seems to be 0, regardless of the source token's elevation. This is causing the template to be rendered and creatures targeted using the wrong walls. Could it be that elevationE is something that would be set by another module (e.g. Elevated Vision)? Or is it not supposed to be taken from the origin token's elevation?

This is why in my PR (#107) I edited the drawMeasuredTemplate() function to set a flag that later gets used by computeSweep().

 

I'm using: