ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
set how far you hear sounds - howto

1 2 | Next 10 events »| All Messages
Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  18:13:44  9 March 2008
profilee-mailreply Message URLTo the Top
pgeek
(Senior)
 
On forum: 02/21/2008
 

Message edited by:
pgeek
03/09/2008 18:16:14
Messages: 75
set how far you hear sounds - howto

in my opinion the distance of sound where you can hear stalkers/mutants talk/bark/whatever is set to high. in real life you wouldn't hear it if you are 60m away, at least not as loud as you can in the game. so i decided to find out how to change this. i didn't manage to find a simple solution like editing a script. that doesn't mean it is difficult to change the distance, but it's time-consuming, because you have to edit the sound files. you don't need a hex-editor. it's done with the stalker-sdk, more precisely with the sound editor of the sdk.

if we want to create a new file for ingame use, we have to create two versions of the file. first we need a .wav file (mono, 44100Hz, 16-bit). i'm using audacity ([link]http://sf.net/projects/audacity[/link]) for this. if you have saved your file as .wav, export an .ogg of your file too. then you have for example foo.wav and foo.ogg. they must have the same name!

now copy foo.wav to <driveletter>:\Program Files\X-Ray SDK\level_editor\rawdata\sounds and copy foo.ogg to <driveletter>:\Program Files\X-Ray SDK\level_editor\gamedata\sounds.

start the level editor. in the menu click on sounds (below scene) and then on sound editor. a new window pops up. there a now to files: foo and zone_mosquito_bald. when you click on foo for the first time, there will be an error message saying that your file has no comment header. ignore this and click on close (after you have edited your file, the sound editor will create a comment header). on the right side of the sound editor you have a few variables for your file.

quality = 0.00
min dist = 1.00
max dist = 300.00
max ai dist = 300.00
base volume = 1.00
game type = undefined


quality = ?
min dist = you can hear the sound up to min dist meters at full volume.
max dist = this far in meters you can hear the sound.
max ai dist = i think this is how far npcs can hear the sound. you can't set this higher than max dist.
base volume = maximum volume of the sound.
game type = type of sound. it's self-explanatory... click to see which types are available.

if you lower the value for max dist, max ai dist will be lowered too.
you can add more than one file to the list, if you repeat the steps i described above.
if you want to change the values for all files on the same time, you can leftclick on the left side and hold the mousebutton. simply mark all your files... if they have different settings, then on the right side instead of the value there will be (mixed). click on (mixed) to set it for all of them.

when you are done editing the values, click on ok and your file//s will be saved.

if you want to edit a file that's already used in the game, open it in audacity, export it to .wav and repeat the other steps.

well, that's all
  19:11:42  9 March 2008
