Aedif / TokenVariants

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

I have a few things for this really cool module #45

Closed jbowensii closed 2 years ago

jbowensii commented 2 years ago

This is a great module and does 85% of what I wanted, it was recommended to me on a Reddit blog post. That post is here and you may want to read it to understand my use case... https://www.reddit.com/r/FoundryVTT/comments/sxe1rc/request_help_to_find_a_token_art_module_or_code/

A couple of issues I ran into...

(1) I could not keep subdirectories under my monster titles, it would not scan/index them so I just moved all of my tokens into the root directory. Even with MATCH NAME TO FOLDER checked.

(2) The S3 bucket is hard to setup, through trial and error this is the correct format (the tip on the setup screen did not work for me) "s3:name_of_my_bucket:root_directory/Portraits/"

The name of the S3 bucket does NOT contain its location or any other data from say a URL, then a colon (required) followed by a directory path (any depth and name should work), MOST IMPORTANT end with a "/" at least on LINUX.

(3) the search filter setup on the project site shows the search terms in [ ] Brackets, it took me a while to understand that they must be part of the names, so I just removed them since I did not name my files with brackets. You may want to clarify that on your project page.

(4) to get the art and token replaced in a compendium (to make visual searching an option) I had to import the entire compendium, WAIT, then export it again. For the matches 100% were correct, about 15% did not get automatic choices. If you started with bad art, it kept the bad art as a choice which was a problem for me.

Questions:

(1) how do you add multiple terms to a field on the Search Filter Settings. Say I wanted .png and .webp

(2) I could not switch back and for between filenames and pictures when selecting the alternate token. I right-clicked while in the token graphic choice option but the filename list was blank.

Suggested Features:

(1) option to always override current artwork and token (losing current token artwork), or a script to blow away the current artwork in a directory or compendium would be fantastic.

(2) option to have multiple types of tokens, see my example on REDDIT for TOP DOWN tokens since some games like those, but not others... sometimes for BIG monsters, I like top-down even though my other tokens are not.

(3) A way to update a compendium directly, so everything looks nice when searching through a compendium and sometimes you need a picture to help you choose.

Thank you for your time...

Discord: jbowens#0415

Aedif commented 2 years ago

Hello,

1 - I just tested it and it appears to work fine for me. I'd need more specifics about your setup to identify any potential issues with the setting. i.e. token name, path and name of the images you think should be picked up, filters, etc.

2 - Yes, that's indeed the correct format: s3:{bucket-name}:{path}. In programming curcly brackets are often used to indicate something that is to be replaced the curcly brackets themselves included. But I see how that could cause some confusion. The '/' at the end I was not aware as being required and I can adjust for that. However in general S3 buckets is not something I can work on right now as for a long time now I have not had an S3 bucket setup to test on.

3 - I'll clarify that in the docs. That's the example that has been used since that's the pattern that was used by the user that originally reuquested this feature. e.g. Adbert [Token].png, Adbert [Portrait].png

4 - That's not really the intended usecase for this module, but I am working on something right now that should help with compendium mapping.

Qs:

1 - For multiple terms you'd need to use RegEx. 'Include' and 'Exclude' are for simple cases, and RegEx is for anyhing that lies outside of that. For multiple file endings it would be something like so: *.(\.webp|\.png)**

2 - I can't quite understand what you mean here. Could you perhaps rephrase it or provide some screenshots for context?

Features:

1 - As mentioned above I'm working on a feature that should help with image mapping in compendiums. I'll comment here again once it's released so check it out and respond if you think it's still lacking.

2 - Sorry I again am not quite following. This is something that should already be supported by the module. Assuming the naming convention you use is correct you could have both top down and flat images appear under the same token.

e.g. If your token is named 'Goblin', and you have the following 3 images:

PRT_goblin.png TDT_goblin.png TKN_goblin.png

All of these will be found by the module. If you want to filter out portraits from the tokens, what you'd need to do is go to filter setting and set up 'PRT' in the Portrait Include section, and *.\(TDT|TKN_).*** in the Token RegEx section.

You can use sites such as this: https://regex101.com/ to test any regex expressions

3 - Again as per above, it's something I'm working on. Look out for updates!

Regards, Aedif

jbowensii commented 2 years ago

1) I have a test server that I have given access to a few folks I send a discord message with info. That should help with #1, I may have just misunderstood... I moved all of my tokens under the fantasy\Token directory so this is not a problem anymore.

(2) please use my server to test S3 whenever you need it...

(3) thanks for updating the documentation for #2 adding the '/' and what the brackets [] mean, it may help someone else.

(4) thank you for considering #4 as a feature

Q1) the Regex site explained a lot thank you

Q2) I love the features of your module, but updating a compendium with portraits and tokens to make searching more ecstatically pleasing and visual is my main goal I am after, later flipping between multiple images is a big plus. It just so happens I have a set of flat tokens and a set of top-down tokens in two different directories, so switching back and forth (not mixing) since a single game uses one or another. but I can work around this.

Anyway, thank you... if you need helping testing your compendium feature(s) let me know... if you have a Patreon or Kofe send me a link. Have a good one...

Aedif commented 2 years ago

So to wrap up this issue and for the sake of anyone reading it:

As of release 1.26.1 most of the concerts/suggestiong here should be resolved now with the implementation of a new setting's menu Compendium Mapper , and updates to documentation.

I'll close the issue for now but if there's anything else related to what has been discussed here feel free to comment and it will be re-opened. Otherwise open any other suggestions via separate issues.