ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
Inserting sounds?

Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  19:24:35  1 December 2014
profilee-mailreply Message URLTo the Top
optical_illusion
Senior Resident
 

 
On forum: 02/09/2013
Messages: 176
Inserting sounds?

I want to insert the Russian sound of the Military megafon in Shoc. I have the Russian gamedata folder.

Also is it possible to insert the clear sky megafon sound (gamedata/sound/commandir_megafon" I know where its located but how would they loop?
  20:12:11  1 December 2014
profilee-mailreply Message URLTo the Top
Darkh4
Senior Resident
 

 
On forum: 04/01/2007
Messages: 1177
The megaphone and radio sounds are controlled by sound_theme.script.

If you simply want to replace files with other sound files of the same name, and you know the location of those files it is a simple matter of replacing them. You just have to make sure they are in the exact same place and have the exact same name.

If you want to add additional sound files, you need to find the section of sound_theme.script that handles the sound for that scenario, and add extra lines that include the path to the new sound files.

For example, when I wanted to add the radio music from Stalker Complete to my otherwise vanilla game, first I took the files and installed them in sounds\characters_voice\scenario\bar\radio_music. The files were named bar_music_1, bar_music_2, etc.

Then I extracted the sound_theme.script file from my game, and went to the section called
ph_sound_themes["radio_music"].

From there it just a matter of entering additional paths to each file, following the format there. For example "characters_voices\\scenario\\bar\\radio_music\\bar_music_1",.

I believe sounds from Clear Sky should work, though I've never tried it myself. Everything called out in the sound_theme.script will be included in the random loop.
  04:44:33  2 March 2015
profilee-mailreply Message URLTo the Top
Daemonion
All About Audio
(Resident)

 

 
On forum: 09/27/2011
 

Message edited by:
Daemonion
03/02/2015 4:46:57
Messages: 567

---QUOTATION---
I want to insert the Russian sound of the Military megafon in Shoc. I have the Russian gamedata folder.

Also is it possible to insert the clear sky megafon sound (gamedata/sound/commandir_megafon" I know where its located but how would they loop?
---END QUOTATION---


Sorry for the late reply. Not sure if you still need help or not, but here it is if you want it

First, you are going to need access to a few scripts, as you'll be editing them. It'd also be nice to have the original "megafon" audio files to reference, so you know what they are called and which ones you want to replace. I'd recommend either unpacking the entire gamedata files yourself, though it sounds like you might already have the Russian gamedata?

Get started with the sound_theme script here:

gamedata\scripts\sound_theme.script



Open up this file and you'll find the sounds of the commander speaking in Cordon here:

ph_snd_themes["humor"] = {  "characters_voice\\scenario\\escape\\comandir_megafon_1",
						"characters_voice\\scenario\\escape\\comandir_megafon_2",
						"characters_voice\\scenario\\escape\\comandir_megafon_3",
						"characters_voice\\scenario\\escape\\comandir_megafon_4",
						"characters_voice\\scenario\\escape\\comandir_megafon_5",
						"characters_voice\\scenario\\escape\\comandir_megafon_6",
						"characters_voice\\scenario\\escape\\comandir_megafon_7",
						"characters_voice\\scenario\\escape\\comandir_megafon_8",
						"characters_voice\\scenario\\escape\\comandir_megafon_9",
						"characters_voice\\scenario\\escape\\comandir_megafon_10",
						"characters_voice\\scenario\\escape\\comandir_megafon_11",
						"characters_voice\\scenario\\escape\\comandir_megafon_12",
						"characters_voice\\scenario\\escape\\comandir_megafon_13",
						"characters_voice\\scenario\\escape\\comandir_megafon_14",
						"characters_voice\\scenario\\escape\\comandir_megafon_15",
						"characters_voice\\scenario\\escape\\comandir_megafon_16",
						"characters_voice\\scenario\\escape\\comandir_megafon_17"
	                        }	


Here:

ph_snd_themes["epic"] = { "characters_voice\\scenario\\escape\\megafon_1",
						"characters_voice\\scenario\\escape\\megafon_2",
						"characters_voice\\scenario\\escape\\megafon_3",
						"characters_voice\\scenario\\escape\\megafon_4"
	                        }  


Here:

ph_snd_themes["music"] = {  "characters_voice\\scenario\\megafon\\megafon_music_1",
	                        "characters_voice\\scenario\\megafon\\megafon_music_2",
	                        "characters_voice\\scenario\\megafon\\megafon_music_3"
	                        }


Here:

ph_snd_themes["music"] = {  "characters_voice\\scenario\\megafon\\megafon_music_1",
	                        "characters_voice\\scenario\\megafon\\megafon_music_2",
	                        "characters_voice\\scenario\\megafon\\megafon_music_3"
	                        }


And, lastly, the siren:

ph_snd_themes["siren"] =  { "ambient\\siren2" }



You'll notice that the location of the audio files are given to you. For example, characters_voice\\scenario\\megafon\\megafon_music_2 references the exact location of megafon_music_2 in the gamedata directory. Again, to see these audio files, you'll most likely need the entire gamedata unpacked, or an unpacked Russian version.

All of these sounds are triggered by in-game logic that is baked into the megafon object via the All.Spawn. If you want to change the logic of how the sounds are looped, then you will have to either edit the all.spawn or, more easily, open the Cordon in the Level Editor SDK, click on the actual megaphone at the military camp, and view the logic. I edited the logic directly so that it references a .ltx file instead.

Here is a picture of some logic I edited in the Level Editor to point to an .ltx file: http://i.imgur.com/t8VtM.jpg (look in the custom_data field).

Here is the logic in the .ltx file I made of the commander megaphone at the military camp to show you how it works:
[logic]
active = ph_sound@humor
on_hit = hit

[ph_sound@humor]
snd = humor
on_info = {+esc_blockpost_alarm} ph_sound@alarm
on_info2 = {=esc_blokpost_night} ph_idle
on_info3 = {+esc_commander_die} ph_sound@epic_alone
on_signal = sound_end|ph_idle@wait
on_info4 = {+esc_matugalnik_off} nil

[ph_idle@wait]
on_timer = 10000| ph_sound@epic
on_info2 = {+esc_matugalnik_off} nil

[ph_sound@epic]
snd = epic
on_info = {+esc_blockpost_alarm} ph_sound@alarm
on_info2 = {=esc_blokpost_night} ph_idle
on_info3 = {+esc_commander_die} ph_sound@epic_alone
on_signal = sound_end|ph_idle@wait2
on_info4 = {+esc_matugalnik_off} nil

[ph_idle@wait2]
on_timer = 10000| ph_sound@humor
on_info2 = {+esc_matugalnik_off} nil

[ph_sound@alarm]
snd = alarm1
on_info = {+esc_blockpost_normal +esc_commander_die} ph_sound@epic_alone
on_info2 = {+esc_blockpost_normal -esc_commander_die} ph_sound@humor
on_info3 = {+esc_matugalnik_off} nil

[ph_idle]
on_info = {+esc_blockpost_alarm} ph_sound@alarm
on_info2 = {!esc_blokpost_night -esc_commander_die} ph_sound@humor
on_info3 = {!esc_blokpost_night +esc_commander_die} ph_sound@epic_alone
on_info4 = {+esc_matugalnik_off} nil

[ph_sound@epic_alone]
snd = epic
on_info = {+esc_blockpost_alarm} ph_sound@alarm
on_info2 = {=esc_blokpost_night} ph_idle
on_signal = sound_end|ph_idle@wait3
on_info3 = {+esc_matugalnik_off} nil

[ph_idle@wait3]
on_timer = 30000|ph_sound@epic_alone
on_info = {+esc_matugalnik_off} nil

[hit]
on_info = %+esc_matugalnik_off%



So, in closing, you can either replace the sounds shown in the sound_theme.script and keep the logic as is, or you can open up the logic (all.spawn or level editor SDK) and change the logic yourself. Good luck!
 
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-2021 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.