This document explains each configuration section so you can tailor the system to your server’s style and economy.
Main File: shared/config.lua
General Settings
config.Locale='pt-br' -- Sets the script language (files inside locales/)config.Debug= {Enabled=false, -- Enables general debug logs in console (F8)ShowF8Logs=true, -- Shows prints in F8ShowServerLogs=true, -- Shows prints in the server console (cmd)}
Tip: Keep Debug.Enabled = false in production to avoid console spam.
External Integrations (ExternalSystems)
Define which external systems your server uses.
Note: There is no direct config here for Banking or Target.
The script uses standard framework exports or auto-detects ox_ systems when available.
Company Settings (Company)
Controls player company economy and limits.
Industries & Economy Configuration
Industries are the heart of Space Trucker. They are split into individual definitions (location, type) and global configuration (prices, blips, items).
register_businesses.lua – Businesses that buy final products (Stores, Gas Stations)
2) Blip Configuration (Map Icons)
Blips are not configured inside each individual industry.
They are defined globally inside shared/config.lua, under config.BlipConfig.
The script chooses icons based on Transport Type or a Specific Item override.
Path:shared/config.lua (around line ~1060)
sprite: Icon ID (see FiveM blips reference)
color: Color ID
scale: Icon size (0.8 is the standard)
Display behavior:
Cargo blips are set natively as 4 (map + minimap), and trade points as 5 (minimap only).
To change this, edit client/c_utils.lua inside:
CreateCargoBlip
CreateTradePointBlip
3) Trading & Pricing (Economy)
The economy is controlled in shared/config.lua inside the config.IndustryItems table.
Here you define base price range and profit margin for each item.
Path:shared/config.lua (around line ~442)
Price balancing: Adjust minPrice and maxPrice. The system fluctuates the real price inside this range based on stock.
Profit margin: Adjust percentProfit.
Example: math.random(10, 20) / 100 generates profit between 10% and 20%.
4) Creating/Editing an Industry
To add a new industry to the map, edit one of the files in shared/industries/.
Example (inside register_primary_industries.lua):
Vehicle File: shared/vehicles_config.lua
This file defines all vehicles that can be used for missions and logistics operations.
Vehicle Structure
Adding New Vehicles (Mods)
Get the vehicle spawn name (example: eurotruck)
Copy an existing block in vehicles_config.lua
Paste and change the key to ['eurotruck']
Adjust capacity (balance it with the visual size)
Adjust props positions (x, y, z) so boxes don’t float or clip into the cabin
This requires in-game testing (trial and error).
Important Tip About transType
If you configure a vehicle with onlyLIQUIDS, it won’t be able to run crate or ore deliveries.
Make sure at least one low-level vehicle supports CRATE, so new players can start working immediately.
config.IndustryItems = {
['fuel'] = {
label = Lang:t('item_name_fuel'), -- Translated name
capacity = 1, -- Weight/space used
transType = config.ItemTransportType.LIQUIDS, -- Transport type
-- Economy
minPrice = 528, -- Minimum base price
maxPrice = 792, -- Maximum base price
percentProfit = math.random(2, 10) / 100, -- Profit margin (2% to 10%)
-- (This replaces fixed SellModifier/BuyModifier with a dynamic approach)
-- Visual/info labels
buyFromInfo = ('%s'):format(Lang:t('industry_type_label_oilfield')),
sellToInfo = ('%s'):format(Lang:t('industry_type_label_gas_station')),
},
-- ...
}
Industries:AddIndustry(
config.Industry.Name.PETROLEUM_EXTRACTION_MURRIETA, -- Unique ID (define in config.lua > config.Industry.Name)
Lang:t('industry_murrieta_oil_gas_company'), -- Display name
config.Industry.Status.OPEN,
config.Industry.Tier.PRIMARY,
config.Industry.Type.Primary.OILFIELD, -- Type (config.lua)
vector3(1535.77, -2098.01, 77.11), -- Main coordinate (no blip created here, logic only)
{
-- Selling points (where the industry SELLS products to the player)
['fuel'] = vector3(1548.83, -2116.92, 77.25)
},
{}, -- Buying points (where the industry BUYS from the player, empty for primaries)
{
-- Initial stock data
[config.Industry.TradeType.FORSALE] = {
['fuel'] = {
price = ..., -- Usually pulled dynamically
production = math.random(10,15), -- Production per hour/cycle
storageSize = 100, -- Max capacity
inStock = math.random(10,50), -- Initial stock
}
}
}
):SetPurchasePrice(1500000) -- Price for a player to purchase the business
['vehicle_spawn_name'] = {
label = 'Nice Name In Menu',
capacity = 100, -- Cargo capacity (script units, not inventory weight)
rentPrice = 500, -- Cost to rent this vehicle inside the company
level = 1, -- Company reputation level required to unlock
transType = { -- Cargo types it can carry
[config.ItemTransportType.LIQUIDS] = true, -- Liquids
[config.ItemTransportType.CRATE] = true, -- Crates/General cargo
-- Other types: ORE, REFRIGERATED
},
props = { -- Visual cargo props in the bed (optional)
{ model = `prop_box_wood02a_pu`, pos = vector3(0.0, -2.5, 0.45), rot = vector3(0.0, 0.0, 0.0) }
}
}