VerseIsland
Feed Learn Leaderboard Guides Reference Explore Search Docs Verse Library
Sign in
Feed Learn 📖 Codex Leaderboard Guides Reference Explore Search Docs Verse Library
Verse Library › Materials/VFX
Browse Verse Library

Library

Devices 634
  • Devices166
  • Triggers & Logic117
  • UI & HUD41
  • Audio39
  • Items & Inventory29
  • Events28
  • Scoring & Objectives24
  • Spawning19
  • Classes & Interfaces18
  • Game Modes16
  • Props & Meshes13
  • Variables & Mutability12
  • Modules & Structure11
  • Player Management11
  • Round Flow9
  • Tutorials7
  • Animation6
  • Functions6
  • Getting Started6
  • Teams & Classes6
  • Concurrency5
  • Debugging5
  • NPCs & AI5
  • VFX & Particles5
  • Cameras4
  • Arrays & Maps3
  • Control Flow3
  • Structs & Enums3
  • Syntax & Types3
  • Cinematics2
  • Persistence2
  • Scene Graph2
  • Building1
  • Other1
  • Physics1
  • Publishing & Islands1
  • Reference1
  • Templates1
  • Vehicles1
  • Weapons1
Verse Language 257
  • Control Flow35
  • Functions27
  • Arrays & Maps25
  • Classes & Interfaces22
  • Variables & Mutability22
  • Concurrency21
  • Syntax & Types18
  • Modules & Structure12
  • Debugging8
  • Devices8
  • Events7
  • Player Management6
  • Structs & Enums6
  • Triggers & Logic6
  • Failure & Options4
  • Game Modes4
  • UI & HUD4
  • Getting Started3
  • Round Flow3
  • Scene Graph3
  • Spawning3
  • Reference2
  • Templates2
  • VFX & Particles2
  • Animation1
  • Best Practices1
  • Cameras1
  • Props & Meshes1
Materials/VFX 154
  • Triggers & Logic27
  • UI & HUD17
  • Devices16
  • VFX & Particles16
  • Game Modes8
  • Props & Meshes8
  • Scoring & Objectives8
  • Items & Inventory7
  • Arrays & Maps5
  • Events4
  • Animation3
  • Cinematics3
  • Classes & Interfaces3
  • Control Flow3
  • Modules & Structure3
  • Round Flow3
  • Spawning3
  • Concurrency2
  • Functions2
  • Reference2
  • Scene Graph2
  • Syntax & Types2
  • Variables & Mutability2
  • Getting Started1
  • Persistence1
  • Player Management1
  • Structs & Enums1
  • Tutorials1
General 153
  • Devices22
  • Events20
  • Triggers & Logic20
  • Classes & Interfaces10
  • Variables & Mutability8
  • Round Flow6
  • Scoring & Objectives6
  • UI & HUD6
  • Functions5
  • Player Management5
  • Game Modes4
  • Getting Started4
  • Props & Meshes4
  • Control Flow3
  • Syntax & Types3
  • VFX & Particles3
  • Arrays & Maps2
  • Best Practices2
  • NPCs & AI2
  • Other2
  • Physics2
  • Scene Graph2
  • Spawning2
  • Structs & Enums2
  • Tutorials2
  • Building1
  • Cameras1
  • Cinematics1
  • Failure & Options1
  • Items & Inventory1
  • Teams & Classes1
Player 133
  • Player Management22
  • Teams & Classes18
  • Classes & Interfaces12
  • Devices11
  • Triggers & Logic9
  • Events8
  • Persistence7
  • Arrays & Maps6
  • Game Modes5
  • Round Flow4
  • Functions3
  • Getting Started3
  • Items & Inventory3
  • Modules & Structure3
  • Concurrency2
  • Control Flow2
  • Debugging2
  • Props & Meshes2
  • Scoring & Objectives2
  • Spawning2
  • Structs & Enums2
  • Physics1
  • Reference1
  • UI & HUD1
  • Variables & Mutability1
  • Weapons1
Building & Props 131
  • Variables & Mutability15
  • Props & Meshes13
  • Triggers & Logic13
  • Classes & Interfaces10
  • Devices10
  • UI & HUD10
  • Events7
  • Teams & Classes7
  • Functions6
  • Animation5
  • Building5
  • VFX & Particles5
  • Structs & Enums4
  • Control Flow3
  • Game Modes3
  • Items & Inventory3
  • Round Flow3
  • Scene Graph3
  • Concurrency2
  • Reference2
  • Arrays & Maps1
  • Modules & Structure1
NPCs & AI 76
  • NPCs & AI34
  • Spawning7
  • Animation6
  • Variables & Mutability5
  • Classes & Interfaces3
  • Debugging3
  • Game Modes3
  • UI & HUD3
  • Audio2
  • Concurrency2
  • Props & Meshes2
  • Devices1
  • Functions1
  • Getting Started1
  • Reference1
  • Triggers & Logic1
  • VFX & Particles1
Spawning 73
  • Spawning31
  • Concurrency6
  • Events6
  • Vehicles5
  • Player Management4
  • Props & Meshes4
  • Items & Inventory3
  • Teams & Classes3
  • Devices2
  • Functions2
  • Round Flow2
  • Scene Graph2
  • Control Flow1
  • Scoring & Objectives1
  • Triggers & Logic1
Cinematics 71
  • Cameras17
  • Cinematics15
  • Devices11
  • Audio5
  • Animation4
  • Triggers & Logic4
  • Functions2
  • Game Modes2
  • Templates2
  • UI & HUD2
  • Classes & Interfaces1
  • Concurrency1
  • Control Flow1
  • Debugging1
  • Items & Inventory1
  • Modules & Structure1
  • Scene Graph1
UI 57
  • UI & HUD34
  • Devices5
  • Scoring & Objectives4
  • Classes & Interfaces3
  • Round Flow2
  • Scene Graph2
  • Arrays & Maps1
  • Functions1
  • Getting Started1
  • Reference1
  • Structs & Enums1
  • Triggers & Logic1
  • Variables & Mutability1
Scene Graph 40
  • Scene Graph9
  • Items & Inventory8
  • Classes & Interfaces3
  • Events3
  • Props & Meshes3
  • Reference2
  • Arrays & Maps1
  • Building1
  • Control Flow1
  • Debugging1
  • Functions1
  • Modules & Structure1
  • Player Management1
  • Structs & Enums1
  • Syntax & Types1
  • Triggers & Logic1
  • UI & HUD1
  • VFX & Particles1
Vehicles 38
  • Spawning12
  • Devices7
  • Vehicles7
  • Props & Meshes4
  • Game Modes2
  • Failure & Options1
  • Items & Inventory1
  • Reference1
  • Teams & Classes1
  • Tutorials1
  • VFX & Particles1
Tutorials 37
  • Game Modes6
  • Triggers & Logic5
  • Classes & Interfaces4
  • Events4
  • Props & Meshes3
  • Building2
  • Devices2
  • Items & Inventory2
  • Scoring & Objectives2
  • Animation1
  • Arrays & Maps1
  • Cameras1
  • Concurrency1
  • Physics1
  • Player Management1
  • Structs & Enums1
Weapons 30
  • Devices6
  • Game Modes6
  • Weapons4
  • Items & Inventory3
  • Scoring & Objectives3
  • Spawning2
  • Teams & Classes2
  • Best Practices1
  • Classes & Interfaces1
  • Functions1
  • Triggers & Logic1
Items 28
  • Items & Inventory23
  • Devices2
  • Triggers & Logic2
  • Spawning1
Assets 20
  • Modules & Structure6
  • Arrays & Maps3
  • Functions3
  • Scene Graph2
  • Best Practices1
  • Devices1
  • Events1
  • Failure & Options1
  • Physics1
  • Variables & Mutability1
Animation 19
  • Animation9
  • Variables & Mutability4
  • Devices1
  • Props & Meshes1
  • Reference1
  • Scene Graph1
  • Syntax & Types1
  • Tutorials1
Release Notes 17
  • Classes & Interfaces5
  • Modules & Structure3
  • Concurrency2
  • Control Flow2
  • Variables & Mutability2
  • Debugging1
  • Devices1
  • Items & Inventory1
Input & Controls 16
  • Functions3
  • Control Flow2
  • Syntax & Types2
  • UI & HUD2
  • Animation1
  • Arrays & Maps1
  • Cinematics1
  • Debugging1
  • Devices1
  • Events1
  • Reference1
Publishing 8
  • Control Flow5
  • Arrays & Maps1
  • Devices1
  • Syntax & Types1
Audio 7
  • Audio5
  • UI & HUD2
Landscape 7
  • Other4
  • VFX & Particles2
  • Scene Graph1
Persistence 6
  • Structs & Enums2
  • Items & Inventory1
  • Persistence1
  • Publishing & Islands1
  • Variables & Mutability1
Physics 5
  • Syntax & Types3
  • Classes & Interfaces1
  • Devices1
Creator Economy 3
  • Modules & Structure1
  • Other1
  • Publishing & Islands1
Discovery 3
  • Devices1
  • NPCs & AI1
  • Structs & Enums1
Editor & Project 3
  • Other1
  • Props & Meshes1
  • Tutorials1

Santa's Toy Factory Upgrade Tables

Santa's Toy Factory — Upgrade Price Tables

The heart of a tycoon's progression curve: per-level upgrade price tables ([][]int), max-level caps, production speeds, and storage capacities, with lookup helpers. Shows how Epic drives tunable game balance from plain Verse data tables instead of hard-coded numbers.

From the Santa's Toy Factory Epic starter project (SampleVerse/SantaToyFactory/Config/upgrade_config.verse). Epic Games reference Verse, shown for study.

# This file contains the data used to configure the factory in the game.
# This includes upgrade prices, max levels, production speeds, storage capacities and more.
# It also contains functions for getting all this data. 

using { /Verse.org/Simulation }
using { Persistence }

# Blubberchops: "Looks like this is the place to modify the upgrade prices for belts."
#               "Let's make them cheaper!"

# Defines the upgrade price per level for each factory belt.
FactoryBeltPrices: [][]int =
    # Each column is a belt.       0             1               2               3
    # Each row is a level.
    array{  array{                 1,           5,            10,          15},
            array{                5,          10,           25,          35},
            array{               10,          25,           50,         100},
            array{               20,          50,          100,        200},
            array{               30,         100,          200,        300},
            array{               40,         200,          400,        500},
            array{               50,         250,          500,        750},
            array{               75,         375,          750,       1000},
            array{              100,         500,         1000,       1500},
            array{              150,         750,         1500,       2000},
            array{              200,        1000,         2000,       3000},
            array{              250,        1250,         2500,       3500},
            array{              300,        1500,         3000,       4000},
            array{              400,        2000,         4000,       5000},
            array{              500,        2500,         5000,       7500}}

# Defines the upgrade price per level for each factory mould.
FactoryMouldPrices : [][]int = 
    # Each column is a mould.      0             1               2               3
    # Each row is a level.
    array{  array{                 5,           25,            500,          5000},
            array{                15,           75,           1500,         15000},
            array{                25,          125,           2500,         25000},
            array{                50,          250,           5000,         50000},
            array{               100,          500,          10000,        100000},
            array{               150,          750,          15000,        150000},
            array{               200,         1000,          20000,        200000},
            array{               250,         1250,          25000,        250000},
            array{               300,         1500,          30000,        300000},
            array{               350,         1750,          35000,        350000},
            array{               400,         2000,          40000,        400000},
            array{               450,         2250,          45000,        450000},
            array{               500,         2500,          50000,        500000},
            array{               600,         3000,          60000,        600000},
            array{               700,         3500,          70000,        700000},
            array{               800,         4000,          80000,        800000},
            array{               900,         4500,          90000,        900000},
            array{              1000,         5000,         100000,       1000000},
            array{              1250,         6250,         125000,       1250000},
            array{              1500,         7500,         150000,       1500000},
            array{              1750,         8750,         175000,       1750000},
            array{              2000,        10000,         200000,       2000000},
            array{              2250,        11250,         225000,       2250000},
            array{              2500,        12500,         250000,       2500000},
            array{              2750,        13750,         275000,       2750000},
            array{              3000,        15000,         300000,       3000000},
            array{              3500,        17500,         350000,       3500000},
            array{              4000,        20000,         400000,       4000000},
            array{              4500,        22500,         450000,       4500000},
            array{              5000,        25000,         500000,       5000000}}

# Defines the upgrade price per level for each factory wrapper.
FactoryWrapperPrices : [][]int = 
    # Each column is a wrapper.    0             1               2               3
    # Each row is a level.
    array{  array{                25,          100,           2000,         20000},
            array{                50,          250,           5000,         50000},
            array{               100,          500,          10000,        100000},
            array{               500,         2500,          50000,        250000},
            array{              1000,         5000,         100000,        500000},
            array{              2500,        12500,         250000,       1000000},
            array{              5000,        25000,         500000,       2500000},
            array{             10000,        50000,        1000000,       5000000},
            array{             15000,        75000,        1500000,       7500000},
            array{             20000,       100000,        2000000,       9999999}}

# Defines the upgrade price per level for the factory storage.
FactoryStoragePrices: []int =
    # Each column is a level.
    array{ 10, 25, 50, 100, 250, 500, 1000, 2500, 5000, 10000, 25000, 50000, 100000, 250000, 500000}

# Defines the length of factory belts in LEGO® units (knobs).
# If the length of the belts is changed, this value should be updated.
FactoryBeltTransportDistance<public> : float = 60.0

# Defines the base amount of products produced per minute for each factory mould.
FactoryMouldBaseProductsPerMinute : []float = 
    # Each column is a mould.
    array{ 2.0, 1.0, 0.5, 0.25}

# Gets the max level for the factory belt.
GetFactoryBeltMaxLevel<public>(FactoryBeltNumber:int)<decides><transacts>:int=
    FactoryBeltPrices.Length

# Gets the max level for the factory mould.
GetFactoryMouldMaxLevel<public>(FactoryMouldNumber:int)<decides><transacts>:int=
    FactoryMouldPrices.Length

# Gets the max level for the factory wrapper.
GetFactoryWrapperMaxLevel<public>(FactoryWrapperNumber:int)<decides><transacts>:int=
    FactoryWrapperPrices.Length

# Gets the max level for the factory storage.
GetFactoryStorageMaxLevel<public>()<decides><transacts>:int=
    FactoryStoragePrices.Length

# Gets the upgrade price of the factory belt for the player.
GetFactoryBeltUpgradePrice<public>(FactoryBeltNumber:int, Player:player)<decides><transacts>:int=
    FactoryBeltLevel := GetFactoryBeltLevel[Player, FactoryBeltNumber]
    FactoryBeltIndex := Min(FactoryBeltLevel, FactoryBeltPrices.Length-1)
    FactoryBeltPrices[FactoryBeltIndex][FactoryBeltNumber]

# Gets the upgrade price of the factory mould for the player.
GetFactoryMouldUpgradePrice<public>(FactoryMouldNumber:int, Player:player)<decides><transacts>:int=
    FactoryMouldLevel := GetFactoryMouldLevel[Player, FactoryMouldNumber]
    FactoryMouldIndex := Min(FactoryMouldLevel, FactoryMouldPrices.Length-1)
    FactoryMouldPrices[FactoryMouldIndex][FactoryMouldNumber]

# Gets the upgrade price of the factory wrapper for the player.
GetFactoryWrapperUpgradePrice<public>(FactoryWrapperNumber:int, Player:player)<decides><transacts>:int=
    FactoryWrapperLevel := GetFactoryWrapperLevel[Player, FactoryWrapperNumber]
    FactoryWrapperIndex := Min(FactoryWrapperLevel, FactoryWrapperPrices.Length-1)
    FactoryWrapperPrices[FactoryWrapperIndex][FactoryWrapperNumber]

# Gets the upgrade price of the factory storage for the player.
GetFactoryStorageUpgradePrice<public>(Player:player)<decides><transacts>:int=
    FactoryStorageLevel := GetFactoryStorageLevel[Player]
    FactoryStorageIndex := Min(FactoryStorageLevel, FactoryStoragePrices.Length-1)
    FactoryStoragePrices[FactoryStorageIndex]

# Gets the speed of the factory belt for the player.
GetFactoryBeltSpeed<public>(FactoryBeltNumber:int, Player:player)<decides><transacts>:float=
    FactoryBeltLevel := GetFactoryBeltLevel[Player, FactoryBeltNumber]
    # This formula slowly makes the factory belt faster as the level increases.
    # It starts with a value of 0.5 at level 1 and hits a value of 5.0 at level 15.
    FactoryBeltLevel * 0.25 + 0.25

# Gets the speed of the factory mould for the player.
GetFactoryMouldSpeed<public>(FactoryMouldNumber:int, Player:player)<decides><transacts>:float=
    FactoryMouldLevel := GetFactoryMouldLevel[Player, FactoryMouldNumber]
    # This formula very slowly makes the factory mould faster as the level increases.
    # It starts with a value of 1.0 at level 1 and hits a value of 30.0 at level 30.
    FactoryMouldLevel * 1.0 + 0.0

# Gets the price multiplier of the factory wrapper for the player.
GetFactoryWrapperMultiplier<public>(FactoryWrapperNumber:int, Player:player)<decides><transacts>:float=
    FactoryWrapperLevel := GetFactoryWrapperLevel[Player, FactoryWrapperNumber]
    # This formula slowly makes the factory wrapper multiplier higher as the level increases.
    # It starts with a value of 1.4 at level 1 and hits a value of 5.0 at level 10.
    FactoryWrapperLevel * 0.4 + 1.0

# Gets the time in seconds it takes for a product to make it from the factory mould to the factory storage for the player.
GetFactoryBeltDeliveryTime<public>(FactoryBeltNumber:int, Player:player)<decides><transacts>:float=
    FactoryBeltSpeed := GetFactoryBeltSpeed[FactoryBeltNumber, Player]
    FactoryBeltTransportDistance / FactoryBeltSpeed

# Gets the time in seconds it takes for the factory mould to produce a product for the player.
GetFactoryMouldProductionTime<public>(FactoryMouldNumber:int, Player:player)<decides><transacts>:float=
    FactoryMouldSpeed := GetFactoryMouldSpeed[FactoryMouldNumber, Player]
    FactoryMouldProductsPerMinute := FactoryMouldSpeed * FactoryMouldBaseProductsPerMinute[FactoryMouldNumber]
    60.0 / FactoryMouldProductsPerMinute

# Gets the factory storage capacity for the player.
GetFactoryStorageCapacity<public>(Player:player)<decides><transacts>:int=
    FactoryStorageLevel := GetFactoryStorageLevel[Player]
    # This formula makes the factory storage capactity grow exponentially.
    # It starts with a value of 10.0 at level 1 and doubles for each level.
    Ceil[10.0 * Pow(2.0, FactoryStorageLevel * 1.0 - 1.0)]

Comments

    Sign in to vote, comment, or suggest an edit. Sign in
    📄
    Source
    Epic Games

    © Epic Games. From an official Epic Games starter project / UEFN sample, shown here as reference for study with a link to Epic's docs. All rights remain with Epic Games — this is not Verse Island original work. Terms ↗

    View original Sources & licensing
    Request removal
    Tags
    epic-sample epic reference tycoon config data-tables upgrades
    Verse code
    Not yet compile-verified
    Sign in to download .verse

    Copy-paste the code above is always free.

    Keep exploring
    More in Verse Language · 72 of 106
    Prev
    santas toy factory order config
    Next
    santas toy factory utility module
    Related topics
    • Santas Toy Factory Order Config Verse Language
    • Santas Toy Factory Player Persistence Player
    • Lego Santas Toy Factory In Unreal Editor For Fortnite Tutorials
    • Lego Santas Toy Factory In Unreal Editor For Fortnite Tutorials
    • Santas Toy Factory Utility Module Verse Language

    Related

    Open in graph →

    Related topics

    • Santas Toy Factory Order Config
    • Santas Toy Factory Player Persistence
    • Lego Santas Toy Factory In Unreal Editor For Fortnite
    • Lego Santas Toy Factory In Unreal Editor For Fortnite
    • Santas Toy Factory Utility Module
    VerseIsland · an archipelago of Verse & UEFN knowledge
    🗺️ Island atlas Learn Guides History About & Press Sources & Licensing Status

    Not affiliated with Epic Games. Fortnite, UEFN, Unreal Engine, and Verse are trademarks of Epic Games, Inc. Content is attributed to its source — see Sources & Licensing.

    🦜

    Scout · your island guide

    The Isle of Verse