Features

Overview of the current Oxide Vending gameplay flow, o-link integration, and core systems.

Core Flow

Players interact with the configured showroom NPC, register a vending business, buy machine types they have unlocked, place machines in the world, stock them from inventory or warehouse storage, and manage revenue and progression from the built-in dashboard or menu flow.

o-link handles the framework-facing work for:

  • Player identity
  • Inventory access
  • Money operations
  • Targets
  • Notifications
  • Menu, input, progress bar, and helptext UI

Business System

Registration

The showroom flow allows a player to:

  • View starting business limits
  • Pay the configured registration fee
  • Enter a business name
  • Sign the registration contract UI

Current business rules come from Config.Business:

  • RegistrationFee = 5000
  • AllowMultipleBusinesses = false
  • OnePerAccount = false
  • MaxBusinesses = 0 for unlimited server-wide businesses by default

Creating a business also creates its progression record when progression is enabled.

Employee Roles

The resource ships with four role presets:

RoleEffective permissions
ownerFull access including manage, stock, collect, placement, staffing, pricing, and balance actions
manageStock, collect, place, remove, pricing, deposit, and balance access
collectCollection and balance access
stockStocking only

These role maps are defined in config/config.lua.

Machines

Machine Types

oxide-vending currently includes four machine categories:

TypePriceSlotsCapacity per slot
drinks15000850
snacks12000640
general200001230
electronics35000620

Each category exposes one or more prop model choices from config/machines.lua.

Placement Flow

Placement is a two-stage client flow:

  1. Start placement for a machine type and model.
  2. Position the preview object in front of the player.
  3. Confirm to lock position and enter rotation mode.
  4. Confirm again to send final coordinates and rotation to the server.

Placement respects:

  • Maximum distance from the player
  • Minimum distance between machines
  • Blocked placement zones
  • Valid GTA model checks

Machine States and Durability

Machines operate in one of three states:

  • active
  • inactive
  • broken

Durability is reduced on sales and repaired through the machine management flow. Default degradation values are:

  • Player sales: 0.5
  • NPC sales: 0.3

Broken machines stop normal operation until repaired.

Stock, Pricing, and Sales

Stock Rules

Stocking uses the current Config.ItemWhitelists and machine slot limits. Items must:

  • Be allowed for that machine type
  • Exist in the active inventory system through o-link
  • Fit remaining slot capacity

Pricing

Base prices come from Config.ItemBasePrices. Selling prices are constrained by:

  • Fallback global markup limits from Config.Pricing
  • Progression-based pricing ranges when progression is enabled

The default starting markup target is 1.5x base price.

Player Sales

When a player buys from a machine:

  1. The machine stock is reduced.
  2. Cash is removed from the buyer.
  3. The item is given through o-link.inventory.
  4. Revenue is added to the machine and business balance path.
  5. A transaction is logged.
  6. Durability is reduced.
  7. Progression XP and revenue tracking are updated.

Business Balance

The business economy is built into the resource. There is no external banking integration path to configure.

Current behavior:

  • Each business stores its own balance in the business record
  • Sales revenue feeds that business-side balance
  • Owners and authorized employees can deposit to or withdraw from it
  • Deposits and withdrawals move money against the player's personal bank balance through o-link.money

Dashboard and Contract UI

Open Paths

The dashboard can be opened through:

  • /vendingdashboard
  • /vdb
  • exports["oxide-vending"]:OpenDashboard()

The contract screen also has client exports for direct opening and closing.

Dashboard Areas

The packaged NUI includes:

AreaPurpose
OverviewBusiness summary, balance, level, and quick actions
StockStock controls, pricing, wholesale, and warehouse-related actions
MapMachine location view using bundled map tiles
TransactionsRevenue and sale history
AnalyticsRevenue charts and competition summaries

The dashboard also handles:

  • Daily bonus claims
  • Progression overlays
  • Registration prompts
  • Business management actions for permitted users

Wholesale, Pickup, and Warehouse

Wholesale Ordering

Wholesale data comes from config/wholesale.lua. Orders use:

  • Config.Wholesale.MarkupPercent
  • Config.Wholesale.MinOrder
  • Config.Wholesale.DeliveryTime

Higher progression levels reduce wholesale cost through the level reward discount.

Pickup Pallet

If Config.PickupLocation.Enabled = true, wholesale deliveries create physical pickup boxes at the configured pallet. Boxes:

  • Persist in vending_pickup_boxes
  • Are synced to clients
  • Require stock permission or matching order ownership to collect
  • Use o-link.target and o-link.progressbar

Warehouse

The warehouse system is a separate purchased upgrade with:

  • A 4-digit access code
  • A per-business routing bucket
  • Separate persistent business inventory
  • Deposit and withdrawal flows while inside the warehouse instance

Default warehouse gate values:

  • Enabled = true
  • Price = 50000
  • RequiredLevel = 3
  • MaxCapacity = 5000
  • MaxItemTypes = 50

Progression

The progression system has 10 levels and requires both:

  • The XP threshold
  • The lifetime revenue milestone

Level rewards control:

  • Machine cap
  • Employee cap
  • Machine category unlocks
  • Pricing range
  • Wholesale discount
  • NPC revenue boost

See Progression for the full table.

NPC Sales

NPC sales are simulated entirely server-side. No actual purchase NPCs are spawned for the sale logic itself.

The simulation considers:

  • Current hour
  • Location hotzone multiplier
  • Machine type multiplier
  • Price competitiveness
  • Stock variety
  • Nearby same-type competition

When enabled, ambient visual feedback can animate nearby world peds for cosmetic machine-use scenes.

See NPC Sales for the detailed formulas and config.

Admin and Anti-Abuse

The resource includes:

  • Admin commands for business and machine management
  • Progression and NPC simulation controls
  • Debug commands for balance, daily bonuses, boxes, and progression repair
  • Server-side rate limiting on important actions
  • Transaction pruning for old records