Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Image/Size Match #19

Closed
brunocalado opened this issue Jun 30, 2021 · 10 comments
Closed

[Feature Request] Image/Size Match #19

brunocalado opened this issue Jun 30, 2021 · 10 comments
Labels
enhancement New feature or request

Comments

@brunocalado
Copy link

Hi.

You module is great!

Can you a way to change the size of the token when you change the image?
image

Sugestion

  • Let the user add to the image name a code:
    great_eagle_size3.jpg
    size(?) will change the size of the target
    image
@javieros105
Copy link
Owner

ohhhh that sounds lie a pretty awesome way of changing the size on the grid. I'm gonna see hw to implement it and use some kind of format to follow.

@javieros105 javieros105 added the enhancement New feature or request label Jul 3, 2021
@jacksands
Copy link

perhaps a clickable options with 1/2x 1x 2x 3x default, or even a slider above or below the images for selection

@javieros105
Copy link
Owner

I was actually thinking that it could be even better, by using the image name, for example i have the names
Character_v1_width_height_scale.png
Character_v2_width_height_scale.png

And if parsing the string I find those values I can set the width height and scale automatically for that specific image.

@jacksands
Copy link

That would be awesome to define a default size indeed, but if there was an "on the fly" selection together with the image selector that would make possible to make a multiplier of the default, or 1x1 multiple if none... with that we could make a giant butterfly for example with 2 clicks... if you want.

to note, both me and Bruno use your module on a werewolf game, and we love it, we can change the image forms anytime... I know people that use it on isometric, Gundam, etc... it is amazing... I just give the idea because it would help me a lot...

but thanks for the awesome module, we love it!!!

@javieros105
Copy link
Owner

that's awesome, really glad you guys like it. That could also be an option, adding buttons to the panel with size presets in case you wanna use those. But I think the data being in the image name gives a lot of flexibility so I'm gonna try to implement that first then maybe add the option of buttons

@javieros105
Copy link
Owner

Just an update, been doing some tests and it's kinda working, want to clean it up a bit and maybe by the end of the week I can have an auto set height width and scale from the name of the image. Still pondering about adding bottons to the hud.

@jacksands
Copy link

Amazing! thank you for your effort!
Anyway you choose will be fine, because even with some of my folders having dozens of images (normally for generic citizens or gards, etc) renaming them will be easy, especially with renamer software...

The hud buttons would be good for me for creating different monsters, using size changing spells, etc, but it also can be done with macros, that I already use, so it is just a detail.

Many of my maps are fully populated with different images thanks to your incredible module, so just for you to take the time and facing this Code black magic that I really don't understand at all is really appreciated!!

thank you!

@javieros105
Copy link
Owner

Just missing a part in the code where if there is no height width or scale in the filename it will use the corresponding value of the prototype token. Once I have that part finished, the update will go live

@jacksands
Copy link

ow, sorry for the late response... very happy about that!!
once again thanks for the effort

@javieros105
Copy link
Owner

Latest release adds the functionality to set dimensions through the wildcard image. Readme has instructions but I will put them here too to give them visibility

  • wildcard images use this pattern name*
  • name_height<number>_width<number>_scale<number>_.extension, it's important that each parameter s preceded and followed by an underscore, so if you want to set up height, there has to be a _height<number>_ somewhere in the name
  • you can choose to change <number> for a positive integer or floating number and which one to fill. If there are any parameter missing then the module will use the prototype token parameters to fill the ones missing, so you can use images with no parameter setting at all or just set one or two of the parameters.
  • these are valid filenames that will be picked up by the module name.extension, name-different.extension, name-other_height2_scale1.5_.extension

@javieros105 javieros105 pinned this issue Jul 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants