Configuration
Vehicle config structure, developer-bundled configs, cross-vehicle references, and server defaults.
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 defaultsVehicle config structure
Each model entry has four sections:
| Section | Holds |
|---|---|
leds | LED positions, rotations, sizes, groups, bone attachments |
patterns | Color palettes, frame sequences, timing, playback flags |
triggers | Compound condition rules with actions |
siren | Tone slots, airhorn, horn / chirp behavior, suspend flags |
arges | Arges spotlight props (optional) |
LED entry
{
"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"
}| Field | Type | Notes |
|---|---|---|
id | string | 16-char hex UUID — stable identity used by patterns. Never reference LEDs by name or index. |
x, y, z | number | Local offset (relative to bone if set, otherwise the chassis) |
yaw, pitch, roll | number | Rotation in degrees |
sw, sh | number | Surface width and height, metres |
side | number | 1 Right, 2 Left, 3 Center |
bone | string | Optional vehicle bone name |
groups | string[] | Display/filter tags |
shape | string | "rect" (default) or "circle" |
bloom | string | "sprite", "corona", or "both" |
extra | number | Optional GTA extra ID — LED only renders when that extra is enabled |
Pattern entry
{
"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
}| Field | Type | Notes |
|---|---|---|
cells | object | LED UUID → 1-based color index (0 = off) |
dimCells | object | LED UUID → true for smooth interpolation into the next frame |
duration | number | Ticks at the pattern's fps |
triggerOnly | boolean | Skipped by 9/0 cycling, still usable by trigger actions |
syncNear | boolean | Sync the frame index across clients using the server clock |
useEmergencyLights | boolean | Hold GTA's native emergency-lights flag while this pattern plays |
useHighBeams | boolean | Hold high beams while this pattern plays |
livery | number | Restrict to a specific livery index. Omit for any livery. |
Trigger entry
{
"id": "c5d6e7f8a9b0c1d2",
"conditions": ["brake", "speed_30"],
"negated": [false, false],
"operator": "and",
"enabled": true,
"actions": [
{ "type": "pattern_overlay", "patternName": "Brake Warning" }
]
}| Field | Type | Notes |
|---|---|---|
id | string | 16-char hex UUID — stable identity used by trigger refs |
conditions | string[] | See Editor → Condition reference |
negated | boolean[] | Parallel to conditions. true flips that condition. |
operator | string | "and" or "or" |
actions | object[] | See Editor → Action types |
enabled | boolean | Ignored when false |
Legacy triggers that use { trigger: "brake", patternName: "..." } auto-migrate to the compound form on load.
Siren config
{
"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
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
{
"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
{ "$ref": "police4", "patternName": "Code 3" }{ "$ref": "police4", "triggerId": "c5d6e7f8a9b0c1d2" }{ "$ref": "police4", "$all": true }"sirenRef": "police4""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.
| Setting | Default | Range | Description |
|---|---|---|---|
emissive | 1.0 | 0.1 – 3.0 | LED emissive intensity multiplier |
bloom | 1.0 | 0.1 – 3.0 | Bloom brightness multiplier |
envQuality | 4 | 0 – 4 | Environmental lighting quality (Off / Low / Medium / High / Smart) |
lightingQuality | 4 | 0 – 4 | LED render pipeline quality |
hudVisible | true | boolean | HUD visibility fallback |
hudLayout | — | string | Default 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:
| Parameter | Value |
|---|---|
| Metadata key | tels_config |
| Default filename | tels.json |
| Local file | data.json |
| Log tag | Lightbar |
| Chat tag | [tELS] |
| Event prefix | tels |
| Receive event | tels:config_receive |
If you're integrating or debugging, these are the strings to look for in the server console and in your own listeners.
