My first try on modding NS2 (Sound Mod)

WinterActualWinterActual Join Date: 2012-09-11 Member: 159027Members
edited August 2013 in Modding
Hi guys! I wanted to replace some NS2 sounds so I started reading the forum. I have found 2 great tutorials but I am stuck because something is not coming up right. Everything is fine until I have to check the sound length. All vanilla files have length of -1ms for some reason, even if they are playing fine in the Event Player. Why is that and how to deal with it?

Also when I built the files the error appeared with similar problem - "Error! Length wasn't cached for sound file " (and "Error : Build failed : An error occurred while writing ....." but I think thats because of the previous error). This error is for my replacement file, not for the vanilla files' length. But again - why this error pops up? The sound is playing fine if I try to preview it in the Browse window, I don't think the file is broken or something, its a standard MP3 file.

I will be glad if someone can help me.

Comments

  • RioRio Join Date: 2005-01-28 Member: 38716Members
    The length of sound files are defined in the ns2/sound/NS2.soundinfo file. If the length is -1, it's a looping sound which means it only stops when you destroy the sound effect. If the length is 0, the sound is very short, not exactly 0 seconds, but less than 1 second I guess.
    The sound files, if you haven't found that yet, are set in the *Effects.lua files (e.g. PlayerEffects.lua). If you want to replace the sounds, I would try to overwrite those and set the path to your new custom sounds. The sound length needs to be specified in your own soundinfo file.
    I hope that helps you a bit.
  • WinterActualWinterActual Join Date: 2012-09-11 Member: 159027Members
    Hm, so if the sound is loop, like let say rifle 14 sec fire loop, the length line should always be -1 which means the sound will go on forever unless I move over my finger off of the trigger when I fire. And the length is a exact number only when the sound should be played only once, like when I am using the pistol - 1 shot weapon. Right?

    Btw why in Fmod it says "file not found" when I try to preview some sound files I added? I didn't moved the file from where it was obviously.
  • RioRio Join Date: 2005-01-28 Member: 38716Members
    Hm, so if the sound is loop, like let say rifle 14 sec fire loop, the length line should always be -1 which means the sound will go on forever unless I move over my finger off of the trigger when I fire. And the length is a exact number only when the sound should be played only once, like when I am using the pistol - 1 shot weapon. Right?
    Exactly. I don't know why you're getting that error message in Fmod. There's a very good tutorial about adding sounds to Fmod here, if you haven't found that yet.
  • WinterActualWinterActual Join Date: 2012-09-11 Member: 159027Members
    This is the primary thread I was following about the whole thing but it doesn't says anything about this exact or similar error :\
Sign In or Register to comment.