DOCUMENTATION

Examples and Use Cases

Complete examples and common patterns for game economies

Examples and Use Cases

Complete examples and common patterns for game economies

Examples and Use Cases#

This guide provides complete examples of common game economy patterns. Use these as starting points for your own designs, or adapt them to fit your specific needs.

Example 1: Simple Quest Reward System#

A basic economy where players complete quests and earn gold.

Setup#

Currencies:

  • Gold (start: 100, clamp: 0-1000)

Variables:

  • None needed for basic version

Flow:

  1. Start Node
  2. Economy Source (Gold, +50, absolute)
  3. End Node

Connections#

  • Start → Economy Source (regular)
  • Economy Source → End (regular)

Behavior#

Each step:

  • Player earns 50 gold
  • Gold increases by 50 each step
  • Clamped at 1000 maximum

Variations#

Random Rewards:

  • Change Economy Source to range mode
  • Min: 30, Max: 70
  • Adds randomness to rewards

Variable Rewards:

  • Create variable questReward (int, value: 50)
  • Use {{questReward}} in Economy Source amount
  • Can adjust reward dynamically

Example 2: Purchase System#

Players earn gold and can spend it on items.

Setup#

Currencies:

  • Gold (start: 200, clamp: 0-1000)

Variables:

  • None needed for basic version

Flow:

  1. Start Node
  2. Economy Source (Gold, +25, absolute)
  3. Economy Sink (Gold, -50, conditional)
  4. Conditional Node (check if Gold >= 50)
  5. End Node

Connections#

  • Start → Economy Source (regular)
  • Economy Source → Conditional (regular)
  • Conditional → Economy Sink (success, green)
  • Economy Sink → End (regular)
  • Conditional → End (failure, red)

Behavior#

Each step:

  1. Player earns 25 gold
  2. System checks if player has >= 50 gold
  3. If yes: Player buys item (loses 50 gold), routes to success
  4. If no: Player keeps gold, routes to failure

Variations#

Multiple Items:

  • Add more Economy Sink nodes
  • Different prices (25, 50, 100 gold)
  • Use conditional connections to check currency

Variable Prices:

  • Create variable itemPrice (int, value: 50)
  • Use {{itemPrice}} in Economy Sink amount
  • Can adjust prices dynamically

Example 3: Level Progression System#

Track player level and experience points.

Setup#

Currencies:

  • Experience Points (start: 0, clamp: 0-1000)

Variables:

  • playerLevel (int, start: 1)
  • experienceToNext (int, start: 100)

Flow:

  1. Start Node
  2. Economy Source (Experience, +10, absolute)
  3. Conditional Node (check if Experience >= experienceToNext)
  4. Adjust Variable (increase playerLevel by 1)
  5. Adjust Variable (set experienceToNext to {{playerLevel}} * 100)
  6. Economy Sink (set Experience to 0)
  7. End Node

Connections#

  • Start → Economy Source (regular)
  • Economy Source → Conditional (regular)
  • Conditional → Adjust Variable (level) (success)
  • Adjust Variable (level) → Adjust Variable (threshold) (regular)
  • Adjust Variable (threshold) → Economy Sink (regular)
  • Economy Sink → End (regular)
  • Conditional → End (failure)

Behavior#

Each step:

  1. Player gains 10 experience
  2. System checks if experience >= threshold
  3. If yes:
    • Level increases by 1
    • Threshold increases (level * 100)
    • Experience resets to 0
  4. If no: Continue accumulating experience

Variations#

Variable Experience Gain:

  • Create variable expGain (int, value: 10)
  • Use {{expGain}} in Economy Source
  • Can adjust based on activities

Progressive Thresholds:

  • Use expression in threshold: {{playerLevel}} * 100 + {{baseXP}}
  • Creates progressive difficulty curve

Example 4: Random Loot System#

Players have a chance to get different quality items.

Setup#

Currencies:

  • Gold (start: 0, clamp: 0-10000)

Variables:

  • None needed for basic version

Flow:

  1. Start Node
  2. Chance Connection Hub (multiple Economy Sources)
  3. Economy Source (Common, +10 gold, chance: 70)
  4. Economy Source (Rare, +50 gold, chance: 25)
  5. Economy Source (Epic, +200 gold, chance: 5)
  6. End Node

Connections#

  • Start → Economy Source (Common) (chance, weight: 70)
  • Start → Economy Source (Rare) (chance, weight: 25)
  • Start → Economy Source (Epic) (chance, weight: 5)
  • All Economy Sources → End (regular)

Behavior#

Each step:

  • Random roll selects one loot type
  • 70% chance: Common (10 gold)
  • 25% chance: Rare (50 gold)
  • 5% chance: Epic (200 gold)
  • Only one path executes

Variations#

Variable Loot Values:

  • Create variables for each loot tier
  • Use variables in Economy Source amounts
  • Adjust values dynamically

Conditional Loot:

  • Add Conditional Node before chance connections
  • Check player level or other conditions
  • Higher level = better loot chances

Example 5: Energy System#

Players have limited energy that regenerates over time.

Setup#

Currencies:

  • Energy (start: 100, clamp: 0-100)

Variables:

  • None needed for basic version

Flow:

  1. Start Node
  2. Economy Source (Energy, +5, absolute)
  3. Conditional Node (check if Energy < 100)
  4. Economy Sink (Energy, -20, conditional)
  5. End Node

