Skip to content

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

KeyTypeDefaultSet by
tafk:playerDisabledboolunset → enabledAFK System
tafk:musicboolunset → inheritPlay Music During AFK
tafk:volumefloatunset → inheritMusic Volume
tafk:hudHideboolunset → inheritHide HUD While AFK
tafk:stillCameraboolunset → offStill Camera While AFK
tafk:seqDisabledstring[][]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.

lua
files { 'tafk.json' }
tafk_config 'tafk.json'
json
{ "mycar": { "sequences": [ "… entries exactly as in data.json" ] } }
RuleDetail
ManifestNeeds both tafk_config and tafk.json in files { }
ShapeOne file per resource, lowercase model keys, entries like sequences[]
PriorityTwo resources, one model: first scanned wins. Admin edits outrank packs
RefreshServer 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

KeyTypeDefaultMeaning
timeoutSecondsint30Idle seconds before auto-AFK. 0 disables it
useMusicbooltrueStart music on AFK enter
musicVolumefloat 0–10.04Music volume
hideHudInAFKbooltrueHide HUD and minimap while AFK
beatAnchorMsint-15Next-beat offset. Negative cuts early
minDurationMsint5000Shortest shot
maxDurationMsint10000Longest shot
radioEnabledboolfalseLive stream instead of audio/
radioStreamUrlstringOOC RadioIcecast mount. https, must send CORS
radioDelaySecondsint25Seconds 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[]

FieldTypeNotes
idstringStable key for opt-outs and edits. Never change it
namestringDisplay name in /tafk menus
enabledboolfalse is skipped by the director
vehiclesstring[]["*"] = all, else lowercase model names
start / endobjectSee Keyframe shape

Keyframe shape

json
{ "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 } }
FieldMeaning
offsetVehicle-local metres: right +x, forward +y, up +z
rotationDegrees, a delta on the "point at vehicle" rotation
fovDegrees. The editor clamps its wheel to 10–120
dof.near / .farRange in metres
dof.strength0 (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:

bash
./tools/audio/setup.sh   # once
./tools/audio/beatmap.sh --out "data/resources/[tScripts]/tAFK/audio/beatmap.json" \
    analyze "data/resources/[tScripts]/tAFK/audio/"*.ogg

File layout

The paths you touch; the rest is internal.

PathPurpose
data.jsonSettings, sequences, vehicleConfigs
shared/schema.luaDefaults, the 11 seed sequences, validators
audio/ + beatmap.jsonMusic 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.

Still stuck? Support can answer it directly.

Was this page helpful?