Adding custom shoot sounds to v_models


Vash
05-22-2003, 02:48 AM
Does anyone know how to modify the v_models, more specifically all the bolt weapon models so that you can place your OWN custom shoot sound, instead of the standard one. I've tried decompiling and editing the shoot sequence to include the sound event for my own custom sound, but it seems all the shoot sounds are coded in, or at least recognized by numbers or something, as written in the .qc. I should probably explain what and why I'm doing too.

I've modified the shoot sounds from an idea borrowed from the late 3.1 days where I cobbled together the shoot sounds for the bolt rifles with the bolt_back and bolt_forward sounds. So in one sound, it plays the rifle shot, and working the bolt back and forward. Then I simply named it "kar_shoot" or "einfield_shoot" etc. Since the game is hardcorded to use these sound names for the 3rd person models, guess what. When someone shoots a Kar, tada, you hear them work the bolt! I lined up the sounds so that it matches the timing of the animation, and it is SO much easier than 3.1, with the animation timing actually ALL THE SAME for standing, crouching, and prone. This was a problem in 2.0-3.0 animations as they went from slower to slower in each position. It also helps that ALL bolt guns use the same "standing_bolt_shoot" as a refrence for all bolt guns. Anyways, these work wondefully sweet ingame, as it's a nice little touch to the atmosphere, and helps tactically to know the timing of a kar user while he's popping in and out without having to focus intently. Now, my problem.

As stated before, as far as I know, the v_models are coded to follow a number thing or something to play the shoot sounds, so I figured I could just rename these to "kar_shoot_custom" and have that sound file be the ORIGINAL shoot sound, without the bolt sounds. This way, the v_models keeps it's own carefully timed bolt sounds to match it's own animations. Buuuuuuut....I ran into problems when the "kar_shoot" sound still play for v_models. So then I get an echo effect for the bolt, with the bolt sounds from the modified "kar_shoot" and the standard "bolt_forward/back" sounds for the v_model overlapping.

Soooo, essentially I want to know if I can completely erradicate the v_model from playing "kar_shoot" etc. for the bolt guns, and instead play my "kar_shoot_custom" sound, thus leaving the sounds in 3rd person perfectly matched up to the animations, and the sounds in 1st person perfectly matched up to those animations. I thank you advance, post haste on a fix. Next up..... TRY to get distant sounds back.....

-=JaCoBsOn=-
05-22-2003, 02:53 AM
I think I've asked that one time on the older forum a long time ago... But I got the answer:
"It's not possible, cause I'ts hard-coded to play the original sound"
And I can't see any sequence line that says something about shoot-sounds... :(
Well I hope someone could make it possible to play the shootsounds you want... :)

Vash
05-22-2003, 02:59 AM
NOOOOOOOOOOOOOOOO Bad hard-coding, bad! *whaps hard-coding away* Sniff, well their goes my perfect idea if it is hard-coded, I was kinda figuring it was, but hoping it wasn't so... Thanks for the quick answer -=JaCoBsOn=-, and yeah their is nothing in the .qc about shoot_sounds, just a number for the sound event, so instead of "kar_shoot.wav" it says "41" etc. Gah... Please one of the talented wizards of MSA break-through again....this was sooo cool while implemented into the game.... plus it'd be my first real contribution to MSA and the community...

-=JaCoBsOn=-
05-22-2003, 03:32 AM
Originally posted by Vash TS .45L.C.
NOOOOOOOOOOOOOOOO Bad hard-coding, bad! *whaps hard-coding away* Sniff, well their goes my perfect idea if it is hard-coded, I was kinda figuring it was, but hoping it wasn't so... Thanks for the quick answer -=JaCoBsOn=-, and yeah their is nothing in the .qc about shoot_sounds, just a number for the sound event, so instead of "kar_shoot.wav" it says "41" etc. Gah... Please one of the talented wizards of MSA break-through again....this was sooo cool while implemented into the game.... plus it'd be my first real contribution to MSA and the community... The "41" stands for how big the muzzleflash is... So if you change it to 81, it will be like a cannon. :p

