I already had the portrait folders named to indicate their contents following a scheme similar to Portrait Pack 2024 Full. So naturally I wanted to batch tag somehow. But that proved more difficult than expected because tag files have to include the "pseudo hash" (see function definition of GetPseudoHash() here) of each portrait's Fulllength.png.
At first I thought the mod would generate tag files for all portraits by first loading all portraits by pressing the Load Portraits button then pressing the Save All Portrait Data button. But no. Apparently the only way to get the mod to generate a tag file (and therefore a "pseudo hash") is to add at least one tag to a portrait manually. Well, screw that with a 10-foot pole.
So I decided to reproduce the hashing function in Python as part of a larger script to parse folder names to tags. Which was great fun for reasons that the comments may suggest (/sarcasm).
I thought about that but I couldn't find a reliable way to do it :-( Everyone names portraits differently and I'm not sure even image recognition can help much with fantasy portraits.
Just write in instructions to rename portraits to tag1_tag2_tag3 and scan them, with good ol ctr+c ctrl+v and/or bulk rename apps it'd be already faster than though UMM UI
Thought I'd ask here since your mod sort of muddles with this (at least the concept)... Is there anyway you can swap the portrait of your animal companion?
Having a hard time figuring out how to use this mod - have you thought about an instruction manual for dummies? Specifically, I put my 2,400 portraits into an Import folder I created under your mod, it takes a few minutes to load, then I do what with it after I've done that? None of the buttons in the mod manager seem to do anything.
Like I said somewhere else, putting 2400 portraits into the game is a very good idea - it eats 20+ GB of RAM and I saw people reporting crashes/unstable behavior even with 500+ portraits. As for instruction - yes, I'll expand the mod description a bit (probably with the next version?). And, yes, it looks like the import option's broken somewhere in 0.1.4 so it will be fixed in the next version.
Could I request some more powerful filter controls? From what I could tell, how it works now is that portraits that match all checkmarked tags are shown. What would be useful for me is if each tag could have one of three rules:
A. a portrait MUST have these tags to be included. This rule could be called "required." B. a portrait with one of these tags is excluded. This rule could be called "forbidden." C. these tags are not considered by the filter. This rule could be called "allowed."
I've got a bunch of portraits that, for example, aren't explicitly human or elf. When making an elf character, it would be nice to be able to browse those ambiguous portraits while also excluding the non-ambigously human ones. Same for portraits that aren't explicitly classed.
Side question, the description mentions a "favorite" system that I can't figure out. Where is it and how do I use it?
I liked the first idea and I'll see if it'd be possible to implement that relatively easily (probably by replacing binary filter with something a bit more complicated). As for the "favorite" system - it was supposed to be a reserved tag for "favorite" portraits (like in case you have a couple of portraits you use for most of your characters). But IIRC I've decided it'd be used too rarely so it isn't added.
Ok, this is embarrassing but I feel like I've tried everything (although obviously I haven't). How exactly does this work? I got as far as getting portraits loaded (I think), it shows that I have 499 loaded portraits, 0 tagged. How exactly do I tag portraits?
Hey, great mod, thanks for making this. I wanted to ask if you can make it so I can sort tags alphabetically. They seem to just be in whatever order I make them, making it a bit time consuming to find the right ones once I got a good few going, I deleted everything and started trying to make them in order, but I found that if I don't apply them all to the image the unused ones get deleted.
I am not sure how doable it is but I also thought that it would be nice if the export/import feature, could let you keep all the photos in the mod folder, and only import ones with the selected tags (maybe a checkbox on the export that makes it delete the files after it is done or something?), just to give us the ability to still have them all nice and organized for when we want a certain character, but not need to load them all otherwise, would likely make a tag called PC and NPC and so that the game only ever loaded ones I was using after I was done. Also saves a lot of space in the C drive, I really would prefer it if they had kept that either in the game folder or in documents like other games do.
Again well done with this, I suspect I'll get a lot of use out of this for future playthroughs, and if you make one for the next game they make maybe you can make a way to import our tags to that as well.
Thanks for the suggestions. I remember I've done sorting tags after loading the portraits to the mod UI (you can try saving portraits and unloading->loading them from UI) but I guess I didn't consider sorting after adding a new tag. Importing selected tags doesn't seem like a hard task so I'll probably do it after I finish playing alpha version of a certain game :-)
No, it only work with prepared portrait files. Fortunately, there're a lot of portrait packs and there was a website that does cropping/formatting pictures for Kingmaker portrait format.
On trying this, I got a problem where hitting any button to get to level up caused the program to freeze. Currently uninstalled, but looking forward to it working, as it's a great idea!
Mod was trying to load portraits on leveling up the characters (when it was obviously not needed). Fixed in 0.1.2. You will still experience a "freeze" for 10+ seconds on character creation/respec as the mod is trying to load all of your portraits and it might take a while if you've got a lot of them.
23 comments
I already had the portrait folders named to indicate their contents following a scheme similar to Portrait Pack 2024 Full. So naturally I wanted to batch tag somehow. But that proved more difficult than expected because tag files have to include the "pseudo hash" (see function definition of GetPseudoHash() here) of each portrait's Fulllength.png.
At first I thought the mod would generate tag files for all portraits by first loading all portraits by pressing the Load Portraits button then pressing the Save All Portrait Data button. But no. Apparently the only way to get the mod to generate a tag file (and therefore a "pseudo hash") is to add at least one tag to a portrait manually. Well, screw that with a 10-foot pole.
So I decided to reproduce the hashing function in Python as part of a larger script to parse folder names to tags. Which was great fun for reasons that the comments may suggest (/sarcasm).
Anyway, the script requires Pillow.
My Python environment:
Python 3.10.5
Pillow 9.2.0
Thought I'd ask here since your mod sort of muddles with this (at least the concept)... Is there anyway you can swap the portrait of your animal companion?
As for instruction - yes, I'll expand the mod description a bit (probably with the next version?). And, yes, it looks like the import option's broken somewhere in 0.1.4 so it will be fixed in the next version.
A. a portrait MUST have these tags to be included. This rule could be called "required."
B. a portrait with one of these tags is excluded. This rule could be called "forbidden."
C. these tags are not considered by the filter. This rule could be called "allowed."
I've got a bunch of portraits that, for example, aren't explicitly human or elf. When making an elf character, it would be nice to be able to browse those ambiguous portraits while also excluding the non-ambigously human ones. Same for portraits that aren't explicitly classed.
Side question, the description mentions a "favorite" system that I can't figure out. Where is it and how do I use it?
As for the "favorite" system - it was supposed to be a reserved tag for "favorite" portraits (like in case you have a couple of portraits you use for most of your characters). But IIRC I've decided it'd be used too rarely so it isn't added.
Sorry, I have the dumb today.
EDIT: Neeeeeevermiiiiind. :p
I am not sure how doable it is but I also thought that it would be nice if the export/import feature, could let you keep all the photos in the mod folder, and only import ones with the selected tags (maybe a checkbox on the export that makes it delete the files after it is done or something?), just to give us the ability to still have them all nice and organized for when we want a certain character, but not need to load them all otherwise, would likely make a tag called PC and NPC and so that the game only ever loaded ones I was using after I was done. Also saves a lot of space in the C drive, I really would prefer it if they had kept that either in the game folder or in documents like other games do.
Again well done with this, I suspect I'll get a lot of use out of this for future playthroughs, and if you make one for the next game they make maybe you can make a way to import our tags to that as well.
Importing selected tags doesn't seem like a hard task so I'll probably do it after I finish playing alpha version of a certain game :-)