Jump to content
Sign in to follow this  
Snake Man

Individual cfgEnvSounds per terrain

Recommended Posts

class CfgEnvSounds is what handles what sounds are played in the terrain environment. For example here is BIS sample models ARMA_SampleModelsEnvironmentOther\sounds\ config:

class CfgEnvSounds
{
class Default // editor - sounds from landscape
{
	name = $STR_CFG_ENVSOUNDS_DEFAULT;
	sound[]={"$DEFAULT$",0,1};
	soundNight[]={"$DEFAULT$",0,1};
};
class Rain // rain
{
	name = $STR_DN_RAIN;
	sound[]={"\ca\Sounds\Env\hard_rain01",db-25,1};
	soundNight[]={"\ca\Sounds\Env\hard_rain02",db-15,1};
};
class Sea // sea
{
	name = $STR_DN_SEA;
	sound[]={"\ca\Sounds\Env\wave_break_01",db-60,1};
	soundNight[]={"\ca\Sounds\Env\wave_break_02",db-65,1};
};
class Meadows // default - no trees, no sea, no hills ...
{
	name = $STR_DN_MEADOWS;
	sound[]={"\ca\Sounds\Animals\crickets06",db-45,1};
	soundNight[]={"\ca\Sounds\Animals\crickets04",db-45,1};
};
class MeadowsNight // default - no trees, no sea, no hills ...
{
	name = $STR_DN_MEADOWS;
	sound[]={"\ca\Sounds\Animals\crickets03",db-45,1};
};
class Trees // trees
{
	name = $STR_DN_TREES;
	sound[]={"\ca\Sounds\Env\treesbirds",db-65,1};
	soundNight[]={"\ca\Sounds\Animals\crickets04",db-45,1};
};
class TreesNight // trees
{
	name = $STR_DN_TREES;
	sound[]={"\ca\Sounds\Animals\crickets03",db-55,1};
};

class Hills // hills > 250m
{
	name = $STR_DN_HILLS;
	sound[]={"\ca\Sounds\Env\wind_day",db-45,1};
	soundNight[]={"\ca\Sounds\Env\wind_night",db-55,1};
};
class Wind
{
	name = $STR_DN_WIND;
	sound[]={,db-75,1};
};
class Combat // desinger effect
{
	name = $STR_CFG_ENVSOUNDS_COMBAT;
	sound[]={"\ca\Sounds\Env\battle1",db-45,1};
	soundNight[]={"\ca\Sounds\Env\battle2",db-40,1};
};
};

