MegaMek / megamek

MegaMek is a networked Java clone of BattleTech, a turn-based sci-fi boardgame for 2+ players. Fight using giant robots, tanks, and/or infantry on a hex-based map.
http://www.megamek.org
GNU General Public License v2.0
299 stars 289 forks source link

All units are Intro, Standard, or Unofficial in unit selector under Variable Tech Level #6177

Open pavelbraginskiy opened 2 weeks ago

pavelbraginskiy commented 2 weeks ago

Severity *

High (Major Disruption): A major feature is broken or incorrect, but a workaround exists.

Brief Description *

With VTL enabled, almost every unit which should be Advanced or Experimental is considered Standard in the unit selector (and possibly other contexts):

image

This Skinwalker should be Experimental in any game year.

The Advanced and Experimental categories are nearly empty, even with game year 3150, with a few odd exceptions:

image

Steps to Reproduce

  1. Start a game
  2. Enable Variable Tech Level in the Allowed Units and Equipment tab of game options
  3. Add a unit, select IS/Clan Advanced/Experimental, observe very few units present
  4. Alternatively select Clan TW, search for Skinwalker, observe that there are units present.

Operating System *

Linux

Java Version *

17

MegaMek Suite Version *

0.50.1 nightly

Attach Files

logs.zip

SJuliez commented 2 weeks ago

I'm not an expert on tech progression but I (tentatively) think this is how it should be - the tech levels change with the game year, so setting different years with VTL makes different units advanced/standard and in later years almost all units are indeed standard. In the years I tested no units were ever experimental though. @HammerGS this would be something for you to give a test. Are unit levels in different years with VTL really what they should be? Shouldn't there be experimental units in some game years?

pavelbraginskiy commented 2 weeks ago

Lots of equipment never becomes common. The Skinwalker's Interface Cockpit should make it Experimental in every year. Re-engineered lasers only become Advanced in 3130, and never become Standard.

In our own data for some equipment, such as Spikes, we have the advancement defined like this:

misc.techAdvancement.setTechBase(TECH_BASE_IS).setIntroLevel(false).setUnofficial(false).setTechRating(RATING_C)
                .setAvailability(RATING_X, RATING_E, RATING_E, RATING_D)
                .setISAdvancement(3051, 3082, DATE_NONE, DATE_NONE, DATE_NONE)
                .setISApproximate(false, false, false, false, false).setPrototypeFactions(F_LC)
                .setProductionFactions(F_LC).setStaticTechLevel(SimpleTechLevel.ADVANCED);
        return misc;

Experimental 3051, Advanced 3083, Standard never.

And in fact, if you view the equipment in MML, you can see the tech level for individual pieces of equipment is calculated correctly. But for some reason, if you calculate the tech level of the entire unit mounting the equipment, there's some sort of problem.