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
127 stars 161 forks source link

[Nightly] Company Generator Creates Mechwarriors without mechs #4245

Open repligator opened 2 weeks ago

repligator commented 2 weeks ago

Environment

Build Date: 2024-06-16T23:38:20.419110358 Java Version: 17.0.11 Platform: Linux 6.5.0-35-generic (amd64)

Description

When using the company generator, I received two pilots without mechs. I suspect that the following log entry had something to do with it. Will investigate when I get the chance.

15:24:49,072 ERROR [mekhq.campaign.universe.generators.companyGenerators.AbstractCompanyGenerator] {AWT-EventQueue-0} mekhq.campaign.universe.generators.companyGenerators.AbstractCompanyGenerator.generateEntity(AbstractCompanyGenerator.java:896) - Failed to generate an entity due to a null 'Mech summary for faction SL

Files

mekhq.log mechless warriors zipped.gz.cpnx.zip

Thom293 commented 2 weeks ago

I think its based on AtB rules, there is a chance a MW can roll as "dispossessed" without a mech. Happens rarely, but it does happen.

EDIT: Although that may not be what happened here, given your log.

Thom293 commented 2 weeks ago

Here is a screen from the AtB doc and from a very old spreadsheet that we had to use before MHQ was up to speed. Someone automated the company generation.

image

image

repligator commented 2 weeks ago

Looks like it occurs if the faction rolls as Star League, but Star League rolls false. It's also basically the same error you get if you ask for IS Omni-Mech's in 3025.

Screenshot_20240619_161309

IllianiCBT commented 1 week ago

Yeah, this happens a lot if you play in very early eras, as a lot of factions don't have mechs in every category. I do wonder if we need to implement a fallback faction - IS for Inner Sphere, Clan to Clan, Periphery for Periphery, etc. Assuming that's not already implemented and it's just not triggering.