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 = 5000AllowMultipleBusinesses = falseOnePerAccount = falseMaxBusinesses = 0for 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:
| Role | Effective permissions |
|---|---|
owner | Full access including manage, stock, collect, placement, staffing, pricing, and balance actions |
manage | Stock, collect, place, remove, pricing, deposit, and balance access |
collect | Collection and balance access |
stock | Stocking only |
These role maps are defined in config/config.lua.
Machines
Machine Types
oxide-vending currently includes four machine categories:
| Type | Price | Slots | Capacity per slot |
|---|---|---|---|
drinks | 15000 | 8 | 50 |
snacks | 12000 | 6 | 40 |
general | 20000 | 12 | 30 |
electronics | 35000 | 6 | 20 |
Each category exposes one or more prop model choices from config/machines.lua.
Placement Flow
Placement is a two-stage client flow:
- Start placement for a machine type and model.
- Position the preview object in front of the player.
- Confirm to lock position and enter rotation mode.
- 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:
activeinactivebroken
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:
- The machine stock is reduced.
- Cash is removed from the buyer.
- The item is given through
o-link.inventory. - Revenue is added to the machine and business balance path.
- A transaction is logged.
- Durability is reduced.
- 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/vdbexports["oxide-vending"]:OpenDashboard()
The contract screen also has client exports for direct opening and closing.
Dashboard Areas
The packaged NUI includes:
| Area | Purpose |
|---|---|
| Overview | Business summary, balance, level, and quick actions |
| Stock | Stock controls, pricing, wholesale, and warehouse-related actions |
| Map | Machine location view using bundled map tiles |
| Transactions | Revenue and sale history |
| Analytics | Revenue 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.MarkupPercentConfig.Wholesale.MinOrderConfig.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.targetando-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 = truePrice = 50000RequiredLevel = 3MaxCapacity = 5000MaxItemTypes = 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