xxxx is being attacked sound

xxxx is being attacked sound

Various things about Spring that do not fit in any of the other forums listed below, including forum rules.

Moderator: Moderators

Post Reply
Paul-Devon-UK
Posts: 17
Joined: 27 Mar 2012, 23:28

xxxx is being attacked sound

Post by Paul-Devon-UK »

Does anyone know the location of the sound played when the "xxxx is being attacked" message is displayed?

I ask as it is annoyingly loud and I am unable to find out how to turn it down. My intention is to either replace or edit the sound to reduce its annoyance factor.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: xxxx is being attacked sound

Post by Forboding Angel »

What game?
User avatar
very_bad_soldier
Posts: 1397
Joined: 20 Feb 2007, 01:10

Re: xxxx is being attacked sound

Post by very_bad_soldier »

The sound is generated from the widget "Attack and Move Notification" (unit_attackMoveNotification.lua).
You could just disable it in the F11-menu.
Paul-Devon-UK
Posts: 17
Joined: 27 Mar 2012, 23:28

Re: xxxx is being attacked sound

Post by Paul-Devon-UK »

Forboding Angel wrote:What game?
XTA as I am an OLD TA player from V1 and this feels like a natural progression.

@very_bad_soldier - I don't want to disable it as sometimes it is handy to know when an attack is happening somewhere other than in the main view.

I want to turn down the volume for that sound only as everything else has an OK volume. If it were a single .MP3 file I could modify it.
User avatar
very_bad_soldier
Posts: 1397
Joined: 20 Feb 2007, 01:10

Re: xxxx is being attacked sound

Post by very_bad_soldier »

You can copy the file to your local widget directory and modify line 61

Code: Select all

spPlaySoundFile( "sounds/" .. soundFile, udef.sounds.underattack[id].volume, nil, "ui" )
e.g. use your own file or modify the played volume by subtract a value.
Paul-Devon-UK
Posts: 17
Joined: 27 Mar 2012, 23:28

Re: xxxx is being attacked sound

Post by Paul-Devon-UK »

very_bad_soldier wrote:You can copy the file to your local widget directory and modify line 61

Code: Select all

spPlaySoundFile( "sounds/" .. soundFile, udef.sounds.underattack[id].volume, nil, "ui" )
e.g. use your own file or modify the played volume by subtract a value.
Thanks for that. Unfortunately practically non of it means anything to me. I am a player, not a developer. Or am I just being a bit dumb? My questions would be;

"You can copy the file" what file?
"your local widget directory" I am playing on Win7(64) ....\Spring\LuaUI ?
"modify line 61" in what file?
In the code would I replace the word "volume" with something?

Thanks in advance.
User avatar
very_bad_soldier
Posts: 1397
Joined: 20 Feb 2007, 01:10

Re: xxxx is being attacked sound

Post by very_bad_soldier »

The file I mentioned in my last post (unit_attackMoveNotification.lua) is located inside the mod in "LuaUI/Widgets". You can extract the mod with 7Zip or another zip-program.
So copy that file to your <spring>/Lua/Widgets.
Then you can edit the file with a text editor. Go to the line and change it to something like this:

Code: Select all

spPlaySoundFile( "sounds/" .. soundFile, udef.sounds.underattack[id].volume * 0.5, nil, "ui" )
So you should have half the volume. You can modify the "0.5" to fit your needs.
Paul-Devon-UK
Posts: 17
Joined: 27 Mar 2012, 23:28

Re: xxxx is being attacked sound

Post by Paul-Devon-UK »

very_bad_soldier wrote:The file I mentioned in my last post (unit_attackMoveNotification.lua) is located inside the mod in "LuaUI/Widgets". You can extract the mod with 7Zip or another zip-program.
So copy that file to your <spring>/Lua/Widgets.
Then you can edit the file with a text editor. Go to the line and change it to something like this:

Code: Select all

spPlaySoundFile( "sounds/" .. soundFile, udef.sounds.underattack[id].volume * 0.5, nil, "ui" )
So you should have half the volume. You can modify the "0.5" to fit your needs.
YES!!!

Thank you. I can now play and not go deaf whenever some unit receives a minor scratch.

I need to bookmark this as no doubt I will have to re-do it at some time in the future.
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: xxxx is being attacked sound

Post by Jools »

I have turned off that widget completely, because it warns too often. But maybe we just need to make it a bit more intelligent.

(Basically what annoys me is when opponent sends a jeffy or lurker to kill off my wind/tidal lines, then it will warn for each attack even though it's not important at that time).
Post Reply

Return to “General Discussion”