dev7355608 / perfect-vision

Foundry VTT Module: Lighting Drawings and Vision Limitation.
https://foundryvtt.com/packages/perfect-vision
MIT License
53 stars 11 forks source link

Feature Request - Devil's Sight should see through Magical Darkness #197

Closed Backnard closed 2 years ago

Backnard commented 2 years ago

Perfect-Vision's implementation of Magical Darkness is the most accurate I've seen in a VTT with one exception: Devil's Sight should ignore it, A token with Devil's sight should be able to see through the area of darkness from the outside and should be able to see out when inside. Please consider adding this if possible, Warlocks with Devil's Sight who cast the Darkness spell are an unfortunately very common occurrence and your module is the closest I've seen to making that doable in Foundry.

dev7355608 commented 2 years ago

Devil's Sight and Blind Sight is coming in version 3.6.0.

Backnard commented 2 years ago

Oh, Awesome! Well then, thanks for making vision in Foundry more and more perfect. Your module is living up to its name quite nicely and is one of my favorites!

dineshm72 commented 2 years ago

Agreed. I have a devil's sight warlock and a blindfighting fighter who can't wait for the 3.6 version! Great job!

dev7355608 commented 2 years ago

Well, I lied about devil's sight & blindsight being part of the 3.6.0 release, but it's coming, don't worry.

dineshm72 commented 2 years ago

Just adding some encouragement on this... my devil's sight warlock has now started casting darkness on himself and then attacking from within it, and at the moment I end up just having to delete the very nice perfect vision darkness in order to fake it so that he can still see.

dev7355608 commented 2 years ago

I planned to redesign the vision rules UI entirely in order to integrate devil's sight / blind sight nicely, but it was announced that Foundry v10 is going to feature Vision Modes, which will replace all/some of PV's vision rules; I'm not quite sure what this is going to be, so I'm not going to do a complete redesign of the vision rules UI now.

Also allowing the distinction between natural obstructions like fog and magical darkness is tricky. I need to build it as system agnostic as possible: usually there are multiple levels of magical darkness (lesser / greater darkvision). I don't want to create a big mess in the UI. I might just add a simple minimum sight limit for now without different kinds of sight limits and postpone the distinction between fog and magical darkness (blindsight and magical darkvision) etc to a later update (when v10 is released probably).

dev7355608 commented 2 years ago

The V10 release of PV is going to feature Vision Limitation. It is the replacement for Sight Limit, and it is going to allow you to configure different limits for vision and each Detection Mode. If Devil's Sight/Blind Sight/True Sight are defined by the system, you are able to make exceptions for it.

image

dineshm72 commented 1 year ago

Has anyone found a module which has added Devil's Sight, True Sight, or (if needed) Blind Sight as options in the dnd5e system? Until that happens, we can't use the above sweet new feature, right?

dev7355608 commented 1 year ago

Has anyone found a module which has added Devil's Sight, True Sight, or (if needed) Blind Sight as options in the dnd5e system? Until that happens, we can't use the above sweet new feature, right?

@dmaneyapanda Adequate Vision

dineshm72 commented 1 year ago

Awesome!

At the risk of taking this issue over, I'm having some trouble getting the new settings shown above to work, maybe you can point out what I'm doing wrong.

In this scene I have set up a token with Devil's Sight detection, put in a Darkness spell (and modified it to limit vision to 0 and limit devils sight to 60). Here it is with no token's selected:

image

Since I'm the GM, I can see the light on the other side of the darkness spell. When I select the token with Devil's Sight, I'm expecting that token will also be able to "see through" the darkness spell, but it looks like the spell is still blocking sight into/through it.

image

Am I missing something?

dev7355608 commented 1 year ago

That's basically a limitation of detection modes: they can only detect/see tokens. Only Vision Range (Basic Sight) allows the token to see the environment. Basic Sight is darkvision + normal light-based perception, but it could also be used represent other senses. I hope Foundry gets rid of Basic Sight in the future and lets you select, for example, Devil's Sight instead of Darkvision as the primary sense or something like that. It's hard to know for PV what Basic Sight is supposed to be without system/module-specific compatibility code.

So normal vision is be blocked, but the token is able to see other tokens behind the magical darkness with Devil's Sight. Unless you run different rules for magical darkness/Devil's Sight, the limit of Devil's Sight should be infinity (unrestricted), otherwise the token can only see up to 60 feet in magical darkness.

dineshm72 commented 1 year ago

Ahh OK I think I'm coming to better understand the difference between the Vision mode and the Detection mode(s), thanks. Also appreciate the nudge on 60 vs infinity - I was trying to get it to work and wasn't sure whether 0 or infinity was the right setting, so I picked something in the middle that should have worked at some distance in my example.

I'm a little confused about "lets you select, for example, Devil's Sight instead of Darkvision as the primary sense", because I think that is possible now, isn't it?

image

In fact, if you select Tremorsense, things seems to mostly work the way I was expecting them to for Devil's Sight (which, if selected, actually doesn't work), just in a tremorsensy way rather than a devils sighty way:

image

Aside: I would expect tremorsense would work through walls too, but I suspect that is something that would have to be taken up with the Adequate Vision mod.

Is this perhaps a path forward? I don't understand at all whats going on under the hood with Adequate Vision to know, but it seems like if it can make tremorsense work, then there should be a way to make Devil's Sight work. But maybe that also all needs to be done on the side of that mod, not yours.

dev7355608 commented 1 year ago

For the most part vision modes control how the token perceive, not what; but a vision mode can turn off lights, like Tremorsense, which has an affect detection modes. The Tremorsense vision mode isn't actually Tremorsense (the detection mode), it's really darkvision with the lights turned off. That's why it doesn't go through walls and is affected by the blinded condition. It's still just basic sight.

It's doesn't really make sense to apply limitation based on the vision mode, because visibility should be purely the job of detection modes. Even if PV tried to, there are the following problems, which are basically impossible to solve without module/system-specif compatibility code.

Tremorsense can see through the magical darkness, because the vision mode turns off lights and so the vision limitation of the light source is disabled too. I should probably change that: just because a token cannot see light, doesn't mean that the vision limitation of a light source can be ignored.

dineshm72 commented 1 year ago

OK, I think I'm getting it. Let me try to restate things to see if I have it right.

So to sum up, the dream of being able to implement a real Devil's Sight is not yet here, and will require some fundamental changes to the vision/detection architecture. For now, the vision part (i.e. environment) will still be pretty basic, and all you can effectively implement is token detection into and through magical darkness. If that's not good enough, then I suppose one could fall back on just manually turning the darkness light on and off, much like I've been doing up until now for my warlock.

I vaguely remember during the unveiling of the detection modes they talked about how early on they wanted things different, but couldn't figure out how to effectively show multiple vision modes operating at once (e.g. a player with darkvision who casts a spell to get tremorsense), so they had to simplify things. Perhaps that is related to why they ended up where they did.

dev7355608 commented 1 year ago

[...] You can set them to turn off/ignore all lights, but that's it.

Yes. But the FOV/LOS polygon (wall interaction etc) should be the job of detection modes. The vision mode should ideally just determine how the vision is rendered.

PV cannot offer vision limitation for senses that don't have their own detection mode in a system/module-agnostic manner. It would be possible to add compatibility code into PV for Adequate Vision for proper Devil's Sight. But dnd5e isn't the only system with magical darkvision; so naturally I'd have to implement it for other systems too. That's a lot to maintain. I don't want to have that kind mess in PV. API improvements would have to start with the elimination of Basic Sight in my opinion: the split of the Basic Sight into darkvision and standard light-based perception.