p4535992 / conditional-visibility

a FoundryVTT module to hide tokens from some players, but not from others
MIT License
5 stars 8 forks source link

[BUG] Passive stealth not working unless very high value #47

Closed Zolmy closed 2 years ago

Zolmy commented 2 years ago

Module Version: v0.6.16

Describe the bug Passive stealth not working unless extremely high value

To Reproduce Steps to reproduce the behavior:

  1. Give token higher dexterity / passive stealth until finally hidden.

Expected behavior Token is hidden if passive stealth is higher than passive perception

In my case I needed a passive stealth of 31 for the token to no longer be shown

Screenshots image image

p4535992 commented 2 years ago

@Zolmy set the debug option of the module and pass to me the logs on the web console of the browser. Or as alternative export the json of the actors and pass to me.

Zolmy commented 2 years ago
10 Passive Perception vs 30 Passive Stealth DEBUG | conditional-visibility | (3.6) 'P1' with sourceVisionLevels = [ { "visionName": "Darkvision (CV)", "visionIcon": "modules/conditional-visibility/icons/ae/darkvision.jpg", "visionId": "darkvision", "visionLevelValue": 30, "visionType": "sense", "visionIsDisabled": false, "visionPath": "data.attributes.senses.darkvision", "visionTargets": [], "visionSources": [], "visionBlinded": false, "visionBlindedOverride": false }, { "visionName": "Normal (CV)", "visionIcon": "modules/conditional-visibility/icons/ae/normal.jpg", "visionId": "normal", "visionLevelValue": 30, "visionType": "sense", "visionIsDisabled": false, "visionPath": "", "visionElevation": false, "visionTargets": [], "visionSources": [], "visionBlinded": false, "visionBlindedOverride": false } ] lib.js:113 DEBUG | conditional-visibility | (3.7) 'E1' with targetVisionLevels = [ { "visionName": "Stealthed (CV)", "visionIcon": "modules/conditional-visibility/icons/ae/stealthed.jpg", "visionId": "stealthed", "visionLevelValue": 30, "visionType": "condition", "visionIsDisabled": false, "visionPath": "", "visionElevation": false, "visionTargets": [], "visionSources": [], "visionBlinded": false, "visionBlindedOverride": false } ] lib.js:113 DEBUG | conditional-visibility | [darkvision][stealthed](9.3) Is false, 'P1' can't see 'E1' lib.js:113 DEBUG | conditional-visibility | [darkvision](12.3) Is true, 'P1' can see 'E1' lib.js:113 DEBUG | conditional-visibility | FINAL => 'P1' can see 'E1' lib.js:113 DEBUG | conditional-visibility | (20) Target 'E1' is visible to at least one of the following sources [P1]
10 Passive Perception vs 31 Passive Stealth DEBUG | conditional-visibility | (3.6) 'P1' with sourceVisionLevels = [ { "visionName": "Darkvision (CV)", "visionIcon": "modules/conditional-visibility/icons/ae/darkvision.jpg", "visionId": "darkvision", "visionLevelValue": 30, "visionType": "sense", "visionIsDisabled": false, "visionPath": "data.attributes.senses.darkvision", "visionTargets": [], "visionSources": [], "visionBlinded": false, "visionBlindedOverride": false }, { "visionName": "Normal (CV)", "visionIcon": "modules/conditional-visibility/icons/ae/normal.jpg", "visionId": "normal", "visionLevelValue": 30, "visionType": "sense", "visionIsDisabled": false, "visionPath": "", "visionElevation": false, "visionTargets": [], "visionSources": [], "visionBlinded": false, "visionBlindedOverride": false } ] lib.js:113 DEBUG | conditional-visibility | (3.7) 'E1' with targetVisionLevels = [ { "visionName": "Stealthed (CV)", "visionIcon": "modules/conditional-visibility/icons/ae/stealthed.jpg", "visionId": "stealthed", "visionLevelValue": 31, "visionType": "condition", "visionIsDisabled": false, "visionPath": "", "visionElevation": false, "visionTargets": [], "visionSources": [], "visionBlinded": false, "visionBlindedOverride": false } ] lib.js:113 DEBUG | conditional-visibility | [darkvision][stealthed](9.3) Is false, 'P1' can't see 'E1' lib.js:113 DEBUG | conditional-visibility | [normal][stealthed](9.3) Is false, 'P1' can't see 'E1' lib.js:113 DEBUG | conditional-visibility | FINAL => 'P1' can't see 'E1' lib.js:113 DEBUG | conditional-visibility | (20) Target 'E1' is not visible to at least one of the following sources [P1]
p4535992 commented 2 years ago

The checker is working, you have been set a Darkvision with a value of 30 on the key ATCV.darkvision, maybe you mean to use 30 as the number of feet instead the value for the checker ? In that case you have two option: 1) Manually set the active effect change ATCV.conditionDistance with CUSTOM property and value 30 , and update the value fo the key ATCV.darkvision to 1 for example. 2) [ONLY FOR DND5e] Remove the darkvision acitve effect change "Darkvision (CV)" and set the sense darkvision to 30 ft. on the standard sheet, the module should recreate the active effect the same the frist option describe.

Zolmy commented 2 years ago

Oh alright, I misunderstood the sense values as requiring feet. Thanks for the clarification!