I wanted to configure individual terrain sounds for each of my terrains, however it looks to me that cfgEnvSounds is defined in the "global" space (sorry I have no clue what I'm talking about) and NOT inside the class CfgWorlds and more precisely not inside the cfgworlds{ my_terrain { }; }; space.

I tried making a config where the cfgEnvSounds is inside my terrain config, no custom sounds were played as it reverted to ArmA 2 default sounds (dunno, maybe faulty config, maybe cfgEnvSounds just doesn't work inside terrain config).

Are we not able to configure individual terrain sounds per terrain?

EDIT: Boy do I feel dumb now. 5 min after posting this topic I found a solution :)

If you want to have individual sound environments for each of your terrains, do it like this:

class cfgWorlds
{
class CAWorld;
class YOURTERRAINNAME: CAWorld
{
	class CfgEnvSounds;
	class EnvSounds: CfgEnvSounds
	{
		class Rain
		{
			name = "Rain";
			sound[] = {"\PATH\SOUNDNAME.wss", 0.8, 1};
			soundNight[] = {"", 0, 1};
			volume = "rain*(1-night)*(1-forest)";
		};

		class RainNight
		{
			name = "RainNight";
			sound[] = {"\PATH\SOUNDNAME.wss", 0.8, 1};
			soundNight[] = {"", 0, 1};
			volume = "rain*(1-forest)*night";
		};

Sorry for posting a topic where I found solution so quickly, however search in forums and wiki (even google search) came up empty, I guess now we have small tutorial how to do individual terrain sound environments then :)

Edited by Snake Man

Share this post


Link to post
Share on other sites

Hey Snake,

I am trying myself to get some sounds only for my environment. As i try your way i am still not successfull. Maybe you see what is wrong?

When i define it outside of the world class i get my sound fine but then ofcourse its defined for all islands which is not realy the idea here.

I post i think it should be done, since i reference from Utes i am one step lower:

class CfgWorlds {
class CAWorld;	// External class reference

class Utes : CAWorld {
	class Grid;	// External class reference
	class DefaultClutter;	// External class reference


};

class WTK_Watkins : Utes {

	class CfgEnvSounds;
	class EnvSounds: CfgEnvSounds {





class Sea {
	name = "wtk_sea";
	sound[] = {"SIX_WTK\WTK_WATKINS\data\Sounds\waves_beach", 1, 1};
	soundNight[] = {"SIX_WTK\WTK_WATKINS\data\Sounds\waves_beach", 1, 1};
};


};

---------- Post added at 10:47 PM ---------- Previous post was at 10:19 PM ----------

Just to make sure i want back exactly like your example and using the default sounds. Resulting in a total quiet island and no sound at the coast... i am totaly lost here now :(

	class Utes : CAWorld {
	class Grid;	// External class reference
	class DefaultClutter;	// External class reference


};

class WTK_Watkins : Utes {

	class CfgEnvSounds;
	class EnvSounds: CfgEnvSounds {






class Sea {
	name = "Sea";
	sound[] = {"\ca\Sounds\Enviroment\wave_break_01", 0.1, 1};
	soundNight[] = {"\ca\Sounds\Enviroment\wave_break_02", 0.177828, 1};
};



};

---------- Post added at 11:27 PM ---------- Previous post was at 10:47 PM ----------

=======================

Ok now this sounds absurd ( i will test futher tomorrow) but it seems i can get most (havent checked if all) sounds but the Sea seems to be and say quiet. I tested the wind stuff and that went fine. In short i am still all :confused::confused::confused::confused:

Share this post


Link to post
Share on other sites

Yeah I don't know about the exact class names for the meadows and ocean rain etc stuff, the main basic ones work for me okay but I have not tested each and every one (like with rain and night time etc).

Keep us posted if you discover some new info.

Share this post


Link to post
Share on other sites

Using the default ones used by BIS i am a bit more successfull. However referring to my own sounds on the sea weird enough i did not get results. The rest does works. Since i only need wind on my artic map the rest is left out. Maybe later i go decorate the sounds bit more. This is what i got and works:

class WTK_Watkins : Utes {

	class CfgEnvSounds;
	class EnvSounds: CfgEnvSounds {	
					  class Default
			  {
				sound[] = {
				  "$DEFAULT$",
				  0,
				  1
				};
				soundNight[] = {
				  "$DEFAULT$",
				  0,
				  1
				};
				name = "Default";
			  };
			  class Rain
			  {
				sound[] = {
				  "\Ca\sounds\Ambient\rain\rain_hard1",
				  0.177828,
				  1
				};
				volume = "rain";
				name = "Rain";
				soundNight[] = {
				  "\Ca\sounds\Ambient\rain\rain_hard1",
				  0.177828,
				  1
				};
			  };
			 class Sea
			  {
				sound[] = {
				  "\ca\Sounds\Enviroment\wave_break_01",
				  0.1,
				  1
				};
				volume = "sea";
				name = "Sea";
				soundNight[] = {
				  "\ca\Sounds\Enviroment\wave_break_02",
				  0.177828,
				  1
				};
			  };

			 class Hills
			  {
				name = "";
				sound[] = {
				  "",
				  0.7,
				  1
				};
				volume = "hills";
			  };
			  class Wind
			  {
				name = "";
				sound[] = {
				  "",
				  0.5,
				  1
				};
				volume = "(1-hills)*windy*0.5";
			  };
			  class WindForestHigh
			  {
				name = "Wind";
				sound[] = {
				  "ca\sounds\Ambient\forest\wind-forest-1",
				  0.0398107,
				  1
				};
				volume = "forest*(windy factor[0,1])*(0.1+(hills factor[0,1])*0.9)-(night*0.25)";
			  };
			  class WindNoForestHigh
			  {
				name = "Wind";
				sound[] = {
				  "six_wtk\wtk_watkins\data\sounds\wind",
				  1.0,
				  1
				};
				volume = "(1-forest)*(windy factor[0,1])*(0.1+(hills factor[0,1])*0.9)-(night*0.25)";
			  };
			  class Meadows
				  {
					sound[] = {
					  "\ca\sounds\Ambient\meadows\wind-meadow-2",
					  0.0316228,
					  1
					};
					name = "Meadows";
					volume = "(1-forest)*(1-houses)*(1-night)*(1-sea)";
				};
			 class MeadowsNight
			  {
				sound[] = {
				  "\ca\sounds\Ambient\meadows\wind-meadow-2",
				  0.0177828,
				  1
				};
				name = "Meadows";
				volume = "(1-forest)*(1-houses)*night*(1-sea)";

			 };


	};

Share this post


Link to post
Share on other sites

spirit6 every config you posted here has a missing ending bracket..

Share this post


Link to post
Share on other sites
spirit6 every config you posted here has a missing ending bracket..

Because i posted the relevant part, not the ending :) Else ya need my whole clutter and other talk also, which is not relevant to this part.

Share this post


Link to post
Share on other sites

Sorry for waking up an old thread, but its the only one I found with the same topic.

Snake Man: this solution works, but only partially. For example: default Sea/Rain sounds are still used, although you specify different ones in the island-specific config. Anyone have a solution for that?

Share this post


Link to post
Share on other sites

Not entirely sure what is really asked here, but this is how I setup individual sounds for individual islands. If something "special" goes down, like redefining class Default, like in MBG_Nam, then I have to redefine that too.

class CfgPatches {
class BiB_Ambience {
	units[] = {};
	weapons[] = {};
	requiredVersion=0.100000;
	requiredAddons[] = {"CASounds","Takistan","Zargabad","MBG_Nam_C"}; //add "Desert_E" if putting Sand effects outside defaultworld
	version = "2010-10-04";
	projectName = "BIB - Replacement Ambient Sounds";
	author = "CarlGustaffa";
};
};
class CfgEnvSounds {
#include "bib_amb_forest.hpp"
#include "bib_amb_hills.hpp"
#include "bib_amb_meadows.hpp"
#include "bib_amb_rain.hpp"
//	#include "bib_amb_sand.hpp" //Activate for desert like islands
#include "bib_amb_trees.hpp"
#include "bib_amb_wind.hpp"
#include "bib_amb_houses.hpp"
#include "bib_amb_sea.hpp" //sea or lake, not both
//	#include "bib_amb_lake.hpp" //sea or lake, not both

#include "bib_sfx_forest.hpp"
#include "bib_sfx_forestwind.hpp"
//	#include "bib_sfx_hills.hpp" //Activate only for hilly islands
#include "bib_sfx_meadows.hpp"
#include "bib_sfx_insects.hpp"
#include "bib_sfx_rain.hpp"
//	#include "bib_sfx_sand.hpp" //Activate for desert like islands
#include "bib_sfx_trees.hpp"
#include "bib_sfx_wind.hpp"
#include "bib_sfx_housesday.hpp"
#include "bib_sfx_housesnight.hpp"
#include "bib_sfx_houseswind.hpp"
#include "bib_sfx_sea.hpp"

#include "bib_one_birdsing.hpp"
#include "bib_one_chicken.hpp"
#include "bib_one_cock.hpp"
#include "bib_one_cow.hpp"
#include "bib_one_crow.hpp"
#include "bib_one_dog.hpp"
#include "bib_one_forestlark.hpp"
#include "bib_one_frog.hpp" //Deactivate for desert like islands
#include "bib_one_hedgesparrow.hpp"
#include "bib_one_nightingale.hpp"
#include "bib_one_owl.hpp"
#include "bib_one_seagull.hpp" //Deactivate for islands without a coast
//	#include "bib_one_goose1.hpp" //Deactivate for islands with a coast
//	#include "bib_one_goose2.hpp" //Deactivate for islands with a coast
#include "bib_one_skylark.hpp"
#include "bib_one_wolf.hpp"

#include "bib_one_forestbird.hpp"
#include "bib_one_woodpecker.hpp" //Activate only for islands based on woods
#include "bib_one_treebird.hpp" //Activate only for islands based on woods
#include "bib_one_littlebird.hpp" //Activate only for islands based on woods
#include "bib_one_junglebird.hpp" //Activate only for islands with jungle (debug activated for Chernarus)
//	#include "bib_one_desertbirds.hpp" //Activate only for islands with desert
#include "bib_one_horse.hpp"
//	#include "bib_one_mountaincreature.hpp" //Activate only for islands with desert
#include "bib_one_pig.hpp"
#include "bib_one_sheep.hpp"
};
class DefaultWorld;
class Weather;
class CfgWorlds {
class CAWorld: DefaultWorld {
	class Weather: Weather {
		class ThunderboltNorm {
			soundNear[] = {
				"\BiB_Ambience\Thunder\Thunder",
				25.622801,
				1
			};
			soundFar[] = {
				"\BiB_Ambience\Thunder\ThunderFar",
				10,
				1
			};
		};
		class ThunderboltHeavy {
			soundNear[] = {
				"\BiB_Ambience\Thunder\ThunderHeavy",
				20.622801,
				1
			};
			soundFar[] = {
				"\BiB_Ambience\Thunder\ThunderHeavyFar",
				10,
				1
			};
		};
	};
};
class CfgEnvSounds;
class Takistan: CAWorld {
	class EnvSounds: CfgEnvSounds {
		#include "bib_amb_forest.hpp"
		#include "bib_amb_hills.hpp"
		#include "bib_amb_meadows.hpp"
		#include "bib_amb_rain.hpp"
		#include "bib_amb_sand.hpp" //Activate for desert like islands
		#include "bib_amb_trees.hpp"
		#include "bib_amb_wind.hpp"
		#include "bib_amb_houses.hpp"
//			#include "bib_amb_sea.hpp" //sea or lake, not both
		#include "bib_amb_lake.hpp" //sea or lake, not both


		#include "bib_sfx_forest.hpp"
		#include "bib_sfx_forestwind.hpp"
		#include "bib_sfx_hills.hpp" //Activate only for hilly islands
		#include "bib_sfx_meadows.hpp"
		#include "bib_sfx_insects.hpp"
		#include "bib_sfx_rain.hpp"
		#include "bib_sfx_sand.hpp" //Activate for desert like islands
		#include "bib_sfx_trees.hpp"
		#include "bib_sfx_wind.hpp"
		#include "bib_sfx_housesday.hpp"
		#include "bib_sfx_housesnight.hpp"
		#include "bib_sfx_houseswind.hpp"
		#include "bib_sfx_lake.hpp"

		#include "bib_one_birdsing.hpp"
		#include "bib_one_chicken.hpp"
		#include "bib_one_cock.hpp"
		#include "bib_one_cow.hpp"
		#include "bib_one_crow.hpp"
		#include "bib_one_dog.hpp"
		#include "bib_one_forestlark.hpp"
//			#include "bib_one_frog.hpp" //Deactivate for desert like islands
		#include "bib_one_hedgesparrow.hpp"
		#include "bib_one_nightingale.hpp"
		#include "bib_one_owl.hpp"
//			#include "bib_one_seagull.hpp" //Deactivate for islands without a coast
		#include "bib_one_goose1.hpp" //Deactivate for islands with a coast
		#include "bib_one_goose2.hpp" //Deactivate for islands with a coast
		#include "bib_one_skylark.hpp"
		#include "bib_one_wolf.hpp"

		#include "bib_one_forestbird.hpp"
//			#include "bib_one_woodpecker.hpp" //Activate only for islands based on woods
//			#include "bib_one_treebird.hpp" //Activate only for islands based on woods
//			#include "bib_one_littlebird.hpp" //Activate only for islands based on woods
		#include "bib_one_junglebird.hpp" //Activate only for islands with jungle (debug activated for Chernarus)
		#include "bib_one_desertbirds.hpp" //Activate only for islands with desert
		#include "bib_one_horse.hpp"
		#include "bib_one_mountaincreature.hpp" //Activate only for islands with desert
		#include "bib_one_pig.hpp"
		#include "bib_one_sheep.hpp"
	};
};
class Zargabad: CAWorld {
	class EnvSounds: CfgEnvSounds {
		#include "bib_amb_forest.hpp"
		#include "bib_amb_hills.hpp"
		#include "bib_amb_meadows.hpp"
		#include "bib_amb_rain.hpp"
		#include "bib_amb_sand.hpp" //Activate for desert like islands
		#include "bib_amb_trees.hpp"
		#include "bib_amb_wind.hpp"
		#include "bib_amb_houses.hpp"
//			#include "bib_amb_sea.hpp" //sea or lake, not both
		#include "bib_amb_lake.hpp" //sea or lake, not both

		#include "bib_sfx_forest.hpp"
		#include "bib_sfx_forestwind.hpp"
		#include "bib_sfx_hills.hpp" //Activate only for hilly islands
		#include "bib_sfx_meadows.hpp"
		#include "bib_sfx_insects.hpp"
		#include "bib_sfx_rain.hpp"
		#include "bib_sfx_sand.hpp" //Activate for desert like islands
		#include "bib_sfx_trees.hpp"
		#include "bib_sfx_wind.hpp"
		#include "bib_sfx_housesday.hpp"
		#include "bib_sfx_housesnight.hpp"
		#include "bib_sfx_houseswind.hpp"
		#include "bib_sfx_lake.hpp"

		#include "bib_one_birdsing.hpp"
		#include "bib_one_chicken.hpp"
		#include "bib_one_cock.hpp"
		#include "bib_one_cow.hpp"
		#include "bib_one_crow.hpp"
		#include "bib_one_dog.hpp"
		#include "bib_one_forestlark.hpp"
//			#include "bib_one_frog.hpp" //Deactivate for desert like islands
		#include "bib_one_hedgesparrow.hpp"
		#include "bib_one_nightingale.hpp"
		#include "bib_one_owl.hpp"
//			#include "bib_one_seagull.hpp" //Deactivate for islands without a coast
		#include "bib_one_goose1.hpp" //Deactivate for islands with a coast
		#include "bib_one_goose2.hpp" //Deactivate for islands with a coast
		#include "bib_one_skylark.hpp"
		#include "bib_one_wolf.hpp"

		#include "bib_one_forestbird.hpp"
//			#include "bib_one_woodpecker.hpp" //Activate only for islands based on woods
//			#include "bib_one_treebird.hpp" //Activate only for islands based on woods
//			#include "bib_one_littlebird.hpp" //Activate only for islands based on woods
		#include "bib_one_junglebird.hpp" //Activate only for islands with jungle (debug activated for Chernarus)
		#include "bib_one_desertbirds.hpp" //Activate only for islands with desert
		#include "bib_one_horse.hpp"
		#include "bib_one_mountaincreature.hpp" //Activate only for islands with desert
		#include "bib_one_pig.hpp"
		#include "bib_one_sheep.hpp"
	};
};
class MBG_Nam: CAWorld {
	class EnvSounds: CfgEnvSounds {
		class Default {
			sound[] = {
				"\BiB_Ambience\NoSound",
				0,
				1
			};
			soundNight[] = {
				"\BiB_Ambience\NoSound",
				0,
				1
			};
		}; //Clears the default, I hope...
		#include "bib_amb_jungleforest.hpp"
		#include "bib_amb_hills.hpp"
		#include "bib_amb_jungleclearing.hpp"
		#include "bib_amb_rain.hpp"
//			#include "bib_amb_sand.hpp" //Activate for desert like islands
		#include "bib_amb_trees.hpp"
		#include "bib_amb_wind.hpp"
		#include "bib_amb_houses.hpp"
//			#include "bib_amb_sea.hpp" //sea or lake, not both
		#include "bib_amb_lake.hpp" //sea or lake, not both

		#include "bib_sfx_forest.hpp"
		#include "bib_sfx_forestwind.hpp"
//			#include "bib_sfx_hills.hpp" //Activate only for hilly islands
		#include "bib_sfx_meadows.hpp"
		#include "bib_sfx_insects.hpp"
		#include "bib_sfx_rain.hpp"
//			#include "bib_sfx_sand.hpp" //Activate for desert like islands
		#include "bib_sfx_trees.hpp"
		#include "bib_sfx_wind.hpp"
		#include "bib_sfx_housesday.hpp"
		#include "bib_sfx_housesnight.hpp"
		#include "bib_sfx_houseswind.hpp"
		#include "bib_sfx_lake.hpp"

		#include "bib_one_birdsing.hpp"
		#include "bib_one_chicken.hpp"
		#include "bib_one_cock.hpp"
//			#include "bib_one_cow.hpp"
		#include "bib_one_crow.hpp"
		#include "bib_one_dog.hpp"
		#include "bib_one_forestlark.hpp"
		#include "bib_one_frog.hpp" //Deactivate for desert like islands
		#include "bib_one_hedgesparrow.hpp"
		#include "bib_one_nightingale.hpp"
		#include "bib_one_owl.hpp"
//			#include "bib_one_seagull.hpp" //Deactivate for islands without a coast
//			#include "bib_one_goose1.hpp" //Deactivate for islands with a coast
//			#include "bib_one_goose2.hpp" //Deactivate for islands with a coast
		#include "bib_one_skylark.hpp"
//			#include "bib_one_wolf.hpp"

		#include "bib_one_forestbird.hpp"
		#include "bib_one_woodpecker.hpp" //Activate only for islands based on woods
		#include "bib_one_treebird.hpp" //Activate only for islands based on woods
		#include "bib_one_littlebird.hpp" //Activate only for islands based on woods
		#include "bib_one_junglebird.hpp" //Activate only for islands with jungle (debug activated for Chernarus)
		#include "bib_one_desertbirds.hpp" //Activate only for islands with desert
//			#include "bib_one_horse.hpp"
//			#include "bib_one_mountaincreature.hpp" //Activate only for islands with desert
		#include "bib_one_pig.hpp"
//			#include "bib_one_sheep.hpp"

		#include "bib_one_snakes.hpp"
		#include "bib_one_gnatcatcher.hpp"
		#include "bib_one_gibbon.hpp"
		#include "bib_one_macaw.hpp"
//			#include "bib_one_sheep.hpp"
//			#include "bib_one_sheep.hpp"
//			#include "bib_one_sheep.hpp"
	};
};
};

Too lazy to edit to make it look good, but this seems to work good for me. Btw, "amb" only includes ambient and no sfx, "sfx" has only generic sound effects using a dummy ambient, and "one" includes a single type of animal only also using a dummy ambient.

Not sure if this answers anything. Not had much time for this lately, so...

Share this post


Link to post
Share on other sites

It's not working. Sea sound is still default one, even lost all jungle sounds... I'll try to spend couple of hours testing...

Share this post


Link to post
Share on other sites

Pleas share so we all could have a look and see what's going on... If it only was merely for learning purposes. Working or not, it might give good ideas.

Share this post


Link to post
Share on other sites

So far I have:

- working sounds on Lingor only, localized

- but Sea sound is not working

This is what I use on main island config:

http://pastebin.com/Ww5wVjXL

I even tried adding:

	class Sea
{
	name="$STR_DN_SEA";
	sound[]=
	{
		"\Lingor_sounds\sounds\Environment\LingorRiver1.wss",
		0.700000,
		1
	};
	soundNight[]=
	{
		"\Lingor_sounds\sounds\Environment\LingorRiver1.wss",
		0.500000,
		1
	};
};

and changing Sea -> ibr_lingor_Sea... to no avail.

I also use lingor_sounds.pbo (that Charon made, but sounds work on all other islands) with config:

http://pastebin.com/mLwwgLRD

hoping the Sea sound would appear, but water is totally quiet now, with BIS default splashing waves loop gone, too.

Any clues how to enable my new Sea sound that mainly servers for river with a subtle running stream sfx?

Share this post


Link to post
Share on other sites

Every user defined class should have volume and probably also name, but volume is definitely needed, for example:

class Sea
{
name="Sea";
volume="sea";
sound[]=
{
	"\nst\ns_sounds\zonesounds\amb_namalsk_sea.ogg",
	0.300000,
	1
};
soundNight[]=
{
	"\nst\ns_sounds\zonesounds\amb_namalsk_sea.ogg",
	0.300000,
	1
};  
};

(volume parameter can be more complex, see bis's definitions, but for sea is this enough)

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×