HIT Forums

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: "Sound replacement file"  (Read 6820 times)

0 Members and 1 Guest are viewing this topic.

Devile

  • The Liquidator
  • Headcrab
  • ***
  • Offline Offline
  • Posts: 29
  • The Liquidator
    • View Profile
"Sound replacement file"
« on: December 04, 2008, 09:33:00 AM »

So I want to change the sound of a weapon through Valve hammer (Sven-Coop) I have the sound in a folder of the map name in the sounds directory in sven-coop directory, just a quick tutorial to get it working would be appreciated



: )
Logged

bloodsurfer

  • The zxeno prophet
  • Gargantua
  • *******
  • Offline Offline
  • Posts: 521
  • Coding furiously
    • View Profile
Re: "Sound replacement file"
« Reply #1 on: December 04, 2008, 10:20:34 AM »

You have to use the Sound Replacement File of the weapon entity. From what I read, it should work like this :

"sounds/aslave/word1.wav" "sounds/sc_arctic/alienslavesounds/word2.wav"
"sounds/aslave/word2.wav" "sounds/sc_arctic/alienslavesounds/word2.wav"
"sounds/aslave/word2.wav" "sounds/sc_arctic/alienslavesounds/word2.wav"
"sounds/aslave/word2.wav" "sounds/sc_arctic/alienslavesounds/word2.wav"
"sounds/aslave/word2.wav" "sounds/sc_arctic/alienslavesounds/word2.wav"
"sounds/aslave/word2.wav" "sounds/sc_arctic/alienslavesounds/word2.wav"
"sounds/aslave/word2.wav" "sounds/sc_arctic/alienslavesounds/word2.wav"
"sounds/aslave/word2.wav" "sounds/sc_arctic/alienslavesounds/word2.wav"
"sounds/aslave/word2.wav" "sounds/sc_arctic/alienslavesounds/word2.wav"

First one is the original sound, second one is the replacement sound.
Logged

Devile

  • The Liquidator
  • Headcrab
  • ***
  • Offline Offline
  • Posts: 29
  • The Liquidator
    • View Profile
Re: "Sound replacement file"
« Reply #2 on: December 05, 2008, 05:40:03 AM »

Yeah, I've got in the sound replacement part of the handgun

Code: [Select]
Liquidator/handgun.txt
then in a folder called Liquidator in sounds of sven coop there's a text document named handgun with

Code: [Select]
"weapons/pl_gun3.wav" "Lassassins/pl_gun3.wav"
Then in sounds/Lassassins I've got the new pl_gun3 sound but it still doesn't seem to work.
Logged

Lt.JC

  • Silencer
  • Alien Grunt
  • ******
  • Offline Offline
  • Posts: 262
    • View Profile
    • Nostalgic-Games
Re: "Sound replacement file"
« Reply #3 on: December 05, 2008, 12:26:18 PM »

You can't change weapon sounds, only crowbar/wrench sounds.

Sniper meant that it has something to do with the client side code or something dunno.  ???
Logged

Devile

  • The Liquidator
  • Headcrab
  • ***
  • Offline Offline
  • Posts: 29
  • The Liquidator
    • View Profile
Re: "Sound replacement file"
« Reply #4 on: December 05, 2008, 04:22:35 PM »

Oh... Damn.
Logged

KylerAdams

  • A subtly invisible
  • Gonarch
  • ********
  • Offline Offline
  • Posts: 4253
    • View Profile
Re: "Sound replacement file"
« Reply #5 on: December 06, 2008, 05:53:49 PM »

You can't change weapon sounds, only crowbar/wrench sounds.

Sniper meant that it has something to do with the client side code or something dunno.  ???

Pipewrench, I could understand. Why not the new weapons, like the M40 + UZIs?
Logged

bloodsurfer

  • The zxeno prophet
  • Gargantua
  • *******
  • Offline Offline
  • Posts: 521
  • Coding furiously
    • View Profile
