RedM VORP Framework Complete Setup Guide
The VORP Framework is the backbone of most RedM roleplay servers. This guide covers installation through advanced configuration, giving you a fully functional Wild West RP experience with character creation, inventory, economy, and essential gameplay scripts.
What is VORP Framework?
VORP (Versatile Open Roleplay Platform) is an open-source roleplay framework built specifically for RedM. It serves the same purpose as ESX or QBCore in the FiveM ecosystem:
- >Character creation and management - Multi-character support with customizable appearances
- >Inventory system - Weight-based item management with a visual UI
- >Economy - Dual currency with gold and dollars (period-appropriate for 1898)
- >Developer API - Server and client exports for building custom scripts
- >Database integration - MySQL-backed persistent storage for all player data
- >Modular design - Install only the components you need
---
VORP vs RedEM:RP
| Feature | VORP | RedEM:RP |
|---|---|---|
| Popularity | Largest community | Smaller but active |
| Open Source | Yes (GitHub) | Partially |
| Script Ecosystem | Large | Smaller |
| Inventory | Weight-based | Slot-based |
| Economy | Gold + dollars | Configurable |
---
Prerequisites
Before installing VORP, you need:
- >A working RedM server (see our RedM Server Setup Guide)
- >MySQL or MariaDB installed and running
- >oxmysql installed as your database connector
- >Basic familiarity with Lua and server configuration
server.cfg has:set mysql_connection_string "mysql://redm_user:your_password@localhost/redm_server?charset=utf8mb4"
ensure oxmysql
---
Installing VORP Core
VORP Core is the foundation. All other VORP resources depend on it.
Download and Install
cd ~/redm/server-data/resources/[core]
git clone https://github.com/VORPCORE/vorp-core-lua.git vorp_core
Import the Database
mysql -u redm_user -p redm_server < ~/redm/server-data/resources/[core]/vorp_core/database/vorp_core.sql
Configure VORP Core
-- vorp_core/config.lua
Config = {}
Config.MaxCharacters = 5
Config.StartingMoney = 100.00
Config.StartingGold = 5.00
Config.DefaultSpawn = {
x = -279.22, y = 788.42, z = 118.35, heading = 180.0
}
Config.SaveInterval = 5 -- minutes
Config.WhitelistEnabled = false
Config.RespawnTime = 60 -- seconds
Config.RespawnCost = 5.00 -- dollars deducted on death
Add to server.cfg
ensure oxmysql
ensure vorp_core
---
Installing VORP Character
VORP Character handles character creation, selection, and appearance customization.
cd ~/redm/server-data/resources/[core]
git clone https://github.com/VORPCORE/vorp_character-lua.git vorp_character
mysql -u redm_user -p redm_server < vorp_character/database/vorp_character.sql
Configuration
-- vorp_character/config.lua
Config = {}
Config.MinFirstNameLength = 2
Config.MaxFirstNameLength = 20
Config.MinAge = 18
Config.MaxAge = 80
Config.Genders = {
{ label = "Male", value = "male", model = "mp_male" },
{ label = "Female", value = "female", model = "mp_female" }
}
Config.AppearanceOptions = {
face = true, hair = true, beard = true,
body = true, overlays = true, clothing = true
}
Add ensure vorp_character to server.cfg after vorp_core.
---
Installing VORP Inventory
cd ~/redm/server-data/resources/[core]
git clone https://github.com/VORPCORE/vorp_inventory-lua.git vorp_inventory
mysql -u redm_user -p redm_server < vorp_inventory/database/vorp_inventory.sql
Configuration
-- vorp_inventory/config.lua
Config = {}
Config.InventoryType = "weight"
Config.MaxWeight = 24000 -- grams
Config.HotbarSlots = 5
Config.MaxStack = 50
Config.DropOnDeath = false
Config.UsePickupAnimation = true
Config.OpenKey = "TAB"
Register Items
Items must be registered in the database before use:
INSERT INTO items (item, label, weight, description, type) VALUES
('bread', 'Bread', 200, 'A loaf of fresh bread', 'item_standard'),
('water', 'Water Bottle', 500, 'Clean drinking water', 'item_standard'),
('bandage', 'Bandage', 100, 'A basic medical bandage', 'item_standard'),
('whiskey', 'Whiskey', 400, 'A bottle of fine whiskey', 'item_standard'),
('tobacco', 'Tobacco', 50, 'Dried tobacco leaves', 'item_standard'),
('rope', 'Rope', 300, 'A sturdy length of rope', 'item_standard'),
('meat_raw', 'Raw Meat', 500, 'Uncooked animal meat', 'item_standard'),
('meat_cooked', 'Cooked Meat', 400, 'Grilled and ready to eat', 'item_standard'),
('gold_nugget', 'Gold Nugget', 100, 'A small nugget of gold', 'item_standard'),
('horse_reviver', 'Horse Reviver', 300, 'Medicine for a downed horse', 'item_standard'),
('ammo_revolver', 'Revolver Ammo', 150, 'Ammunition for revolvers', 'item_standard'),
('ammo_rifle', 'Rifle Ammo', 200, 'Ammunition for rifles', 'item_standard');
Add ensure vorp_inventory to server.cfg.
---
Database Tables Overview
After installing the core VORP components, your database contains:
| Table | Purpose |
|---|---|
| users | Player accounts linked by identifier |
| characters | Character data (name, money, job, position) |
| inventory | Player inventory items |
| items | Item definitions (name, weight, type) |
| whitelist | Whitelisted player identifiers |
| loadout | Player weapon loadouts |
SHOW TABLES;
SELECT COUNT(*) FROM items;
DESCRIBE characters;
---
Configuring the Economy System
VORP uses a dual-currency system with dollars and gold.
Using the Economy API
-- Server-side economy functions
local VORPcore = exports.vorp_core:GetCore()
RegisterNetEvent('myScript:buyItem')
AddEventHandler('myScript:buyItem', function(price)
local source = source
local Character = VORPcore.getUser(source).getUsedCharacter
if Character.money >= price then
Character.removeCurrency(0, price) -- 0 = dollars, 1 = gold
TriggerClientEvent('myScript:purchaseComplete', source)
else
TriggerClientEvent('myScript:insufficientFunds', source)
end
end)
-- Admin commands
-- Admin: give dollars
RegisterCommand('givemoney', function(source, args)
local targetId, amount = tonumber(args[1]), tonumber(args[2])
if not targetId or not amount then return end
VORPcore.getUser(targetId).getUsedCharacter.addCurrency(0, amount)
end, true)
-- Admin: give gold
RegisterCommand('givegold', function(source, args)
local targetId, amount = tonumber(args[1]), tonumber(args[2])
if not targetId or not amount then return end
VORPcore.getUser(targetId).getUsedCharacter.addCurrency(1, amount)
end, true)
Automatic Salary System
local Salaries = {
sheriff = { money = 50, gold = 0.5 },
doctor = { money = 40, gold = 0.3 },
blacksmith = { money = 35, gold = 0.2 },
farmer = { money = 25, gold = 0.1 },
}
-- Pays salaries every 30 minutes based on character job
CreateThread(function()
while true do
Wait(1800000)
for _, playerId in pairs(GetPlayers()) do
local user = VORPcore.getUser(tonumber(playerId))
if user then
local character = user.getUsedCharacter
local salary = Salaries[character.job]
if salary then
character.addCurrency(0, salary.money)
character.addCurrency(1, salary.gold)
end
end
end
end
end)
---
Adding VORP Scripts
VORP Stables (Horse Management)
cd ~/redm/server-data/resources/[gameplay]
git clone https://github.com/VORPCORE/vorp_stables-lua.git vorp_stables
mysql -u redm_user -p redm_server < vorp_stables/database/vorp_stables.sql
-- vorp_stables/config.lua
Config.Stables = {
{
name = "Valentine Stables",
coords = vector3(-365.89, 770.27, 115.17),
horses = {
{ model = "A_C_Horse_Arabian_White", name = "White Arabian", price = 850.00 },
{ model = "A_C_Horse_Morgan_Bay", name = "Bay Morgan", price = 150.00 },
{ model = "A_C_Horse_Mustang_Buckskin", name = "Buckskin Mustang", price = 400.00 },
}
}
}
VORP Stores (General Shops)
git clone https://github.com/VORPCORE/vorp_stores-lua.git vorp_stores
-- vorp_stores/config.lua
Config.Stores = {
{
name = "Valentine General Store",
coords = vector3(-325.29, 774.52, 116.98),
items = {
{ item = "bread", label = "Bread", price = 2.00 },
{ item = "water", label = "Water", price = 1.00 },
{ item = "whiskey", label = "Whiskey", price = 5.00 },
{ item = "bandage", label = "Bandage", price = 4.00 },
}
}
}
VORP Crafting
git clone https://github.com/VORPCORE/vorp_crafting-lua.git vorp_crafting
mysql -u redm_user -p redm_server < vorp_crafting/database/vorp_crafting.sql
-- vorp_crafting/config.lua
Config.Recipes = {
{
name = "Cooked Meat",
result = { item = "meat_cooked", amount = 1 },
ingredients = { { item = "meat_raw", amount = 1 } },
craftTime = 10,
requiredJob = nil,
station = "campfire"
}
}
VORP Housing
git clone https://github.com/VORPCORE/vorp_housing-lua.git vorp_housing
mysql -u redm_user -p redm_server < vorp_housing/database/vorp_housing.sql
-- vorp_housing/config.lua
Config.Properties = {
{
id = "valentine_house_1",
label = "Valentine Homestead",
price = 500.00,
coords = vector3(-300.50, 800.30, 117.50),
storage = 50,
maxOwners = 1,
furnishable = true
}
}
Complete Resource Load Order
# Database
ensure oxmysql
# VORP Core Framework
ensure vorp_core
ensure vorp_character
ensure vorp_inventory
# VORP Gameplay Scripts
ensure vorp_stables
ensure vorp_stores
ensure vorp_crafting
ensure vorp_housing
# Utility
ensure chat
ensure spawnmanager
ensure hardcap
---
Creating Custom VORP Scripts
Here is a pelt-selling script example showing how to use VORP Core and Inventory APIs together.
fxmanifest.lua
fx_version 'cerulean'
game 'rdr3'
author 'Your Name'
description 'Custom hunting script for VORP'
version '1.0.0'
shared_scripts { 'config.lua' }
server_scripts { '@oxmysql/lib/MySQL.lua', 'server/main.lua' }
server/main.lua
local VORPcore = exports.vorp_core:GetCore()
local PeltPrices = {
deer_pelt = 8.00,
rabbit_pelt = 3.00,
bear_pelt = 25.00,
}
RegisterNetEvent('hunting:sellPelts')
AddEventHandler('hunting:sellPelts', function()
local source = source
local Character = VORPcore.getUser(source).getUsedCharacter
local total = 0.0
for item, price in pairs(PeltPrices) do
local count = exports.vorp_inventory:getItemCount(source, nil, item)
if count > 0 then
exports.vorp_inventory:subItem(source, item, count)
total = total + (price * count)
end
end
if total > 0 then
Character.addCurrency(0, total)
TriggerClientEvent('vorp:NotifyTip', source,
"Sold pelts for %%CODEBLOCK_23%%quot; .. string.format("%.2f", total), 4000)
end
end)
---
Managing the Admin Panel
VORP Core provides built-in admin commands: /addmoney, /addgold, /setjob, /revive, /tp, /bring, /kick, and /ban.
Admin Groups in server.cfg
add_ace group.owner vorp.admin allow
add_ace group.owner vorp.superadmin allow
add_ace group.admin vorp.admin allow
add_principal identifier.license:your_license_hash group.owner
You can also manage admin status directly in the database:
UPDATE characters SET `group` = 'admin' WHERE charidentifier = 1;
---
Common VORP Errors and Troubleshooting
"VORP Core not found"
Ensure resources load in order: oxmysql then vorp_core then other VORP resources.
Character Creation Issues
SHOW TABLES LIKE '%character%';Inventory Items Not Showing
SELECT * FROM items;ensure vorp_inventoryEconomy Not Working
Check that Character.addCurrency(0, amount) uses 0 for dollars and 1 for gold. Verify the money and gold columns are populated in the characters table.
---
Performance Optimization
Database Optimization
ALTER TABLE characters ADD INDEX idx_identifier (identifier);
ALTER TABLE characters ADD INDEX idx_job (job);
ALTER TABLE inventory ADD INDEX idx_charidentifier (charidentifier);
ALTER TABLE inventory ADD INDEX idx_item (item);
DELETE FROM inventory WHERE charidentifier NOT IN (SELECT charidentifier FROM characters);
OPTIMIZE TABLE characters;
OPTIMIZE TABLE inventory;
Script Performance
- >Cache exports - Store
exports.vorp_core:GetCore()once at script load, not per event - >Distance-based sleep - Use
Wait(2000)by default, reduce toWait(0)only when players are near interaction points - >Batch database queries - Avoid single queries per item when processing multiple items
Recommended Community Scripts
| Script | Description | Type |
|---|---|---|
| VORP Fishing | Fishing mini-game with selling | Gameplay |
| VORP Mining | Ore extraction and trade | Jobs |
| VORP Lumberjack | Wood chopping and lumber | Jobs |
| VORP Farming | Crop planting and harvesting | Jobs |
| VORP Wanted | Bounty and wanted system | Law |
| VORP Lawman | Sheriff job with arrests | Jobs |
| VORP Moonshine | Brewing and distribution | Jobs |
| VORP Banking | Bank accounts and robbery | Economy |
| VORP Blacksmith | Weapon crafting and repair | Crafting |
| VORP Camp | Placeable camps with storage | Survival |
---
Conclusion
Your VORP-powered RedM server now has character creation, inventory management, economy, and essential gameplay scripts. From here:
- >Add community scripts based on your server's theme
- >Create custom Lua scripts using the VORP API
- >Fine-tune economy values through playtesting
- >Build a unique Wild West experience for your community
- >Add job scripts for sheriff, doctor, blacksmith, and rancher
- >Set up Discord webhooks for server events
- >Create custom events and storylines for roleplay
- >Monitor performance and optimize queries as your player base grows