• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

'Custom Sound Environment' sound paths

Status
Not open for further replies.
Hello, does anyone know the paths (directory inside MPQ/CASC) of these 4 ambient sounds (Mountains, Lakes, Psychotic, Dungeon) that you can find in Map Properties?

upload_2020-1-25_0-26-39.png
 
Last edited:
They do play ambient sound when you select any of the four so there should be .mp3 or .wav file somewhere, and I need to replace those ambient sounds, 3D sound in kinda buggy in the game so I decided to maybe just replace the default ambient sounds instead.

Still looking for the path of those four ambient sounds (so far it's not in the Sound/Ambient or UI/SoundInfo directories).
 
Level 11
Joined
Dec 11, 2009
Messages
234
I think it's just ambient MIDI sounds that you hear playing, for example from these:
JASS:
call SetAmbientDaySound( "BlackCitadelDay" )
call SetAmbientNightSound( "BlackCitadelNight" )
I just tried changing this "Custom Sound Environment" and listening to ambience (speakers at high volume), and I didn't notice any difference (at least for BlackCitadel)
 
Wait, can I change the sounds using custom script instead of replacing the file?

Does this work? (Sorry I'm kinda illiterate in custom/JASS scripts, I don't know what parameters these functions accept)

Code:
call SetAmbientDaySound( "war3mapimported\MyCustomAmbience.mp3" )
call SetAmbientNightSound( "war3mapimported\MyCustomAmbience.mp3" )
 
Level 11
Joined
Dec 11, 2009
Messages
234
No, these are just midi labels, not actual paths to sound files.

For example, this:
  • Sound - Use the Black Citadel daytime ambient theme
  • Sound - Use the Black Citadel nighttime ambient theme
... converts to JASS as:
JASS:
call SetAmbientDaySound( "BlackCitadelDay" )
call SetAmbientNightSound( "BlackCitadelNight" )
In theory, you could replace MIDI files "Sound\Ambient\BlackCitadel\BlackCitadel_OutlandDay.mid" and "Sound\Ambient\BlackCitadel\BlackCitadel_OutlandNight.mid", but who knows how to edit these? And it still doesn't answer the question what "Custom Sound Environment" does exactly.
 
Last edited:
Level 21
Joined
May 29, 2013
Messages
1,566
In theory, you could replace MIDI files "Sound\Ambient\BlackCitadel\BlackCitadel_OutlandDay.mid" and "Sound\Ambient\BlackCitadel\BlackCitadel_OutlandNight.mid"
Weren't the mid files replaced with wav files?
And it still doesn't answer the question what "Custom Sound Environment" does exactly.
It does nothing on the patch I'm using (1.29.2), but in previous patches it used to add different kinds of echo to unit responses.
 
Level 11
Joined
Dec 11, 2009
Messages
234
Weren't the mid files replaced with wav files?
I'm not sure, because I actually was looking through pre-1.30-MPQ (or some other old version) extracted files.
But SetAmbientDaySound and SetAmbientNightSound are BJ functions that still use CreateMIDISound up to this day (1.31.1):
JASS:
//===========================================================================
// 1.31.1 Blizzard.j 
//===========================================================================
function SetAmbientDaySound takes string inLabel returns nothing
    local real ToD

    // Stop old sound, if necessary
    if (bj_dayAmbientSound != null) then
        call StopSound(bj_dayAmbientSound, true, true)
    endif

    // Create new sound
    set bj_dayAmbientSound = CreateMIDISound(inLabel, 20, 20)

    // Start the sound if necessary, based on current time
    set ToD = GetTimeOfDay()
    if (ToD >= bj_TOD_DAWN and ToD < bj_TOD_DUSK) then
        call StartSound(bj_dayAmbientSound)
    endif
endfunction

//===========================================================================
function SetAmbientNightSound takes string inLabel returns nothing
    local real ToD

    // Stop old sound, if necessary
    if (bj_nightAmbientSound != null) then
        call StopSound(bj_nightAmbientSound, true, true)
    endif

    // Create new sound
    set bj_nightAmbientSound = CreateMIDISound(inLabel, 20, 20)

    // Start the sound if necessary, based on current time
    set ToD = GetTimeOfDay()
    if (ToD < bj_TOD_DAWN or ToD >= bj_TOD_DUSK) then
        call StartSound(bj_nightAmbientSound)
    endif
endfunction
but in previous patches it used to add different kinds of echo to unit responses.
Yeah, I also thought that I could hear the difference when I was testing it long ago (around 2009). Maybe they disabled some functionality as it was outdated MIDI-stuff (or causing some bugs)?
 
Last edited:
I'm trying to change the world ambient sound, so far Region with attached 3D sounds work but the problem is that there are also alot of other sources of 3D sounds in the map and I'm trying to reduce those sources (since too much 3D sounds causes sound bugs in the game) by trying to replace the default 'Custom Environment Sound' - Lake theme for example. Maybe I'll just trigger this, make the custom ambient sound I have to non-3D and play it with 'Sound - Play <sound>' trigger.
 
Level 21
Joined
May 29, 2013
Messages
1,566
SetAmbientDaySound and SetAmbientNightSound are BJ functions that still use CreateMIDISound up to this day (1.31.1)
Those functions probably haven't been updated yet, since sound-related things seem to always be at the bottom of the priority list.

@Strydhaizer, I think you might be confusing Ambient Sounds with Custom Sound Environment. Do you hear any difference when you uncheck the Ambient Sounds box in the game options?
 
Last edited:
I'm trying to change the world ambient sound, so far Region with attached 3D sounds work but the problem is that there are also alot of other sources of 3D sounds in the map and I'm trying to reduce those sources (since too much 3D sounds causes sound bugs in the game) by trying to replace the default 'Custom Environment Sound' - Lake theme for example. Maybe I'll just trigger this, make the custom ambient sound I have to non-3D and play it with 'Sound - Play <sound>' trigger.
If you're trying to play a world "ambience sound" and also have different regions with 3D ambient sounds attached to them you can, as you said, use the trigger "Play sound". If you want a worldwide ambient sound then play a non 3D sound at center of map, that way it will play everywhere. When you want to attach a looping 3D sound to a region and hear this sound simultaneously as you hear the worldwide ambient sounds, you need to change its sound channel as only one sound per channel can be played at the same time. Make sure the sound you're attaching to the region is 3D and have proper fade out range settings.

If you want a demonstration I can send you the map I'm working on right now so you can see.
 
Status
Not open for further replies.
Top