Page 1 of 2

Some changes regarding sounds in mods

Posted: 25 Jan 2009, 18:03
by Auswaschbar
After recent failures with beep9.wav and stuff, we made a few modifications regarding sounds used by the engine in a mod:

You can place a file "sounds.lua" in your gamedata-folder, which may look like this:

Code: Select all

--- Valid entries: IncomingChat, MultiSelect, MapPoint
local Sounds = {
	engineEvents = {
		IncomingChat = "sounds/beep4.wav",
		MultiSelect = "sounds/button9.wav",
		MapPoint = "sounds/beep6.wav",
	},
}

return Sounds
So when a chat messge is recieved, beep4.wav is played. MultiSelect is played when you select multiple units.

The exmple above whould give the exact behaviour like it has been before, if no such file is present, no sounds are played. Keep in mind, that you need to have this sound either in your mod, or you have to use ota-content which is why we don't enable this by default.

Re: Some changes regarding sounds in mods

Posted: 25 Jan 2009, 18:10
by KDR_11k
If the .lua file is needed for those sounds to work can't it be put into springcontent? After all there are tons of mods that don't use otacontent and they are pretty much guaranteed to have the wavs.

Re: Some changes regarding sounds in mods

Posted: 25 Jan 2009, 18:25
by Argh
If we already have the WAVs in our /sounds directory, will this work, or result in an error?

Re: Some changes regarding sounds in mods

Posted: 25 Jan 2009, 18:27
by Auswaschbar
The exmple above whould give the exact behaviour like it has been before
if no such file is present, no sounds are played
none of this 3 sounds, your other sounds will work as before

Re: Some changes regarding sounds in mods

Posted: 25 Jan 2009, 18:28
by SeanHeron
Sounds to me like, if you have those .wav's, but not the lua file, the wav's simply won't be played (no error but no those 3 sounds either). Though I'm guessing - or just stating my understanding, I don't actually know.

Re: Some changes regarding sounds in mods

Posted: 25 Jan 2009, 18:46
by KDR_11k
Auswaschbar wrote:none of this 3 sounds, your other sounds will work as before
So why exactly would you break all non-OTA mods?

Re: Some changes regarding sounds in mods

Posted: 25 Jan 2009, 19:14
by SeanHeron
I see this as added functionality, not breaking non-OTA mods... I'm would have expected the list to give you greater control (ie further sounds, etc.) over sounds [edit: if not now then perhaps at a later point of time]. Also, I don't see the problem with dropping in such a file with the next update you do of a game - and yea, so the sounds don't play till then. Well ?
Sean

Re: Some changes regarding sounds in mods

Posted: 25 Jan 2009, 20:34
by KDR_11k
I mean why do you put it into otacontent instead of springcontent?

Re: Some changes regarding sounds in mods

Posted: 25 Jan 2009, 20:36
by Auswaschbar
KDR_11k wrote:I mean why do you put it into otacontent instead of springcontent?
I didn't put it into neither otacontent nor springcontent.

Re: Some changes regarding sounds in mods

Posted: 25 Jan 2009, 20:37
by imbaczek
why otacontent? referenced files are in otacontent, but this file itself won't be...

Re: Some changes regarding sounds in mods

Posted: 25 Jan 2009, 20:41
by lurker
You didn't put it into otacontent? So as of now 0 mods will have the sounds?

Re: Some changes regarding sounds in mods

Posted: 25 Jan 2009, 21:00
by smoth
I already have those sound files covered, however, will I hear it?

Re: Some changes regarding sounds in mods

Posted: 26 Jan 2009, 07:07
by Argh
Not until you have the Lua stuck in.

Re: Some changes regarding sounds in mods

Posted: 26 Jan 2009, 07:17
by smoth
ewwwwwwwwwwwwwwwww :oops:

Re: Some changes regarding sounds in mods

Posted: 26 Jan 2009, 09:53
by SeanHeron
I can hardly believe how conservative you guys are... here our engine devs go, fixing what I see as an bug/error (a mod not starting if you don't have 3 arbitrarily named sound files in your sound folder), and all you can do is complain that you're going to have to add the lua file - way to go, I'm sure this is really motivating for them :/.
Sean

Re: Some changes regarding sounds in mods

Posted: 26 Jan 2009, 10:06
by KDR_11k
Sean, I get the feeling that you have no clue what I'm complaining about.

Re: Some changes regarding sounds in mods

Posted: 26 Jan 2009, 17:53
by smoth
yes kdr, yes he did :\.

sean, personally I am just joking around. I don't care what they need me to include as long as it isn't a virus infected file. It isn't a big deal gundam always had those files because at some point spring required(it might not any more) them. I just wanted to know if they work without the lua file. Not a big deal.

Re: Some changes regarding sounds in mods

Posted: 26 Jan 2009, 17:58
by BrainDamage
tl;dr : spring used to have such sound filenames hardcoded, now they are read from a variable, if you want from them to still be loaded again, add the variable in sounds.tdf/sounds.lua

Re: Some changes regarding sounds in mods

Posted: 26 Jan 2009, 23:01
by KDR_11k
BUT WHY IS THERE NO DEFAULT FILE IN SPRINGCONTENT?

Re: Some changes regarding sounds in mods

Posted: 27 Jan 2009, 01:56
by thesleepless
KDR_11k wrote:BUT WHY IS THERE NO DEFAULT FILE IN SPRINGCONTENT?
make a free one and put it in there?