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

Add experimental option for drawing armor pips in groups of 5 #1598

Merged
merged 33 commits into from
Sep 28, 2024

Conversation

pavelbraginskiy
Copy link
Collaborator

@pavelbraginskiy pavelbraginskiy commented Aug 24, 2024

Many people prefer the armor pip layout used by programs like Flechs, which renders armor pips in clusters of 5.

This pull request adds an option to attempt to render the armor pips in a similar fashion.

Even with the option enabled, not all unit types are supported, units where the alternate pip-placement method is known to not work well will always use the old drawing method.

Sometimes adding pips in groups of 5 fails, in which case the code simply falls back to the old method.

The option to enable this method is clearly marked as Experimental so people don't think this feature is guaranteed to produce good results. A future version of MML will remove the Experimental marker and have better support for more units.

I've playtested these sheets on the tabletop with players at my local LGS where they've been generally very well-received.

The following sheets have dedicated support, with custom pip layout hints:

  • WiGEs (0/1 turrets)
  • Ground Vehicles (0/1/2 turrets)
  • Aerospace Fighters
  • VTOLs (0/1 turrets)
  • Bipedal Mechs
  • Tripod Mechs
  • Quad Mechs
  • Quadvees
  • Aerodyne Dropships
  • Spheroid Dropships
  • Conventional Fighters
  • LAMs
  • Spheroid Small Craft
  • Aerodyne Small Craft
  • Naval vessels (0/1 turrets)
  • Submarines (0/1 turrets)

The following sheets might be supported in the future, but are extremely rare and work ok without dedicated support:

  • All Superheavy Non-VTOL Vehicles
  • Dualturret naval and submarine

The following units aren't supported, and armor pips will not be attempted to be drawn using the new method. These units mostly just have a completely different conception of how armor pips work for them, but for ProtoMeks specifically, it's because applying this method to their armor diagram causes the code to fail spectacularly in a way I haven't been able to really fix.

  • Battle Armor
  • Conventional Infantry
  • Jumpships
  • ProtoMechs
  • Space Stations
  • Warships

And now, some example record sheets:

image

image

image

image

image

image

image

Copy link

codecov bot commented Aug 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 2.16%. Comparing base (f3645a6) to head (7119d96).
Report is 42 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##             master   #1598      +/-   ##
===========================================
+ Coverage      2.15%   2.16%   +0.01%     
- Complexity      205     208       +3     
===========================================
  Files           266     266              
  Lines         30638   30731      +93     
  Branches       5236    5255      +19     
===========================================
+ Hits            660     666       +6     
- Misses        29825   29909      +84     
- Partials        153     156       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@HammerGS HammerGS added Record Sheets Record Sheets and PDF/Printing issue For New Dev Cycle This PR should be merged at the beginning of a dev cycle labels Aug 24, 2024
@pavelbraginskiy pavelbraginskiy marked this pull request as draft August 25, 2024 19:30
@pavelbraginskiy
Copy link
Collaborator Author

Thanks to TimberwolfD1 for providing SVG work to better support this armor layout scheme.

@pavelbraginskiy pavelbraginskiy marked this pull request as ready for review September 21, 2024 20:46
@rjhancock
Copy link
Collaborator

Just did a sanity check on code.

@HammerGS HammerGS merged commit 7119d96 into MegaMek:master Sep 28, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Record Sheets Record Sheets and PDF/Printing issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants