Introduction
The shared files inrsg-core contain all the core configuration data for your server including jobs, items, vehicles, gangs, weapons, and utility functions. These files are shared between client and server, making the data accessible on both sides without additional network calls.
Location: resources/[framework]/rsg-core/shared/
Shared files are loaded on both client and server automatically. Changes require a server restart!
Core Features
๐ฆ Centralized Configuration
- Jobs: Define all server jobs with grades and payments
- Items: Configure inventory items with properties and metadata
- Vehicles: Set up vehicle shops and pricing
- Gangs: Create gang hierarchies and structures
- Weapons: Define weapon properties and ammo types
- Utilities: Helper functions for common operations
๐ Shared Access
- Client & Server: Data available on both sides
- No Network Calls: Instant access without events
- Consistent Data: Single source of truth
- Easy Management: Edit in one place, affects everywhere
โ๏ธ Flexible System
- Add Custom Jobs: Create new job types
- Define Items: Add new items with decay, quality, etc.
- Vehicle Categories: Organize vehicles by type
- Gang System: Set up gang hierarchies
- Utility Functions: String manipulation, math helpers
Utility Functions
Location
File:rsg-core/shared/main.lua
Starter Items
Define default items for new players:String Functions
RandomStr
Generate random string of specified length:RandomInt
Generate random number string:SplitStr
Split string by delimiter:Trim
Remove whitespace from string:FirstToUpper
Capitalize first letter:Round
Round number to decimal places:Vehicle Functions
ChangeVehicleExtra
Toggle vehicle extras:SetDefaultVehicleExtras
Set multiple vehicle extras:Items Configuration
Location
File:rsg-core/shared/items.lua
Item Structure
Complete item definition with all properties:Item Properties Reference
Item Type Examples
Consumable Food
Tools & Equipment
Money Items
Weapon Items
Items with Default Metadata
Jobs Configuration
Location
File:rsg-core/shared/jobs.lua
Job Structure
Complete job definition:Job Properties
Grade Properties
Default Jobs
The framework includes these jobs by default: Law Enforcement (type = 'leo'):
vallaw- Valentine Law Enforcementrholaw- Rhodes Law Enforcementblklaw- Blackwater Law Enforcementstrlaw- Strawberry Law Enforcementstdenlaw- Saint Denis Law Enforcement
type = 'medic'):
valmedic- Valentine Medicsdmedic- Saint Denis Medic
unemployed- Default job for all players
Creating Custom Jobs
Vehicles Configuration
Location
File:rsg-core/shared/vehicles.lua
Vehicle Structure
Vehicle Properties
Vehicle Categories
Common categories:'horses'- Horse mounts'carts'- Wagons and carts'coaches'- Stagecoaches'boats'- Watercraft
Gangs Configuration
Location
File:rsg-core/shared/gangs.lua
Gang Structure
Default Gangs
none- No gang affiliationodriscoll- OโDriscoll Boyslemoyne- Lemoyne Raidersmurfree- Murfree Broodskinner- Skinner Brotherslaramie- Laramie Gangdellobo- Del Lobo Gangnight- Night Folkforeman- Foreman Brothersanderson- Anderson Boyswatson- Watsonโs Boys
Creating Custom Gangs
Weapons Configuration
Location
File:rsg-core/shared/weapons.lua
Weapon Structure
Weapons must also be defined in
shared/items.lua as inventory items with type = 'weapon'!Best Practices
Test Thoroughly: Test all new jobs, items, and vehicles before deploying to production
Configuration Tips
- Consistent Naming: Use lowercase with underscores (
my_custom_item) - Clear Labels: Use descriptive display names
- Balanced Payments: Keep job payments balanced for economy
- Weight System: 1000g = 1kg, keep items realistic
- Image Files: Ensure all images exist in rsg-inventory/html/images
Common Mistakes
โ Donโt:Next Steps
- Item Decay System - Configure item quality degradation
- Money System - Set up money types and banks
- Configuration Guide - Configure server settings
- Inventory Functions - Work with items programmatically
Need help? Join the RSG Framework Discord!