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

MASH equipment is broken for some existing units #1659

Open
7 tasks done
dxz6228 opened this issue Nov 20, 2024 · 1 comment
Open
7 tasks done

MASH equipment is broken for some existing units #1659

dxz6228 opened this issue Nov 20, 2024 · 1 comment

Comments

@dxz6228
Copy link

dxz6228 commented Nov 20, 2024

Prerequisites and Pre-Issue Checklist

  • I'm reporting the issue to the correct repository:

  • MegaMek

  • MegaMekLab

  • MekHQ

  • I've tested the issue against at least the latest MILESTONE version

  • I've asked on the MegaMek Discord about the error

  • I've reviewed the BattleTech rules and MegaMekLab documentation, and I've confirmed that something isn't working as intended.

  • I've searched the Github tracker and haven't found the issue listed

Severity *

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

Brief Description *

As originally raised by me in Discord, for some preexisting units in MegaMekLab that have MASH theaters/MASH equipment, the equipment fails to load correctly, displaying MASH theater capacity of 0, which, for literal MASH trucks I think is not correct:
изображение
изображение
Furthermore, when loading a bugged unit like this, clicking on the Size column in the Equipment tab for bugged MASH equipment causes an exception:
изображение
I am attaching log files for additional study.

Steps to Reproduce

  1. Load a pre-existing unit with MASH equipment, e.g. MASH Truck.
  2. Notice that its MASH theater capacity is at 0, and MASH equipment fails to load correctly.
  3. Go to Equipment tab, click on Size column for bugged MASH equipment. Receive exception.

Operating System *

Windows 11

Java Version *

17.0.12 from Eclipse Adoptium

MegaMek Suite Version *

Free Text (type manually)

Custom MegaMekLab Version

v0.50.01

Attach Files

megameklab.log

Final Checklist

  • I've checked to make sure that this issue has not already been filed
  • I'm reporting only one issue in this ticket for clarity and focus
@Setsul
Copy link

Setsul commented Nov 20, 2024

This is due to changes to how MASH Equipment is handled and written out in the blk files.
For MASH Equipment of size 5 the old format assigned 5 lines of equipment, 1 MASH core component and 4 MASH Operation Theater.
The new format simply uses MASH Equipment:SIZE:5.0, which is much more sensible in my opinion.

I'm not entirely sure why v0.50.01 manages to load the MASH core component correctly as MASH equipment, but it then stumbles due to the missing SIZE parameter and defaults to size 0. The unkown MASH Operation Theater breaks things completely, they can't be removed via GUI so a simple resaving after correcting the size will not work.
It's entirely fixable via simple text editor though, if you have to.

Either way, the files will simply need to be replaced with new versions saved by v0.50.01.
I don't know if loading outdated files should be handled more gracefully. This would also break loading files from the previous Milestone version, so if compatibility between Milestones is to be preserved, it would have to be handled before the next one.
I'll let someone else weigh in on that though.

EDIT: v0.50.0 already saves in the new format while still loading the old format correctly. Someone removed some of the logic handling the old format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants