#1
I'v been trying to understand the point of those "sound position" slots and the "info target" entity but i just can't get around it.

 

Say that im using so.uprising_seafront in my custom map, but i want to add other sounds emitted from nearby props, such as the sound of a idling Humvee, a tree, some waves and water drops.

 

How can i do it? should i add the soundscape, then add each ambient generic, name those ambient generics and insert their name in each "sound position" in the soundscape?

 

:O

 

thanks in advance

Reply
#2
Hi Ra1der,


Basically each soundscape entity allows you to tie 8 positional sounds to it, these are listed in the env_soundscape entity as Sound Position 0 through to Sound Position 7. When you add a soundscape script entry to an env_soundscape entity using the Soundscape value box you are telling the entity to call that soundscape script entry and use the positional sounds allocated to it in the script. So for example:


Here is an image of the env_soundscape on market at the security spawn area.

[Image: O0bXTk6.jpg]



As you can see this env_soundscape is assigned "so.market_security_spawn" which is one of the entries in soundscapes_market.txt. It also has 4 info_targets assigned to it at the positions I want those sounds to occur. The info_targets are placed in hammer at the locations you want the sound to emit from. This is what one of the info_target entities looks like:

[Image: GTE5li4.jpg]


In this case it is named ss_secspawn_ship_horn and as you can see it is assigned in the env_soundscape at the correct number position to correlate with the positional script entry in the soundscape script.


The section of script below is the positional section of "so.market_security_spawn" and following with the example above you can see position 4 has the ship horn sound entry assigned to it.

Code:
    // *** positional sounds *** //
    

    // Apc idle
    "playlooping"
    {
        "volume"    "0.0"
        "pitch"        "100"
        "wave"    ")soundscape\emitters\loop\apc_idle_01.wav"
        "soundlevel"      "SNDLVL_100dB"
        "position"    "0"
    }
    
    //Ocean Ambience
    "playlooping"
    {
        "volume"    "1.0"
        "pitch"        "100"
        "soundlevel"      "SNDLVL_120dB"
        "wave"    ")soundscape\ambience\ocean_ambience_01.wav"
        "position"    "1"
    }
    
    //Leaf rustles
    "playrandom"
    {
        "time"        "2,6"
        "volume"    "0.7,0.9"
        "pitch"        "100"
        "soundlevel"      "SNDLVL_NORM"
        "position"    "2"
        
        "rndwave"    
        {
        "wave"    "soundscape\emitters\oneshot\leaf_rustle_01.ogg"    
        "wave"    "soundscape\emitters\oneshot\leaf_rustle_02.ogg"
        "wave"    "soundscape\emitters\oneshot\leaf_rustle_03.ogg"
        "wave"    "soundscape\emitters\oneshot\leaf_rustle_04.ogg"
        "wave"    "soundscape\emitters\oneshot\leaf_rustle_05.ogg"
        "wave"    "soundscape\emitters\oneshot\leaf_rustle_06.ogg"
        "wave"    "soundscape\emitters\oneshot\leaf_rustle_07.ogg"            
        }
    }
    
    // airconditioner Large 1
    "playlooping"
    {
        "volume"    "0.6"
        "pitch"        "115"
        "soundlevel"      "SNDLVL_110dB"
        "position"    "3"
        "wave"    "soundscape\emitters\loop\airconditioner_out.wav"
    }
    
    // distant ship horn
    "playrandom"
    {
        "time"        "15,50"
        "volume"    "0.5"
        "pitch"        "100"
        "soundlevel"      "SNDLVL_120dB"
        "position"    "4"
        "rndwave"    
        {
        "wave"    ")soundscape\emitters\oneshot\ship_horn_distant.ogg"
        }
    }
}

Hope that helps clear it up a little. Let me know if you have any further questions about it. 

Reply
#3
Quote:Hi Ra1der,


Basically each soundscape entity allows you to tie 8 positional sounds to it, these are listed in the env_soundscape entity as Sound Position 0 through to Sound Position 7. When you add a soundscape script entry to an env_soundscape entity using the Soundscape value box you are telling the entity to call that soundscape script entry and use the positional sounds allocated to it in the script. So for example:


Here is an image of the env_soundscape on market at the security spawn area.

[Image: O0bXTk6.jpg]



As you can see this env_soundscape is assigned "so.market_security_spawn" which is one of the entries in soundscapes_market.txt. It also has 4 info_targets assigned to it at the positions I want those sounds to occur. The info_targets are placed in hammer at the locations you want the sound to emit from. This is what one of the info_target entities looks like:

[Image: GTE5li4.jpg]


In this case it is named ss_secspawn_ship_horn and as you can see it is assigned in the env_soundscape at the correct number position to correlate with the positional script entry in the soundscape script.


The section of script below is the positional section of "so.market_security_spawn" and following with the example above you can see position 4 has the ship horn sound entry assigned to it.

Code:
    // *** positional sounds *** //
    

    // Apc idle
    "playlooping"
    {
        "volume"    "0.0"
        "pitch"        "100"
        "wave"    ")soundscape\emitters\loop\apc_idle_01.wav"
        "soundlevel"      "SNDLVL_100dB"
        "position"    "0"
    }
    
    //Ocean Ambience
    "playlooping"
    {
        "volume"    "1.0"
        "pitch"        "100"
        "soundlevel"      "SNDLVL_120dB"
        "wave"    ")soundscape\ambience\ocean_ambience_01.wav"
        "position"    "1"
    }
    
    //Leaf rustles
    "playrandom"
    {
        "time"        "2,6"
        "volume"    "0.7,0.9"
        "pitch"        "100"
        "soundlevel"      "SNDLVL_NORM"
        "position"    "2"
        
        "rndwave"    
        {
        "wave"    "soundscape\emitters\oneshot\leaf_rustle_01.ogg"    
        "wave"    "soundscape\emitters\oneshot\leaf_rustle_02.ogg"
        "wave"    "soundscape\emitters\oneshot\leaf_rustle_03.ogg"
        "wave"    "soundscape\emitters\oneshot\leaf_rustle_04.ogg"
        "wave"    "soundscape\emitters\oneshot\leaf_rustle_05.ogg"
        "wave"    "soundscape\emitters\oneshot\leaf_rustle_06.ogg"
        "wave"    "soundscape\emitters\oneshot\leaf_rustle_07.ogg"            
        }
    }
    
    // airconditioner Large 1
    "playlooping"
    {
        "volume"    "0.6"
        "pitch"        "115"
        "soundlevel"      "SNDLVL_110dB"
        "position"    "3"
        "wave"    "soundscape\emitters\loop\airconditioner_out.wav"
    }
    
    // distant ship horn
    "playrandom"
    {
        "time"        "15,50"
        "volume"    "0.5"
        "pitch"        "100"
        "soundlevel"      "SNDLVL_120dB"
        "position"    "4"
        "rndwave"    
        {
        "wave"    ")soundscape\emitters\oneshot\ship_horn_distant.ogg"
        }
    }
}

Hope that helps clear it up a little. Let me know if you have any further questions about it. 
 

Perfect explanation, thanks a lot! Smile

 

Btw, i'v been creating my own soundscape file for my map, called: soundscapes_docks.txt i know it goes to: "Steam\SteamApps\common\insurgency2\insurgency\scripts", but i also read in a tutorial that i needed to insert the name "soundscapes_docks.txt" in the soundscapes manifest. This same manifest was supposed to be in the same directory, but i can't find it with GFScape. I can only find "soundscapes.txt" which contains the following:

 

Quote:// DSP Effects

// 0 : "Normal (off)"
// 1 : "Generic"
// 2 : "Metal Small"
// 3 : "Metal Medium"
// 4 : "Metal Large"
// 5 : "Tunnel Small"
// 6 : "Tunnel Medium"
// 7 : "Tunnel Large"
// 8 : "Chamber Small"
// 9 : "Chamber Medium"
// 10: "Chamber Large"
// 11: "Bright Small"
// 12: "Bright Medium"
// 13: "Bright Large"
// 14: "Water 1"
// 15: "Water 2"
// 16: "Water 3"
// 17: "Concrete Small"
// 18: "Concrete Medium"
// 19: "Concrete Large"
// 20: "Big 1"
// 21: "Big 2"
// 22: "Big 3"
// 23: "Cavern Small"
// 24: "Cavern Medium"
// 25: "Cavern Large"
// 26: "Weirdo 1"
// 27: "Weirdo 2"
// 28: "Weirdo 3"
 
// ATTN_NONE 0.0f
// ATTN_NORM 0.8f 75dB
// ATTN_IDLE 2.0f 60dB
// ATTN_STATIC 1.25f 66dB
// ATTN_RICOCHET 1.5f 65dB
// ATTN_GUNFIRE 0.27f 140dB
 
// SNDLVL_50dB = 50, // 3.9
// SNDLVL_55dB = 55, // 3.0
// SNDLVL_IDLE = 60, // 2.0
// SNDLVL_TALKING = 60, // 2.0
// SNDLVL_60dB = 60, // 2.0
// SNDLVL_65dB = 65, // 1.5
// SNDLVL_STATIC = 66, // 1.25
// SNDLVL_70dB = 70, // 1.0
// SNDLVL_NORM = 75,
// SNDLVL_75dB = 75, // 0.8
// SNDLVL_80dB = 80, // 0.7
// SNDLVL_85dB = 85, // 0.6
// SNDLVL_90dB = 90, // 0.5
// SNDLVL_95dB = 95,
// SNDLVL_100dB = 100, // 0.4
// SNDLVL_105dB = 105,
// SNDLVL_120dB = 120,
// SNDLVL_130dB = 130,
// SNDLVL_GUNFIRE = 140, // 0.27
// SNDLVL_140dB = 140, // 0.2
// SNDLVL_150dB = 150, // 0.2
 
// General soundscapes
 
// This soundscape enables automatic dsp
 
"automatic"
{
"dsp" "1"
"dsp_volume" "1.0"
}
// This soundscape enables automatic dsp at 50% mix - good if you have 
// a lot of dialog that must be understood at any distance
 
"automatic_dialog"
{
"dsp" "1"
"dsp_volume" "0.5"
}
 
 

What am i missing here?

 

Thanks in advance!! Smile
Reply
#4
Hi Ra1der, the manifest is in insurgency_misc_dir.vpk, however you don't actually need to add your soundscape to the manifest provided you use the following naming convention:
Code:
soundscapes_mymapname.txt
Once named properly with mymapname obviously being the name of your map including any underscores etc. and if the soundscape script file is located in insurgency\scripts then it should find your soundscape file on map-load.


Just to clarify about the benefits/differences of using info_targets with your soundscapes positional section and ambient_generics. They are partly interchangeable to some extent. However I would stick to the following rule:


1: If you want the positional sound to be looping constantly and be audible across multiple soundscapes, then use an ambient_generic ,as an example, an engine for a vehicle which would be audible outside of the soundscape area defined, maybe outside of a building and inside a building, which would require the player to cross between two soundscapes. (The alternative in this case would be to add that vehicle to the positional section of both the outside and inside soundscape and have both share the same info_target, however using an ambient_generic would be easier.)


2: If you want to use logic to script how an emitting sound works inside hammer, then again, use an ambient_generic , as an example, the rockets being fired on Buhriz or the A-10 gun runs on Sinjar.


3: If you want the sound to be non-looping and play at random intervals, then use an info_target + soundscape script entry. As the only way to create random on/off behaviour with an ambient_generic is to use logic relays etc. in hammer. As an example, rustling leaves on a tree that don't loop but play random files at random intervals.


4: If you want the sound to be looping (or random) but only contained inside a certain soundscape area, then again, use an info_target + soundscape script entry. As an example, the waves in the beach front areas on maps such as Market and Revolt.


5: Finally if you require more than 8 positional sounds inside a soundscape area, then, as you can guess, your only option is to use ambient_generic entities to add more as soundscape scripts only offer 8 positional sounds per area. Also bare in mind that ambient_generics permanently add to the channel count if not using logic relays to turn them on and off. So an ambient_generic on the opposite side of the map which, while not audible to the player at his current position, will still be taking up a channel in the clients channel count. For this reason they must be used somewhat sparingly and I would suggest never trying to utilize more than 20-30 ambient_generics in a map if you can help it.
Reply
#5
Quote: 

Hi Ra1der, the manifest is in insurgency_misc_dir.vpk, however you don't actually need to add your soundscape to the manifest provided you use the following naming convention:

Code:
soundscapes_mymapname.txt

Once named properly with mymapname obviously being the name of your map including any underscores etc. and if the soundscape script file is located in insurgency\scripts then it should find your soundscape file on map-load.


Just to clarify about the benefits/differences of using info_targets with your soundscapes positional section and ambient_generics. They are partly interchangeable to some extent. However I would stick to the following rule:


1: If you want the positional sound to be looping constantly and be audible across multiple soundscapes, then use an ambient_generic ,as an example, an engine for a vehicle which would be audible outside of the soundscape area defined, maybe outside of a building and inside a building, which would require the player to cross between two soundscapes. (The alternative in this case would be to add that vehicle to the positional section of both the outside and inside soundscape and have both share the same info_target, however using an ambient_generic would be easier.)


2: If you want to use logic to script how an emitting sound works inside hammer, then again, use an ambient_generic , as an example, the rockets being fired on Buhriz or the A-10 gun runs on Sinjar.


3: If you want the sound to be non-looping and play at random intervals, then use an info_target + soundscape script entry. As the only way to create random on/off behaviour with an ambient_generic is to use logic relays etc. in hammer. As an example, rustling leaves on a tree that don't loop but play random files at random intervals.


