Jump to content

Help adding new gun sounds to weapons


cybervirus92

Recommended Posts

Hey all, I'm trying to give the DE pistol its own firing sound as I think it should sound different and more powerful than the m9/m1911

 

If i just change the swing sound on the deagle in scripts/items_weapons.txt to point to a wav it works ingame but when I turn my camera or move the sound distorts as if I'm moving around the sound, even If i grab the default 9mmshot wav it does the same thing.

 

If I try add a new sound to the game itself I'm obviously missing something, so far I've made a duplicate of the Firearm9mmShot in sounds_items.txt and renamed mine to FirearmDEshot but for this line underneath I'm unsure of what to do:

 

event = Weapons/Firearm/9mmShot

 

I've tried just having it point to the wav but im obviously missing something as ingame I can see my sound in the advanced sound menu but trying to play it I only get silence.

 

If anyone could help that would be great as my only working way right now sounds terrible with the moving distortion.

 

Also if anyone knows how to just make a import of the sounds_items.txt as right now Im just making a whole copy of the default one than just adding my sound, I have got a import working for just the items_weapons.txt just adding my deagle change.

 

Cheers!

 

Link to comment
Share on other sites

In Items.txt file

In the subject of your pistol ...

 

item Your pistol
{

...
SoundVolume    =    70,
SwingSound    =     9mmShot ,

SoundRadius    =    140,

SoundGain = 1.5,

...

etc.

}

 

****************************************

 

In sounds_item.txt file

 

    sound 9mmShot
    {
        category = Item,
        clip
        {
            event = Weapons/Firearm/9mmShot,
            distanceMax = 150, /* SoundRadius in items.txt */
        }
    }

 

Place the sound file in the / sound folder.

 

The sound will float as you move from tile to tile. This is a feature of the engine. I couldn't deal with this problem either.

 

Edited by Nebula
Link to comment
Share on other sites

On 1/2/2021 at 4:54 PM, Nebula said:

In Items.txt file

In the subject of your pistol ...

 

item Your pistol
{

...
SoundVolume    =    70,
SwingSound    =     9mmShot ,

SoundRadius    =    140,

SoundGain = 1.5,

...

etc.

}

 

****************************************

 

In sounds_item.txt file

 

    sound 9mmShot
    {
        category = Item,
        clip
        {
            event = Weapons/Firearm/9mmShot,
            distanceMax = 150, /* SoundRadius in items.txt */
        }
    }

 

Place the sound file in the / sound folder.

 

The sound will float as you move from tile to tile. This is a feature of the engine. I couldn't deal with this problem either.

 

 

Hey, I found a decent enough workaround to the point where it sounds normal.

 

    sound FirearmDEShot
    {
        category = Item,
        is3D = false,
        clip
        {
            file = media/sound/DEshot.ogg,
            distanceMin = 0,
            distanceMax = 0,
            reverbMaxRange = 10,
            reverbFactor = 0,
        }
    }

 

The is3d Line is key in getting rid of the weird ear to ear distortion, but then you can physically move around the gunshot sound ingame, the distance min/max 0 gets rid of that problem, finally the reverb factor is to get rid of the insane reverb on the menu and i think when its thunderstorming? might be a good idea to play around with all the values but I got sick of it and moved on to making a mili base loot mod. Not the perfect fix but found a way around and right now im happy with it, sounds just like it should and you would expect, try it and let me know what you think.

Link to comment
Share on other sites

  • 3 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...