legacy-towing
Configuration
Every key in config.lua, with defaults and behaviour.
Configuration
All keys live in config.lua. Per-vehicle rig data (decks, slots, ramps, winch anchors) is not here — it's authored in-game and stored in data/rigs.json.
Admin / command
| Key | Type | Default | Description |
|---|---|---|---|
Config.AdminAce |
string | 'admin' |
Ace permission checked server-side for admin actions (opening the panel, saving). Must be an ace, not a principal — 'group.admin' here will silently fail the check. |
Config.CommandRestriction |
string | 'group.admin' |
Principal the /towingconfig-style command itself is restricted to; players lacking it don't even get autocomplete. |
Config.AdminCommand |
string | 'towingconfig' |
Chat/console command that opens the admin config NUI. |
Interaction / detection
| Key | Type | Default | Description |
|---|---|---|---|
Config.TargetDistance |
number | 3.0 |
ox_target interaction distance used on every registered option (ramps, load/unload, winch, release). |
Config.AdminSearchRadius |
number | 150.0 |
Radius the admin menu searches for a spawned example of the rig being edited. |
Config.WatchInterval |
number | 250 |
Poll interval (ms) for the carry watcher while a configured rig is nearby. |
Config.ScanRadius |
number | 30.0 |
Radius within which a configured rig must exist for the carry watcher to run at all. |
Config.AttachDelay |
number | 400 |
Grace period (ms) after exiting a vehicle before it's eligible for auto-attach. |
Config.MaxAttachSpeed |
number | 2.0 |
A parked vehicle above this speed (m/s) is never auto-attached, even if geometrically on the deck. |
Winch — Config.Winch (table)
Governs the physical rope winch in client/winch.lua. No inventory item is required — access is gated purely by whether the rig's own config has a winch enabled.
Known sub-fields: reachDistance, ropeType, slack, slackMin, slackMax, carrySlackRatio, pullSlackRatio, reshapeThreshold, maxMass (checked against the vehicle's handling fMass, not a native mass getter), pullSpeed, maxClimbSpeed, minDistance, operateDistance, attachDistance, hook (model, bone, offset, rotation), anims (takeOut, attach — each {dict, clip, flag, duration, label}), keys (winch = pull control, default 38/E; release = unhook/stow control, default 47/G; plus label_winch/label_release).
The winch never writes rotation to the towed vehicle — orientation only comes from wheels/ramp/pull direction.
Reference vehicles — Config.SlotReferences (table)
List of { model, label } reference boats/jetskis (seashark, speeder, dinghy, marquis, tropic) spawned only inside the admin slot placer, to line up boat/jetski trailer cradles. Never spawned during normal play.
Ramps — Config.Ramps (table)
Physical ramp-prop settings, used only by rigs with ramp.mode = 'props' (rigs using 'extra' or 'door' modes bypass this entirely).
| Sub-field | Description |
|---|---|
prop |
Ramp prop model name (default 'imp_prop_flatbed_ramp'). |
stowDistance |
Metres the rig must move from its drop point before ramps auto-stow (default 3.0). |
watchInterval |
Poll ms while ramps are deployed (default 500). |
originTolerance |
Max discrepancy the server accepts between a client-reported drop origin and the rig's live position before falling back to true (live transform). |
step / stepFast, rot / rotFast |
Authoring nudge increments in the admin ramp placer. |
reach |
Raycast distance used while aiming the ramp placer. |
anims |
lower/raise, each {dict, clip, flag, duration, label} (default dict 'pickup_object'). |
Deployed ramp props are frozen world objects, not attached to the rig — they will not follow it if it moves, hence the auto-stow distance.
Fixed (hand-loaded) mode — Config.Fixed (table)
| Sub-field | Description |
|---|---|
range |
Max vehicle-to-rig distance to offer "Load onto flatbed" (default 8.0). |
anim |
Loading progress-bar animation, {dict, clip, flag, duration, label} (default dict 'mini@repair', flag 49, duration 4000). |
unloadMargin |
Extra clearance (metres) behind the rig used to derive an unload position when the rig has no authored rig.unload (default 1.5). |
references |
Reference cars (futo, sultan, baller, bison, bati801) spawned only while authoring fixed/unload positions in the admin panel. |
Carry / overlap — Config.Carry (table)
| Sub-field | Description |
|---|---|
checkOverlap |
Default true. When true, dynamic (non-slot) rigs run a footprint/overlap test before allowing another vehicle onto the deck, because attached entities stop colliding with other vehicles. Set false to disable this safety check for dynamic rigs. Slot-mode rigs never run this check (by design). |
overlapPadding |
Metres shrunk off each vehicle's footprint before testing overlap (default 0.12). |
overlapHeight |
Vertical slack (metres) for the overlap test, so stacked decks don't falsely conflict (default 0.6). |
Hitch — Config.Hitch (table)
Automatic truck↔trailer hitching, unrelated to deck-loading rigs. The entire file (client/hitch.lua) no-ops if Config.Hitch is nil or Config.Hitch.enabled is falsy.
| Sub-field | Description |
|---|---|
enabled |
Master on/off switch. |
maleBone / femaleBone |
Bone names read via GetEntityBoneIndexByName ('attach_male' / 'attach_female'). |
range |
Max hitch-to-hitch distance to show the prompt. |
key / keyLabel |
Control read only while the prompt is showing (default 74 / H — INPUT_VEH_HEADLIGHT). Not a registered global keybind. |
suppressKeyConflict |
Default true. Disables the raw headlight control while the prompt is up so H doesn't also flick your lights. |
scanInterval |
Poll ms while driving a tow-capable vehicle with no prompt showing. |
attachRadius |
Passed to AttachVehicleToTrailer (looser than range). |
trustVehicleType |
Default true. When true, a model with no attach_female bone but GetVehicleType() == 'trailer' still gets a coupling point at its front-centre. Set false to require the bone, which will hide the prompt for many addon trailers. |
Debug
| Key | Type | Default | Description |
|---|---|---|---|
Config.Debug |
boolean | true |
Prints console diagnostics (rig/category counts on load, slot-assignment tracing, missing-deck warnings). Set to false on a live server. |