Posted: . At: 8:58 PM. This was 5 years ago. Post ID: 13497
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.



Sponsored



How to edit the all.spawn in Shadow of Chernobyl to add alternate music to a radio.


Editing the all.spawn in Shadow of Chernobyl is fun, this allows the modder to change the game in many ways. I edited it to add alternate music to the radio in Sidorovitch`s bunker. Use the S.T.A.L.K.E.R. *.spawn compiler/decompiler to work with all.spawn files.

This is the existing entry for the radio. I changed it to use the sound_theme.script to define a set of music files to play from the radio. Make sure the files are in ogg format, and are mono, 44100 KHZ files and 16 bit PCM. Audacity is the best editor for working with sound.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
[2435]
 
; cse_abstract properties
section_name = physic_object
name = trader_pribor_0002
position = -245.461166381836, -23.9442577362061, -133.349502563477
direction = 0, -0.0872577428817749, 0
id = 65535
version = 118
script_version = 6
spawn_id = 3976
 
; cse_alife_object properties
game_vertex_id = 0
level_vertex_id = 594270
object_flags = 0xfffffffa
custom_data = <<END
[collide]
ignore_static
[logic]
active = ph_sound1
 
[ph_sound1]
snd = sidor_music_day
END
 
; cse_visual properties
visual_name = physics\decor\priemnik_gorizont
 
; cse_ph_skeleton properties
skeleton_name = 
 
; cse_alife_object_physic properties
physic_type = 0x3
mass = 10
fixed_bones = link
 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

This is the entry in the sound_theme.script in gamedata\scripts.

ph_snd_themes["sidor_music_day"] = {"characters_voice\\scenario\\esc\\sidor_music_1",
                                    "characters_voice\\scenario\\esc\\sidor_music_2",
                                    "characters_voice\\scenario\\esc\\sidor_music_3",
                                    "characters_voice\\scenario\\esc\\sidor_music_4",
                                    "characters_voice\\scenario\\esc\\sidor_music_5",
                                    "characters_voice\\scenario\\esc\\sidor_music_6",
                                    "characters_voice\\scenario\\esc\\sidor_music_7",
                                    "characters_voice\\scenario\\esc\\sidor_music_8",
                                    "characters_voice\\scenario\\esc\\sidor_music_9",
                                    "characters_voice\\scenario\\esc\\sidor_music_10",
                                    "characters_voice\\scenario\\esc\\sidor_music_11",
                                    "characters_voice\\scenario\\esc\\sidor_music_12",
                                    "characters_voice\\scenario\\esc\\sidor_music_13",
                                    "characters_voice\\scenario\\esc\\sidor_music_14",
                                    "characters_voice\\scenario\\esc\\sidor_music_15"
                                    }

This is from OGSE I think, I am glad I could work this out. The existing music plays from a file in the sounds\scripts\magnitofon\magnitofon_2.ogg file I replaced this with a blank file instead of editing the level.snd_static file in gamedata\levels\l01_escape again. This way, I can control the music playlist on the trader`s radio and add more atmosphere. So, this is how it is done. This might help out a modder out there who wants to make a mod for SoC.

I have also added Bandit radio to the Dark Valley. There is only one radio object in the map, and therefore, it is Borov`s radio, I can add a sound theme to this as well.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
[725]
 
; cse_abstract properties
section_name = physic_destroyable_object
name = val_physic_destroyable_object_0015
position = 32.4231986999512, 5.56226015090942, -87.2135696411133
direction = 0, -3.23640084266663, 0
id = 65535
version = 118
script_version = 6
spawn_id = 7294
 
; cse_alife_object properties
game_vertex_id = 811
level_vertex_id = 316473
object_flags = 0xffffff3a
custom_data = <<END
[collide]
ignore_static
[logic]
active = ph_sound1
 
[ph_sound1]
snd = radio_music_bandit
END
 
; cse_visual properties
visual_name = physics\decor\priemnik_gorizont
 
; cse_ph_skeleton properties
 
; cse_alife_object_physic properties
physic_type = 0x3
mass = 10
 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Just press Control-F in Notepad++ and search for “physics\decor\priemnik_gorizont” to find a radio to use.


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.