Skip to content

Custom vehicle audio

Neon lets a client resource replace the presentation of selected vehicle sounds with a packaged FMOD-backed configuration. The server can synchronize which vehicles opt in through element data, while each client loads the same resource-owned configuration and presents nearby vehicles locally.

This is useful beyond racing: custom cars, mission vehicles, convoys, roleplay fleets, cinematics, and scripted events can all share the same audio layer.

addEventHandler("onClientResourceStart", resourceRoot, function()
if not engineLoadVehicleAudioConfig("audio/vehicles.conf") then
outputDebugString("Vehicle audio configuration was not accepted")
end
end)

The configuration path must be non-empty and resolve inside the calling resource. One resource owns the single global vehicle-audio lease on a client. That owner can call engineReloadVehicleAudioConfig after changing its files or engineUnloadVehicleAudioConfig when it no longer needs the system.

The configuration directory must contain base/common.bank and base/common.strings.bank. Vehicle banks live below banks/; each *.bank needs a same-stem *.ini metadata file. A vehicle-definition line can combine these flags:

FlagEnables
1Automatic and scripted backfire audio.
2Exhaust flame effects when the vehicle uses a full/flames audio mode.
4Turbo boost and blow-off presentation.

Add the values together when a definition needs more than one behavior.

A successful load means the configuration and lease were accepted. FMOD and its banks initialize lazily, so true does not by itself prove that a requested bank will play in game.

Set the synchronized neon:vehicleAudio element data on vehicles that should use the loaded definitions:

ValueResult
"sound" or 1Custom sound presentation.
"full", "flames", 2, or trueCustom sound plus configured backfire effects.
"silent-local" or 3Keeps the vehicle in the custom manager while suppressing its local custom sound mix.

Unknown or absent values leave the vehicle on the ordinary path. The separate neon:vehicleAudioCompetitive flag is used by a specific showcase mix and should not be treated as the general public activation contract.

The owner resource can call enginePlayVehicleAudioBackfire with mode 1 or 2 for a vehicle already active in its configuration. Other modes, a foreign owner, or an inactive vehicle return false.

Reload and unload are owner-only. Stopping the owner resource releases the lease and tears down the manager automatically. Commit fd9045aea corrected shutdown ordering so the audio manager releases FMOD state before the backend disappears.

The engine currently emits an internal onClientVehicleAudioBackfire call, but the name is not registered in the client’s built-in event list. Do not document or depend on it as a normal public event yet; a future engine change must register and test that contract first.

Commit 0418bcea7 introduced the four public Lua functions and the resource lease. The client project built, and AE86/Soundize-bank and BUST gameplay runs exercised the path manually. There is no public checked-in test resource, configuration, or bank that reproduces those checks, so this guide does not call playback broadly validated. Commit 0464ee0c1 packages the required FMOD 2.02.26 x86 runtime with the Windows client.