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

Refactored Contract Difficulty Display and Added Tooltips #5073

Merged

Conversation

IllianiCBT
Copy link
Collaborator

@IllianiCBT IllianiCBT commented Oct 19, 2024

Changed difficulty display method from green and red stars to full and half skulls to provide clearer representation of contract difficulty.

Added tooltips for contract difficulty.

image

Introduced a new challenge level display to the mission view panel, which will dynamically update as the contract progresses. So that players can get a better sense of the impact their combat losses make on the contract difficulty.

image

We do have plans to replace the skulls with something more mech-y, down the line, so this is just placeholder art derived from the Pirates faction icon.

Revised contract difficulty stars to use skull images and improved the difficulty calculation logic. Refined the calculation to provide a more accurate difficulty representation, ensuring better gameplay balance and clarity.
Changed difficulty display method from stars to skulls to provide clearer representation of contract difficulty. Added tooltips for contract difficulty and wrapped long text blocks for better readability in ContractMarketDialog.
@IllianiCBT IllianiCBT added UX User experience Force Generation Anything related to Force Generation (Opfor or Friendly) labels Oct 19, 2024
@IllianiCBT IllianiCBT self-assigned this Oct 19, 2024
@codecov-commenter
Copy link

codecov-commenter commented Oct 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 10.42%. Comparing base (a339462) to head (7731b8c).
Report is 111 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #5073   +/-   ##
=========================================
  Coverage     10.42%   10.42%           
- Complexity     6028     6030    +2     
=========================================
  Files           953      953           
  Lines        134113   134143   +30     
  Branches      19435    19433    -2     
=========================================
+ Hits          13979    13983    +4     
- Misses       118785   118814   +29     
+ Partials       1349     1346    -3     

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

@IllianiCBT
Copy link
Collaborator Author

Updated to replace grey skulls with black, to improve readability on dark themes.

Previously, the tooltip text incorrectly implied possession by the user. The updated text clarifies that the estimation refers to the forces’ power equivalence in a general context.
Added a check to return true if the resource key is not found in the mapping, effectively assuming the player accepts the mission by default. This change ensures smoother handling of undefined difficulty levels and avoids potential errors.
Introduced a new JPanel lblChallenge to display the mission's challenge level. Implemented the display of the contract's difficulty using skulls and adjusted the grid layout to accommodate the new component.
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.

Tested and seems to work.

I've missed most of the converstaions on this. I feel like the 2.5 bit is confusing. I think if we started at 1 skull showing parity or near parity, say +50% BV, then add the half skull for each range beyond that.

Skull Ranges
1 Skull (Parity or Near-Parity):

  • OPFOR strength is 100% - 150% of the player’s BV.
  • This represents a balanced or slightly challenging match where the enemy might have a slight upper hand.

1.5 Skulls (Moderately Stronger OPFOR):

  • OPFOR strength is 151% - 200% of the player’s BV.
  • This shows that the OPFOR has a clear advantage, making the encounter significantly more challenging.

2 Skulls (Significantly Stronger OPFOR):

  • OPFOR strength is 201% - 250% of the player’s BV.
  • This indicates a substantial threat level, where the enemy has a dominant position.

0.5 Skulls (Moderately Weaker OPFOR):

  • OPFOR strength is 50% - 99% of the player’s BV.
  • The OPFOR is somewhat weaker, but it’s still capable of providing a reasonable challenge.

0 Skulls (Significantly Weaker OPFOR):

  • OPFOR strength is 0% - 49% of the player’s BV.
  • This represents an encounter with a minimal threat, as the enemy is far weaker.

@HammerGS HammerGS merged commit 3f2dbdb into MegaMek:master Oct 21, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Force Generation Anything related to Force Generation (Opfor or Friendly) UX User experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants