Configuration
βοΈ Configuration Guide
This comprehensive guide covers all configuration options for the TW Scrapyard system. The configuration is split across two main files: config.lua (gameplay settings) and coordinate.lua (location data and machine setups).
π Table of Contents
Core Settings
Framework Integration
UI & Interaction
Job Configuration
Mission Regions
Scrap Spawn System
Processing Machines
Vehicle System
Reconnection System
XP & Progression
Core Settings
Framework Selection
Supported Frameworks:
'esx'- ESX Framework (latest)'oldesx'- ESX Legacy (older versions)'qb'- QBCore / QBox (latest)'oldqb'- QBCore (older versions)'vrp'- vRP Framework
Database Configuration
Supported Adapters:
"oxmysql"- OxMySQL (recommended)"mysql-async"- MySQL Async"ghmattimysql"- GHMatti MySQL
Ensure your chosen SQL resource is started before tw-scrapyard in your server.cfg.
Inventory Integration
Supported Inventory Systems:
"qb_inventory"- QBCore Inventory"esx_inventory"- ESX Inventory"ox_inventory"- Ox Inventory"qs_inventory"- Quasar Inventory
Image Path Examples:
QBCore:
"nui://qb-inventory/html/images/"Ox Inventory:
"nui://ox_inventory/web/images/"ESX:
"nui://esx_inventoryhud/html/img/items/"
The default item image is used when an item's image cannot be found in your inventory system.
Currency Settings
Account Types:
"bank"- Bank account"cash"- Cash on hand"money"- Default money (framework-dependent)
Currency Symbols:
'$'- US Dollar'β¬'- Euro'βΊ'- Turkish Lira'Β£'- British Pound
Framework Integration
Interaction System
Supported Systems:
'drawtext'- Native 3D text (recommended)'qb-target'- QBCore Target'ox-target'- Ox Target
Vehicle Key Systems
Automatically Supported Key Systems:
cd_garage
qs-vehiclekeys
wasabi_carlock
qb-vehiclekeys
qbx-vehiclekeys
Renewed-Vehiclekeys
Custom Integration:
Fuel System Integration
Supported Fuel Systems:
LegacyFuel
x-fuel
ox_fuel
cdn-fuel
ps-fuel
Native (fallback)
Clothing System
Supported Clothing Systems:
"qb-clothing"- QBCore Clothing"fivem-appearance"- FiveM Appearance"illenium-appearance"- Illenium Appearance"esx_skin"- ESX Skin"rcore_clothing"- RCore Clothing
Job Outfits:
UI & Interaction
Default UI Positions
Language Configuration
Adding Custom Languages:
Create new locale file:
locales/yourlang.luaCopy structure from
locales/en.luaTranslate all strings
Add to
Config.LanguageTitlearray
Notification System
Message Types:
"success"- Green notification"error"- Red notification"info"- Blue notification"warning"- Orange notification
Job Configuration
Job Location
Job Restriction:
'all'- Everyone can access'police'- Only police'mechanic'- Only mechanicsCustom job names from your framework
Job Cooldown
Examples:
0- No cooldown (unlimited jobs)1- 1 hour cooldown6- 6 hours cooldown24- Daily cooldown
Mission Completion Rewards
Set giveItemPlayer = true only if you want players to receive physical items in addition to money/XP.
Daily Missions
Daily Mission System:
Resets every 24 hours
Tracks progress across all players
Bonus rewards for completion
Progress saved in database
Mission Regions
Region Configuration
Reward Calculation:
Base reward increases with player count in lobby
2 players: +50% rewards
3 players: +75% rewards
4 players: +100% rewards
Job Tasks
Task Types:
rent_vehicle- Rent a vehicle from showroomscrap_createobject- Collect scrap objects from worldscrap_press- Press items in press machineshredding_press- Shred pressed itemsmelt_scrap- Melt metal in furnacefill_moulds- Pour metal into moulds
Illegal Area Configuration
Security Tips:
Set
authorizedJobs = {'police', 'admin'}to restrict accessEnable
checkRequiredItemfor keycard-based accessUse
checkCarryingItemto prevent exploits
Scrap Spawn System
Scrap Areas (coordinate.lua)
Adding New Spawn Areas:
Add new region ID to array
Add vector3 coordinates for each spawn point
Update
Config.scrapyardCoordswith region center
Scrapyard Zones
Zone Settings:
id- Must matchConfig.scrapAreaindexcoords- Center point of spawn zoneradius- How far objects can spawn from centermax- Maximum objects allowed in zone
Scrap Item Distribution
Spawn Weight System:
1-25- Very rare (big items)26-50- Rare (medium items)51-75- Common (small-medium items)76-100- Very common (small items)
Balancing Tips:
Urban areas should have more modern appliances
Rural areas should have older/rarer items
Keep big items rare to maintain value
Press Stage Configuration
Press Stages Explained:
Raw Item (
_01) - Collectible scrap objectPartially Pressed (
_02) - After first pressFully Pressed (
_03) - Ready for shredding
Shredding Output
Output Scaling:
Small items: 1-2 metal pieces
Medium items: 1-3 metal pieces
Large items: 2-4 metal pieces
Drop Zones
Drop Zone Usage:
Players can only drop pressed objects near these coordinates
Prevents littering across the map
Radius check: 5 meters from zone
Processing Machines
Press Machines (coordinate.lua)
Adding New Press Machines:
Copy existing machine config
Increment ID
Update all coordinates to new location
Adjust rotation values for proper alignment
Define press area polygon (8 points = box with height)
Important:
Press area must be 8 points (bottom 4 + top 4)
Piston must align with press area center
Lever rotation affects animation direction
Shredding Machines (coordinate.lua)
Shredding Machine Components:
Gears - Visual rotation during processing
Shredding Line - Path items travel during shredding
Case System - Collects shredded metal
Grate - Openable grate for dust collection
Dust System - Accumulates during operation
Vehicle System
Vehicle Rental Tiers
Vehicles are configured in coordinate.lua under Config.VehicleRental:
Grid System Explained:
w- Width (cells left-right)h- Height (cells front-back)layers- Vertical stacking levels
Example Capacities:
Cheap (3x3x2): 18 items max
Mid (4x4x3): 48 items max
Pro (5x5x4): 100 items max
Vehicle Blips
Reconnection System
Grace Period & Attempts
Grace Period Examples:
0- Player can reconnect anytime before lobby closes300- 5 minutes to reconnect600- 10 minutes to reconnect1800- 30 minutes to reconnect
Attempt Limit Examples:
0- Unlimited reconnections1- One reconnection only3- Three reconnections per session5- Five reconnections per session
Owner Transfer
Owner Transfer Logic:
Owner Disconnects β System searches for replacement
Eligibility Check:
Player must be in lobby β₯
minimumLobbyTimesecondsPlayer must be online (not disconnected)
Priority Selection:
If
prioritizeByScore = true: Highest score winsIf
prioritizeByScore = false: Longest lobby time wins
Transfer Complete:
New owner assigned
Lobby ownership transferred
Original owner can rejoin as member if
allowRejoinAsMember = true
If no eligible replacement is found, the lobby closes and all players are kicked.
Notification Settings
Debug Mode
Debug Output:
XP & Progression
Level System
XP Curve:
Levels 1-10: 1000-5500 XP per level
Levels 11-20: 6000-10500 XP per level
Levels 21-50: 11000-25500 XP per level
Levels 51-70: 26500-45500 XP per level
Total XP to Max Level: ~1,150,000 XP
XP Sources
Mission Completion:
Daily Missions:
Calculation Example:
Debug & Commands
Debug Mode
Debug Commands:
Tutorial System
Tutorial Requirements:
Videos must be
.mp4formatHosted on accessible CDN
Recommended resolution: 1920x1080
Recommended length: 1-3 minutes
Sell NPCs Configuration
Legal Scrap Dealer
Sellable Legal Items:
Iron scrap
Gold dust
Copper fragments
Aluminum pieces
Steel bars
Illegal Black Market Dealer
Sellable Illegal Items:
Crafted weapons
Weapon parts
Illegal attachments
Contraband materials
Security Warning: Enable blips with caution. Players may camp these locations.
Crafting System
Weapon Crafting:
Requires illegal area access
Uses processed metals
Configurable recipes in
coordinate.luaIntegration with weapon systems
Legal Crafting:
Tools and equipment
Vehicle parts
Construction materials
Performance Optimization
Recommended Settings
Entity Limits
Common Issues
Framework Not Loading
Problem: [ERROR] Failed to load framework!
Solution:
Vehicle Keys Not Working
Problem: Players can't access rented vehicles
Solution:
Scrap Not Spawning
Problem: No scrap objects appear in world
Solution:
Check player is within
radiusof scrapyard zoneVerify job has started correctly
Check
Config.scrapAreahas coordinatesEnsure
maxlimit not reached
Database Errors
Problem: [SQL ERROR] Table doesn't exist
Solution:
Migration Guide
Updating from Old Versions
Config.lua Changes:
Coordinate.lua Changes:
Backup Recommendation: Always backup your config files before updating!
Support & Resources
Official Links
Discord: https://discord.gg/tworst
Documentation: https://docs.tworststore.com
GitHub Issues: https://github.com/tworst/tw-scrapyard/issues
Configuration Generators
Use online tools to generate coordinates:
Vector3 Converter: https://coords.tworststore.com
Zone Creator: https://zones.tworststore.com
Advanced Configuration
For advanced topics including:
Custom machine creation
Network entity optimization
Multi-server synchronization
Custom crafting recipes
See: Advanced Configuration Guide β
Last Updated: November 2024 Version: 2.0.0 Compatibility: FiveM build 2802+
Last updated