Cost Types
Cost Types
1. Arithmetic Cost (Linear Growth)
Formula: STARTING_COST + LEVEL * INCREASE_COST_BY
Arithmetic cost increases by a fixed amount each level, creating a linear progression. This results in predictable, steady cost increases.
Example:
Starting Cost: 100
Increase Cost By: 50
Level 1: 100 + 1 × 50 = 150
Level 2: 100 + 2 × 50 = 200
Level 3: 100 + 3 × 50 = 250
2. Exponential Cost (Exponential Growth)
Formula: STARTING_COST * EXPONENTIAL_GROWTH^LEVEL
Exponential cost multiplies by a growth factor each level, creating rapid cost acceleration. This creates increasingly expensive upgrades at higher levels.
Example:
Starting Cost: 100
Exponential Growth: 1.5
Level 1: 100 × 1.5¹ = 150
Level 2: 100 × 1.5² = 225
Level 3: 100 × 1.5³ = 337.5
Configuration
Arithmetic Cost Configuration
currency: "coins" # Currency type to use
starting-cost: 100.0 # Base cost at level 0
increase-cost-by: 50.0 # Amount to add per level
remove-currency: true # Whether to deduct currency from playerExponential Cost Configuration
currency: "gems" # Currency type to use
starting-cost: 100.0 # Base cost at level 0
exponential-growth: 1.5 # Multiplier per level (must be > 1.0)
remove-currency: true # Whether to deduct currency from player
is-exponential: true # Set to true for exponential costLast updated
Was this helpful?