Connections#

  • Start → Economy Source (regular)
  • Economy Source → Conditional (regular)
  • Conditional → Economy Sink (success, if Energy < 100)
  • Economy Sink → End (regular)
  • Conditional → End (failure, if Energy = 100)

Behavior#

Each step:

  1. Energy regenerates by 5 (capped at 100)
  2. System checks if energy < 100
  3. If yes: Player can use action (costs 20 energy)
  4. If no: Energy is full, no action available

Variations#

Variable Regeneration:

  • Create variable regenRate (int, value: 5)
  • Use {{regenRate}} in Economy Source
  • Adjust based on upgrades or items

Multiple Actions:

  • Add more Economy Sink nodes
  • Different energy costs
  • Use conditional connections to check energy

Example 6: Inventory System#

Track items in inventory slots using arrays.

Setup#

Currencies:

  • Gold (start: 500, clamp: 0-10000)

Variables:

  • inventory (array, start: [0, 0, 0, 0])
  • currentSlot (int, start: 0)

Flow:

  1. Start Node
  2. Economy Source (Gold, -100, conditional)
  3. Conditional Node (check if Gold >= 100)
  4. Adjust Variable (set inventory[{{currentSlot}}] to 1)
  5. Adjust Variable (increase currentSlot by 1)
  6. End Node

Connections#

  • Start → Conditional (regular)
  • Conditional → Economy Sink (success)
  • Economy Sink → Adjust Variable (inventory) (regular)
  • Adjust Variable (inventory) → Adjust Variable (slot) (regular)
  • Adjust Variable (slot) → End (regular)
  • Conditional → End (failure)

Behavior#

Each step:

  1. System checks if player has >= 100 gold
  2. If yes:
    • Player spends 100 gold
    • Item added to current inventory slot
    • Current slot advances
  3. If no: Purchase fails

Variations#

Multiple Item Types:

  • Create multiple arrays for different item types
  • Use different prices for each type
  • Track quantities in each slot

Variable Slot Management:

  • Create variable maxSlots (int, value: 10)
  • Check if {{currentSlot}} < {{maxSlots}} before adding
  • Prevents overflow

Example 7: Multi-Layer Economy#

Organize complex economy using layers.

Layer 1: Quest Rewards (Priority 0)#

  • Start Node
  • Economy Source (Gold, +50)
  • End Node

Layer 2: Shop Purchases (Priority 1)#

  • Start Node
  • Conditional (check Gold >= 100)
  • Economy Sink (Gold, -100, conditional)
  • End Node

Layer 3: Crafting (Priority 2)#

  • Start Node
  • Conditional (check Gold >= 200)
  • Economy Sink (Gold, -200, conditional)
  • Economy Source (Materials, +1)
  • End Node

Behavior#

Each step:

  1. Layer 1 executes first: Player earns 50 gold
  2. Layer 2 executes second: Player can buy item (if enough gold)
  3. Layer 3 executes third: Player can craft (if enough gold)
  4. All layers share the same currency state

Benefits#

  • Organization: Separate systems into logical layers
  • Priority Control: Execute in specific order
  • Shared State: All layers affect same currencies
  • Maintainability: Easier to manage complex economies

Example 8: Variable-Based Dynamic Economy#

Prices and rewards change based on player state.

Setup#

Currencies:

  • Gold (start: 1000, clamp: 0-10000)

Variables:

  • playerLevel (int, start: 1)
  • basePrice (int, start: 100)
  • priceMultiplier (int, start: 1)

Flow:

  1. Start Node
  2. Economy Source (Gold, {{playerLevel}} * 10, absolute)
  3. Conditional Node (check if Gold >= {{basePrice}} * {{priceMultiplier}})
  4. Economy Sink (Gold, {{basePrice}} * {{priceMultiplier}}, conditional)
  5. Adjust Variable (increase priceMultiplier by 1)
  6. End Node

Connections#

  • Start → Economy Source (regular)
  • Economy Source → Conditional (regular)
  • Conditional → Economy Sink (success)
  • Economy Sink → Adjust Variable (regular)
  • Adjust Variable → End (regular)
  • Conditional → End (failure)

Behavior#

Each step:

  1. Player earns gold based on level (level * 10)
  2. System checks if player can afford item
  3. Price increases after each purchase (multiplier increases)
  4. Creates dynamic economy that scales with player

Variations#

Level-Based Scaling:

  • Rewards scale with level
  • Prices scale with level
  • Creates progressive economy

Supply and Demand:

  • Adjust prices based on purchase frequency
  • Increase multiplier if purchases frequent
  • Decrease if purchases rare

Best Practices from Examples#

Start Simple#

  • Begin with basic flows
  • Add complexity gradually
  • Test each addition

Use Variables Wisely#

  • Variables for dynamic values
  • Arrays for multi-slot systems
  • Booleans for state flags

Organize with Layers#

  • Separate systems into layers
  • Use priorities for execution order
  • Share currencies across layers

Test Incrementally#

  • Run simulations frequently
  • Check results at each step
  • Adjust based on behavior

Balance Sources and Sinks#

  • Ensure economy is balanced
  • Use analysis tools
  • Compare sources vs sinks

Next Steps#

  • Try building these examples yourself
  • Adapt them to your needs
  • Combine patterns from multiple examples
  • Experiment with variations
  • Learn about Node Types for more options
  • Explore Connections for flow control
  • Read about Variables for dynamic behavior