8000 Improvement: Reworked Integrated Command Rights to No Longer AutoAssign Forces and to Allow Interactions with StratCon by IllianiBird · Pull Request #6813 · MegaMek/mekhq · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Improvement: Reworked Integrated Command Rights to No Longer AutoAssign Forces and to Allow Interactions with StratCon #6813

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

Merged
merged 5 commits into from
May 14, 2025

Conversation

IllianiBird
Copy link
Collaborator
@IllianiBird IllianiBird commented Apr 29, 2025

Dev Notes

Integrated command rights have long been a pain point for players and generally considered a 'newbie trap'. Under integrated command rights the player does not deploy forces, instead MekHQ will pick a force at random and deploy that for them.

This means StratCon players under integrated command rights do not play StratCon they play "advance day until something interesting happens and hope MekHQ doesn't deploy an infantry company against an assault lance for the 4th time this contract."

This PR changes Integrated command rights so that they work like House with some minor differences. Every scenario is still considered a Turning Point, under integrated, but unlike House command rights you will be supported by allied forces in every scenario.

This makes integrated rights a good choice for starting campaigns - the time in which players are most likely to be posted to integrated contracts.

… to Allow Interactions with StratCon

### Dev Notes
Integrated command rights have long been a pain point for players and generally considered a 'newbie trap'. Under integrated command rights the player does not deploy forces, instead MekHQ will pick a force at random and deploy that for them.

This means StratCon players under integrated command rights _do not play StratCon_ they play _advance day until something interesting happens and hope MekHQ doesn't deploy an infantry company against an assault lance for the 4th time this contract_.

This PR changes Integrated command rights so that they work like House with some minor differences. Every scenario is still considered a Turning Point, under integrated, but unlike House command rights you will be supported by allied forces in every scenario.

This makes integrated rights a good choice for starting campaigns - the time in which players are most likely to be posted to integrated contracts.
@IllianiBird IllianiBird added StratCon Bugs relating strictly to StratCon UX User experience labels Apr 29, 2025
@IllianiBird IllianiBird self-assigned this Apr 29, 2025
@IllianiBird
Copy link
Collaborator Author

I have tested this change both in a standard contract (non-integrated) and in an integrated contract and I've not noticed any issues. The bulk of this PR consist of removing special handlers for Integrated command rights, rather than adding new content.

While I recognize the reduced scope of 50.06 I think the inclusion of this PR will be a net positive. During a recent user stream I spotted the user encounter a terrible play experience where they accidentally selected an integrated contract. They only discovered this after traveling for close to a year (to reach the contract site). This meant their autosave had overwritten their pre-contract save. They were left with the choice of canning the contract and hopefully finding another one close enough. Or playing through the contract and hoping for the best.

Landmines - problems users only know not to step on if they already know not to step on them - are poor design, especially if there is nothing the user can do to fix the issue.

Copy link
codecov bot commented Apr 29, 2025

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Project coverage is 12.04%. Comparing base (c24b3e0) to head (e4be277).
Report is 98 commits behind head on master.

Files with missing lines Patch % Lines
.../mekhq/campaign/stratcon/StratconRulesManager.java 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master    #6813   +/-   ##
=========================================
  Coverage     12.03%   12.04%           
- Complexity     6852     6854    +2     
=========================================
  Files          1101     1101           
  Lines        141438   141379   -59     
  Branches      21917    21902   -15     
=========================================
+ Hits          17026    17032    +6     
+ Misses       122597   122523   -74     
- Partials       1815     1824    +9     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator
@psikomonkie psikomonkie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it! I might even use integrated next time I'm starting a new game. It always seemed like a trap to me!

@IllianiBird IllianiBird changed the title Reworked Integrated Command Rights to No Longer AutoAssign Forces and to Allow Interactions with StratCon PR: Reworked Integrated Command Rights to No Longer AutoAssign Forces and to Allow Interactions with StratCon Apr 30, 2025
@IllianiBird IllianiBird changed the title PR: Reworked Integrated Command Rights to No Longer AutoAssign Forces and to Allow Interactions with StratCon Improvement: Reworked Integrated Command Rights to No Longer AutoAssign Forces and to Allow Interactions with StratCon May 1, 2025
@IllianiBird
Copy link
Collaborator Author

