gludington / conditional-visibility

a FoundryVTT module to hide tokens from some players, but not from others
4 stars 16 forks source link

Possibility to integrate conditions with Combat Utility Belt's enhanced conditions #13

Open Waltrobus opened 4 years ago

Waltrobus commented 4 years ago

It would be awesome, if this module could work together with Combat Utility Belt's Enhanced Conditions. This way conditions could be combined and unnecessary condition stacking could be avoided.

Just being able to add Conditional Visibility conditions into the Combat Utility Belt's customized condition list would also help a lot as users of the Enhanced Conditions probably all have the default core conditions hidden and that happens to hide Conditional Visibility conditions too!

gludington commented 4 years ago

If you are removing all other conditions but CUB, one way to get it working is to add the conditions on Combat Utility Belt's Condition Lab. image

The pairs would be Invisible modules/conditional-visibility/icons/unknown.svg

Obscured modules/conditional-visibility/icons/foggy.svg

In Darkness modules/conditional-visibility/icons/moon.svg

Hidden (5e only) modules/conditional-visibility/icons/newspaper.svg

736dave commented 3 years ago

Bug? If you have added the conditions back in to Condition Lab as described above: When a player/npc rolls stealth, the condition appears to be added to the token, BUT not activated in the HUD. I had to use a script to remove the condition. (selecting it again in the HUD just seems to add the same condition a second time) Screen Shot 2021-01-02 at 12 51 03 PM

If it helps, I see two active conditions:

Screen Shot 2021-01-03 at 11 41 56 AM

Peej2 commented 3 years ago

Sorry if this has been resolved, very new to foundry. Is there any other config required of the effect, or is just getting the correct icon and name what matters?

I cant seem to get it to apply automatically on stealth roles.

Vagor96 commented 3 years ago

This seems to be a CUB bug. See death-save/combat-utility-belt#448

Vagor96 commented 3 years ago

Nevermind, it is a core foundry bug. The comma is in the en.json. If you remove it manually, everything works fine. https://gitlab.com/foundrynet/foundryvtt/-/issues/4710

LuxuriaU commented 3 years ago

en.json

Do you know how one would do this on Forge, if it is possible, not super savvy with code related issues.

736dave commented 3 years ago

en.json

Do you know how one would do this on Forge, if it is possible, not super savvy with code related issues.

Either that, or do we know it will be fixed in the next release. My apologies for being a Muggle ;-)

shinkei13 commented 3 years ago

en.json

Do you know how one would do this on Forge, if it is possible, not super savvy with code related issues.

Per KaKaRoTo "It should be however easy to have a macro or a module that does this : game.i18n.translations.Hidden = "Hidden" "

I haven't been able to get it to work/fix the issue however. It does show both effects as "Hidden" no comma. But I presume this is happening after "this._system.effectsByCondition().get('hidden');" and thus doesn't register before the module takes place.