Replacing Weapon Sounds Doesn't Work

Obsidian General.
Post Reply
Touma
Pixel
Posts: 4
Joined: Sat Sep 03, 2011 9:42 pm
Contact:

Replacing Weapon Sounds Doesn't Work

Post by Touma »

Hello there, OC Community. My friend and I wanted to customize our Smg1 firing sounds, so we did like you do everywhere else, drop in the right sounds folder, make sure all the file names are correct, etc. Then we went on our way. But when we got in-game, they were still the default SMG sounds. No matter where we looked or what we did, we couldn't change them. Are the mounts overriding the weapon sounds or is there another step we missed for OC? Thanks for reading.
MaestraFénix
Team Member
Team Member
Posts: 2470
Joined: Mon May 10, 2010 11:50 am
Location: Spain
Contact:

Re: Replacing Weapon Sounds Doesn't Work

Post by MaestraFénix »

Touma wrote:Hello there, OC Community. My friend and I wanted to customize our Smg1 firing sounds, so we did like you do everywhere else, drop in the right sounds folder, make sure all the file names are correct, etc. Then we went on our way. But when we got in-game, they were still the default SMG sounds. No matter where we looked or what we did, we couldn't change them. Are the mounts overriding the weapon sounds or is there another step we missed for OC? Thanks for reading.
Hmm. The people who use skins doesnt have any problem. What games have you mounted? Is only the SMG, or is a scripted weapon?
Click on my photo to add me into your friends in Steam
Image
Steam photos | Steam videos

Image
Touma
Pixel
Posts: 4
Joined: Sat Sep 03, 2011 9:42 pm
Contact:

Re: Replacing Weapon Sounds Doesn't Work

Post by Touma »

It's only the smg1, and I have all the possible games mounted.
User avatar
Shana
Lead Developer
Lead Developer
Posts: 2971
Joined: Tue Aug 29, 2006 8:12 pm
Location: Germany
Contact:

Re: Replacing Weapon Sounds Doesn't Work

Post by Shana »

sound\weapons\smg1\smg1_pl_fire.wav
Touma
Pixel
Posts: 4
Joined: Sat Sep 03, 2011 9:42 pm
Contact:

Re: Replacing Weapon Sounds Doesn't Work

Post by Touma »

I even replaced that, and it did nothing.
User avatar
TESLA-X4
Former Developer
Former Developer
Posts: 570
Joined: Wed Jul 01, 2009 3:26 pm
Location: $Recycle.Bin

Re: Replacing Weapon Sounds Doesn't Work

Post by TESLA-X4 »

Unlike other games/mods, it's a different file you need to replace (as W0rf0x said: sound/weapons/smg1/smg1_pl_fire.wav). This file is different fron the standard one in that the left channel is used when the sound is played closer, and the right channel is used when the sound is played further away. There are two ways you can do this:

1: Replace the actual file
This may require you to alter the file you intend to replace to work in the same way as the original (i.e. left and right channels) with an audio editor such as Audacity or GoldWave. Just take note that the mod uses a different sound (as mentioned above), so you'll need to change the filename to match up. If you do not have the capability to/want to modify the file, you can force the mod to use a different sound instead.

2: Change the soundscript to point to a different file
Open up scripts/game_sounds_weapons.txt with Notepad or an equivalent text editor and perform a search for Weapon_SMG1.Single. You should see something like this:

Code: Select all

"Weapon_SMG1.Single"
{
	"channel"		"CHAN_WEAPON"
	"volume"		"0.55"
	"soundlevel"		"SNDLVL_90db"
	"soundlevel"	"SNDLVL_GUNFIRE"
	"pitch"			"95,105"

	"wave"			"^weapons/smg1/smg1_pl_fire.wav"
}
Change ^weapons/smg1/smg1_pl_fire.wav to )weapons/smg1/smg1_fire1.wav (note the closing parenthesis in front of the string, that is used by the game to determine how the sound should be played), then save the file and close your text editor. You can now replace the sound file weapons/smg1/smg1_fire1.wav.
Apparently, Valve can't make games beyond the number 2.
I think the only time we'll get a Source SDK code update is when it starts having purchasable hats integrated, i.e. hatconomy.

Please do not make assumptions you are not knowledgeable enough to make - that just backfires on yourself.
Tick me off, and I'll be sure to give you the golden treatment. Haven't you heard? Silence is golden.
Touma
Pixel
Posts: 4
Joined: Sat Sep 03, 2011 9:42 pm
Contact:

Re: Replacing Weapon Sounds Doesn't Work

Post by Touma »

Thank you so much for showing me this method, changing the file did the trick. :) You're a lifesaver.
Post Reply