kandashi / Active-Token-Lighting

MIT License
24 stars 24 forks source link

Can set wrong image on token when used in combination with Token Variant Art module #107

Closed strongpauly closed 1 year ago

strongpauly commented 2 years ago

Describe the bug I'm using combat utility belt to configure effects that are applied with conditions. I've configured both ATL to add lighting effects and Token Variant Art to change a token's image. With other effects applied by CUB the image is retained, but with any effects that include ATL values the image is reset to the tokens original.

To Reproduce Steps to reproduce the behavior:

  1. Enable modules Combat Utility Belt, Token Variant Art and ATL.
  2. Configure a condition that changes a token image as described in TVA.
  3. Configure a different condition that adds token lighting with ATL.
  4. Apply first condition - image is changed
  5. Apply second condition

Expected behavior Image should remain that defined by first condition.

Actual behavior Image is changed back to default

Environment:

strongpauly commented 2 years ago

See that's a similar thing described in #100

Aedif commented 2 years ago

Hope you don't mind me jumping in but if you want to avoid TVA clashes with ATL for your usecase of setting both the image and some lighting effects, you might make do with using Custom Configs functionality provided by TVA.

TVA allows to assign whatever setting exists in the Token Configuration window to an image, and if that image is mapped to an effect those settings will get applied to the token together with the image:

https://user-images.githubusercontent.com/7693704/173160740-d005bb61-4684-473a-89a6-52aab5482907.mp4

However this does seem like a resolvable bug.

Just throwing it out there so that you're aware in case there are any more clashes that could potentially be avoided ๐Ÿ™‚

strongpauly commented 2 years ago

Thank for the detailed demo, but I don't think this quite fits my use case:

I have two images, one for standing and another for prone. I want the "Prone" image to be shown when that condition is applied, and the default one when its not.

I have several conditions that apply lighting that can be applied separately of "Prone", for example the Light spell.

I'm trying to get it so the light is applied independently of the image and vice versa.

Although my PR fixes this specific case, it won't fix #100 which addresses a larger issue in that ATL is messing with properties it shouldn't be IMO

Aedif commented 2 years ago

Hi, since the pull request hasn't gone through and as far as I can tell the problem still perisists, I wanted to inform that since my last comment TVA (>=2.10.0) now supports Token Configurations on Active Effects independent of any actual image.

If anyone has conflicts occur between these two modules it should now be a bit easier to just make do with one if need be. This is not a complete substitute for all that ATL can do, and will not work for everyone, but it's there. ๐Ÿ‘

LukasPrism commented 2 years ago

I'm having the same issue with Convenient Effects. If I've used TVA to select another token, an ATL change using CE will revert the token back to the prototype. Doesn't seem to happen with TMFX or other effects triggered by CE, just ATL. Unfortunately there are a fair few CEs that use ATL.

Bryn1701 commented 2 years ago

I too am getting this issue. It took a lot of effort to find out what was happening. I have updated TVA to the latest but it still doesn't resolve the issues for me. ;(

Edit: Upon further testing, this issue still takes the token back to the prototype attached to the character sheet even with TVA disabled. Only disabling ATL can I stop this from happening.

LukasPrism commented 2 years ago

Thereโ€™s a setting in TVA now that updates the prototype to skirt around this issue. Do you have that turned on?

Bryn1701 commented 2 years ago

I couldn't find this setting. Any help is appreciated. Thanks

Aedif commented 2 years ago

image

Note that ATL will still be reverting back to the prototype data, but with this setting enabled changes made via TVA at aleast will be preserved because they will get applied to the token and the prototype.

Bryn1701 commented 2 years ago

I have indeed tried using this setting to no avail. My token still instantly reverts to the Prototype tied to the character sheet when Darkvision spell which is using ATL to give it sight is applied to said token. I am at a loss ;(

Aedif commented 2 years ago

Jut to be sure. The order of events in your test are:

  1. You've set the setting to true
  2. Updated the Token image using the TVA module (Art Select, Token HUD, Condition mapping etc.)
  3. Applied a condition which is using ATL
  4. The Token image got reverted ?

Could you check that with the setting enabled any changes to the Token image using TVA are actually being applied to the Prototype? If not I may need to look into this.

Bryn1701 commented 2 years ago

Yes for number 1 and 3. When I manually tell it via the TVA which art to select to begin with, it sometimes reverts to the prototype and sometimes keeps the current blank PNG, but each time regardless of the outcome, it reverts to the original size of the prototype token which is in this case 1 x 1 where my PNG token is set to 4 x 4. But I would like to emphasize that this issue happens where there or not your module TVA is enabled. The only thing that corrects it is removing the ATL in DAE or disabling ATL altogether.

Here is a video(without audio) for the case issues. https://www.youtube.com/watch?v=m1jQBgqfCvI

Aedif commented 2 years ago

Ok, yes this has nothing to do with TVA. All of these problems stem from ATL.

The workaround that worked for Lukas will work for your use case.

The TVA setting seems to be doing what it's supposed to. The only thing that got "retained" was the only thing that you changed using TVA which was the image. You could also assign the width and height to the image using TVA but I don't think that's what you want.

You want your Actors to have differing images on different scenes which is not possible due to how ATL works. Your tokens will all source the same prototype and will automatically be reset to it.

So yeah, ATL needs to be changed to only affect the properties it has been set to modify. Which is the original problem described by strongpauly.

I'm not sure how it could be worked around in a way that would not break your splash screen. Sorry Bryn. ๐Ÿ˜ž

Bryn1701 commented 2 years ago

Yeah I came to the same conclusion. What's weird is, this is something new. I had used ATL for awhile without issues. I guess one of the updates dug deeper or something. But thank you very much for your help on this. Appreciate the back and forth and aide.