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

BUG [49.12] Portraits revert to default "?" when battle starts #4449

Closed
TheSkywise opened this issue May 23, 2023 · 10 comments · Fixed by #4477
Closed

BUG [49.12] Portraits revert to default "?" when battle starts #4449

TheSkywise opened this issue May 23, 2023 · 10 comments · Fixed by #4477
Labels
Bug GUI User Interface

Comments

@TheSkywise
Copy link

Environment

megamek.MegaMek.initializeLogging(MegaMek.java:115) - Starting MegaMek v0.49.12
Build Date: 2023-03-04T15:27:34.898759400
Today: 2023-05-22
Origin Project: MegaMek
Java Vendor: Eclipse Adoptium
Java Version: 11.0.18
Platform: Windows 11 10.0 (amd64)
System Locale: en_US
Total memory available to MegaMek: 2 GB

Description

Super easy for me to recreate issue.
I start MegaMek and add units. When I change the pilots portrait, the new portrait shows up in lobby but the portrait disappears when the battle starts. It changes to the "?" default portrait. This happens with newly created forces, saved mul file forces, etc.

I have a custom portrait folder but the issue occurs even if I just use the default portraits and no custom.

I have even deleted my custom portrait folder, and the issue still persists.

If I load a unit list, their portraits show up in lobby but also change to "?" default when the battle starts.

I have developmental version on two computers (one is a win10 and the other a win11), and it happens on both.

This happens when I run MM by itself, or from MHQ.

I dont know if this helps, but here are my random thoughts on the issue:

  1. The MM program folder is on my desktop. Could that be an issue with windows file name trying to use the windows user in file path? I dont know, just a shot in the dark.
  2. Surely it has to be on my side since I would imagine others would have reported this obvious issue already, so here is what my computers have in common:
    a. Both have a custom portrait folder in the portraits folder. Could this folder cause the problem? But problem persists even if I dont use any of those portraits.
    b. Both running Eclipse Adoptium 11.0.18. Maybe a problem loading image files?
    c. I have also noticed that my save game files always save to the "savegames" folder even if I direct it to another folder.
    d. I use 7zip to unzip my MegaMek program, so i dont think its that.
  3. If its not a file load issue (since the portraits show up in lobby), then somehow the portrait data during the battle startup procedures.

Files

Player: Rex Razor Renegades

megamek.log
Portrait.sav.gz

@TheSkywise
Copy link
Author

I think this might not be an issue on my side since its happening to both my clean installs on seperate machines. I have asked my gaming group to test this issue as well, and will let you know if they are having the same issue or not.

@Thom293
Copy link
Contributor

Thom293 commented May 23, 2023

Ive never seen this exact issue but I havent tried to assign portraits from MM before.

Just random thoughts - make sure it's pointed to the correct portraits folder in the correct MHQ install. New MHQ installs remember the old MHQ installs at least for save games and camo, and perhaps portraits too. So to test - in your current MHQ version select a pilot and manually assign him a new portrait in the current install folder. I.e. when selecting the portrait, go up to the mother folder and then drill back down to the portrait folder just to make sure. Then relaunch him in a scenario from MHQ into MM and see if he reverts to a ? or sticks.

For example when I install version 2 of MHQ and load a save, it will default to the save folder of MHQ version 1 unless I manually navigate up and then back down to the version 2 folder.

Beyond that, I'm stumped. There was an issue where MM would display the original pilot photo in the MM pop-up in game, but I think that was fixed.

@TheSkywise
Copy link
Author

TheSkywise commented May 23, 2023

Im not even using MHQ nor am I using save files for this bug. Just straight up building a new unit in MM.

However, I understand what your saying... somehow make MM redo the file path. I tried refreshing the directory in MM, and selecting a portrait.

Same thing. Portrait shows in lobby for that unit, and changes to default "?" portrait when I click "Im done" and the battle starts.

Does this happen to you? It should be super easy to reproduce the bug. Add a new unit, assign any portrait, start the battle and see if the portrait is still there.

@TheSkywise
Copy link
Author

**** UPDATE ****
So, here is what I found out...

The portrait is NOT showing up on the General Tab.
The portrait is NOT showing up when the cursor is on the Unit (popup)
The portrait IS showing up under the pilot tab.

General Tab

Pilot Tab

Cursor Popup

@Thom293
Copy link
Contributor

Thom293 commented May 23, 2023

I'm out of town and can't test, but I think this is the other bug I was describing.

Again not certain because you aren't using MHQ. (I'd suggest using MHQ). But let me see if I can find it.

@Thom293
Copy link
Contributor

Thom293 commented May 23, 2023

#3589. Item 2. Maybe. But I was told it was fixed...

@TheSkywise
Copy link
Author

I get its just a cosmetic bug, doesnt actually affect the game mechanics. However, I am running a MechWarrior campaign and I hope it can be fixed (we have custom portraits and it would be cool).

Also, as I've said many times before, you developers are amazing. Been playing MegaMek since early 2000s, BattleTech since the 80s (Im old). Its just amazing. My hat is off to you guys and your passion for this game. Im going to try and contribute more to this project.

@Thom293
Copy link
Contributor

Thom293 commented May 23, 2023

I am not a developer. But yes I agree. You should thank them on Discord. ;)

Also - use MHQ to launch your battles. It should work perfectly.

  1. Set your pilots up in MHQ. Go to the briefing tab, create a mission (a fake contract). Then create a scenario launch from template, choose battle. Then go to TOE, deploy the pilots to that battle and hit start. Then in MM set it up how you want. At end it will ask you if you want to save as .mul. say yes, and it will xfer back to MHQ. Can use it to track your whole campaign, parts, repairs, cbills, etc. Just a suggestion.

@TheSkywise
Copy link
Author

That worked. The portraits showed up fine when I launched it from MHQ. I was able to load the MUL file into MHQ and it worked. Although, I had a problem a while back with this same issue from MHQ (I think when I change portraits).

However, while the player forces portraits from MHQ work fine, when I load the enemy forces from MUL in MM or make new ones the issue still persists.

I have the players fighting the Red Daggers pirate band as part of our campaign, and to have portraits for them would be cool… of course, this isn’t a game breaking bug or anything, but it would be nice if it could be fixed. Thanks!

@Thom293
Copy link
Contributor

Thom293 commented May 23, 2023

Glad it worked.

There is a way to track the red daggers also. I THINK there is a way to do it by starting their own MHQ Unit and launching them into a battle joined by both the red daggers and the player. I have never done it this way, but others have I think. So you would need to ask around.

I know another way to do it, but it will take me a bit to explain. So give me a few hours and Ill post it up sometime tonight or tomorrow. Basically I can create you a scenario modifier or a scenario called "Red Daggers" and you can add that scenario or modifier, and it will call a "redDaggers.mul" file that you can put in a folder and update the .mul as necessary. It will keep their portraits, skills, (and SPAs and Edge, if you have them enabled). Setting it up the first time may take some doing, but after its set up, you would just need to update the .mul file each time.

Here is a sample battle I did using one of my old Merc Units. It has a readme that explains part of the process.

and you can @ me on discord if you like, so we dont clutter this.

The Bluecoats 3066 Scenario CA.zip

@SJuliez SJuliez added Bug GUI User Interface labels May 25, 2023
HammerGS added a commit that referenced this issue Jun 7, 2023
+ Fix #4449: Delete PilotToolTip cache on client start and when portrait
is set
+ Fix #4467: Add client setting for Max Range to Draw Sensor / Visual
Rings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug GUI User Interface
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants