Author Topic: Different Cloak SFX For Different Ships  (Read 2570 times)

Offline SGM82

  • Posts: 6
  • Cookies: 0
Different Cloak SFX For Different Ships
« on: January 11, 2009, 05:09:07 PM »
Hey all,

               I just curious as to wheather its possible to assign different cloak SFX to different ships.

Your thought on this please

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Different Cloak SFX For Different Ships
« Reply #1 on: January 11, 2009, 06:10:25 PM »
Unfortunately, not that easily.
It would involve making the normal cloaking sound not play, and then, for each ship assign a "default" cloaking sound, unless overridden.
And then you need to make it play said sound.

It's doable I suppose.
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 JimmyB76

  • Posts: 6423
  • Cookies: 421
Re: Different Cloak SFX For Different Ships
« Reply #2 on: January 11, 2009, 06:13:30 PM »
sucks it doesnt work as easily as BP sfx can lol

Offline Rob Archer

  • Posts: 163
  • Cookies: 545
  • New Frontier MKVI
Re: Different Cloak SFX For Different Ships
« Reply #3 on: January 11, 2009, 06:16:07 PM »
I'll have a go... see what i can come up with

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Different Cloak SFX For Different Ships
« Reply #4 on: January 11, 2009, 06:18:54 PM »
sucks it doesnt work as easily as BP sfx can lol
No, that would have been nice, except that unlike a bridge, there are more ships.


I suppose a ShipPluginSounds would be doable. Might as well create one. ;)
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 Rob Archer

  • Posts: 163
  • Cookies: 545
  • New Frontier MKVI
Re: Different Cloak SFX For Different Ships
« Reply #5 on: January 11, 2009, 06:42:13 PM »
I suppose a ShipPluginSounds would be doable. Might as well create one. ;)

Would you mind if i had a go creating a cloak sounds mod MLEO

i think it could be easy although im prepared to admit i might be wrong

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Different Cloak SFX For Different Ships
« Reply #6 on: January 11, 2009, 06:50:21 PM »
Go ahead (no problem at all, it would be pretty evil of me to deny you that).

TMP Warmup was infact intended to be replaced by an FTech for Textures (also replacement for SDT). To be more accurate, TMP Warmup sparked the idea anyway.

A couple of pointers, look in StaticDefs.py, but do not alter it (you can manipulate the sounds)! Don't create a TGSound for each time you need to play it (BC will hate you for it after a couple of times, and it can make BC hang for a moment each time. Also, caching is your friend, you only need 1 TGSound per sound.
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 Rob Archer

  • Posts: 163
  • Cookies: 545
  • New Frontier MKVI
Re: Different Cloak SFX For Different Ships
« Reply #7 on: January 11, 2009, 07:00:25 PM »
Go ahead (no problem at all, it would be pretty evil of me to deny you that).


Thanks for the tips Mleo i already got a romulan warbird to Play the Atlantis Gate Roll when it cloaks and the Canadian National Anthem When it Decloaks...  :P

its not quite cannon but its funny as hell..

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Different Cloak SFX For Different Ships
« Reply #8 on: January 11, 2009, 07:34:52 PM »
It sure is (how did you think I tested BPSounds :P).

Canon would be that every ship has the same sound (atleast I never heard a different sound).
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 Dawg81

  • Posts: 733
  • Cookies: 29
  • I am Dawg; Resistence is futile
Re: Different Cloak SFX For Different Ships
« Reply #9 on: January 11, 2009, 08:20:50 PM »
Go ahead (no problem at all, it would be pretty evil of me to deny you that).


Thanks for the tips Mleo i already got a romulan warbird to Play the Atlantis Gate Roll when it cloaks and the Canadian National Anthem When it Decloaks...  :P

its not quite cannon but its funny as hell..
ROFL i know a few canucks that would get a laugh out of that rofl cookie for ur efforts

Offline KrrKs

  • Posts: 461
  • Cookies: 25
Re: Different Cloak SFX For Different Ships
« Reply #10 on: January 12, 2009, 09:22:35 AM »
As far as I know USS Apollo's QuickBattleAddon (or whatever it was named) included a differend Cloaksoand for Ships with a PhaseCloak.

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Different Cloak SFX For Different Ships
« Reply #11 on: January 12, 2009, 01:28:45 PM »
In case of ATP (and in FTech) the phase cloak sound is played after the normal cloaking sound.
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 Rob Archer

  • Posts: 163
  • Cookies: 545
  • New Frontier MKVI
