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
| Setting | Default | Description |
|---|---|---|
| Update interval (ms) | 50 | How often the listener position and entity attached sounds are updated. |
| Default distance | 25 | Range of a positional sound when none is given. |
| Spatial buffer | 50 | Extra range counted as close for isPlayerCloseToAnySound. |
xsound and InteractSound
| Setting | Default | Description |
|---|---|---|
| xsound compatibility | on | Handle and raise xsound's events. The exports always work. |
| InteractSound compatibility | on | Play InteractSound events. |
| InteractSound folder | sounds | Where names are looked up. A folder of this resource, or resource:path. |
| InteractSound file format | ogg | ogg, mp3 or wav. |
| InteractSound maximum distance (server) | 300 | Larger PlayWithinDistance requests are ignored. |
| InteractSound minimum interval (server) | 150 ms | Shortest time between two requests from one player. |
Routing buckets (server)
| Setting | Default | Description |
|---|---|---|
| Routing bucket awareness | on | Sounds with a bucket are only heard in it. |
| Inherit the entity's bucket | on | Entity sounds use the entity's bucket when none is given. |
| Bucket check interval | 1000 ms | How often players are checked for a bucket change. |
Mixer limits
Every pitch, EQ, filter and fade value a script sends is clamped to these.
| Setting | Default |
|---|---|
| Lowest / highest playback speed | 0.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)
| Setting | Default | Description |
|---|---|---|
| Resolve YouTube links | off | Turn watch links into direct streams on the server. |
| Invidious instances | three public servers | One address per line, tried in order. |
Acoustics
| Setting | Default | Description |
|---|---|---|
| Acoustic effects | on | Muffle sounds in other interiors, vehicles and behind walls. Turn it off to hear every sound clearly. |
| Environment check interval | 300 ms | How often the listener's surroundings are checked. |
| Confirm checks | 2 | Checks in a row that must agree before a change counts. Stops flicker at doorways. |
| Door open threshold | 0.05 | How far a vehicle door must be open to count as open. |
| Draw occlusion lines | off | Debug lines to each sound: green clear, red muffled. |
Occlusion
| Setting | Default | Description |
|---|---|---|
| Occlusion by walls | on | Muffle when the world blocks the line to a sound. |
| Rays per sound | 3 | Lines tested per sound, 1 to 5. |
| Ray spacing | 0.6 | Sideways distance between the rays. |
| Vehicles block sound | on | Vehicles are obstacles for unattached sounds. |
| Idle interval | 500 ms | Wake up rate while no positional sound exists. |
| Update interval | 100 ms | How often results are processed and new lines tested. |
| Sounds tested per update | 4 | Each one costs the rays per sound. |
| Minimum movement | 0.5 | Movement 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.
| Preset | Cutoff | Q | Response |
|---|---|---|---|
| Other interior | 900 | 0.6 | 0.08 |
| Closed vehicle | 1400 | 0.8 | 0.05 |
| Open vehicle | 4500 | 0.6 | 0.05 |
| Blocked by walls | 700 | 0.8 | 0.10 |
Reading settings from another resource
The namespace is tm_sound:
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.