Progression

Current 10-level business progression system for Oxide Vending.

Overview

Businesses level up only when they satisfy both:

  1. The XP threshold
  2. The lifetime revenue milestone

The system is controlled by Config.Progression in config/progression.lua.

Level Table

LvlNameXPRevenueMax MachinesMax EmployeesUnlocksPrice RangeWholesaleNPC Boost
1Newcomer0031drinks0.90x - 1.5x0%0%
2Vendor500500042drinks, snacks0.85x - 1.8x2%5%
3Supplier15001500052drinks, snacks0.85x - 2.0x4%8%
4Distributor35003500063drinks, snacks, general0.80x - 2.2x6%12%
5Merchant65006500073drinks, snacks, general0.80x - 2.4x8%15%
6Retailer1100011000084drinks, snacks, general, electronics0.80x - 2.6x10%18%
7Entrepreneur1800018000094All current types0.80x - 2.8x12%22%
8Tycoon28000280000105All current types0.80x - 3.0x14%25%
9Mogul42000420000126All current types0.80x - 3.0x16%28%
10Vending King60000600000158All current types0.75x - 3.0x20%35%

XP Sources

Sales

SourceFormula
Player sale10 + (saleAmount * 0.1)
NPC sale5 + (saleAmount * 0.1)

Operations

SourceFormula
Stock items3 + (quantity * 0.5)
Collect revenue5 + (amount * 0.02)
Wholesale order15
Repair machine20
Place machine100
Hire employee50

fireEmployee and removeMachine default to 0 XP.

Daily Bonus

The daily bonus uses UTC date comparison in the current implementation.

Defaults:

  • dailyLoginBase = 25
  • dailyStreakBonus = 5
  • dailyStreakMax = 7

Effective streak payout:

Streak DayTotal XP
130
235
340
445
550
655
7+60

If a day is missed, the streak resets to 1.

Milestones

Milestones are one-time XP rewards stored in vending_milestones.

Revenue Milestones

  • 1000 -> 100 XP
  • 10000 -> 250 XP
  • 50000 -> 500 XP
  • 100000 -> 1000 XP
  • 500000 -> 2500 XP
  • 1000000 -> 5000 XP

Sales Milestones

  • 100 -> 150 XP
  • 500 -> 400 XP
  • 1000 -> 800 XP
  • 5000 -> 1500 XP

Machine Milestones

  • 3 -> 150 XP
  • 5 -> 300 XP
  • 10 -> 600 XP

Employee Milestones

  • 1 -> 100 XP
  • 5 -> 250 XP

Runtime Behavior

When a business gains XP or tracked revenue:

  • The cache is updated first
  • The database row is updated
  • The level is recalculated
  • Milestone rewards are checked where applicable
  • The owner receives notifications and level-up effects if online

The owner level-up flow triggers:

  • A success notification
  • The oxide-vending:client:levelUp client event

Dashboard Integration

The dashboard progression panel displays:

  • Level and level name
  • Current XP
  • Lifetime revenue
  • Next-level thresholds
  • Reward summary
  • Daily bonus availability

Admin Tools

Useful progression commands:

  • /vendingsetlevel <businessId> <level>
  • /vendingdebug progression status
  • /vendingdebug progression init
  • /vendingdebug progression create <businessId>
  • /vendingdebug daily [businessId]

Exports

Current progression exports:

  • GetBusinessLevel(businessId)
  • GetBusinessProgression(businessId)
  • AddXP(businessId, amount, source, notifySource)
  • AddRevenue(businessId, amount)
  • GetMaxMachines(businessId)
  • GetMaxEmployees(businessId)
  • IsMachineTypeUnlocked(businessId, machineType)
  • IsWarehouseUnlocked(businessId)
  • GetPricingRange(businessId, itemName)
  • GetWholesaleDiscount(businessId)
  • GetNPCRevenueBoost(businessId)
  • CreateProgressionRecord(businessId)
  • ClaimDailyBonus(source, businessId)

Disabling Progression

If Config.Progression.Enabled = false:

  • Machine type checks return unlocked
  • Machine and employee caps fall back to Config.Business
  • Pricing falls back to Config.Pricing
  • Warehouse unlock checks return true
  • XP and level tracking stop