I'm second-guessing myself and moving this to 50.07

@IllianiBird IllianiBird marked this pull request as draft May 1, 2025 19:09
@HammerGS HammerGS requested a review from Copilot May 2, 2025 03:29
Copy link
Contributor
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the integrated command rights behavior in StratCon by removing automatic force assignment and aligning interactions with manual deployment similar to House command rights.

  • UI adjustments in StratconPanel to reflect the new integrated command behavior
  • Removal of auto-assign logic in StratconRulesManager and corresponding changes to scenario finalization
  • Adjustments in campaign initialization and prisoner event handling to remove legacy integrated command objectives and auto-assignment logic

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
MekHQ/src/mekhq/gui/StratconPanel.java Removed the disabled “Integrated Command” menu item to allow manual interaction
MekHQ/src/mekhq/campaign/stratcon/StratconRulesManager.java Eliminated auto-assign logic and updated scenario finalization calls to use manual assignment
MekHQ/src/mekhq/campaign/stratcon/StratconContractInitializer.java Removed integrated command objectives cleanup to retain strategic objectives
MekHQ/src/mekhq/campaign/randomEvents/prisoners/PrisonEscapeScenario.java Removed auto-assignment related force selection handling consistent with other changes
Comments suppressed due to low confidence (6)

MekHQ/src/mekhq/gui/StratconPanel.java:198

  • The removal of the integrated command check changes UI behavior; ensure that the panel now supports manual force deployment for integrated commands consistently.
if (campaignState.getContract().getCommandRights().isIntegrated()) {

MekHQ/src/mekhq/campaign/stratcon/StratconRulesManager.java:208

  • Removal of the auto-assignment checks may lead to scenarios where availableForceIDs is empty; verify that downstream logic safely handles an empty force list.
for (int scenarioIndex = 0; scenarioIndex < scenarioRolls; scenarioIndex++) {

MekHQ/src/mekhq/campaign/stratcon/StratconRulesManager.java:2751

  • The integrated command check removal in canManuallyDeployAnyForce alters deployment rules; confirm that manual deployment is now allowed for integrated contracts as intended.
if (contract.getCommandRights().isIntegrated()) { return false; }

MekHQ/src/mekhq/campaign/stratcon/StratconContractInitializer.java:239

  • Removal of the strategic objectives cleanup for integrated commands means objectives are retained; ensure that this aligns with the new design and does not interfere with campaign progression.
if (contract.getCommandRights() == ContractCommandRights.INTEGRATED) { ... }

MekHQ/src/mekhq/campaign/randomEvents/prisoners/PrisonEscapeScenario.java:265

  • The removal of auto-assignment logic in this scenario is consistent with the overall changes; verify that any manual force selection here works as expected.
List<Integer> availableForceIDs = getAvailableForceIDs(campaign, contract, false);

MekHQ/src/mekhq/campaign/stratcon/StratconRulesManager.java:306

  • Passing 'false' in the call to finalizeBackingScenario replaces the previous auto-assign behavior; ensure that finalizeBackingScenario correctly processes manual assignment scenarios.
finalizeBackingScenario(campaign, contract, track, false, scenario);

@IllianiBird
Copy link
Collaborato 8000 r Author

I'm second guessing my second guessing. I think this should be ok for 50.06. @HammerGS what are your thoughts?

@IllianiBird IllianiBird marked this pull request as ready for review May 13, 2025 18:09
@IllianiBird IllianiBird requested a review from a team as a code owner May 13, 2025 18:09
@IllianiBird
Copy link
Collaborator Author

Flipping this to live

@IllianiBird
Copy link
Collaborator 8000 Author

This accidentally still had the new dev cycle tag. It has since been removed.

@IllianiBird IllianiBird merged commit 2881b2b into MegaMek:master May 14, 2025
6 checks passed
@IllianiBird IllianiBird deleted the integratedCommandRightsRework branch June 7, 2025 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
StratCon Bugs relating strictly to StratCon UX User experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0