HL2 distant gunshots

I think black mesa needs the same effect HL2 has when you hear an npc firing from distance. In BMS you can’t hear the npc’s gunshot when they are far away. HL2 had an effect which was done quite well. If an npc firing smg for example from a distance you could hear their shots, which sounded quite different from up close. In BMS u cant hear the npc soldiers firing unless you are about 15m away.

Does anyone know how to fix this?

It would ad a lot to the game if this was implemented.

It is implemented… You need to have a different sound for the single_npc files for the glock / shotgun / 357 and mp5 so that sounds more exterior rather than the same sound as you are holding the gun in your hand. i.e. view model sounds.

Thanks.

I’ll look into it. :freeman:

They have something like that in Questionable Ethics in this game. If you listen closely, you can hear distant muffled gunshots followed by agonizing echoed screams. To be honest, that was really scary. D:

That’s different. Those are part of the soundscapes played somewhat randomly. He means NPCs actually firing their weapons, and if they get too far away the shots sound muffled.

[b][u][COLOR=‘DarkOrange’]

[/u][/b]

Actually Its not what I would called muffled. I suggest playing HL2 and letting a combine solder with smg fire at you from distance. It actually sounds like a distant gunshot. as you move closer the sound becomes more and more similar to the players smg.

IN HL2[COLOR=‘SandyBrown’] [COLOR=‘SeaGreen’]IN HL2 the gunshots while in a firefight sound different depending on the distance of the npc. Your own weapons always sound the same, because they are right in your face. Although hl2 engine has a nice echo/reverb effect which actually depends on how big the room is. For example glock sounds different in a pipe, rather than a large metal room. I love this effect. It was even in [COLOR=‘DarkOrange’]HL1

It would be great if firing a gun right next to a wall gave the effect of the echo you would hear, louder in which ever ear is closest to the wall. Guns sound different in all types of environments. I cant wait until these effects are implemented into games more effectively.

