Configuration

Vehicle config structure, developer-bundled configs, cross-vehicle references, and server defaults.

data.jsonVehicle Devs

Overview

All vehicle configuration lives in a single data.json at the resource root, keyed by vehicle model name. You almost never need to edit it by hand — the in-game editor is the source of truth.

The file is managed by tLib's Discovery module, which also scans other resources for bundled configs on server start. Any server edit to a vehicle writes back to this file.

tELS/
  data.json                — local (server-owner) configs
  data/
    server_defaults.json   — admin display defaults

Vehicle config structure

Each model entry has four sections:

SectionHolds
ledsLED positions, rotations, sizes, groups, bone attachments
patternsColor palettes, frame sequences, timing, playback flags
triggersCompound condition rules with actions
sirenTone slots, airhorn, horn / chirp behavior, suspend flags
argesArges spotlight props (optional)

LED entry

data.json / leds[]
{
  "id": "a3f1b2c4d5e6f7a8",
  "name": "Front Right 1",
  "x": 0.1, "y": 0.5, "z": 0.7,
  "yaw": 0, "pitch": 0, "roll": 0,
  "sw": 0.044, "sh": 0.02,
  "side": 1,
  "bone": "siren1",
  "groups": ["Right", "Front"],
  "shape": "rect",
  "bloom": "sprite"
}
FieldTypeNotes
idstring16-char hex UUID — stable identity used by patterns. Never reference LEDs by name or index.
x, y, znumberLocal offset (relative to bone if set, otherwise the chassis)
yaw, pitch, rollnumberRotation in degrees
sw, shnumberSurface width and height, metres
sidenumber1 Right, 2 Left, 3 Center
bonestringOptional vehicle bone name
groupsstring[]Display/filter tags
shapestring"rect" (default) or "circle"
bloomstring"sprite", "corona", or "both"
extranumberOptional GTA extra ID — LED only renders when that extra is enabled

Pattern entry

data.json / patterns[]
{
  "name": "Code 3",
  "fps": 10,
  "colors": [
    { "r": 255, "g": 0, "b": 0, "a": 1.0, "name": "Red" },
    { "r": 0, "g": 120, "b": 255, "a": 1.0, "name": "Blue" }
  ],
  "frames": [
    {
      "cells":    { "a3f1b2c4d5e6f7a8": 1, "b4e2c3d5f6a7b8c9": 2 },
      "dimCells": { "a3f1b2c4d5e6f7a8": true },
      "duration": 1
    }
  ],
  "triggerOnly": false,
  "syncNear": false,
  "useEmergencyLights": false,
  "useHighBeams": false,
  "livery": 0
}
FieldTypeNotes
cellsobjectLED UUID → 1-based color index (0 = off)
dimCellsobjectLED UUID → true for smooth interpolation into the next frame
durationnumberTicks at the pattern's fps
triggerOnlybooleanSkipped by 9/0 cycling, still usable by trigger actions
syncNearbooleanSync the frame index across clients using the server clock
useEmergencyLightsbooleanHold GTA's native emergency-lights flag while this pattern plays
useHighBeamsbooleanHold high beams while this pattern plays
liverynumberRestrict to a specific livery index. Omit for any livery.

Trigger entry

data.json / triggers[]
{
  "id": "c5d6e7f8a9b0c1d2",
  "conditions": ["brake", "speed_30"],
  "negated": [false, false],
  "operator": "and",
  "enabled": true,
  "actions": [
    { "type": "pattern_overlay", "patternName": "Brake Warning" }
  ]
}
FieldTypeNotes
idstring16-char hex UUID — stable identity used by trigger refs
conditionsstring[]See Editor → Condition reference
negatedboolean[]Parallel to conditions. true flips that condition.
operatorstring"and" or "or"
actionsobject[]See Editor → Action types
enabledbooleanIgnored when false

Legacy triggers that use { trigger: "brake", patternName: "..." } auto-migrate to the compound form on load.

Siren config

data.json / siren
{
  "tones": [
    {
      "name": "Wail",
      "sound": "VEHICLES_HORNS_SIREN_1",
      "serverSound": "",
      "serverSoundRef": "",
      "rumblerSound": "",
      "rumblerServerSound": "",
      "rumblerServerSoundRef": "",
      "enabled": true,
      "triggerOnly": false
    }
  ],
  "airhorn": "SIRENS_AIRHORN",
  "serverAirhorn": "", "serverAirhornRef": "",
  "serverAirhornRumbler": "", "serverAirhornRumblerRef": "",
  "hornInterrupt": true,
  "parkKill": true,
  "useNormalHorn": true,
  "hornProgrammable": false,
  "lightsSuspendTA": true,
  "lightsSuspendTakedown": true,
  "chirpTone": 1,
  "chirpByCode": false
}

Server-sided sounds are preferred when configured and the player has Server-sided Sirens enabled in /tels. Otherwise the vanilla sound is used.


Vehicle-developer export

Vehicle makers can bundle a tELS config inside the vehicle resource so it loads automatically on server start — no manual copy from the server owner.

How it works

tLib's Discovery module scans every running resource for the tels_config metadata key. When it finds one, the referenced file is parsed and its configs are merged into tELS on boot. Server-owner edits in the editor are written to data.json and take priority over any bundled config, so customizations never get overwritten.

Add metadata to fxmanifest.lua

your-vehicle/fxmanifest.lua
tels_config 'data/tels.json'

The default filename is tels.json — if you use that exact path, the metadata line can be omitted entirely.

Create the config file

your-vehicle/data/tels.json
{
  "police4": {
    "leds": [ /* ... */ ],
    "patterns": [ /* ... */ ],
    "triggers": [ /* ... */ ],
    "siren": { /* ... */ }
  }
}

Easiest workflow: configure the vehicle in-game with /telsedit, then copy that model's entry from data.json into your resource's tels.json.

Ship the resource

Server owners install the vehicle resource as usual. tELS picks up the bundled config on start — confirmed in the server console.


Cross-vehicle references

Don't duplicate patterns, triggers, or sirens across similar vehicles. Reference them instead, and edit the source once to update all referents.

Reference shapes

Single pattern reference
{ "$ref": "police4", "patternName": "Code 3" }
Single trigger reference
{ "$ref": "police4", "triggerId": "c5d6e7f8a9b0c1d2" }
Bulk import (all patterns or triggers)
{ "$ref": "police4", "$all": true }
Siren config reference (top-level)
"sirenRef": "police4"
Settings reference (top-level)
"settingsRef": "police4"

Pattern and trigger refs live inline in the patterns / triggers arrays — they stand in for the referenced item.

Behavior

  • Refs are resolved at access time, never copied.
  • Editing a referenced pattern or trigger edits the source vehicle's data.
  • Refs don't chain — a ref pointing at a ref won't resolve.
  • Orphaned refs (source deleted) are cleaned up automatically after any save.
  • The editor marks imported items with a link icon and items referenced by other vehicles with a share icon.

Typical setup

Configure police4 fully, then reference its patterns, triggers, and siren from police5, police6, and police7. Any future pattern edit only has to happen once.


Server defaults

Admins with tlib.admin can save their current display settings as the server-wide fallback via /tels → Set as Server Defaults. Defaults are stored in data/server_defaults.json and sent to every client on connect.

SettingDefaultRangeDescription
emissive1.00.1 – 3.0LED emissive intensity multiplier
bloom1.00.1 – 3.0Bloom brightness multiplier
envQuality40 – 4Environmental lighting quality (Off / Low / Medium / High / Smart)
lightingQuality40 – 4LED render pipeline quality
hudVisibletruebooleanHUD visibility fallback
hudLayoutstringDefault HUD layout name

Players' personal KVP settings take priority — server defaults only apply where the player hasn't already picked a value.


Discovery parameters

For reference, tELS configures tLib Discovery like this:

ParameterValue
Metadata keytels_config
Default filenametels.json
Local filedata.json
Log tagLightbar
Chat tag[tELS]
Event prefixtels
Receive eventtels:config_receive

If you're integrating or debugging, these are the strings to look for in the server console and in your own listeners.

On this page

Need help?

Ask on Discord