Studios
Engine Soundshouse-3.jpg

Installation

SoonEngine SoundsStandalone
PAGE 02 OF 06  ·  OVERVIEW → INSTALLATION → CONFIGURATIONdocs.glitchstudios.dev
Browse docs

Requirements#

  • Node.js 18 or newer, on the machine where you add packs. It is only used to run the generator, not on the game server.
  • Packs in the usual GTA V audio layout: .awc wave banks and .rel data files.

Installation steps#

You bought a pack called "2JZ Swap" that contains audio/2jz.awc, 2jz_game.dat151.rel, 2jz_sounds.dat54.rel and the audio object is called my_2jz.

  1. Copy the pack into packs/my_2jz/, keeping its folder structure.

  2. Add packs/my_2jz/sound.json:

    { "name": "my_2jz", "label": "2JZ inline six", "tier": 3 }
    
  3. From this resource folder run node tools/generate-sounds.cjs. It prints how many packs and data_file lines it wrote.

  4. Make sure ensure glitch-engineSounds is in server.cfg before the scripts that use it, then restart the resource.

  5. From any server script, set the sound on a vehicle:

    local ok, err = exports['glitch-engineSounds']:SetVehicleSound(NetworkGetNetworkIdFromEntity(vehicle), 'my_2jz')
    -- ok is true, or false plus 'not_installed', 'no_entity', 'not_a_vehicle' or 'bad_net_id'
    exports['glitch-engineSounds']:SetVehicleSound(netId, nil)   -- stop forcing it (the model default sound comes back straight away)
    

Start order#

Ensure glitch-engineSounds before any script that uses the sounds, and restart those scripts after you change a pack.

ensure glitch-engineSounds
ensure your-mechanic-script

Adding a pack#

  1. Make a folder in packs/, for example packs/my_2jz/.

  2. Copy the pack files into it. Accepted file types are .awc, .rel, .json, .txt and .md. The generator refuses anything else.

  3. Add a sound.json:

    Field Required Meaning
    name yes The audio object name defined inside the pack. Letters, digits, _ and - only.
    label yes Display text for scripts that show a list.
    tier yes A whole number from 1 to 4.
    category no A short tag such as motorcycle.
    builtin no true for an alias pack (see below).
    audio with builtin The vanilla GTA engine audio name the alias plays, for example adder.

    tier and category are stored and passed on as they are. What they mean (engine stage, vehicle class, price band) is up to the script that reads them. This resource does not filter by them.

  4. Run node tools/generate-sounds.cjs.

  5. Restart glitch-engineSounds, then restart the scripts that use it.