Results 1 to 3 of 3

Thread: SFX.dat and SFX.idx only 1 KB

  1. #1

    Default SFX.dat and SFX.idx only 1 KB

    Hi,

    I have an own mod for my Medieval II Definitive Edition Steam Game.

    Everything works, except the following files:

    Medieval II Total War\mods\modfolder\data\sounds\SFX.dat
    Medieval II Total War\mods\modfolder\data\sounds\SFX.idx

    These files are only 1 KB in size no matter how often the game regenerates them. I do not get any error messages in the trace or error log.

    Game is running fine, I do get SFX sounds also, however I cannot change any sounds in the game like for example I tried to add Taunt Sound files (.wav) but regardless of what I do it has no effect.

    Example export_descr_sounds_soldier_voice.txt:

    vocal Individual_Fall_Scream
    event priority 160 minpitch .9 maxpitch 1.1 volume 0 mindist 3 distancepriority 0 fadeout 0 looped
    folder data/sounds/newfolder
    newsoundfile.wav

    Newfolder does exist and has newsoundfile.wav in it. However, even if I remove all the other sounds, it does not work.

    I do get the following warning though in the logfile:

    Sound file missing: data/sounds/newfolder/newsoundfile.wav

    My questions are:

    1. Why do I still get sounds even though the SFX soundfiles seem to be faulty?
    2. How to solve this problem? I want to be able to add taunt and idle speech sound effects like in Rome II.
    Last edited by Ocyalos; December 09, 2020 at 05:06 PM.

  2. #2

    Default Re: SFX.dat and SFX.idx only 1 KB

    Quote Originally Posted by Ocyalos View Post
    1. Why do I still get sounds even though the SFX soundfiles seem to be faulty?
    You're still hearing the vanilla SFX audio from the unpacked SFX.dat in Medieval II Total War/data/sounds. The audio packs do not overwrite their vanilla counterparts anymore than data packs overwrite vanilla data. It's exactly the same as if your mod didn't include descr_projectile, then when you run your mod the game will use the vanilla descr_projectile file contained in one of the data packs. Similarly, if your mod doesn't have sounds/SFX/campaign_map/adopta_general_offer.mp3 then it will use the file from vanilla contained in SFX.dat (assuming this file is still called by one of the text files and hence is referenced in events.idx/.dat).

    Quote Originally Posted by Ocyalos View Post
    2. How to solve this problem? I want to be able to add taunt and idle speech sound effects like in Rome II.
    Assuming your mod's unpacked SFX folder is larger than 1 KB, it seems like your SFX.dat isn't rebuilding. Do you have all 39 of the sounds text files present in your mod's data folder? If you do, then failure to rebuild the packs is likely due to a syntax error or bad call in one of the sounds text files. I recently had a similar issue where my voice.dat pack was rebuilding only about 40% of the contents of the unpacked folder and the cause was that I was invalidating several of the text files by calling a mount type that no longer existed in descr_mount. By invalidating those text files, the audio files in voice weren't being referenced in events.idx/.dat and thus voice.dat was rebuilding without those files.

    I'm not sure it's strictly necessary, but I've been told that audio files used on the battle map must be in .wav format with 352 kbits/s, 16 bit mono @ 22.050 Hz. I don't think this will prevent your SFX pack from rebuilding but it's worth checking as well.

  3. #3

    Default Re: SFX.dat and SFX.idx only 1 KB

    Thank you for your help, I figured out - the problem was that my new sound files were not in the SFX-folder. I have to put the sounds in their SFX- or Voice-folder inside Sound-Folder and only then I can put them in a folder structure as I wish. I now added newsoundfile.wav to data/sounds/SFX/newfolder and now it works. It was in data/sounds/newfolder before but that did not work because the folder after sounds must be SFX, Voice or Music.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •