• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Modding Sounds

Oddball_E8

Landlubber
it seems that if you replace the sounds in the game with other sounds it sometimes crashes the game... <img src="style_emoticons/<#EMO_DIR#>/modding.gif" style="vertical-align:middle" emoid=":modding" border="0" alt="modding.gif" />

does anyone know with what program you have to edit the sounds to make them work in the game?

im mainly asking for help for my cannon sound mod... i would appreciate it if someone who modded the sounds in the build could help out with a wise word or two...
 
do you mean converting them from mp3/wma/wav into .ogg format? you can do that with an audio conversion program. 'dBpowerAMP Music Converter' is a very good one, and a free version DOES exist. cos i found it. don't be misleaded by having to ask for a file to convert a certain file, those are free too. the game can run sound files best when they are in .ogg format, and those files are the smallest type as well. (note: ogg and ogg vorbis are the same thing) just look the program up on google. one very iportant thing is to keep the name of the file the same as the one you replaced.
 
ok, maby i should have been a bit more clear...

i HAVE already replaced the sounds with new ones (cannons in this case)... these were in .wav format, with the right settings (PCM, 44 100, mono, 16bit) and i tried using dBPowerAMP (wich is what i normally use) to convert them to that (from PCM, 44 100, stereo, 16bit so that shouldnt be a problem) and they still crashed the game...
i then tried converting them using the standard windows recording program (by opening the files and then "saving as" with the right settings).
I was told (by pieter IIRC) that it has something to do with what program you use to save the files and that the game was very very picky with the sounds.
thats why im asking if anyone knows what program the build modders used to make their new sounds.

does POTC really accept .ogg sounds btw? i didnt think it did since all the sounds are in .wav format.
 
hmm... well waddaya know... i tried using them as .ogg files (wich required me to also change the sound_alias.ini file) and now they work... no crashes so far, but i did get muffled sounds once, but that was when an entire fort was firing on me at the same time as there was alot of "jubilee" sounds and i was firing back... so i guess that if you have too many sounds at once that can happen (happened to me once before with the normal sounds)

anyways... heres a link to the .ogg version (with the new sound_alias.ini file): <a href="http://rapidshare.com/files/14923723/POTC_B13_Cannons_OGG.rar.html" target="_blank">Rapidshare</a>
 
that's indeed the problem i told you about. when to many sound files are played at once, the game cuts them down.
 
yeah, well it doesnt matter... the .ogg files didnt work anyway...

i dont know why tho... ill try removing the original .wav files from the folder so there is no confusion in the engine as to wich files to use...
 
who made the realistic cannon mod?
that guy must know how to do it since he added new sounds to the new cannons...
if i only knew his name i could pm him on the forum and ask...

EDIT: nevermind... found it myself
 
let me see...now, if the music_aliases file works roughly the same as the sound_aliases file, then the last bit of every line of code (of the ones that play soundtracks) should indicate the format of the file that should be played. try checking that.

the sound_aliases file does control the cannon sound, right?
 
i did... changed it to .ogg instead of .wav...

made no difference... it still played the .wav files...

and it was jack rackham... ive pm'd him but he hasnt answered... even tho hes logged in... maby he wants to keep it a secret? hehehe
 
well... thanks to the help of Jack Rackham i have tried out a few programs for converting soundfiles.
So if anyone wants to change the sounds use this program: <a href="http://www.softe.net/" target="_blank">http://www.softe.net/</a>

my sounds now work in-game... no crashes so far.

i will not, however, release this as a mod since Jack Rackham has expressed wishes for me not to do so unless i mod in some kind of toggle to switch to my sounds instead of the ones in his real-cannons soundmod, as this might be seen as hijacking his project. and since this is way beyond my abilities, and this project is mainly for my own personal use, ive decided to simply not release the mod.
 
if your simply replacing sounds instead of adding them, it's relatively straight forward. just get a sound you want to replace it with [or edit the original sound, if that's the plan. i use Adobe Audition 1.5. quite a good sound editing program. i do all the editing with that, and use SoundEditPro to convert it to .ogg format], rename it to EXACTLY the same name as the sound you want to replace, remove the old one and put in the new one. voila! you now have a new sound! [basically, the game is looking for particular names to run, so if you, for example, rename a sword sound with a gun sound's name, then the sword sound will play when you use the gun.]
this has probably been mentioned further up and me not noticing it, but hey, may as well give a clear explanation for anyone reading, and you, if you need it all in one post...
 
<!--quoteo(post=182107:date=Feb 5 2007, 07:00 PM:name=Oddball_E8)--><div class='quotetop'>QUOTE(Oddball_E8 @ Feb 5 2007, 07:00 PM) [snapback]182107[/snapback]</div><div class='quotemain'><!--quotec-->i will not, however, release this as a mod since Jack Rackham has expressed wishes for me not to do so unless i mod in some kind of toggle to switch to my sounds instead of the ones in his real-cannons soundmod, as this might be seen as hijacking his project. and since this is way beyond my abilities, and this project is mainly for my own personal use, ive decided to simply not release the mod.
<!--QuoteEnd--></div><!--QuoteEEnd-->

Put the sounds up for download somewhere. Let people do with them what they please. Eventually, one of the programmers will make the necessary changes to the code.

Hook
 
I don't have the latest version of the code, but this is how I'd do it.

Cannons_init.c

Change ALL instances as below. Change the name below (cannon_fire_LG4_8) to the name of your sound file.

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->//  rCannon.sound = ("cannon_fire_LG4");//JRH
    switch (JRH_GUNSOUNDS)
    {
        case 1: rCannon.sound = "cannon_fire_LG4");   // JRH
        case 2: rCannon.sound = "cannon_fire_LG4_8"); // Oddball_E8
        rCannon.sound = "cannon_fire";
    }
