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
134 stars 173 forks source link

Supply Convoy assigned as a force needing to be preserved during a Frontline Engagement despite not being in the battle #5288

Closed repligator closed 13 hours ago

repligator commented 14 hours ago

Prerequisites and Pre-Issue Checklist

Severity *

Medium (Gameplay Limitation): Non-core functionality is impaired, providing a suboptimal but playable experience.

Brief Description *

An enemy contact appeared on the AoE map. I assigned my one and only combat lance. After completing the battle, I was puzzled. The preserve allies objective (showing just a single friendly mek) was colored red, and would not switch to green even if checked and unchecked.

I didn't figure out why until I was writing up the issue. My Supply Convoy was listed under the Preserve 50% objective, even though they weren't partaking in the mission. The Supply Convoy did not appear in the actual MM game, nor do they appear in the gamelog nor entitystatus.

Screenshot_20241203_152528

Steps to Reproduce

I don't know. I'm going to continue with this campaign and see if it happens again. I've attached MM as well as MHQ saves/logs in case it matters.

Operating System *

Linux

Java Version *

17

MekHQ Suite Version *

Free Text (type manually)

Custom MekHQ Version

https://github.com/MegaMek/mekhq/commit/b0dc5e1f60817e2f84996e554fb4f5ba75a3a222

Attach Files

megamek.log mekhq.log entitystatus.txt Autosave-1-IS Logistics-30690110.cpnx.gz IS Logistics30690114.cpnx.gz

Final Checklist

IllianiCBT commented 13 hours ago

Unfortunately, with the scenario resolved it's not possible to fetch information from it that would be needed for this investigation. Potentially the upcoming scenario generation changes may fix this, inadvertently, so once they're merged we should keep an eye out to see if this happens again. If it does, make a save prior to undertaking the scenario so I can take a look at the scenario's internals.

repligator commented 13 hours ago

Loaded/Reloaded a Sunday save until I got another erroneous battle. Same as last time the supply convoy is needs to be preserved despite not being a part of the mission. IS Logistics30690111.cpnx.gz

IllianiCBT commented 13 hours ago

Perplexing. I'll take a look

IllianiCBT commented 13 hours ago

Ok, I see what's happening here. When we generate a scenario we pick a seed force, that force isn't assigned to the scenario but we use it to determine scenario objectives. In these instances it appears that 'Supply Convoy' is the seed force, hence it appearing in the objectives. If you were playing an Integrated contract 'Supply Convoy' would have been the force assigned to the scenario.

This isn't so much a bug as an implementation we should probably review. I'll have a think and see if I can come up with a reasonable solution.

IllianiCBT commented 13 hours ago

Closing as resolved