The L.U.R.K. team wants to provide the best possible experience from Stalker: Shadow of Chernobyl, we don't plan to skew the scope of this game, because I, like many others, fell in love with the game because of the story, the realistic gameplay, and the atmosphere. I plan to preserve and improve on that concept to the best of my abilities, and our team has vowed to do so as well. Which is why we took it upon ourselves to provide that experience. We want to fulfill a niche that's otherwise unfulfilled in the modding community. We want to bring as many features to Stalker without damaging or changing the original theme of the game. While improving upon that concept with features that were dropped off the development cycle from GSC, such as stealth AI, and a strong foundation for balance, as well as dynamic A-Life, and an unprecedented visual presentation that no other Stalker Overhaul can touch.
Daemonion shows how to get stereo audio working within the older SoC XRay engine. These changes are included in LURK 1.2.
Posted by Daemonion on Oct 18th, 2012
Basic Client Side Coding.
Why go to the trouble of making stereo audio work?
Shadow of Chernobyl is filled with audio that only plays in mono. While mono has it's uses, a game world needs stereo audio, as well, in order to feel complete. Only using mono, by itself, gives a very compressed feeling.
Mono is good for:
- 3D position sounds (static sound sources in XRay)
- Dialogue directly from an NPC- Environmental "one-shot" sounds (dogs barking, etc)
- Weapon mechanical noises (reloading, the bolt cycling, etc)
Stereo is good for:
- Environmental ambiance (wind, crickets, rain)
- Weapon reports/reverberation (the reflections off the environment)
- Encompassing effects
When using these together, you can create a very full sound stage. As the lead audio designer for LURK 1.2, I knew I had to get stereo audio working in SoC.
To illustrate the differences, give these a listen.
Now you see why I went to the trouble :)
Stereo files are made up of a left channel and a right channel. Mono has only a center channel. A stereo file is a combination of these left and right channels.
SoC's XRay engine can't actually use a true stereo file like the Call of Pripyat engine can. When XRay was being made, GSC came up with the idea to use two stereo-separated, mono files affixed with a _l and _r to indicate left or right.
The engine was then supposed to use an algorithm to play a _l file only in the left channel, and a _r file only in the right channel. When played together, this would make it sound as though stereo audio was playing, even though it was just two separate mono tracks.
This never worked, in-game, though. Until now.
**Note you can't just use any old mono track. You need to start with a true stereo file and convert it's left and right channels into separate mono tracks. This way, you have a left channel mono file and a right channel mono file.
You will need to first get your stereo sounds converted to split-track mono .ogg files (don't forget to comment them properly). I use Audacity to split a stereo track into two channel-dependent tracks. To split the tracks:
Make sure to label the left channel track with _l and the right channel track with _r!
You will also need to replace your gamedata/scripts/sr_sound2d.script with my new sr_sound2d.script at the bottom of the post. My changes essentially add these lines of code, which switch to the .s2d function to place each file at particular x,y,z coordinates.
Lastly, you will need a new wrap_oal.dll file, as the left and right channels are swapped with the vanilla .dll, also included at the bottom of the post.
Place this new wrap_oal.dll into your /bin directory
Replace your sr_sound2d.script with this (back up your old file!) or PasteBin