Configuration
All settings are in shared/config.lua. Restart the resource after editing it. Missions and terminals are not in this file, they are in data/terminals.json, see Terminals and Missions.
General
Config.debug = true
Config.interact_distance = 2.0
Config.job = {
locked = false,
name = "porter"
}| Option | What it does |
|---|---|
Config.debug |
Enables the test commands, such as /portercrates for anyone. Turn it off on a live server. |
Config.interact_distance |
How close, in metres, a porter has to be to interact. |
Config.job.locked |
If true, only players with the job can take missions. |
Config.job.name |
The name of that job. |
Cargo condition
Config.cargo = {
fall_damage = 25,
fragile_damage = 2.0,
ranks = {
{ rank = 'S', from = 95 },
{ rank = 'A', from = 80 },
{ rank = 'B', from = 60 },
{ rank = 'C', from = 40 },
{ rank = 'D', from = 0 },
},
}| Option | What it does |
|---|---|
fall_damage |
The condition an item loses each time it is spilled or thrown off. |
fragile_damage |
Fragile cargo loses this many times more. |
ranks |
The condition a delivery needs for each rank. The first match wins. |
Pay and missions
Config.missions = {
pay_by_rank = { S = 1.0, A = 0.9, B = 0.75, C = 0.5, D = 0.25 },
pay_to = 'cash',
leaderboard_size = 50,
rotation = {
visible = 4,
period_minutes = 40,
urgent_bonus = 0.35,
},
repeats = {
window_minutes = 60,
pay = { 0.8, 0.6 },
},
}| Option | What it does |
|---|---|
pay_by_rank |
The share of a mission's pay that each rank earns. |
pay_to |
Where the pay goes: 'cash' or 'bank'. |
leaderboard_size |
How many porters the terminal's leaderboard lists. |
rotation.visible |
Missions a terminal shows at a time. 0 shows all of them, always. |
rotation.period_minutes |
How long a board stays up. The terminals change theirs at different times. |
rotation.urgent_bonus |
The urgent mission pays this much more: 0.35 is +35%. |
repeats.window_minutes |
Deliveries of a mission longer ago than this no longer count as repeats. |
repeats.pay |
The share the first repeat earns, the second, and every one after. |
Ranges such as terminal_range, ped_range, marker_range and deliver_range are in the same table.
Danger
Config.missions.danger = {
models = { 'g_m_y_lost_01', 'g_m_y_lost_02', 'g_m_y_lost_03' },
weapons = { 'WEAPON_PISTOL', 'WEAPON_SAWNOFFSHOTGUN' },
health = 200,
accuracy = 35,
spawn_distance = 30,
spawn_margin = 30,
despawn_margin = 90,
respawn_seconds = 10,
}These are the defaults for every mission with a danger section. A mission can override models and weapons.
The stack
Config.stack sets how much a porter can carry and where it sits on their back.
| Option | What it does |
|---|---|
max_height |
Metres of cargo, 1.8 by default (six L crates). |
max_weight |
Kilograms, 60 by default. |
max_items |
Items, 12 by default. |
frame |
The cargo frame clothing. Its texture is the colour: 0 hi-vis orange, 1 red, 2 blue, 3 green, 4 white, 5 black, 6 gold. |
Balance
Config.balance holds the numbers that decide how hard a stack is to carry. They are placeholders for feel, not tuned values, so change them one at a time and test in game.
| Option | What it does |
|---|---|
noise_gain |
Random shoves from the ground. |
rain_gain |
Extra shove at full rain. |
slope_gain |
The push of side slopes. |
turn_gain |
The push of turning at speed. |
fall_spill |
The share of the stack that comes off when a porter loses their balance. |
fall_grace |
Seconds without balance after a fall. |
meter_from |
The lean meter is shown from this load. |
Config.surfaces gives each ground type a roughness by collision material hash, and Config.slippery lists the ground a porter slips on rather than topples from. /portersurface prints the hash of the ground you stand on with Config.debug on.
Vehicles
Config.vehicles = {
classes = {
[8] = 'show',
[12] = 'hide',
[13] = 'show',
},
models = {
-- [`bison`] = 'hide',
-- [`rcbandito`] = false,
},
crash_threshold = 25,
crash_damage = 0.15,
}A porter with cargo on their back cannot get into any vehicle that is not listed. 'hide' is for closed vehicles, where the stack is out of sight while the porter is inside. 'show' is for open ones, where the stack stays on the rider's back. Single models win over classes, and false refuses a model.
HUD
Config.hud = {
command = 'porter:settings',
panel = { x = 98.5, y = 50.0 },
meter = { x = 50.0, y = 95.5 },
}command opens the editor where a player moves the parts of the HUD. panel and meter are where each part sits until a player moves them, in percent of the screen.
Carrying people
Config.carry controls carrying players and NPCs.
| Option | What it does |
|---|---|
require_consent |
A conscious player has to accept. The downed and the dead are not asked. |
consent_timeout |
Seconds to accept. |
living_npcs |
If false, only dead NPCs can be carried. |
load |
What a person counts as for balance. |
revive_dead, restore_death |
A dead ped is revived for the ride, and is dead again once put down. |
Outfits
Config.outfits = {
command = 'porter:outfit',
collection = 'luxu_porter_gear',
list = {
longhaul = {
label = 'Long-Haul',
components = { [3] = 0, [4] = 0, [6] = 0, [11] = 0 },
plain = { [8] = 15 },
},
},
}Set command to false for no command. The outfits come from the luxu_porter_gear collection and work for both freemode peds. Each outfit lists the drawable it uses for each clothing slot (components), for props (props) and for vanilla slots that stay plain (plain).