4: If you want the sound to be looping (or random) but only contained inside a certain soundscape area, then again, use an info_target + soundscape script entry. As an example, the waves in the beach front areas on maps such as Market and Revolt.


5: Finally if you require more than 8 positional sounds inside a soundscape area, then, as you can guess, your only option is to use ambient_generic entities to add more as soundscape scripts only offer 8 positional sounds per area. Also bare in mind that ambient_generics permanently add to the channel count if not using logic relays to turn them on and off. So an ambient_generic on the opposite side of the map which, while not audible to the player at his current position, will still be taking up a channel in the clients channel count. For this reason they must be used somewhat sparingly and I would suggest never trying to utilize more than 20-30 ambient_generics in a map if you can help it.
 
 

 

Thanks a lot man, really appreciate the time you take to explain every detail!! Big Grin

 

Meanwhile, thanks to you, i got it workin for the test map, my test map is called "dynamictest", so this is what i did:

 

Went to: "common\insurgency2\insurgency\scripts" and created the soundscapes_manifest, then edited it and added:

Quote: 

"file"      "scripts/soundscapes_docks.txt"

"file"      "scripts/soundscapes_dynamictest.txt"
 
 
 

then went in-game and added a soundscape with my custom sounds, added all the target infos and it worked!

 

So now, since you told me the location of the "real" "soundscape_manifest" i just copied it from GFScape to its default directory and added those two lines (for the test map and for the main map, docks), and its working like a charm!! 

 

I can't thank you enough ^^

 

Also thanks a lot for the "when to use sound_generic" tutorial, had no idea how it worked and how it could impact performance!

 

Cheers man Big Grin

 

Edit: woopppsss not all soundscapes are working, when i load the map, this is the error that i get:

Quote: 

KeyValues Error: LoadFromBuffer: missing { in file scripts/soundscapes_dynamictest.txt

(*afg.docks_interior_parking_garage*), (*playlooping*), (*wave*), (*rndwave*), 
 
 

Any idea why this is happening? :O

Reply
#6
No problem, post the afg.docks_interior_parking_garage section of your soundscape (use code tags on the forum to keep it legible) From the looks of the error you have a bracket missing somewhere. Also to add, have a try and see if you can get the soundscape script to load without using the manifest (using the method I detailed in my other post). Will make it easier to distribute your map if you don't have to overwrite or edit the original manifest.

Reply
#7
Quote:No problem, post the afg.docks_interior_parking_garage section of your soundscape (use code tags on the forum to keep it legible) From the looks of the error you have a bracket missing somewhere. Also to add, have a try and see if you can get the soundscape script to load without using the manifest (using the method I detailed in my other post). Will make it easier to distribute your map if you don't have to overwrite or edit the original manifest.
 

Ok, thanks in advance. Aparently only the first couple of soundscapes actually work, all others give me errors and won't play in-game.

 

Edit: got it working, thanks for the head's up.

 

Now im gonna try and to like u suggested and not overwrite any main files!

 

Cheers Big Grin

Reply
#8
Missed an " off the end of one of the filepaths Smile 

 

Look in "afg.docks_ins_spawn" and find 

 


<pre class="_prettyXprint">
// Generator
"playlooping"
{
"volume" "0.8"
"pitch" "100"
"wave" "soundscape\emitters\loop\portable_generator.wav
"soundlevel"   "SNDLVL_90dB"
"position" "6"
}</pre>
should be 

 

<div>
<pre class="_prettyXprint">
// Generator
"playlooping"
{
"volume" "0.8"
"pitch" "100"
"wave" "soundscape\emitters\loop\portable_generator.wav"
"soundlevel"   "SNDLVL_90dB"
"position" "6"
}</pre>

</div>
Reply
#9
Quote: 

Missed an " off the end of one of the filepaths Smile

 

Look in "afg.docks_ins_spawn" and find 

 

<div>
<pre class="_prettyXprint">
// Generator
"playlooping"
{
"volume" "0.8"
"pitch" "100"
"wave" "soundscape\emitters\loop\portable_generator.wav
"soundlevel"   "SNDLVL_90dB"
"position" "6"
}</pre>
should be 

 

<div>
<pre class="_prettyXprint">
// Generator
"playlooping"
{
"volume" "0.8"
"pitch" "100"
"wave" "soundscape\emitters\loop\portable_generator.wav"
"soundlevel"   "SNDLVL_90dB"
"position" "6"
}</pre>

</div>
 

</div>
 

Thank you! Smile
Reply




Users browsing this thread: 1 Guest(s)