MegaMek / megameklab

MegaMekLab is a BattleTech unit modification program. It allows creating and modifying all unit types available in MegaMek from Support Vehicles up to WarShips. It also allows printing record sheets for single or multiple units.
http://www.megamek.org
83 stars 122 forks source link

[0.49.8] Laser Insulator needs functionality to attach it to a specific weapon #1151

Closed SVNaas closed 5 months ago

SVNaas commented 1 year ago

Environment

MegaMekLab 0.49.8

Description

If a Laser Insulator is equipped to a unit with more than one viable weapon in the weapon area, for example the right arm, the lab will read this as being valid. However, attempting to load the unit into MegaMekLab, MegaMek or MekHQ will cause a load issue as the Insulator needs to be linked to a single weapon rather than a section of the the unit.

Files

image Ref.txt (Really an mtf)

kchapinriddle commented 1 year ago

This is a bug, but the cause is a little different than reported. The attached 'mech is invalid because PPCs aren't lasers, not because there's two of them in the same location. Hence the 'mech has a laser insulator with no matching laser in the location, which is a construction rule violation. Replace those PPCs with LLs and the 'mech works fine.

The actual issue is that MegaMekLab validation doesn't ensure that every laser insulator has a corresponding laser - it'll let a 'mech with a laser insulator but no lasers pass validation. Which will fail later. See attached designs.

Laser Insulator Test Actual Lasers Version.txt Laser Insulator Test No Lasers Version.txt

HuntingTarg commented 1 year ago

So would this be the same reason that MML does not properly calculate the Total Heat when laser insulators are appropriately placed? [EDIT: added a more informative screenshot] MegaMekLab bug Laser Insulators, validation, and calculated Total Heat MegaMekLab bug Laser Insulators, validation, and calculated Total Heat_LocationPlacement

HuntingTarg commented 1 year ago

Side question (for users, not maintainers); is there a CBT rules citation or official ruling that says that Laser Insulators must be applied/attached to a specific weapon, or can they just be 'out there' to fill crit slots? I looked here and couldn't readily find one. This is relevant to this bug because if (and as long as) there isn't, then the unit should not be deemed invalid by MHQ/MML, it should just treat the unattached Laser Insulator(s) as independent equipment item(s); i,e, if an Insulator isn't 'paired' with a specific laser, it just takes up a (hittable) crit slot and 0.5 ton and does nothing else to the design, it shouldn't be treated as an illegal design.

HammerGS commented 1 year ago

It's well defined in TacOps:AUE pg 134.

and must always be placed in the same location as the weapon they are insulating. Units that do not use BattleMech critical hit space treat insulators as part of the weapon itself.

HammerGS commented 1 year ago

The bug here is in the calculation with us not applying the 1 point heat reduction.