Skip to content

Settings ​

tm_sound has no config file. Every option is a setting with its default in code, saved in the database and edited in game: open the admin panel with /tmadmin and choose Sound. Changes apply at once, no restart. Only players with the tm_lib admin permission can edit them.

Settings marked server are never sent to players.

General ​

SettingDefaultDescription
Update interval (ms)50How often the listener position and entity attached sounds are updated.
Default distance25Range of a positional sound when none is given.
Spatial buffer50Extra range counted as close for isPlayerCloseToAnySound.

xsound and InteractSound ​

SettingDefaultDescription
xsound compatibilityonHandle and raise xsound's events. The exports always work.
InteractSound compatibilityonPlay InteractSound events.
InteractSound foldersoundsWhere names are looked up. A folder of this resource, or resource:path.
InteractSound file formatoggogg, mp3 or wav.
InteractSound maximum distance (server)300Larger PlayWithinDistance requests are ignored.
InteractSound minimum interval (server)150 msShortest time between two requests from one player.

Routing buckets (server) ​

SettingDefaultDescription
Routing bucket awarenessonSounds with a bucket are only heard in it.
Inherit the entity's bucketonEntity sounds use the entity's bucket when none is given.
Bucket check interval1000 msHow often players are checked for a bucket change.

Mixer limits ​

Every pitch, EQ, filter and fade value a script sends is clamped to these.

SettingDefault
Lowest / highest playback speed0.25 / 4
EQ lowest / highest gain (dB)-40 / 6
Filter lowest / highest frequency (Hz)10 / 22050
Filter highest resonance (Q)30
Longest fade (ms)30000

YouTube (server) ​

SettingDefaultDescription
Resolve YouTube linksoffTurn watch links into direct streams on the server.
Invidious instancesthree public serversOne address per line, tried in order.

Acoustics ​

SettingDefaultDescription
Acoustic effectsonMuffle sounds in other interiors, vehicles and behind walls. Turn it off to hear every sound clearly.
Environment check interval300 msHow often the listener's surroundings are checked.
Confirm checks2Checks in a row that must agree before a change counts. Stops flicker at doorways.
Door open threshold0.05How far a vehicle door must be open to count as open.
Draw occlusion linesoffDebug lines to each sound: green clear, red muffled.

Occlusion ​

SettingDefaultDescription
Occlusion by wallsonMuffle when the world blocks the line to a sound.
Rays per sound3Lines tested per sound, 1 to 5.
Ray spacing0.6Sideways distance between the rays.
Vehicles block soundonVehicles are obstacles for unattached sounds.
Idle interval500 msWake up rate while no positional sound exists.
Update interval100 msHow often results are processed and new lines tested.
Sounds tested per update4Each one costs the rays per sound.
Minimum movement0.5Movement needed before a sound is tested again.

Filter presets ​

A lowpass filter is applied for each situation: its cutoff in Hz (lower is more muffled), its resonance (Q) and how quickly it moves (seconds). The lowest cutoff of all the situations that apply wins.

PresetCutoffQResponse
Other interior9000.60.08
Closed vehicle14000.80.05
Open vehicle45000.60.05
Blocked by walls7000.80.10

Reading settings from another resource ​

The namespace is tm_sound:

lua
local distance = tm.settings.get('tm_sound', 'defaultDistance')
tm.settings.onChange('tm_sound', 'defaultDistance', function(value) end)

See the tm_lib settings documentation for the full API.

Language ​

Text is translated through locales/en.json. Add locales/es.json (and so on) and set setr ox:locale es; anything missing falls back to English.