Closed Kendricke closed 6 years ago
Saved campaign. Restarted. Images working now. We can resolve this for now as I'm unsure what happened previously.
Oddly enough, I've been experiencing similar intermittent issues with this. Sometimes MHQ won't "detect" any of the images that were in a given folder, even though I'm positive these are valid images in the right folder for this type of person and they're unused and were there when MHQ was started and so on, and then after a restart those will work. Maybe some pictures in a different folder won't load this next time. Maybe they all work this time.
I haven't had much luck tracking down what is causing this. Best I can tell is maybe something's hiding the files or folders from the DirectoryItemsFactory
in some situations (the generic, Java-built-in piece of code that makes a list of the files in the data/images/portraits/ folder)? I haven't managed to replicate any of these issues in debug mode yet.
I just ran into a similar/related issue where I can't randomize or assign portraits to KIA / MIA members of the unit (because I'd changed the images and folders completely, I'm assuming this caused some sort of issue there).
On a side note, I've been inspired to update my giant list of 1000+ portraits I've collected and post-processed for a more general audience. Any idea where I might upload such a file (similar, but even larger than the one I have above on this ticket)?
Use campaign file and portraits.zip files attached below.
1 - Note that I created completely new folders and uploaded new art to take advantage of feature: https://github.com/MegaMek/mekhq/pull/481
2 - Note that I can confirm new hires will use new portraits correctly per above feature.
3 - Note that I do not currently assign Astechs a portrait per my ATB settings.
To repro: Open Personnel tab and try to change ANY personnel to new portrait, either through Randomize Portrait(s) command or "Change Portrait". I can ONLY change the 4 year old dependent "Kolman Stinson" in this fashion (who never previously had a portrait).