profilee-mailreply Message URLTo the Top
Darius6
The sound guy...
(Resident)

 

 
On forum: 04/05/2007
Messages: 2131
Hmm, intresting! I was wondering about a thing here: How does the lowering of the BASE_VOLUME affect the sound? Does it physically make the sound volume lower, or could this be the sound percievement in the game engine (how loud it's registered of the sound meter in the hud)?

Cause I've tried to alter this through editing scripts, configs etc.

Didn't even realize that the SDK had an sound editor!

I guess I'll download the SDK asap, and start testing.

Anyway, great info, thanks!
  19:29:29  9 March 2008
profilee-mailreply Message URLTo the Top
pgeek
(Senior)
 
On forum: 02/21/2008
Messages: 75

---QUOTATION---
Hmm, intresting! I was wondering about a thing here: How does the lowering of the BASE_VOLUME affect the sound? Does it physically make the sound volume lower, or could this be the sound percievement in the game engine (how loud it's registered of the sound meter in the hud)?
---END QUOTATION---


i made a quick test:
i can't hear a difference if i set base volume to 1.00 and 2.00. i think you're right with the sound perceivement.

btw: with the sound editor you can only edit these variables, it's not a real editor like audacity or cool edit.
  19:36:12  9 March 2008
profilee-mailreply Message URLTo the Top
barin
scripter
(Resident)

 

 
On forum: 09/12/2007
Messages: 702
cool, one question: if i load my custom ogg file to level editor and then save it, will it be properly commented?
  19:50:18  9 March 2008
profilee-mailreply Message URLTo the Top
pgeek
(Senior)
 
On forum: 02/21/2008
 

Message edited by:
pgeek
03/11/2008 16:23:31
Messages: 75

---QUOTATION---
cool, one question: if i load my custom ogg file to level editor and then save it, will it be properly commented?
---END QUOTATION---


yes, these variables you'll change with the editor are the comments. but it does only work if you have a .ogg and a .wav version of your file. if you look at the rawdatasounds folder, there are files with an *.thm extension. i think the content of these files are what is added to the comment header. the .ogg is used to play your sound in the editor and the .thm and .wav files are used to create a new commented .ogg.

oh, i forgot this: you must change at least one value to save the file. if you don't change anything, it will not be saved.
  21:22:05  9 March 2008
profilee-mailreply Message URLTo the Top
Darius6
The sound guy...
(Resident)

 

 
On forum: 04/05/2007
 

Message edited by:
Darius6
03/09/2008 21:35:00
Messages: 2131
I'm trying this out right now! I'll check if my theory on the base_volume variable works: If I can lower the sound percievement of a silenced rifle sound WITHOUT actually affecting the initial volume of the sound. I'll report back how it goes!

[edit]

Nope, it did actually lower the INITIAL volume of the sound. 1.00 being the highest number (max volume), I tried changing it to 0.50, which resulted to the sound being played at half of it's volume but still being percieved as loud as a normal shot. Now to fiddle around with the other variables. I have a strong feeling that it's some of those that might work...
  22:08:34  9 March 2008
profilee-mailreply Message URLTo the Top
pgeek
(Senior)
 
On forum: 02/21/2008
Messages: 75

---QUOTATION---
Nope, it did actually lower the INITIAL volume of the sound. 1.00 being the highest number (max volume), I tried changing it to 0.50, which resulted to the sound being played at half of it's volume but still being percieved as loud as a normal shot. Now to fiddle around with the other variables. I have a strong feeling that it's some of those that might work...
---END QUOTATION---


i'm not sure if i understand what you want...
if you want the sound to be lowered in the sound meter at the hud, then you should edit the weapon ltx file. for example in w_knife.ltx:
snd_shoot = weapons\knife_1, 0.3
add the bold part to the line. this is the volume a weapon will make if it's used.
  22:24:07  9 March 2008
profilee-mailreply Message URLTo the Top
Darius6
The sound guy...
(Resident)

 

 
On forum: 04/05/2007
 

Message edited by:
Darius6
03/09/2008 22:25:19
Messages: 2131

---QUOTATION---
Nope, it did actually lower the INITIAL volume of the sound. 1.00 being the highest number (max volume), I tried changing it to 0.50, which resulted to the sound being played at half of it's volume but still being percieved as loud as a normal shot. Now to fiddle around with the other variables. I have a strong feeling that it's some of those that might work...
i'm not sure if i understand what you want...
if you want the sound to be lowered in the sound meter at the hud, then you should edit the weapon ltx file. for example in w_knife.ltx:
snd_shoot = weaponsknife_1, 0.3
add the bold part to the line. this is the volume a weapon will make if it's used.
---END QUOTATION---



No, I actually figured it out!!! See, with the ltx tweaking while lowering the percievement level in the sound meter, you're at the same time lowering the main volume, ie the quieter the sound is percieved in the meter, the quieter it ACTUALLY IS. Which made making silencer sounds a drag, cause you have this authentic silencer "clack", but due the silencer tweak for it to actually work as a silenced one, you'd have to lower the MAIN VOLUME of the sound in the ltx. You get what I mean?

Anyway, while fiddling around the editor I kinda figured it out. Best way to explain is to show what I did:

I had two versions of the EXACT same rifle shot, one named normal, one named _silence. I edited the _silence one in the SDK to have significantly lower distances (tweaked all of them, still have to single out, which one is the one affecting this.)
Now, WITHOUT the volume variable in the ltx, the same sound is percieved as full volume when shooting unsilenced, but with the silencer attached it's only percieved at having half of the volume compared to unsilenced one. And this IS the EXACT same sound for both. See my point? We don't HAVE TO anymore use the volume variable in the ltx's, this does the same trick without the loss of actual volume in the soundfile.
Now to tweak the footsteps, I always wondered what was the point, that
while sprinting your footsteps were percieved as louder than an actual gunshot.
  22:37:15  9 March 2008
profilee-mailreply Message URLTo the Top
ket
Senior Resident
 

 
On forum: 01/13/2006
Messages: 1432
You know, I think GSC would be better off hiring a bunch of us to do their games.. at least while we may take the same kind of timescale they did, WE would actually get it right
  22:43:48  9 March 2008
profilee-mailreply Message URLTo the Top
Kanyhalos
Level ?? Demon (Boss)
(Resident)

 

 
On forum: 01/26/2007
Messages: 6527
pgeek check your mail pls
 
Each word should be at least 3 characters long.
Search:    
Search conditions:    - spaces as AND    - spaces as OR   
 
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
 

All short dates are in Month-Day-Year format.


 

Copyright © 1995-2022 GSC Game World. All rights reserved.
This site is best viewed in Internet Explorer 4.xx and up and Javascript enabled. Webmaster.
Opera Software products are not supported.
If any problem concerning the site functioning under Opera Software appears apply
to Opera Software technical support service.