Bridge Commander Central

BC Forums => BC Scripting => Topic started by: GreatBarrier86 on August 15, 2008, 03:23:34 PM

Title: Changing phaser sounds for a certain ship
Post by: GreatBarrier86 on August 15, 2008, 03:23:34 PM
I'm sorry for this question but i dont know very much about this. I want to change the phaser sounds of the DJGalaxy and DJVenture but i'm not sure where to change it. Can someone offer me advice?

Thanks,
Jason
Title: Re: Changing phaser sounds for a certain ship
Post by: Voyager16 on August 15, 2008, 05:09:17 PM
Replace the excisting file by your file, and give it the same name.

I dont know bout the Plugin, in some cases it's not needed to change.
Title: Re: Changing phaser sounds for a certain ship
Post by: GreatBarrier86 on August 15, 2008, 05:29:43 PM
I finally got it.

Perhaps this is more of my question. Where can i find the plugin related to the SetFireSound in the hardpoint py? For instance, there is a "Galaxy2 Phaser" plugin, but i can't find a py file in Custom\Autoload named "Galaxy2 Phaser".
Title: Re: Changing phaser sounds for a certain ship
Post by: MLeo on August 16, 2008, 07:29:28 AM
It's mostlikely inside a file. Remember, the filenames in Autoload are not important. It's the contents that are.
Title: Re: Changing phaser sounds for a certain ship
Post by: GreatBarrier86 on August 16, 2008, 11:29:32 AM
IS there a sound modding tutorial? or a prgrm that can mod sounds? I noticed BCMCP doesn't mod ones that are there already.
Title: Re: Changing phaser sounds for a certain ship
Post by: Voyager16 on August 16, 2008, 01:30:32 PM
What exactly do you want to change?
Title: Re: Changing phaser sounds for a certain ship
Post by: GreatBarrier86 on August 16, 2008, 03:48:31 PM
The phaser sounds for "Sovereign." I noticed the "SetFireSound was set to Phaser.SetFireSound("TNG Phaser"). I changed it to Phaser.SetFireSound("Galaxy2 Phaser"). Now, i only changed it to "Galaxy2 Phaser" because the Proto-nebula mods used it so i know such a phaser mod existed.

But i'd rather be able to do this without having to look at other mods. So, where would i actually find the "TNG Phaser" or "Galaxy2 Phaser" files?
Title: Re: Changing phaser sounds for a certain ship
Post by: Kirk on August 16, 2008, 03:58:00 PM
Check the sound def files in scripts/Custom/Autoload. That's where the sounds files' names are defined.
Title: Re: Changing phaser sounds for a certain ship
Post by: MLeo on August 16, 2008, 04:49:50 PM
Not sure if Windows Find(er) can do this (I don't have an use for it) but I tend to search for either SoundDef or the actual sound name.
Title: Re: Changing phaser sounds for a certain ship
Post by: GreatBarrier86 on August 16, 2008, 06:38:47 PM
Now does the file name itself have anything to do with it? or it is just the name inside
Title: Re: Changing phaser sounds for a certain ship
Post by: Mario on August 16, 2008, 07:53:37 PM
Assuming you know the filenames of the sounds at least (start and loop sound) you can create a "new" sound plugin for it using BCSMC using its sounddef creator, just make sure to give it a unique name.

BC Tools -> SoundDef Plugin option to create one from within the dropdown menu (be sure to point it first towards the default bc installation, press the detect button first)

Quote
Now does the file name itself have anything to do with it? or it is just the name inside

Just the name inside.
Title: Re: Changing phaser sounds for a certain ship
Post by: GreatBarrier86 on August 16, 2008, 08:37:27 PM
But what is the "name inside?" Unless i have missed something, all i see is a TNG Phaser Start and a TNG Phaser Loop. Does the game read from that and parse the name out of it?
Title: Re: Changing phaser sounds for a certain ship
Post by: MLeo on August 17, 2008, 05:17:48 AM
Well, let's say we have a sound called "foo" (like your "Galaxy2 Phaser"), that plays a sound called "sfx/bar.mp3", then it can be in any file, and I mean any, ending with py or pyc.

No relation with the filename (in Autoload) may exist, except those that the original author may have placed upon it.
Title: Re: Changing phaser sounds for a certain ship
Post by: GreatBarrier86 on August 17, 2008, 10:03:29 AM
Well then how does the game find the "Galaxy2 Phaser?" I don't actually see a reference to that literal phrase. I see "Start" and "loop" but not actually that phrase.

Does it look through every py file in Autoload until it finds what it needs?
Title: Re: Changing phaser sounds for a certain ship
Post by: El on August 17, 2008, 10:57:09 AM
Ok, here's how it works;
In the HP Phaser property, say you have a sound called 'Federation Phaser'
In you sfx folder you have two sound files called MyPhaserSound1.wav and MyPhaserSound2.wav

So your soundpak file would contain this;
Code: [Select]
Foundation.SoundDef("sfx/Weapons/MyPhaserSound1.wav", "Federation Phaser Start", 1)
Foundation.SoundDef("sfx/Weapons/MyPhaserSound2.wav", "Federation Phaser Loop", 1)

Foundation.SoundDef("sfx/Weapons/MyPhaserSound2.wav", "Federation Phaser Loop", 1)
The bit in italics must exactly match the name in the HP Property for that sound.

This assumes that the Start sound is MyPhaserSound1.wav and the Loop sound is MyPhaserSound2.wav

Your basically mapping your wav's to the name of the phaser in the HP property.

Edit: Fixed the italics tags
Title: Re: Changing phaser sounds for a certain ship
Post by: GreatBarrier86 on August 17, 2008, 11:33:22 AM
Bingo. I got it now. That makes sense.

Hmm...i guess i will just have to use the windows search to find each name. blargh. There isn't a better way to search in this case is there?

J