Jump to content
cybervirus92

Help adding new gun sounds to weapons

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!

 

Share this post


Link to post
Share on other sites
Posted (edited)

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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites
Posted (edited)

Reverb can only be controlled from the script described in ... * txt

I cannot do this trick in lua.

As they explained to me, this is not implemented in FOMOD.

Edited by Nebula

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...