Re: "Sound replacement file"
« Reply #6 on: December 06, 2008, 08:48:35 PM »

Pipewrench, I could understand. Why not the new weapons, like the M40 + UZIs?

Why would that make a difference ?
Logged

KylerAdams

  • A subtly invisible
  • Gonarch
  • ********
  • Offline Offline
  • Posts: 4253
    • View Profile
Re: "Sound replacement file"
« Reply #7 on: December 06, 2008, 11:15:55 PM »

Pipe wrench, M40A1 + UZI all use sound files inside svencoop/sound/weapons. The defaults use it straight from the .gcf..
Logged

bloodsurfer

  • The zxeno prophet
  • Gargantua
  • *******
  • Offline Offline
  • Posts: 521
  • Coding furiously
    • View Profile
Re: "Sound replacement file"
« Reply #8 on: December 07, 2008, 12:01:25 PM »

Pipe wrench, M40A1 + UZI all use sound files inside svencoop/sound/weapons. The defaults use it straight from the .gcf..

Not realated to the problem, when you are playing a sound file inside the code, the file must have been precached first. It's the role of the precaching method to find the file, you just give a relative path to it (e.g. sounds/aslave/word1.wav), no matter if it's an orignal HL sound a replaced one in your mod, their is a hierarchy in the folders the precaching method will look into.
Logged

KylerAdams

  • A subtly invisible
  • Gonarch
  • ********
  • Offline Offline
  • Posts: 4253
    • View Profile
Re: "Sound replacement file"
« Reply #9 on: December 07, 2008, 01:29:43 PM »

Ah, mkay.
Logged

Devile

  • The Liquidator
  • Headcrab
  • ***
  • Offline Offline
  • Posts: 29
  • The Liquidator
    • View Profile
Re: "Sound replacement file"
« Reply #10 on: January 12, 2009, 09:33:45 AM »

Ok, I have a barney model'd as Kate, I want to replace his sounds with kates but it's just not working; quite annoying.

liquidator/kate.txt in the sound replacement part of model
then a kate.txt in the liquidator folder in sound of svencoop
which has barney sounds then being replaced by a few kate sounds

I'm out of ideas.
Logged

Lt.JC

  • Silencer
  • Alien Grunt
  • ******
  • Offline Offline
  • Posts: 262
    • View Profile
    • Nostalgic-Games
Re: "Sound replacement file"
« Reply #11 on: January 12, 2009, 03:23:53 PM »

I had the same problems when I tried to replace op4 grunt sounds.

With barney/scientist/op4 grunt/otis and so on you have to replace their scripted sentences which are located in the sentences.txt

Go to your svencoop/sound folder and open it.

Then search for the Barney sentences which start at // BARNEY and should all begin with a BA_

Now you Write it like this in your replacenment file:

"!BA_OK0"   "yourfolder/yoursound.wav"

That should work   ;)
Logged

Devile

  • The Liquidator
  • Headcrab
  • ***
  • Offline Offline
  • Posts: 29
  • The Liquidator
    • View Profile
Re: "Sound replacement file"
« Reply #12 on: January 12, 2009, 04:40:45 PM »

Hmmm, still no luck.

: s
« Last Edit: January 12, 2009, 04:48:02 PM by Devile »
Logged

Lt.JC

  • Silencer
  • Alien Grunt
  • ******
  • Offline Offline
  • Posts: 262
    • View Profile
    • Nostalgic-Games
Re: "Sound replacement file"
« Reply #13 on: January 12, 2009, 05:18:53 PM »

How did you write the path to your sound replacement file in the editor? Maybe there is an error.
Logged

Devile

  • The Liquidator
  • Headcrab
  • ***
  • Offline Offline
  • Posts: 29
  • The Liquidator
    • View Profile
Re: "Sound replacement file"
« Reply #14 on: January 12, 2009, 05:52:35 PM »

Liquidator/kate.txt

which is a text file in sounds/liquidator
Logged
Pages: [1] 2