-
Notifications
You must be signed in to change notification settings - Fork 176
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
Added Variable Unit Quality to Unit Markets and Updated Unit Market Logic #4160
Added Variable Unit Quality to Unit Markets and Updated Unit Market Logic #4160
Conversation
* Revised unit market offers based on market type, unit type, and rarity * Added quality calculation for units based on the market type * Included market type description in the GUI
- Adjusted values for market offers in unit market - Added condition checks for campaign start in contract market - Introduced modifier for mercenary faction in mercenary market - Streamlined faction retrieval in PlanetarySystem - Updated warning message in GUI properties
# Conflicts: # MekHQ/resources/mekhq/resources/CampaignOptionsDialog.properties
Conflicts resolved |
# Conflicts: # MekHQ/src/mekhq/campaign/Campaign.java
# Conflicts: # MekHQ/src/mekhq/campaign/Quartermaster.java # MekHQ/src/mekhq/campaign/mission/AtBContract.java # MekHQ/src/mekhq/campaign/storyarc/storytrigger/AddUnitStoryTrigger.java # MekHQ/src/mekhq/campaign/universe/generators/companyGenerators/AbstractCompanyGenerator.java # MekHQ/src/mekhq/gui/CampaignGUI.java # MekHQ/src/mekhq/gui/adapter/ProcurementTableMouseAdapter.java # MekHQ/src/mekhq/gui/dialog/GMToolsDialog.java # MekHQ/src/mekhq/gui/dialog/MekHQUnitSelectorDialog.java # MekHQ/src/mekhq/gui/dialog/PersonnelMarketDialog.java # MekHQ/src/mekhq/gui/panes/UnitMarketPane.java
Resolved conflicts |
# Conflicts: # MekHQ/resources/mekhq/resources/CampaignOptionsDialog.properties # MekHQ/src/mekhq/campaign/Campaign.java
… role * Updated computation for determining frequency of units in different rarity categories in AtBMonthlyUnitMarket.java * Added fallback mission role when no specific ones are assigned
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of questions/maintainability requests.
* @param market the type of market | ||
* @return the quality of the unit | ||
*/ | ||
private int getQuality(UnitMarketType market) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to have this "business logic" code in this UI class, or maybe move it to the UnitMarketType class instead?
MekHQ/src/mekhq/campaign/market/unitMarket/AtBMonthlyUnitMarket.java
Outdated
Show resolved
Hide resolved
- Implemented special vehicle chance setting in market options - Rolled back `getFactions` and `getFactionSet` methods in `PlanetarySystem.java` - Adjusted special unit type selection in `AtBMonthlyUnitMarket.java` - Made related changes in campaign options and campaign options pane files - Updated CampaignOptions properties and GUI components accordingly
- The getQuality method is now a static method in UnitMarketType - These changes allow quality calculations to be done on the market type object instead of in the GUI - Removed redundant quality calculation code in UnitMarketPane.java
Updated to include requested revisions. I also moved the arbitrary 'special vehicle chance' value to campaign options. It's no less arbitrary, but this at least means the user can better adjust it to meet their needs. Moving |
# Conflicts: # MekHQ/src/mekhq/campaign/market/unitMarket/AtBMonthlyUnitMarket.java
Requires: #4150 and #4158
This PR enhances the functionality of the AtB Unit Market with the following objectives:
Streamline the process for adding new units for sale. Upon reviewing the code, I noticed numerous dice rolls that lacked clarity regarding their comparison to other market types. I standardized these rolls, introducing human-readable rarity levels to provide maintainers with clear insights into the rarity of units within any given market.
Introduce greater depth to the markets by considering campaign faction and contract state more effectively. Previously, many markets defaulted to the employer faction, potentially leading to difficulties for House Units in maintaining their faction's units between contracts, or problems when no employer is available.
Associate unit quality with market type. While initially, I incorrectly believed this had always been the intent, it seemed too good an idea to abandon. This is applicable for campaigns with and without random unit quality enabled. In the event random unit quality is enabled, the market types will apply different modifiers to the quality roll. In the event this option is disabled, the unit quality will be fixed based on market type.
Additionally, I have provided comprehensive documentation for unit markets and renamed the 'AtB Stuff' folder to 'Against the Bot'. You can access the documentation here.
Update
This now includes a bug fix for the Unit Market that otherwise prevents Artillery from spawning in the unit market. This bug fix was merged into this PR to avoid conflicts.
Closes
Closes #2085