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

Removed Predictable Scenario Generation Schedule #5286

Merged

Conversation

IllianiCBT
Copy link
Collaborator

Previously scenarios would always be spawned on a Monday, with the player having advanced notice for all scenarios that would be encountered that week. I've received a lot of feedback over the past months from the dev team and streamers that this creates a very predictable timetable of affairs which, while very civilized, removes a lot of tension from deployments.

Now, every Monday, we make scenario rolls as normal. For every scenario scheduled we secretly store a date. On that date we will spawn the scenario. The player will still have some forewarning, based on the deployment time for the chosen sector, however this makes engagements a lot less predictable.

Added a new "Sector" column in ScenarioTableModel to display sector information. Enhanced scenario generation by implementing weekly scenario date generation and daily scenario scheduling based on campaign and contract conditions, improving dynamic campaign management. These changes optimize the scenario planning process and improve overall gameplay experience.
@IllianiCBT IllianiCBT added the StratCon Bugs relating strictly to StratCon label Dec 3, 2024
@IllianiCBT IllianiCBT self-assigned this Dec 3, 2024
@codecov-commenter
Copy link

codecov-commenter commented Dec 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 10.47%. Comparing base (b29f8cc) to head (df82f23).
Report is 49 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##             master    #5286    +/-   ##
==========================================
  Coverage     10.47%   10.47%            
- Complexity     6052     6065    +13     
==========================================
  Files           959      959            
  Lines        135253   135505   +252     
  Branches      19684    19742    +58     
==========================================
+ Hits          14169    14199    +30     
- Misses       119733   119953   +220     
- Partials       1351     1353     +2     

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

@IllianiCBT
Copy link
Collaborator Author

Added more intelligent force picking for Integrated contracts.

Previously it would just pick a random force from a list of available combat forces. Now it creates a pool with intact forces having a higher chance of being picked over less operational forces.

Streamlined the `determineLayeredForceIconOperationalStatus` method with a switch expression for clarity and efficiency. Improved the force assignment logic in `StratconRulesManager` to better handle force selection and ensure operational units have an increased chance of assignment. Enhanced code readability and reduced potential for errors by using modern collection methods.
Replaced the linear calculation with a quadratic formula to determine the operation status. This change aims to provide a more balanced scaling of operation status relative to the unit count.
The removal logic for force IDs was corrected to ensure proper conditional execution within the 'autoAssignLances' block. This change prevents force IDs from being erroneously retained, eliminating potential conflicts between force assignments. The adjustment maintains correct indexing by moving the removal operations inside the conditional block.
Copy link
Member

@HammerGS HammerGS left a comment

Choose a reason for hiding this comment

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

Co-Pilot sees no issues.

@HammerGS
Copy link
Member

HammerGS commented Dec 4, 2024

@IllianiCBT Merge Conflicts

# Conflicts:
#	MekHQ/src/mekhq/campaign/stratcon/StratconCampaignState.java
#	MekHQ/src/mekhq/campaign/stratcon/StratconRulesManager.java
@IllianiCBT IllianiCBT merged commit 8b24db0 into MegaMek:master Dec 4, 2024
4 checks passed
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants