Tune economy and progression
This tutorial changes how fast players earn currency, gain XP, unlock buildings, and advance the day/night simulation.
Economy flow
Section titled “Economy flow”flowchart LR Place[Place building] --> Cost[ConsumeCurrency] Cost --> Construct[ConstructionTime] Construct --> Operate[Residential or Commercial] Operate --> Income[CollectIncome / AddPopulation] Income --> XP[OnXpChanged] XP --> Level[OnLevelUp] Level --> Unlock[UnlockLevel gates]
1. Tune building costs
Section titled “1. Tune building costs”Open each in-game building under Blueprints/Buildings/InGameBuildings/:
| Blueprint | Properties to edit |
|---|---|
| BP_CBT_House | BuildingCost_Currency, BuildingCost_PremiumCash, ConstructionTime |
| BP_CBT_Apartment | Same + higher UnlockLevel |
| BP_CBT_Shop | Costs + Revenue Per Worker, Profit Delay, Worker Max Limit, Currency Collect XP |
| BP_CBT_OfficeBuilding | Higher tier costs, Revenue Per Worker 1240, Profit Delay 120 s |
Example — cheaper starter house
- Open BP_CBT_House → Class Defaults.
- Note current BuildingCost_Currency (read in editor).
- Multiply by
0.75for a 25% discount. - Compile, save, play DemoMap, place one house, confirm HasEnoughCurrencyToConstruct still validates correctly.
2. Commercial income
Section titled “2. Commercial income”On BP_CBT_Shop and BP_CBT_OfficeBuilding, income is workers × Revenue Per Worker per Profit Delay tick (not a flat class-default Generated Income — that field is computed at runtime).
| Property | Shipped default (shop) | Effect |
|---|---|---|
| Worker Max Limit | 10 | Cap on workers per building |
| Worker Add Delay | 1.5 s | Time between hiring workers after construction |
| Revenue Per Worker | 268 | Currency earned per worker per tick |
| Profit Delay | 60 s | Cooldown between income generation ticks |
| bAutoCollectIncome | false | true = passive income; false = requires WBP_CollectCurrency |
| bGetXpWhenCollectingCurrency | true | Awards Currency Collect XP (3) on collect |
Example — passive shop
- Open BP_CBT_Shop → set bAutoCollectIncome =
true. - Lower Revenue Per Worker ~30% to compensate for automation.
- Play and confirm OnCurrencyUpdated fires without clicking the collect widget.
3. XP and city level
Section titled “3. XP and city level”BP_CBT_PlayerController → Internal_GetExperienceForLevel defines XP thresholds.
BP_CBT_Singleton broadcasts:
- OnXpChanged → WBP_PlayerHUD XP bar
- OnLevelUp → WBP_LevelUpNotification + AddLeveledUpElements
Example — faster early levels
- Open BP_CBT_PlayerController → find Internal_GetExperienceForLevel.
- Reduce returned XP for levels
1–3by ~20%. - Set BP_CBT_Apartment → UnlockLevel =
2so players see a unlock on first level-up.
4. Simulation and day length
Section titled “4. Simulation and day length”| Blueprint | Property | Shipped default | Effect |
|---|---|---|---|
| BP_CBT_GameState | Simulation State | NormalSpeed | ESimulationState — pause / normal / double |
| BP_CBT_TimeOfDay | Sun Speed | 10 | How fast the sun rotates at normal simulation |
| BP_CBT_TimeOfDay | Night Threshold | 0 | Sun angle when IsNight becomes true |
| BFL_CBT_GlobalFunctions | SetSimulationSpeed | — | Called from HUD speed buttons |
Example — faster day cycle for testing
- Open BP_CBT_TimeOfDay → raise Sun Speed (e.g.
20) for quicker day/night transitions. - Use DoubleSpeed on the HUD and confirm vehicles pause/hide correctly at night (BP_Vehicle → Internal_OnNightStarted).
5. Premium cash (optional)
Section titled “5. Premium cash (optional)”BuildingCost_PremiumCash on buildings and AddPremiumCash / ConsumePremiumCash in BFL_CBT_GlobalFunctions support a secondary currency.
To disable premium requirements for a building type, set BuildingCost_PremiumCash = 0 on that child Blueprint.
Example presets
Section titled “Example presets”| Preset | Changes | Result |
|---|---|---|
| Sandbox | All BuildingCost_Currency × 0.5; bAutoCollectIncome = true on shops | Fast iteration |
| Hard mode | All costs × 1.5; Revenue Per Worker × 0.8 | Slower expansion |
| XP rush | Double CurrencyCollectXP; lower level thresholds 25% | Frequent OnLevelUp |
Test checklist
Section titled “Test checklist”- Place one residential and one commercial building after each change.
- Confirm EStartConstructionResult still returns NotEnoughMoney when wallet is empty.
- Save → load → verify BP_CBT_SaveGame currency and level fields restore.
- Watch ST_CityBuilderTemplate strings on level-up UI for correct building names.