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

[RFE] When deploying reinforcements using leadership, consider a unit’s transport #5845

Open
3 tasks done
psikomonkie opened this issue Jan 21, 2025 · 0 comments
Open
3 tasks done
Assignees
Labels
(RFE) Enhancement Requests for Enhancement, new features or implementations

Comments

@psikomonkie
Copy link
Collaborator

psikomonkie commented Jan 21, 2025

Enhancement Type *

Improvement to Existing Feature

Brief Description of Enhancement *

When selecting leadership reinforcements let’s consider a transport’s transported units as part of the transport if the transport + transported units is under the GBV threshold.

High-Level Plan

  • Get all active (? However it currently works) Units that are under the GBV threshold
  • Let's prepare transports - start with an empty map of Transports (Unit) to the pertinent information (the GBV and units it's transporting) <UUID, Tuple<GBV, List>>
  • For Each Unit, if it is a transport:
    • For each Transport, store its "totalGBV" - for now just the transport's GBV, and then get its transported unit's UUID's, and for each of them:
    • If the transported Unit is already deployed, skip this (continue;).
    • If the transported Unit is not in the list of eligible reinforcements, break out of this transport's for loop: If a transport can't transport all its units let's list everything individually
    • If the transported unit is eligible, add its GBV to the running total (totalGBV) for this transport.
    • If the totalGBV is more than the threshold, break out of this transport's for loop
    • once every transported unit has processed, if our totalGBV is still below the threshold add this transport, its total GBV, and its transported units to the Transports map. Then, let's remove its transported units from the original list. They're now going to be listed in the menu as part of this transport
  • Once every transport has been checked, display the remaining units from the eligible units under the GBV. For Transports, show its totalGBV instead. If a transport is selected, we'll grab its transported units too for deploying.
    • Bonus: Display transported units nicely

Important other considerations:

  • Don’t double count transported units - if a Transport’s transported units are already deployed lets not consider those transported units for the GBV calculation

Open Questions:

  • Different Transport Types: If a unit has ship transported units assigned and tactical transported units assigned, which should we show?
    • I think the best at to handle this is to show the transport multiple times with the different ways to consider transports. So, if all of them are under the GBV threshold, we’d show Transport (No Transported Units), Transport (with Ship Transported Units), and Transport (with Tactical Transported Units)
    • Edit from Psi: Actually I'm not convinced on this. If you can select multiple units from the leadership menu to deploy at once this could let you deploy the same unit twice (which shouldn't do anything, just wastes your GBV budget). Maybe a dropdown on the leadership menu with the Transport Types, including a "None" option that doesn't consider transports (that is, it'll work the way it currently does if you select None)

Use Cases or Rationale

From Illiani: “Leadership Units should include transported units, from a purely QOL standpoint.

What you’ll want to do, though, is make sure transported units are not shown in the leadership unit menu; and that they are displayed when selecting the transport and that the bv cost to deploy factors in all transported units”

Attach Files

No response

MekHQ Suite Version *

latest

Final Verification

  • I confirm this request hasn't already been submitted (checked the tracker)
  • I've discussed or asked about this enhancement on MegaMek Discord
  • I’m opening this on the correct repo (MegaMek, MegaMekLab, or MekHQ)
@psikomonkie psikomonkie added the (RFE) Enhancement Requests for Enhancement, new features or implementations label Jan 21, 2025
@psikomonkie psikomonkie self-assigned this Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
(RFE) Enhancement Requests for Enhancement, new features or implementations
Projects
None yet
Development

No branches or pull requests

1 participant