<!--c2--></div><!--ec2-->

AIBalls.c

Change this:

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->    if(JRH_GUNSOUNDS && CheckAttribute(rCannon,"sound")) // NK 05-05-03 add toggle and check.
    {
        //sounds per type JRH
        //  ref rCannon = GetCannonByType(sti(aCharacter.Ship.Cannons.Type)); // not needed
        Play3DSound( rCannon.sound , fX, fY, fZ);

        //gunner cough JRH
        if(sti(aCharacter.index) == GetMainCharacterIndex())
        {
            Play3DSound("gunner_cough", fX, fY, fZ);
        }
    }
    
    else { Play3DSound("cannon_fire", fX, fY, fZ); }
<!--c2--></div><!--ec2-->

To this:

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->    if(CheckAttribute(rCannon,"sound"))
    {
        Play3DSound( rCannon.sound , fX, fY, fZ);

        //gunner cough JRH
        if(GUNSOUNDS_EXTRA && sti(aCharacter.index) == GetMainCharacterIndex())
        {
            Play3DSound("gunner_cough", fX, fY, fZ);
        }
    }
    
    else { Play3DSound("cannon_fire", fX, fY, fZ); }
<!--c2--></div><!--ec2-->

AICannon.c

Change JRH_GUNSOUNDS to GUNSOUNDS_EXTRA as follows

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->    //gunner shout JRH
    if(GUNSOUNDS_EXTRA && sti(aCharacter.index) == GetMainCharacterIndex())
    {
        //put switch block here, did but it doesn´t switch
        PlaySound("gunner_shout");
    }
<!--c2--></div><!--ec2-->

In BuildSettings.h

Add the following line as indicated. This will allow players to toggle off the extra sounds of gunners shouting and coughing.

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->#define JRH_GUNSOUNDS                   0       // type=bool, presets={Off=0; Default=1}, desc="Jack Rackham's new cannon sounds. USE_REAL_CANNONS must be on for this to do anything."
#define GUNSOUNDS_EXTRA                 0       // type=bool, desc="Gunner shouts and coughing"
<!--c2--></div><!--ec2-->

Hook
 
thanx for the support there Hook, but jack rackham already made a toggle for me...

so i guess the sounds will be released after all...

i only made the sounds for my own enjoyment so it wouldnt have bothered me if they werent released... but thanks to jack rackham (and to you Hook, even tho i wont use your code) they will be released.

i hope you guys like them... theyre a bit more "umphy"... might not be the most realistic sounds, but i like noise... hehehe
besides... ive never made a soundmod for blackpowder weapons before...
 
<!--quoteo(post=182107:date=Feb 6 2007, 02:00 AM:name=Oddball_E8)--><div class='quotetop'>QUOTE(Oddball_E8 @ Feb 6 2007, 02:00 AM) [snapback]182107[/snapback]</div><div class='quotemain'><!--quotec-->
i will not, however, release this as a mod since Jack Rackham has expressed wishes for me not to do so unless i mod in some kind of toggle to switch to my sounds instead of the ones in his real-cannons soundmod, as this might be seen as hijacking his project. and since this is way beyond my abilities, and this project is mainly for my own personal use, ive decided to simply not release the mod.
<!--QuoteEnd--></div><!--QuoteEEnd-->
You could release it as an additional download, right? That way Jack Rackham's original files are used by default and if somebody wants to use your files, they can download those instead. <img src="style_emoticons/<#EMO_DIR#>/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" />
 
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->//  rCannon.sound = ("cannon_fire_LG4");//JRH
    switch (JRH_GUNSOUNDS)
    {
        case 1: rCannon.sound = "cannon_fire_LG4");   // JRH
        case 2: rCannon.sound = "cannon_fire_LG4_8"); // Oddball_E8
        rCannon.sound = "cannon_fire";
    }
<!--c2--></div><!--ec2-->


OOPS! Anyone catch the problem there? Better add the "break;" to each case!


<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->//  rCannon.sound = ("cannon_fire_LG4");//JRH
    switch (JRH_GUNSOUNDS)
    {
        case 1: rCannon.sound = "cannon_fire_LG4"); break;   // JRH
        case 2: rCannon.sound = "cannon_fire_LG4_8"); break; // Oddball_E8
        rCannon.sound = "cannon_fire";
    }
<!--c2--></div><!--ec2-->

"Always proofread carefully to see of you any words out."

EDIT: "Always proofread carefully to see if you any words out."

Darn it, I hate it when that happens! <img src="style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" />

Hook
 
<!--quoteo(post=182188:date=Feb 6 2007, 10:02 AM:name=Hook)--><div class='quotetop'>QUOTE(Hook @ Feb 6 2007, 10:02 AM) [snapback]182188[/snapback]</div><div class='quotemain'><!--quotec-->

"Always proofread carefully to see of you any words out."

Hook
<!--QuoteEnd--></div><!--QuoteEEnd-->

One of the problems writing with one hand <img src="style_emoticons/<#EMO_DIR#>/whistling.gif" style="vertical-align:middle" emoid=":wp" border="0" alt="whistling.gif" /> I guess

And I assume it is your IF'y LEFT hand <img src="style_emoticons/<#EMO_DIR#>/mybad.gif" style="vertical-align:middle" emoid=":facepalm" border="0" alt="mybad.gif" />
 
ok... heres the mod WITH the switch included... hopefully it works.

it didnt crash my game when i tested it, but i couldnt be sure if it was working 100% since ive already replaced the original sounds with my own and that means i cant hear any difference... but it should be working now (please send me an e-mail if it isnt working)

heres the <a href="http://www.badongo.com/file/2177177" target="_blank">Download Link</a>
 
Back
Top