Sound Modding

Discussion in 'Modding' started by Fimti, Sep 25, 2016.

  1. Fimti

    Fimti New Member

    I would like to see people make new sound mods to this game. Some sounds are already amazing while others are terrible, I just assume that they are not finished yet.

    This short and simple tutorial will focus on replace existing sound files and increase the amount of sounds for a certain animation.

    The sound files are located at:

    - Cossacks 3\data\sounds\units

    The sound file format is usually:

    Format: .ogg
    Sample Rate: 48000 Hz or 44100 Hz
    Channels: 2
    Bit Depth: 32 (float)​

    If we use the infantry death sound as an example:

    There are only 6 sounds when infantry die (deathinf1-6). You can replace these files however you like as long as you use the right format and name.

    To add one or more sound files to this group you have to open (unit.snd) file located in folder:

    - Cossacks 3\data\sounds\units

    In this file you have to add the new sound file name and directory to the (deathinf) sound range.

    section.begin {refkey=sound}
    Name = deathinf7
    Path = .\data\sounds\units\deathinf7.ogg
    DefVolume = 0.6
    section.end​

    Now the game knows how to find the sound file, but to make the game play the sound you have to expand the sound file shuffle range. Find and open the file (sound.script) located at:

    - Cossacks 3\data\scripts\lib

    Locate the script that says:

    for i:=1 to 6 do
    _sound_AddSoundToSoundLibrary(gc_snd_ind_deathinf, 'deathinf'+IntToStr(i), cLoudMedium, cFreqLow);​


    The first range (for i:=1 to 6 do) is the range of (deathinf) sound files the game will play. So just replace 6 with the amount of extra sound files you have added to this range. Example:

    for i:=1 to 7 do
    _sound_AddSoundToSoundLibrary(gc_snd_ind_deathinf, 'deathinf'+IntToStr(i), cLoudMedium, cFreqLow);​


    That’s it! Play the game and enjoy your new sounds.

    Hope this helps people that are not experienced modders, but have some creative skills to make some awesome sound mods for this game!

    Good luck!
     
    Last edited: Sep 26, 2016
  2. A. Soldier

    A. Soldier Active Member

    Nice find, I'm guessing the same works for music, as in adding additional tracks apart from the default's nation themes.
     
  3. Furious Peasant

    Furious Peasant Active Member

    A silly but important question: In which programming language Cossacks 3 was written?

    Thank you for your tipp! Very usefull informations.
     
  4. A. Soldier

    A. Soldier Active Member

    A friend of mine says it's very likely written in Pascal.
     
  5. `zerr

    `zerr New Member

    I can confirm what A. Soldier wrote - scripts look like Delphi / Pascal syntax, the game was also written in Delphi. In \data\projects folder we have project.main.prj folder - it's Delphi project file.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice