Eriku33 / Foundry-VTT-Image-Hover

Character art module for Foundry Virtual Table top
MIT License
7 stars 12 forks source link

Add option to not show image hover for imprecise tokens #69

Open dineshm72 opened 1 month ago

dineshm72 commented 1 month ago

At some point in v11, foundry began to support the concept of imprecise tokens, at least in 5e, possibly in core.

Essentially, these are tokens that are not visible (they may be in darkness, may be invisible, etc.) but may be detected by other "imprecise" senses (hearing, tremorsense).

In game these tokens can be configured to display differently - common options are the mystery man, or (when using Vision 5e) a swirly soundwave image (see below). The intention is that you know something is there, but you cannot identify it, friend or foe. The Token Disposition colorization is also hidden, along with any nameplates or health bar indicators. image image image

Unfortunately, Image Hover does not (yet!) respect this setting, and will gladly show the actor image in the designated location, kinda ruining this imprecision. image

So the request is to add in handling for this case to (optionally?) prevent the image hover from working for these tokens. Or perhaps only preventing it for players? It may be useful to see for GMs I suppose.

Eber (foundry dev and author of Vision 5e) suggested that you need to check the token properties using something along these lines:

if (this.object.detectionLevel === Token.DETECTION_LEVELS.IMPRECISE ) ...

Thanks for considering!