Vash
05-22-2003, 07:34 PM
Well it's following the same event for all the other sounds. Yesh I know about the muzzleflash placements, sizes etc. lol Had fun with those in 3.1 modifying them for the hacked 3rd person muzzleflashes. But 41 just happened to be one of the numbers, the others use numbers that don't follow the muzzleflash thing, like 37 etc. The first digit is suppose to be the size, and the second which muzzleflash to play, 1 being the standard one and 3 being the MG-42 star-shaped one. So *shrug* I knew it wasn't for the muzzleflash. Still, anyone got any ideas? :confused:

Devin Kryss
05-22-2003, 07:55 PM
Well, you cant still acheive the effect you want. Just dont add your bolt sounds to the V model's firing sound, but rather, make a sound of the bolt action being worked. Then, attach the bo0lt working sound to the P model that actually goes in the guys hand. Your looking for the Left ahnded P model, it'll be like p_98kl.mdl, rather than p_98k.mdl. Add the sequence for a noise (event 5004 if memory serves me) to the L models shoot sequence, and after he shoots, you'll hear a bolt noise. This is such a good idea, im going to do it my P models.

05-22-2003, 09:22 PM
Originally posted by Devin Kryss
Well, you cant still acheive the effect you want. Just dont add your bolt sounds to the V model's firing sound, but rather, make a sound of the bolt action being worked. Then, attach the bo0lt working sound to the P model that actually goes in the guys hand. Your looking for the Left ahnded P model, it'll be like p_98kl.mdl, rather than p_98k.mdl. Add the sequence for a noise (event 5004 if memory serves me) to the L models shoot sequence, and after he shoots, you'll hear a bolt noise. This is such a good idea, im going to do it my P models.

Only problem with that idea is that you couldn't tell where they and they'll play like first-person sounds. =\ Too bad we don't have an event that will play a directional based 3rd person sound.

Sgt.Sinister
05-22-2003, 09:27 PM
Okay, if I understand correctly, you want whatever weapon you have to play a different sound which you can do in the qc but it wil still play the sound it's coded to play, right?

Why not just make the sound you don't want it to play silent so that when it does play it, you don't here anything but the sound you want it play?

And if you still a different to play the sound that you don't want this weapon to play, make the shoot sound in the qc different and rename the sound you want it to play to whatever you called it in the qc.

I hope you understand. If not, I'll make an example, but I don't really feel like it unless you ask for it.

bmanc
05-22-2003, 10:49 PM
that is possibly the best idea ever

Vash
05-23-2003, 12:06 AM
Devin, you are so the man, from 3.X and on. I'm gonna try to hack away at your method, hopefully you will to, I don't think I'll have much sucess. You ARE the hack job pro...so I think you'll beat me to it. :D Either way... I understand about attaching the bolt sounds to the left handed p_models, but how would I get the event to play at the right time??

And to Sgt. Sinister, you got it right, I want to play a different sound from what's hardcoded, but ONLY for the v_model. I will still have the p_models playing the same hardcoded sound file "name" but I want the v_model to play my "custom name" one. It's sorta misleading, cause the originaly named sound is actually custom, but my custom named sound is original....if that made sense to you... lol. Either way, I'm gonna give Devin's method a shot, hope it works. And yay! More people are noticing! Let's all try to get this one implemented people... :cool:

Vash
05-23-2003, 12:47 AM
Oh wait... I forgot about the event 5004 stuff and only playing in 3rd person... ergh. I'll give it a go anyways...

Day of Defeat Forum Archive created by Neil Jedrzejewski.

This in an partial archive of the old Day of Defeat forums orignally hosted by Valve Software LLC.
Material has been archived for the purpose of creating a knowledge base from messages posted between 2003 and 2008.