Configuration
Admin settings in /tafk, player overrides, per-vehicle sequence packs, and the data.json the editor writes.
Settings come from four places, each overriding the one before it: shared/schema.lua defaults, data.json at the resource root, a vehicle pack's tafk.json, then the player's own tafk:* settings. Sequences are a union of data.json and the packs.
Almost nothing here needs a text editor. The camera sequences are built in the
in-game editor (/tafkedit) and every server setting is tunable live from
/tafk; data.json is what those two write, and is documented below as
reference for reading it or shipping one with a vehicle.
Admin settings via /tafk
Every settings field is tunable live with the tlib.admin ACE, and clamped server-side: timeoutSeconds 0–3600, durations 1000–45000, beatAnchorMs ±1000, musicVolume 0–1, radioDelaySeconds 5–60, radioStreamUrl https and ≤512 chars. A value outside its range is refused and logged, not written.
The duration sliders are in seconds — minimum 1–30, maximum 2–45 — and are stored in milliseconds.
Player KVP overrides
| Key | Type | Default | Set by |
|---|---|---|---|
tafk:playerDisabled | bool | unset → enabled | AFK System |
tafk:music | bool | unset → inherit | Play Music During AFK |
tafk:volume | float | unset → inherit | Music Volume |
tafk:hudHide | bool | unset → inherit | Hide HUD While AFK |
tafk:stillCamera | bool | unset → off | Still Camera While AFK |
tafk:seqDisabled | string[] | [] | Sequences tab |
Per-vehicle sequence packs
A vehicle resource can ship its own sequences. Declare them in its manifest and tAFK merges them in on start.
files { 'tafk.json' }
tafk_config 'tafk.json'{ "mycar": { "sequences": [ "… entries exactly as in data.json" ] } }| Rule | Detail |
|---|---|
| Manifest | Needs both tafk_config and tafk.json in files { } |
| Shape | One file per resource, lowercase model keys, entries like sequences[] |
| Priority | Two resources, one model: first scanned wins. Admin edits outrank packs |
| Refresh | Server start, a pack's onResourceStart, every admin save |
data.json shape
Read once at server start. After a direct edit run restart tAFK, which re-scans audio/ too. Invalid sequences are dropped with a server-log warning.
Four top-level keys: version, settings, sequences, and vehicleConfigs. Do not edit vehicleConfigs by hand — it is written for you by the editor and by vehicle packs.
settings
| Key | Type | Default | Meaning |
|---|---|---|---|
timeoutSeconds | int | 30 | Idle seconds before auto-AFK. 0 disables it |
useMusic | bool | true | Start music on AFK enter |
musicVolume | float 0–1 | 0.04 | Music volume |
hideHudInAFK | bool | true | Hide HUD and minimap while AFK |
beatAnchorMs | int | -15 | Next-beat offset. Negative cuts early |
minDurationMs | int | 5000 | Shortest shot |
maxDurationMs | int | 10000 | Longest shot |
radioEnabled | bool | false | Live stream instead of audio/ |
radioStreamUrl | string | OOC Radio | Icecast mount. https, must send CORS |
radioDelaySeconds | int | 25 | Seconds behind live |
Live radio
The stream replaces the audio/ rotation. Leave radioDelaySeconds alone — beat-matching needs that lookahead.
Each AFK player opens their own connection, ~24 KB/s at 192 kbps. A dead mount, or one with no CORS header, falls back to audio/.
sequences[]
| Field | Type | Notes |
|---|---|---|
id | string | Stable key for opt-outs and edits. Never change it |
name | string | Display name in /tafk menus |
enabled | bool | false is skipped by the director |
vehicles | string[] | ["*"] = all, else lowercase model names |
start / end | object | See Keyframe shape |
Keyframe shape
{ "offset": [-6.0, -7.0, 0.1], "rotation": [3.0, 0.0, 30.0], "fov": 55.0,
"dof": { "near": 2.0, "far": 20.0, "strength": 0.7 } }| Field | Meaning |
|---|---|
offset | Vehicle-local metres: right +x, forward +y, up +z |
rotation | Degrees, a delta on the "point at vehicle" rotation |
fov | Degrees. The editor clamps its wheel to 10–120 |
dof.near / .far | Range in metres |
dof.strength | 0 (no blur) to 1 (full) |
Offsets also accept { "x": …, "y": …, "z": … }.
Music tracks
Drop .ogg, .mp3 or .wav files into tAFK/audio/ and restart. Any filename works, with nothing to register: the folder is the authority, re-scanned every boot, and tracks are not in data.json.
Beat data
Beat-matched cuts need a grid per track, in audio/beatmap.json.
You need run nothing: analysis starts 30 seconds after load and happens in the background, one track at a time. An un-analysed track still plays, at random shot lengths. The offline analyser in tools/audio/beatmap.sh produces a better grid, and is never overwritten by the automatic one.
The offline script defaults to tLoading's beatmap, so point --out at tAFK's:
./tools/audio/setup.sh # once
./tools/audio/beatmap.sh --out "data/resources/[tScripts]/tAFK/audio/beatmap.json" \
analyze "data/resources/[tScripts]/tAFK/audio/"*.oggFile layout
The paths you touch; the rest is internal.
| Path | Purpose |
|---|---|
data.json | Settings, sequences, vehicleConfigs |
shared/schema.lua | Defaults, the 11 seed sequences, validators |
audio/ + beatmap.json | Music tracks and their beat grids |
client/ui/ + client/web/ | Built NUI assets, and the source. bun run build |
shared/schema.lua is unencrypted in your install, so every default on this page is readable there.
AFK Cinematics
Still stuck? Support can answer it directly.
Was this page helpful?
TIMMYG Studios