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

Feature: Add cost multiplier to affect Expenditure types #21932

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

ltsSmitty
Copy link
Contributor

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.

/**
* Sets wages to be 50% of their standard value. E.g.handymen are now $25 per month.
**/
gameState.CostMultiplierExpenditureTable[EnumValue(ExpenditureType::Wages)] = 50;

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!

@Gymnasiast Gymnasiast added the discussion Some input from team members is wanted. label Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Some input from team members is wanted.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants