Installation Guide
Step-by-step setup for Oxide Vending using o-link, ox_lib, and oxmysql.
Prerequisites
Required Resources
| Resource | Purpose |
|---|---|
ox_lib | Shared library, locale loading, callbacks, and utility helpers |
oxmysql | Database driver |
o-link | Framework and system abstraction used by this resource |
o-link Expectations
Oxide Vending depends on your o-link setup for:
- Player loaded and unload lifecycle events
- Player identifier lookup
- Admin checks
- Notifications
- Menu, input, progress bar, and helptext helpers
- Inventory item lookup, carry checks, and add/remove operations
- Cash and bank balance access
- Target interactions on machines, showroom NPCs, and pickup entities
Optional Resource
| Resource | Purpose |
|---|---|
oxide-weather | Supplies in-game hour data to NPC sales. If not present, Oxide Vending falls back to real system time |
Installation Steps
1. Place the Resource
Place oxide-vending inside your server's resources folder.
2. Add Startup Order
Start dependencies before the resource:
ensure ox_lib
ensure oxmysql
ensure o-link
ensure oxide-vending
3. Install the SQL Tables
Run sql/install.sql against your database.
This creates the vending_* tables used for:
- Business ownership and employee roles
- Placed machines and unplaced owned machines
- Machine stock, revenue, and transactions
- Progression and milestones
- Warehouse ownership and storage
- Wholesale pickup boxes and pending deliveries
4. Review Configuration
Adjust the config files under config/:
config/config.luaconfig/machines.luaconfig/items.luaconfig/wholesale.luaconfig/npc_sales.luaconfig/progression.lua
See Configuration for the full reference.
5. Register the Items Your Server Will Sell
The vending system only works for items that exist in your active inventory system and are recognized by o-link.inventory.GetItemInfo(...).
Review config/items.lua and make sure every item listed in:
Config.ItemWhitelistsConfig.ItemBasePricesConfig.WholesaleCatalog
exists in the inventory item registry your server uses.
6. Leave the Packaged UI in Place
The manifest loads the included html/ files directly:
html/index.htmlhtml/css/*.csshtml/js/**/*.jshtml/img/*
There is no web/ build step for the resource in its current form.
Verification
- Start the server and confirm
ox_lib,oxmysql,o-link, andoxide-vendingall load without dependency errors. - Verify the showroom blip appears if
Config.Showroom.Blip.enabled = true. - Walk to the showroom NPC and confirm the target interaction appears.
- Register a test business and open the contract and dashboard flow.
- Purchase a machine, choose a model, and place it in the world.
- Stock the machine with a valid configured item and confirm a player can buy from it.
- Confirm
/vdband/vendingdashboardopen the dashboard for the business owner or employee. - If warehouse and wholesale are enabled, place a test order and verify pickup boxes appear at the configured pallet.
Notes
Item Naming
The default config/items.lua includes a mixed starter list. Review it carefully before going live, especially if your server uses custom item names.
Optional Weather Integration
NPC sales read the hour from exports["oxide-weather"]:GetTime() when available. If oxide-weather is not running, sales timing still works using real time.