Add your own custom sounds

Audio Rejectz

Well-Known Member
Hi,

After reading this post here http://opendayz.net/index.php?threads/dayz-sound-effect-editing.6852/#post-11025 and reading the comment from shinkicker i decided to try and add some custom sounds to our Taviana map, things like random screams and so on.

Anyway, i managed to get it to work with the following process

I created a folder called sounds i put into my mission file, in there i have scream.ogg and scream2.ogg

I created a description.ext file and used

Code:
class CfgSounds
{
// List of sounds (.ogg files without the .ogg extension)
sounds[] = {scream,scream2};
 
// Definition for each sound
class scream
{
name = "scream"; // Name for mission editor
sound[] = {\sounds\scream.ogg, 0.4, 1.0};
titles[] = {0, ""};
};
class scream2
{
name = "scream2"; // Name for mission editor
sound[] = {\sounds\scream2.ogg, 0.4, 1.0};
titles[] = {0, ""};
};

Now in my mission.sqm i have

Code:
class Sensors
    {
        items=1;
        class Item0
        {
            position[]={7795.5649,83.821281,9173.4346};
            activationBy="WEST";
            interruptable=1;
            age="UNKNOWN";
            class Effects
            {
                voice="scream";
            };

When i test the mission it works great, i get to the trigger point and my custom sound plays.

My issue is when i try to put the description.ext code into the description.ext of dayzlands taviana.1.5.0 my game crashes and i get an error saying

File C:\****\******\dayz_10.eu.tavi\description.ext, line162: /CfgSounds/:Missing '}'

Any ideas, i cant see no issue with line 162, and it works fine prior to putting it into there description.ext file
 
Pleased you got this working mate. I also have the code somewhere for doing a sound loop all over the map (like the namalsk with the wind / children crying sounds). Let me know if your interested and I can dig it up.
 
That would be awesome if you could mate, as at the moment i am using a lot of triggers all over the map to trigger the new sounds. Problem is if someone runs through more than one in a short period the sounds can clash.

It's worked great for random screams and so on in the woods though :D
 
From what I recall (have not tested this recently (working from laptop at the moment):

Set up a CfgSounds Class in your descriptions.ext:



class CfgSounds
{
sounds[] = {};
class wolf1
{
// how the sound is referred to in the editor (e.g. trigger effects)
name = "my_wolf_sound";
// filename, volume, pitch
sound[] = {"fx\wolf1.ogg", 1, 1};
titles[] = {};
};
};

And then place the following loop in:


//--- audio random loop
[] spawn {
waituntil {isplayer player};
while {true} do {
_ran = ceil random 5;
playsound format ["my_sound",_ran];
_obj = vehicle player;
_pos = position _obj;
};

There is a random seed so it does not just keep looping (which sounds false).

I might need to fix this if it does not work for you.
 
Nice one for that mate, ill give it a try now. Really appreciate that!
Also on another note, when i tried your dog code on a custom mission, it worked great. But when i put it into my main mission.sqm it dosnt work.
I kind of did it a different way though, in the editor i made a unit with these settings:

Side:Empty - Class: Sounds - Control: Non Playable - Info ago: Unknown - Vehicle Lock: Defualt - Unit: Dog

It gives me this in my mission, which looks identical yours

Code:
class Item324
        {
            position[]={7815.8174,84.368927,9158.6133};
            id=425;
            side="EMPTY";
            vehicle="Sound_Dog";
            skill=0.60000002;

But there is no dog sound in game, my custom sound works though.
Also when i click on the dog unit in the editor i get

No Entry 'bin\config.bin\CfgVehicleClasses.small'

Any idea what the issue is?
 
Hmmm...try searching in your rpt file for Sound_Dog see if you have any errors.

The rpt is:

C:\Users\AudioRejects\AppData\Local\ArmA 2 OA\Arma2OA.rpt
 
I seem to have a lot of things like this:

Code:
Warning Message: No entry 'bin\config.bin/CfgVehicles/Sound_Dog.simulation'.
Warning Message: '/' is not a value
Unrecognized CfgVehicles simulation  in bin\config.bin/CfgVehicles/Sound_Dog/
Warning Message: No entry 'bin\config.bin/CfgVehicles/Sound_Dog.model'.
Warning Message: '/' is not a value
Warning Message: No entry 'bin\config.bin/CfgVehicles/Sound_Dog.simulation'.
Warning Message: No entry 'bin\config.bin/CfgVehicles/Sound_Dog.accuracy'.
Warning Message: '/' is not a value
Warning Message: No entry 'bin\config.bin/CfgVehicles/Sound_Dog.camouflage'.
Warning Message: '/' is not a value
Warning Message: No entry 'bin\config.bin/CfgVehicles/Sound_Dog.audible'.
Warning Message: '/' is not a value
Warning Message: No entry 'bin\config.bin/CfgVehicles/Sound_Dog.textSingular'.
Warning Message: '/' is not a value
Warning Message: No entry 'bin\config.bin/CfgVehicles/Sound_Dog.speechSingular'.
Warning Message: Size: '/' not an array
Warning Message: No entry 'bin\config.bin/CfgVehicles/Sound_Dog.textPlural'.
Warning Message: '/' is not a value
Warning Message: No entry 'bin\config.bin/CfgVehicles/Sound_Dog.speechPlural'.
Warning Message: Size: '/' not an array
Warning Message: No entry 'bin\config.bin/CfgVehicles/Sound_Dog.weaponSlots'.
Warning Message: '/' is not a value
Warning Message: No entry 'bin\config.bin/CfgVehicles/Sound_Dog.spotableNightLightsOff'.
Warning Message: '/' is not a value
Warning Message: No entry 'bin\config.bin/CfgVehicles/Sound_Dog.spotableDarkNightLightsOff'.
Warning Message: '/' is not a value
Warning Message: No entry 'bin\config.bin/CfgVehicles/Sound_Dog.spotableNightLightsOn'.
Warning Message: '/' is not a value
Warning Message: No entry 'bin\config.bin/CfgVehicles/Sound_Dog.visibleNightLightsOff'.
Warning Message: '/' is not a value
Warning Message: No entry 'bin\config.bin/CfgVehicles/Sound_Dog.visibleNightLightsOn'.
Warning Message: '/' is not a value
Warning Message: No entry 'bin\config.bin/CfgVehicles/Sound_Dog.nameSound'.
Warning Message: '/' is not a value
Warning Message: No entry 'bin\config.bin/CfgVehicles/Sound_Dog.destrType'.
Warning Message: '/' is not a value
Warning Message: No entry 'bin\config.bin/CfgVehicles/Sound_Dog.picture'.

These are the only errors with sound_dog
 
This is awesome. Going to give this a try in my server.

Question. Is it possible to have the triggers be random positions throughout the map? I am working on something that could be enhanced tremendously if the triggers could "spawn" (if that is a good word for it) at random throughout the map at server start.

Ideas?
 
I seem to have a lot of things like this:

Code:
Warning Message: No entry 'bin\config.bin/CfgVehicles/Sound_Dog.simulation'.
Warning Message: '/' is not a value
Unrecognized CfgVehicles simulation  in bin\config.bin/CfgVehicles/Sound_Dog/
Warning Message: No entry 'bin\config.bin/CfgVehicles/Sound_Dog.model'.
Warning Message: '/' is not a value
Warning Message: No entry 'bin\config.bin/CfgVehicles/Sound_Dog.simulation'.
Warning Message: No entry 'bin\config.bin/CfgVehicles/Sound_Dog.accuracy'.
Warning Message: '/' is not a value
Warning Message: No entry 'bin\config.bin/CfgVehicles/Sound_Dog.camouflage'.
Warning Message: '/' is not a value
Warning Message: No entry 'bin\config.bin/CfgVehicles/Sound_Dog.audible'.
Warning Message: '/' is not a value
Warning Message: No entry 'bin\config.bin/CfgVehicles/Sound_Dog.textSingular'.
Warning Message: '/' is not a value
Warning Message: No entry 'bin\config.bin/CfgVehicles/Sound_Dog.speechSingular'.
Warning Message: Size: '/' not an array
Warning Message: No entry 'bin\config.bin/CfgVehicles/Sound_Dog.textPlural'.
Warning Message: '/' is not a value
Warning Message: No entry 'bin\config.bin/CfgVehicles/Sound_Dog.speechPlural'.
Warning Message: Size: '/' not an array
Warning Message: No entry 'bin\config.bin/CfgVehicles/Sound_Dog.weaponSlots'.
Warning Message: '/' is not a value
Warning Message: No entry 'bin\config.bin/CfgVehicles/Sound_Dog.spotableNightLightsOff'.
Warning Message: '/' is not a value
Warning Message: No entry 'bin\config.bin/CfgVehicles/Sound_Dog.spotableDarkNightLightsOff'.
Warning Message: '/' is not a value
Warning Message: No entry 'bin\config.bin/CfgVehicles/Sound_Dog.spotableNightLightsOn'.
Warning Message: '/' is not a value
Warning Message: No entry 'bin\config.bin/CfgVehicles/Sound_Dog.visibleNightLightsOff'.
Warning Message: '/' is not a value
Warning Message: No entry 'bin\config.bin/CfgVehicles/Sound_Dog.visibleNightLightsOn'.
Warning Message: '/' is not a value
Warning Message: No entry 'bin\config.bin/CfgVehicles/Sound_Dog.nameSound'.
Warning Message: '/' is not a value
Warning Message: No entry 'bin\config.bin/CfgVehicles/Sound_Dog.destrType'.
Warning Message: '/' is not a value
Warning Message: No entry 'bin\config.bin/CfgVehicles/Sound_Dog.picture'.

These are the only errors with sound_dog
Looks like you've used '/' instead of '\' ?
 
From what I recall (have not tested this recently (working from laptop at the moment):

Set up a CfgSounds Class in your descriptions.ext:





And then place the following loop in:




There is a random seed so it does not just keep looping (which sounds false).

I might need to fix this if it does not work for you.


The second snippet goes in the .ext right? after the first part?


Thanks
 
So can I add triggers in the editor and paste these over into my mission and get it to work? cause I don't know how to calculate the x/y cords like in your demo.
 
I'm wondering how to add the internet radio channel instead of sound, such as using a trigger with the Loudspeakers?
 
Yeah I want to make it where we have a Cherna radio station. Would be cool if I could make it where someone could use group voip, since no one can hear outside of lobby. And have it where you can hear group voice though the loudspeakers.
 
I still can't get my own custom sounds to work.
Just complains that it can't find the sound file.

But it's inside the MPmissions/dayz_1.chernaus/fx/sound1.ogg
when I compile the pbo...
 
Is there i way i can change the ending music on my server ? The "You are dead" music i mean. I know there is a a way to do it on pause with onPauseScript = "runsscript.sqf" and then play the music there, but how can i do it in the end ?
Thanks
 
Hi,
Do we have any nice helping code developer here?

I can get a sound trigger to play my own custom sound. But the trouble is, all players hear it regardless of where on the map the trigger is which is odd as it only has a 50m radius!

I have my sound playing in the Trigger Effects - Anonymous. But has anyone got any documentation on this panel in the 2D Editor? I can find nothing online about its various options!
 
Well the first thing is to get your sound.

I use two sounds, one called pipes.ogg and the other screamwoman.ogg
Then I used Audacity (a free sound program) to convert it to a short .ogg file (mono not stereo) and a low sample rate.
Try to keep the file under 100kB in length. As this will increase the loading time of players on your server.

Place these files in a folder called 'fx' within an unpacked dayz_1.Chernarus.pbo (for example)

Then edit the description.ext file in a text editor to add the sounds as listed items from within the game.

Look for where it says loadScreen = and in the next line down add this:

Code:
class CfgSounds
    { 
    sounds[] = {pipes,screamwoman};
    class voicepipes
    {
      name = "pipes";
      sound[] = {"fx\pipes.ogg", db-20, 1.0};
      titles[] = {0, ""};
    };
   
    class voicescream
    {
      name = "screamwoman";
      sound[] = {"fx\screamwoman.ogg", db-10, 1.0};
      titles[] = {0, ""};
    };
    };

As you can see, it's easy to add more.
"db-20" or "db-10" lowers the volume. 1.0 alters the pitch. Just remove "-20" to play at original volume.


Place the unpacked 'dayz_1.Chernarus folder into your user MPMissions folder like here:
(I use the Steam version of ARMA2OA)
F:\Users\Stuart\Documents\ArmA 2\MPMissions

Now load ARMA2OA. (if you have it loaded already, then quit it and reload it. This forces it to re-read your description.ext file. Important that.)

Go into the 2D editor as normal, load this 'dayz_1' mission and click on a Trigger.
I make mine repeat only once. Select a group of your choice, radius, etc.
Select 'Effects' and choose Anonymous and scroll way down. You should see the sounds you've added named in there.

Save the mission to Multiplayer and it'll appear in
T:\Steam\steamapps\common\arma 2 operation arrowhead\MPMissions
as a .pbo file. Your location will vary, so just search your computer for 'steamapps' folder.

Unpack this .pbo and the mission.sqm will have trigger stuff called "Class Sensors"

Typically mine look like this:

Code:
class Item3
        {
            position[]={10875.94,0.40354896,2404.8669};
            a=300;
            b=10;
            angle=-76.380402;
            activationBy="WEST";
            activationType="WEST D";
            interruptable=1;
            age="UNKNOWN";
            class Effects
            {
                sound="voicepipes";
            };
        };

Now take your dayz_1.Chernarus mission folder, and put the new mission.sqm into it and repack it so it now contains the fx folder, new description.ext etc.

Now when you run your server, the sounds will play when a player enters the area.
 
Thats awesome thx!
One more question, when you want this serverwide random sounds, like namalnsk, how to do that?
 
Back
Top