Forums » General

Turbo sound plugin - trying to find sound game uses?

Jun 28, 2013 Arkoz link
Hi! I'm attempting to make a sound plugin that replaces the turbo sound with a 'meatier' one. I've got the lua plugin working and it 'replaces' the sound in game (plays it instead of when a chosen sound 'activates') - problem is that none of the sounds listed in the wiki are any of the turbo thrust sounds.
So I have no idea which sound I need to 'replace' :\ So no turbo sound plugin! Is there a way to see what 'sound' is currently activated?
... If I do get this to work- I'd likely want to contribute more plugins (with no expectation of any ROI other than others' enhanced enjoyment).

-Arkoz (tyrji7)
Jun 28, 2013 tarenty link
IIRC there was a chat command that displayed whatever audio was currently playing. Don't remember what it was though.
Jun 29, 2013 Arkoz link
I just tried /query snd * - I'm on osx - nothing happened :(
Jun 29, 2013 Pizzasgood link
/sndshow
Jun 29, 2013 Arkoz link
Thanks Pizzasgood

Turns out it is " ship.engine.turbo " after all- I modified spuck's deboop script and tried it out...
It only plays the new sound if I use: /lua gksound.GKPlaySound("ship.engine.turbo") in the console
Otherwise, if I press the turbo key, it just uses the original sound
Not sure where to go from here
Jun 29, 2013 TheRedSpy link
Won't this line work?

gksound.GKLoadSound{soundname='ship.engine.turbo', filename="path/to/your/sound.ogg"}

That should just replace the inbuilt one with your custom one when it executes that lua file. Oh, and with sounds you sometimes have to restart the client to get them to load, can't just reload interface.
Jun 29, 2013 Arkoz link
I tried that (the line on its own), then figured it has to do it each time for it to work so investigated deboop, not sure what I'm doing wrong, maybe someone can look over a script idea:

http://pastebin.com/GBYJWuQ2

download audio file here: http://chirb.it/I7qytG
you'd have to rename it to get it to work

modified from spucks deboop script (who did the work-not me)

After running the lua it actually plays if you use GKPlaySound to play the sound name.
but it still uses the old sound when activating turbo
Maybe just over thinking it, not sure but maybe some things just cant be modded
Jun 29, 2013 meridian link
I haven't been able to find a way to override existing sounds.

Here is an old topic on the subject:
http://www.vendetta-online.com/x/msgboard/3/23434
Jun 29, 2013 TheRedSpy link
It's definitely possible to modify this, however I don't think you can assume that the function for the turbo works in the same way as the function for the other sounds does.

Actually it doesn't even have to use the GKPlaySound function, that code only works for anything that goes through gksound.GKPlaySound() and if that isn't the case it wont work. This could be why, or it could be using something else or the function that calls sound for Turbo rewrites it to ensure its always the same sound file.

Anyway, this should be in the community projects forum where spuck has a better chance to see it. He is on holidays or something at the moment but he really is the best person to answer this question.
Jun 29, 2013 Arkoz link
Looks like meridian went through the exact experience as I just did! Glad I'm not going crazy :)
Jun 29, 2013 TheRedSpy link
I will believe it can't be done when spuck (or incarnate/raybondo/momerath42) says it can't be done!
Jul 01, 2013 abortretryfail link
This would be sweet if someone could get it to work. A lot of the built-in sounds have some pretty bad aliasing that sticks out like a sore thumb if you play the game wearing headphones.
Jul 01, 2013 meridian link
Just to be clear, it is possible to hook the gksound.GKPlaySound() function the way deboop does in order to "change" most of the existing sounds by substituting your own code to play a different sound whenever it gets called. However, that is a bit of a hack that circumvents the issue of not being able to replace the actual sounds themselves (or at least I have not found a way to).

This thread is for the turbo sound in particular, which won't work to use that trick since, unlike other sounds, makes use of altering the pitch and must be using something other than GKPlaySound() to play the sound.