How does the game engine choose which sound to play? (Full Version)

All Forums >> [New Releases from Matrix Games] >> The Operational Art of War IV



Message


Cabido -> How does the game engine choose which sound to play? (9/8/2018 10:43:21 PM)

I've noticed that there are multiple sounds for the same event, like fire1, fire2, explosion1, explosion2, explosion3 etc. I have really never noticed if the game uses all these sound effects at once or if they are there just as an alternative to the scenario designer. If so, I suppose the files ending with 1 must be the one used by the game; if not, are they randomly chosen when the event happen?


Is there a way to turn off the game sound when minimized. I love the background sounds, but I always play without them because I keep the game running in the background and the sound keeps playing while I'm doing something else, which is kind of annoying.




Cabido -> RE: How does the game engine choose which sound to play? (9/11/2018 12:05:43 AM)

Ok, I've found out that the game randomizes the use of some files in specific situations.

Just to help those that may want to deal with the sound files, this is what I was able to find out:

multifire hvy.ogg - used after infantry/mixed unit attack.
fire2.ogg - used to represent the firing of artillery gun tubes. This is followed by one of the explosion files chosen randomly.
anti-aircraft multifire.ogg - used only when there is some AA unit in the hex
explosion files - used randomly after aircraft attacks, tank attacks, artillery attacks etc. Here we have a limitation, since we can't design a more specific kind of explosion to the specific kind of weapon.
Tanks seem to use multire hvy.ogg, followed by an explosion file. Sometimes the explosion comes alone (I don't know if it depends on the presence/absence of infantry on the unit).
Truck1.ogg and Truck2.ogg seem to be used interchangeably when moving motorized units. Tanks seem to use both the truck files and the hvyarmor move.ogg (I also don't know if it depends on the presence/absence of non armored motorized equipment on the unit)

I didn't have the time to go further with this, but it was enough to be able to design my sounds mod (see the mod sub folder) in order to get the desired effect. I hope this can somehow aid those trying to mess with the sound files.

Oh, and I'm still waiting for an answer to my second question. How to stop sound playing when the game is minimized. I've searched google for an answer based on windows 10 setup, but it seems that the application establishes if it will hold focus when on the background. So, it seems we can't change this by changing some windows settings. Does someone know a way of doing it?




sPzAbt653 -> RE: How does the game engine choose which sound to play? (9/11/2018 2:47:10 AM)

Pull down menu. Sound > Sound Effects = OFF.




Cabido -> RE: How does the game engine choose which sound to play? (9/11/2018 6:04:08 PM)

Thanks for the answer, but in fact I want to keep it on and having to turn it off each time I minimize the game and back on when returning to the game is annoying. I use the windows sound mixer instead, since its faster to turn sound on and off, but to have it muted automatically when minimized would be nice, since, unlike some applications, the game sound play no role when working on something else.




sPzAbt653 -> RE: How does the game engine choose which sound to play? (9/11/2018 8:56:19 PM)

quote:

the game sound play no role when working on something else.

It lets me know when it is my turn, once the sounds stop for a little bit. [;)] If I do want to turn it off, I usually click the Speaker Mute button that I have on the task bar, because it seems easier than Sound > Sound Effects = OFF.

So you would need a setting added for 'Sound OFF when Minimized'.




sPzAbt653 -> RE: How does the game engine choose which sound to play? (9/11/2018 9:02:34 PM)

Like your sounds, nice work! explosion5 and fire2 don't sound like much, but the rest are good and make the game nicer, thanks [&o]




Cabido -> RE: How does the game engine choose which sound to play? (9/12/2018 7:28:52 PM)


quote:

ORIGINAL: sPzAbt653

Like your sounds, nice work! explosion5 and fire2 don't sound like much, but the rest are good and make the game nicer, thanks [&o]


You may be right concerning fire2. I avoided using some very specific firing sound, since the file is used to represent all kinds of long range fire, from land based artillery of all sizes, to naval guns, so I preferred some kind of distant rumble sound, for effect.
As for explosion5, this is the same sound. Explosions 4 and 5 are there as alternatives. The original sound set contains explosions 1, 2 and 3, so I think those will never be played without renaming. Maybe I'm wrong though. Maybe the code checks for numbered alternatives, but I wasn't able to notice it while testing.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
3.308105E-02