View Full Version : Custom Server Sounds

26th October 2012, 07:11

I made a couple of custom weapon sounds for the server. I've made a new folder and added my sounds to it. I've edited the game_sounds_weapons.txt file

"channel" "CHAN_WEAPON"
"volume" "1.0"
"CompatibilityAttenuation" "0.48"
"pitch" "PITCH_NORM"

"wave" "customweapon/blast.mp3"

The grenade and sonic alarm play the sounds when I change the "wave" directory without issue. No matter what I do I can't manage to get the shotgun fire sound to change. Whether I change the "wave" directory or even remove the whole syntax completely, it refuses to change. I've searched and can't find any other file calling for the M3_Fire.mp3 file.

Any help is appreciated.


26th October 2012, 07:55
if you've just edited the original weapons sound file then it's possible that the sound is being referenced directly in the model.

If you're feeling adventurous, you should be able view the .mdl in a hex editor and search for either "Weapon_M3" or the name of the sound file used by default. If you find the sound file name then you can rename it to something the same length so you don't mess up the model file. so if you find it listed as a file called "weapons/m3/blammo.wav" which is 21 characters long then you can overwrite those 21 characters with say "Weapons_M3.SingleFire" which is also 21 characters long. THen have your weapon script as above but with "Weapon_M3.SingleFire" {...} instead.

be careful though, some server enforce file consistency.

26th October 2012, 19:24
Thanks for such a quick response Paegus,

I've searched the v_shotgun.mdl and w_shotgun.mdl and could not find a reference to an audio file. Is there anywhere else it could be hidden?


27th October 2012, 00:39
I believe I've found the problem.

According to this (http://forums.alliedmods.net/showthread.php?t=87391), a lot of the sounds are strictly client side, the shotgun sound being one of them.

I find it odd though, when observing the IRIS radio menu, Ugly,bleeds, and bring it are server side, so I have edited them to make a new sound, and it works well; however the rest of the radio options are client side and cannot be edited. On a pistol, the fire and reload are client side and cannot be edited, but the dry fire sound is server side. Why would half be client side and the other half be server side? Not that I can do anything about it, just wondering what the reason is.

By the way, thanks for the help anyway Paegus, I decompiled the .mdl and found the play sounds for InsertShell and Reload, but not Single fire. Not that I could do anything about it now anyways. lol


21st November 2013, 23:06
Bumping this, because I'm curious about it as well. I'm only able to change a few of my server's weapon sounds, while others (done the same way) will not chance. Is there a workaround? A plugin? Anything that can be done for this?

24th November 2013, 07:26
Probably due to client-side prediction, weapon sounds are strictly client side.

25th November 2013, 14:38
Probably due to client-side prediction, weapon sounds are strictly client side.

As Peagus said, you cant edit existing Events with Custom Sounds.

7th December 2013, 20:59
Is there no way to reroute the way the server see's these files? I've used a mod that allowed the players of the server to choose custom player models from a mode-list, overwriting the ones precached by the game. This was in a Hidden Source server, and it worked. (Media overwriting other media, like Stripper Source, in a sense)

10th December 2013, 07:30
Player models can indeed be set fairly arbitrarily... The visible hidden mod is doing just that.

Weapon sounds are prediction based so are played client side before these server replies with "yes, you fired"

You could possibly edit the weapon sound list and replace the linked sounds but I don't think even that will propagate to the clients. If they did then custom content (weapon models etc) would not work.