Aedif / TokenVariants

GNU General Public License v3.0
17 stars 12 forks source link

Suggestion: Update Actor portrait using full art instead of token art. #61

Closed 413120 closed 2 years ago

413120 commented 2 years ago

In the Token HUD settings, there is an option to "Update Actor portrait" which allows you to change the token art via the token hud menu and have it automatically update the art on the character sheet with the appropriate image. I'm wondering if it is possible to have it update the character sheet art with a full art variant of the token image instead of the token itself.

I'm probably doing a terrible job explaining what I mean, so basically: Say I have a token on the canvas with three variant token arts: "token1.png" "token2.png" and "token3.png". I'm wondering if it would be possible to change the token art via the token hud, say to "token2.png" and have it update the art on the character sheet alongside it to "token2_full.png"

Aedif commented 2 years ago

The randomizer does something akin to what you're describing:

image

If syncing of Portraits and Tokens is enabled it randomly picks a token image, and then looks for a closely matching portrait art. For example if it randomly picks token1.png it would then select token1_full.png.

However it relies on the 'Search Filters Settings' being set up appropriately. The module does 3 types of searches. Token, Portrait, and General. The randomizer does a Token search, followed by a Portrait search so the filters would need to be setup as so for the syncing to work appropriately:

image

If filters were not there the closest matching name to token1.png would be token1.png, so it need the filters to excluded portrait and token images from one another.

I could do something similar for the Token HUD, but would like to make sure that setting up of the filters would not cause you any issues with your current work flow? Filters affect the rest of the module so there might be unexpected impacts.

413120 commented 2 years ago

No, the filters don't seem to have any negative impact with the way I have things set up.

Aedif commented 2 years ago

Just to keep you updated that I've been distracted by some other new module features I had been working on namely displaying token images to users that only they can see, but I had not forgotten your request. I did some work today and I seem to have something that works:

fileNameSimilarity

I still need to do some testing, cleanup, etc... but will deliver something soon.

Aedif commented 2 years ago

New setting added: Token HUD Settings > Update Actor Portrait > Use a similarly named file

Available in release 1.36.1

Give it a go and see if this fulfils what you want 🙂

413120 commented 2 years ago

It works just as I would have liked. Thank you so much.