MegaMek / mekhq

MekHQ is a java helper program for the MegaMek game that allows users to load a list of entities from an XML file, perform repairs and customizations, and then save the new entities to another XML file that can be loaded into MegaMek.
http://megamek.org
133 stars 171 forks source link

Field Guns/Artillery all arrive on the battlefield with broken guns #4702

Open repligator opened 2 months ago

repligator commented 2 months ago

Environment

Java 17 Linux Master (Latest PR https://github.com/MegaMek/mekhq/commit/d9a07a3c8f79c902c2c188a1590b53ee786de3bd)

Description

This campaign is using the default start date of 3151, so all the weapons should be available. It is also using the default settings under the second preset. All of the units were purchased from the "Purchase Unit" menu. None of them were refit, or had ammo type adjusted. They were staffed by right clicking and selecting Hire Minimum Compliment.

In MHQ, they all appear fine. In the MM lobby, they all appear fine. However, once battle starts, all of their Field Guns/Artillery will appear broken, and can not be fired.

If I launch a second instance of MM (completely separate from the MHQ one) then copy and paste the units from the MM-launched-from-MHQ lobby, they work fine. Somehow this issue is specific to MM when it is launched from MHQ.

Files

megamek.log mekhq.log Freddie's Field Guns31510307.cpnx.gz

repligator commented 2 months ago

Just to make things even more fun, this issue seems to be intermittent now. Saving and loading in MHQ will fix it, sometimes. It also doesn't affect every unit all the time. I've had battles where about half my Field Guns were affected, but the other half weren't.