Feature: Add cost multiplier to affect Expenditure types #21932
+79
−36
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've seen various requests to be able to scale pricing up or down, such as making ride building costs 50% more expensive, or landscaping costs 25% cheaper. This could be used to increase difficulty, or to create a new kind of game mode (e.g., a roguelike that influences costs every few minutes to change complexity, etc.)
This PR goes about it by adding a new cost multiplier expenditure table vs the % to multiply.
A helper function is introduced to interface between the original hardcoded cost and the new cost to be calculated,
money64 FinanceGetModifiedCost(money64 cost, ExpenditureType type)
.There are very few places in the codebase where the financial transaction actually occurs, so implementing there was straightforward. The remaining changes are on various UI elements, ensuring that the price shown aligns with the new charge.
This build has a 50% markdown on all costs, implemented in
FinanceInit()
.Since this touches so many pieces of code, I'm going to pause here and wait for feedback. Hopefully this can open the door to future fun!