Re: Different Cloak SFX For Different Ships (Released)
« Reply #12 on: January 18, 2009, 04:43:35 PM »
Edit: Done

http://bc-central.net/forums/index.php/topic,5055.0.html

Mod is available on Filefront But NOT BCFiles

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Different Cloak SFX For Different Ships
« Reply #13 on: January 18, 2009, 06:12:21 PM »
I hate to say it, but I think it contains an error.
In both DefaultCloak and DefaultDecloak you reference a pSound, a variable which does not exist in any accessable scope, I suspect it will give a nice NameError when you try it.

I'm also not entirely convinced that "App.g_kSoundManager.StopAllSounds()" is the right thing to do either.

I also don't think you are stopping the currently playing sound. You do call "App.g_kSoundManager.StopSound(sCloakSFX)" this, but this is the new cloaking sound, not the stock one.

It also won't work in, for example, cutscenes in a different set than the player set, but I suspect this case won't happen that often.


I'm terribly sorry to be so negative about this. :(
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 Rob Archer

  • Posts: 163
  • Cookies: 545
  • New Frontier MKVI
Re: Different Cloak SFX For Different Ships
« Reply #14 on: January 18, 2009, 06:21:29 PM »
No Need to worry about being Negetive
I should say thanks for pointing that out MLEO looks like i uploaded the wrong Archive by mistake  :oops: Fixed it now

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Different Cloak SFX For Different Ships
« Reply #15 on: January 18, 2009, 06:47:09 PM »
It still contains an error, in the DefaultCloak you put the following:

Code: [Select]
if pDeCloakSound:
pCloakSound.Play()
And in DefaultDecloak:
Code: [Select]
if pDeCloakSound:
pDeCloakSound.Play()
It does suggest that the first one is wrong.


You are also still not stopping the default cloak/uncloak sounds.

And there is something else, slightly odd, in the (De)Cloak event handler you pass strings to StopSound, and in Default(De)Cloak you pass TGSound objects to StopSound.
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 Rob Archer

  • Posts: 163
  • Cookies: 545
  • New Frontier MKVI
Re: Different Cloak SFX For Different Ships
« Reply #16 on: January 18, 2009, 07:08:15 PM »
yeah thanks again MLEO i just noticed that problem...

Good Job your here  :D

It should be fixed Now i hope

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Different Cloak SFX For Different Ships
« Reply #17 on: January 19, 2009, 01:53:34 PM »
Include the following lines in the autoload file and I'll be happy, for now (that is, until some more structural solution is created).

Code: [Select]
import App
for sound in ["cloak", "uncloak"]:
  pSound = App.g_kSoundManager.GetSound(sound)
  if pSound:
    pSound.SetVolume(0)
This will ensure that the actual sounds won't be played (they will, but not audiable).
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 Rob Archer

  • Posts: 163
  • Cookies: 545
  • New Frontier MKVI
Re: Different Cloak SFX For Different Ships
« Reply #18 on: January 19, 2009, 07:51:53 PM »
Include the following lines in the autoload file and I'll be happy, for now (that is, until some more structural solution is created).

Code: [Select]
import App
for sound in ["cloak", "uncloak"]:
  pSound = App.g_kSoundManager.GetSound(sound)
  if pSound:
    pSound.SetVolume(0)
This will ensure that the actual sounds won't be played (they will, but not audiable).

MLeo wouldnt it be just as easy to replace the old sound files with blank ones and include a backup... with the mod?

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Different Cloak SFX For Different Ships
« Reply #19 on: January 20, 2009, 01:10:45 PM »
I don't like to overwrite things, for example, someone might already have replaced the cloak sound with a mod, now if you include the stock ones as backup, then the earlier mod gets lost. It's one of the reasons why I promoted Uniform mutators, and will promote BPUniforms, since they (shouldn't) override.

And something else, your mod could load the stock cloak sound under a different name (say stock_cloak and stock_decloak) and use those for the Default(De)Cloak sounds.
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.