dev7355608 / perfect-vision

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

drawings not made invisible when lighting is enabled #318

Closed Psychotopia closed 1 year ago

Psychotopia commented 1 year ago

Description

the option to not disable the visuals of a drawing when you enable lighting effects allowing the following image3

Context

ive been trying to use the drawing features youve added to make smoke clouds, but when enable the lighting settings for a drawing it turns off there visuals meaning you can no longer see the smoke cloud texture the drawing had examples below

image1 lighting enabled smoke cloud not visible vision restricted by smoke cloud image2 lightning disable smoke cloud visible vision unrestricted by smoke cloud image3 two seperate drawings layered over each other allowing players to see the smoke cloud restricting there vision

i intended to use advanced drawing tools editiable polygons to make dynamic smoke clouds that used this module to restrict vision, two of my players are focused around vision denial one an opaque darkness generator and the other creates large moving smoke clouds, while i can still theoreticaly do this it requires me to copy the drawing so i have one for vision and for visual then delete one edit the main drawing and then copy again every time i alter the shape of the cloud

edit: also is it possible to make a specific token not effected by a specfic vision restricting drawings as my players character can see through there own smoke/darkness but not each others

dev7355608 commented 1 year ago

I wouldn't recommend to use lighting drawings for this. The reason is that, if you ever use other lighting drawings in your scene, the drawing of the smoke cloud will override the lighting (darkness level etc) defined by another drawing. So assume you have a lighting drawing with Darkness Level 1 for the interior in a building but outside the Darkness Level 0 (scene config); if you then spawn the drawing for the fog in the interior, then this drawing would override the Darkness Level to 0, which it inherits from the scene config, and would brighten the interior. For temporary vision limitation templates (or light sources if it is magical darkness) is the right choice. Templates are of course more limited shape-wise.

Another minor issue would be that drawings are rendered below tokens. So the token would appear to be above the smoke instead of in it.

Psychotopia commented 1 year ago

im using the vision limitation feature rather than darkness level on the drawing so i think im free of issues with darkness levels, ive been playing with templates and there limitations are a deal breaker image would it be to hard to make it possible to toggle drawing visibility while the lighting features are active?

Psychotopia commented 1 year ago

im using vision limitation instead of darkness level so hopefully the darkness levels should bother me at all, ive played around with templates and they are to limited in shape and functionality to use, my players will be using the smoke from the start of battles to the end so its going to be all most permenant from round one to the end of the fights

image is it to hard to add an option to not hide the drawing while enabled?

Psychotopia commented 1 year ago

you are kidding me i refreshed so many times to check if the first one had posted then the moment i do the second one its there

dev7355608 commented 1 year ago

I added a flag that makes the drawing visible in 4.1.9. There's UI for this setting at the moment, so you need to change it with a script macro. For example:

// Select drawing(s) and then execute this to make them visible
canvas.drawings.controlled.forEach(d => d.document.setFlag("perfect-vision", "visible", true))
Psychotopia commented 1 year ago

Awesome thank you man i really appriciate it.