Author Topic: 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?  (Read 3950 times)

Offline Billz

  • Posts: 1697
  • Cookies: 45
  • Doctor who? ;)
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)?
Can't wait for 2014 to start.

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
I think it isn't NanoFX at fault.

Do your borg ships use Foundation.BorgShipDef in their plugins?
I still can't read peoples minds, nor can I read peoples computers, even worse, I can't combine the two to read what is going wrong with your BC install...

"It was filed under 'B' for blackmail." - Morse, Inspector Morse - The dead of Jericho.

Offline Billz

  • Posts: 1697
  • Cookies: 45
  • Doctor who? ;)
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?
Can't wait for 2014 to start.

Sandtrooper

  • Guest
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)

Offline Billz

  • Posts: 1697
  • Cookies: 45
  • Doctor who? ;)
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.
Can't wait for 2014 to start.

Sandtrooper

  • Guest
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...


Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
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. ;)
I still can't read peoples minds, nor can I read peoples computers, even worse, I can't combine the two to read what is going wrong with your BC install...

"It was filed under 'B' for blackmail." - Morse, Inspector Morse - The dead of Jericho.

Offline Billz

  • Posts: 1697
  • Cookies: 45
  • Doctor who? ;)
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.
Can't wait for 2014 to start.

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
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.
I still can't read peoples minds, nor can I read peoples computers, even worse, I can't combine the two to read what is going wrong with your BC install...

"It was filed under 'B' for blackmail." - Morse, Inspector Morse - The dead of Jericho.

Offline Billz

  • Posts: 1697
  • Cookies: 45
  • Doctor who? ;)
If you make your Borg ship use BorgShipDef then it will feature the correct colours and sounds.

So how do I do that then?

Can't wait for 2014 to start.

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
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.
I still can't read peoples minds, nor can I read peoples computers, even worse, I can't combine the two to read what is going wrong with your BC install...

"It was filed under 'B' for blackmail." - Morse, Inspector Morse - The dead of Jericho.

Offline Billz

  • Posts: 1697
  • Cookies: 45
  • Doctor who? ;)
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.

Can't wait for 2014 to start.

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
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 still can't read peoples minds, nor can I read peoples computers, even worse, I can't combine the two to read what is going wrong with your BC install...

"It was filed under 'B' for blackmail." - Morse, Inspector Morse - The dead of Jericho.

Offline Billz

  • Posts: 1697
  • Cookies: 45
  • Doctor who? ;)
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.
Can't wait for 2014 to start.