[

https://www.youtube.com/watch?v=G6uHrC37Xqc

Listen close 3:40 - 3:53. you can hear the swamp boat approaching an npc. The firing sounds change as you get closer. BMS does not have this. If an NPC is far away u WILL NOT hear his gun fire. It is obviously implemented into source code. I hope someone can explain how to add this into BMS, or better yet do it for me.

If u wanna have a comparison. Load Surface tension Dam section- “map bm_c2a5a”. Get into a firefight with the soldiers from a distance, the ones you see heading towards the dam… You will notice once they are about 40-60 metres distance away you will not hear their guns firing. You will see muzzle flash and the only sounds u will hear is the body impact,if they hit u and ground impacts from the bullets. IMO u should be able to hear a gunshot from hundreds of metres away.

I hope this makes sense . Also hope someone understands what I am talking about and perhaps point me in the right direction to learn more about how to bring it to BMS.

That’s actually part of the soundscape system, though it’s sorely underutilized in most custom maps, and even a lot in official stuff.
I guess it’s because the predefined DSPs are very specific to certain kinds of rooms, but still. It would be a really nice thing to see.

If it’s not in the final release, it’ll be easy to mod in.

As for distant gunshots, I’m pretty sure thats a setting in the weapon scripts, so you’ll just need a modified copy of the gun sound with proper effects/channel mixing (the distant gunshot sounds are handled a bit differently by the sound system compared to regular ones) and add that to the script.
A cursory inspection of the BM and HL2 scripts should show what’s needed, but I’m not going to have an opportunity to have a look myself for a while.

What Jeff said. If you want the weapons to sound totally different over all, you need to edit the sound scripts and get new sounds as some of the weapon sounds (even NPC ones) aren’t set up for it properly. That’s a tall order if you’re inexperienced. Even when you ARE experienced, it takes hours.

I haven’t gotten around to re-coding them as a result of how much time it takes. It took me a few hours in total to get my client set up how I wanted it before I had to do a wipe.

Dear Chumbuster. I think I know what you mean at least with absent distant gunshots in levels such as Surface Tension. I think my soundpack is just for you. It adds everything you mentioned plus more. I’m sure you had no idea it existed but here it is : https://forums.blackmesasource.com/showthread.php?t=16424

Hi Jeff.

I had a good look and compared both scripts. It seems only a small change is necessary. in the weapon scripts of HL2 there is a line for the distant gunshot wav sound. I tried adding the same line to the weapon script file in bms. I added the line - “wave” “^weapons/mp5/dist_1.wav”

So now it looks like this:

[b]“weapon_mp5.Single_NPC”
{
“channel” “CHAN_WEAPON”
“volume” “VOL_NORM”
“soundlevel” “SNDLVL_NORM”

// “wave” “^weapons/mp5/single_npc.wav”
“wave” “^weapons/mp5/dist_1.wav”[/b]

}

I also made a new wav file named “dist_1.wav” placed in the mp5 weapon sound folder along with the other mp5 gunshot sounds. Sadly it doesn’t play in game though. There must be more I have to change in another script, I think. I will keep looking thanks for your help brothers.

Still need help with this please

I was actually playing with this a week or so ago - By modifying the HL2 sounds to include a different sound blended in one channel, I was able to study how the NPC fires work - The sound will actually have 2 sounds in it - one per channel. When you’re near the NPC, it uses the sound from the left channel only. When you’re far away, it uses the right channel only. Between those areas it blends the two channels together different amounts depending on your position.
You can check it out withthis modified HL2 pistol fire sound. When you’re far enough away to allow the distant sound, you should hear a voice saying “No” when the gun fires - and if you open it in an audio editor, it’ll only be in the right channel of the sound.

Just format the NPC gunshot sounds to be stereo with the left channel having the original and the right channel having the distant, and you should be golden.

Mate, that’s awesome! just one question. Do I place the distant sound with the other npc sounds? how does the game know there is a new file there to play?

I was actually unsure about how BM had set this up, so to make sure I was giving you accurate info, I had a look-see in both the scripts and audio files, which indicated that the feature we’ve been discussing is actually in-game. I loaded up a map to test, and sure enough, the Glock, Shotgun, and Mp5 all do change when at a distance. They’re a bit quiet, though. Maybe boosting the volume in the right audio channel of the default sounds would help them be more audible in the chaos of standard combat.

I Don’t notice any change in the sounds. In BM ,they just fade out the further away you stand.

In HL2, the sound fades as u get further away but also merges with another sound, The distant shot sound. If you look in the HL2 weapon_sounds script and look for the npc version of the mp5 you will notice there are commands for soundfiles such as “mp5 Secial1” also “Special2” If I could get GCFscape to work properly as it did once before I would search for these sound files within HL2 and extract them to listen.

I am pretty certain there is no change in NPC’s firing at a distance in BM.

As I’ve said, I’ve confirmed there is - it’s just very quiet for the glock and Mp5. It is, however, very noticeable with the shotgun.
Either the volume is so low as to be unnoticeable with your audio setup and levels, or the game is running out of sound channels in the scenes where that amount of distance is found and removing the quieter sounds as being lower priority.

This seems plausible since Black mesa is pushing the source 2007 engine to it’s limits. Maybe the engine stops those sounds from being played to conserve memory.

If hl2 can do it than so BMS should be able to. It is not a fantasy that while playing hl2, the npc’s at a distance create a different gunshot sound when they shoot from distance. It is a FACT that in BMS the player cannot here gunshots from an NPC after an amount of distance from yourself to the npc!

There is a different gunshot sound that is presented to the player in HL2 as an npc shoots from a distance. Different sound, there must be more than one WAV file for this to happen.

It’s very possible that the sound was accidentally disabled then, similar to some of the vox computer sounds that are supposed to play in the game but don’t play because of a scripting bug. If what I’m saying is true then hopefully they can fix it by the Xen release.

Founded in 2004, Leakfree.org became one of the first online communities dedicated to Valve’s Source engine development. It is more famously known for the formation of Black Mesa: Source under the 'Leakfree Modification Team' handle in September 2004.