Sounds


You can replace or add sounds for enemies, weapons or any sprite.

  • Sounds are created by adding a .txt script file in the /Script/Sounds folder of a mod.
  • The raw audio files used in a material must be put in the /Audio folder of a mod.
  • Most common file types like wav or ogg are accepted.
  • The name of the .txt file will be how this sound will be referred to in other script files.
  • To replace a base game sound, you must name the .txt file using the right sound ID.
  • Using the same name as a previous mod's sound will overwrite it.

    Script file content example


    // Comments start with a double slash and end with a semicolon. They're ignored by the game.;
    // Every script operation must end with a semicolon. Spaces or line returns are ignored.;
    // Base game sound file names are a number, so only use non-number names to add new sounds. Ex: RubberChickenSound.txt;
    // Don't put spaces in file names.;
    // Not all script operations must be defined for a sound to work. Default values will be used instead. This file contains all possible ones;

    // The file name of the base sound;
    sound = rubberChicken.wav;

    // The type of sound.;
    // 0 : Normal sound affected by the world;
    // 1 : UI sound, not affected by the world and has no position;
    // 2 : UI sound that is affected by the world;
    // 3 : Music;
    // 4 : Master. Not used;
    // 5 : Dialogue;
    class = 0;

    // The higher the priority, the more likely the sound is to play if there are too many sounds at once.;
    // 0.0 to 100.0, weapon sounds are at 99.0;
    priority = 1.0;

    // How loud the sound will be according to distance.;
    // 0 : Short range;
    // 1 : Medium range;
    // 2 : Long range;
    // 3 : Extra long range;
    attenuation = 0;

    // The volume of the sound. Can go over 1.0. Objects that use the sound can further affect volume.;
    volume = 1.0;

    // The pitch of the sound. Can go over 1.0. Objects that use the sound can further affect pitch.;
    pitch = 0.5;

    // Set to true if the sound should loop forever.;
    loop = false;

    // How many of the same sound can play at once. Keep low for performance and memory concerns.;
    maxConcurrency = 1;

    // Which sound to stop if we go over the max concurrency for this sound.;
    // 0 : Stop oldest;
    // 1 : Stop newest;
    // 2 : Don't play this one;
    maxConcurrencyLogic = 0;