Bridge Commander Central

BC Forums => BC Technical Support => Solved Problems => Topic started by: Billz on February 08, 2007, 06:59:11 PM

Title: Warp SFX - All my ships use the default warp sfx sounds; how do I make it so all my custom species use their appropiate warp sounds and effects?
Post by: Billz on February 08, 2007, 06:59:11 PM
This never really bothered me before but I thought I might aswell try it.

Basically, all my custom species ships (Borg Ships, Kazon Ships, Dominion Ships etc.) use the default warp sfx sounds (ie: the sounds used for the ships in the 'Other Ships' selection menu).

I know the borg warp sfx sounds are avaliable with NanoFX2, but my borg ships wont use it, or their warp flashes (borg have green warp flashes according to KM, but my ones use the stupid purple effects).

What do I need to change in the NanoFX2 scripts so that all my custom species use their appropiate warp sounds and effects (provided I can find them)?
Title: Re: Warp SFX - All my ships use the default warp sfx sounds; how do I make it so all my custom species use their appropiate warp sounds and effects?
Post by: MLeo on February 09, 2007, 10:44:56 AM
I think it isn't NanoFX at fault.

Do your borg ships use Foundation.BorgShipDef in their plugins?
Title: Re: Warp SFX - All my ships use the default warp sfx sounds; how do I make it so all my custom species use their appropiate warp sounds and effects?
Post by: Billz on February 09, 2007, 04:36:52 PM
I think it isn't NanoFX at fault.

Do your borg ships use Foundation.BorgShipDef in their plugins?

I just did a search using NotePad for 'Foundation.BorgShipDef' and it didnt find anything along that line so Im guessing thats the reason why the custom warp sound isnt working for it. Am I right and if so, should I change it and all my other ships plugins accordingly?
Title: Re: Warp SFX - All my ships use the default warp sfx sounds; how do I make it so all my custom species use their appropiate warp sounds and effects?
Post by: Sandtrooper on February 09, 2007, 04:59:23 PM
My (edited) Foundation has a BorgShipDef (and the Fed defs too), and NanoFXLIB.py would define the color of the plasma/warp blowup color. You want my Foundation.py? (If this is a KM install, don't ask)
Title: Re: Warp SFX - All my ships use the default warp sfx sounds; how do I make it so all my custom species use their appropiate warp sounds and effects?
Post by: Billz on February 09, 2007, 05:03:02 PM
My (edited) Foundation has a BorgShipDef (and the Fed defs too), and NanoFXLIB.py would define the color of the plasma/warp blowup color. You want my Foundation.py? (If this is a KM install, don't ask)

(This isnt a KM install)

If you think your edited pys will help and also teach me how to do it myself, then yeah, please send them on over.
Title: Re: Warp SFX - All my ships use the default warp sfx sounds; how do I make it so all my custom species use their appropiate warp sounds and effects?
Post by: Sandtrooper on February 09, 2007, 05:09:55 PM
The Following Foundation.py file includes additional defs that support the Stock Fed vessels, Vorcha, BoP, and a RemanShipDef, and not forgetting the Cube.


NanoFXLib.py contains a additional line (adds the Reman colors)


Now, to add a ShipDef (make sure Foundation isn't just one whole line in WordPad, or things get crappy from there),
we do this:

Code: [Select]
YourRace = RaceDef('FullRaceName', 'ShortRaceName')For ShortRaceName, simple: (Dominion has it as "Dom")

then jam this code below in the file:
Code: [Select]
class YourRaceShipDef(ShipDef):
def __init__(self, abbrev, species, dict):
dict['race'] = YourRace #(full name)
ShipDef.__init__(self, abbrev, species, dict)

NanoFX_Lib does some stuff, but also contains the plasma/warp blowup colors:

Code: [Select]
try:
dRGB  = { "Federation" : ( 55.0, 120.0, 255.0),
"Klingon"    : (255.0,  20.0,   0.0),
"Romulan"    : (  0.0, 248.0, 130.0),...

Use RGB, and put "YourRaceName" in the name (or else it defaults).


I havnt' found the WarpSFX just yet, but I'll somehow find it...

Title: Re: Warp SFX - All my ships use the default warp sfx sounds; how do I make it so all my custom species use their appropiate warp sounds and effects?
Post by: MLeo on February 09, 2007, 05:35:34 PM
Hold it, hold it.


The "stock" Foundation.py (since BCMP 4.4, my own first BCMP/Foundation version) already includes a BorgShipDef, hence NanoFX has support for it.
There is also a DominionShipDef.


If you would have searched for just BorgShipDef you would have found it. ;)
Title: Re: Warp SFX - All my ships use the default warp sfx sounds; how do I make it so all my custom species use their appropiate warp sounds and effects?
Post by: Billz on February 09, 2007, 06:10:55 PM
I dont understand. I have searched in Foundation.py for BorgShipDef, found it, but theres nothing in there telling it which warp sounds or flashes to use. What am I supposed to be looking for?

Im using the foundation that comes with BCMI.net since that is the latest one.
Title: Re: Warp SFX - All my ships use the default warp sfx sounds; how do I make it so all my custom species use their appropiate warp sounds and effects?
Post by: MLeo on February 10, 2007, 07:49:18 AM
I dont understand. I have searched in Foundation.py for BorgShipDef, found it, but theres nothing in there telling it which warp sounds or flashes to use. What am I supposed to be looking for?
The colours for the default races are defined in scripts/Custom/NanoFXv2/NanoFX_Lib.py, see GetRaceTextureColor for an example.

If you make your Borg ship use BorgShipDef then it will feature the correct colours and sounds.

Quote
Im using the foundation that comes with BCMI.net since that is the latest one.
They are identical. :P

All Foundation "upgrades" should _not_ modify Foundation.py. For example, FoundationTriggers. It doesn't modify Foundation.py, but each trigger inherits from Foundation.TriggerDef.




If you want to add your own races and stuff. Make it an extra file which you put in Autoload, and import (to be sure) in each of your new ShipDefs. And then use it.
Title: Re: Warp SFX - All my ships use the default warp sfx sounds; how do I make it so all my custom species use their appropiate warp sounds and effects?
Post by: Billz on February 10, 2007, 08:59:17 AM
If you make your Borg ship use BorgShipDef then it will feature the correct colours and sounds.

So how do I do that then?

Title: Re: Warp SFX - All my ships use the default warp sfx sounds; how do I make it so all my custom species use their appropiate warp sounds and effects?
Post by: MLeo on February 10, 2007, 09:02:27 AM
So how do I do that then?
Open your ship plugin (scripts/Custom/Ships) and look for ShipDef

Now, look a bit to the left and see Foundation.

From the . onwards, replace what you see with Borg (untill you see ShipDef that is).

In the end that section will look like this:
Foundation.BorgShipDef(


If you can't work it out, put the plugin up here.
Title: Re: Warp SFX - All my ships use the default warp sfx sounds; how do I make it so all my custom species use their appropiate warp sounds and effects?
Post by: Billz on February 10, 2007, 04:03:50 PM
So how do I do that then?
Open your ship plugin (scripts/Custom/Ships) and look for ShipDef

Now, look a bit to the left and see Foundation.

From the . onwards, replace what you see with Borg (untill you see ShipDef that is).

In the end that section will look like this:
Foundation.BorgShipDef(


If you can't work it out, put the plugin up here.

Here.
I am sorry to be a pain about this but my scripting knowledge goes about as far as being able to make submenus and renaimng ships in their plugin files.

Title: Re: Warp SFX - All my ships use the default warp sfx sounds; how do I make it so all my custom species use their appropiate warp sounds and effects?
Post by: MLeo on February 10, 2007, 04:10:58 PM
This is what I was refering to:
Foundation.ShipDef.CRCube = Foundation.ShipDef(abbrev, species, { 'name': longName, 'iconName': iconName, 'shipFile': shipFile })

It changes into:
Foundation.ShipDef.CRCube = Foundation.BorgShipDef(abbrev, species, { 'name': longName, 'iconName': iconName, 'shipFile': shipFile })


As seen in the file I added here.
Title: Re: Warp SFX - All my ships use the default warp sfx sounds; how do I make it so all my custom species use their appropiate warp sounds and effects?
Post by: Billz on February 10, 2007, 04:57:24 PM
This is what I was refering to:
Foundation.ShipDef.CRCube = Foundation.ShipDef(abbrev, species, { 'name': longName, 'iconName': iconName, 'shipFile': shipFile })

It changes into:
Foundation.ShipDef.CRCube = Foundation.BorgShipDef(abbrev, species, { 'name': longName, 'iconName': iconName, 'shipFile': shipFile })


As seen in the file I added here.

I get it now. Thanks Mleo. I will make all my other ships changes accordingly.