Ru/Soundscape
Саундскейп - это вид звукового сценария, который создает атмосферу в игре. На карте их может быть любое количество, при этом сетевой трафик не генерируется . Саундскейпы используют смесь из зацикленных и произвольно воспроизводимых звуков, каждый из которых может быть присвоен одному из восьми указанных мест; также задействуется профиль DSP.
Одновременно может работать только один саундскейп, а его отдельные звуки не могут управляться с помощью входов. Когда игрок активирует следующий саундскейп, игра создает плавный переход между звуками от одного к другому.
Просмотр саундскейпов
Как правило, саундскейпы находятся в папке игры game abbreviation\scripts\
, и хранятся в нескольких текстовых файлах с именами soundscapes_map name.txt
. (Они запакованы в оригинальные игры Valve, но автоматически переназначаются и распаковываются в папку, где запускается карта.)
В свою очередь, все они перечислены в файле game abbreviation\scripts\soundscapes_manifest.txt
.
В нижней части этой статьи вы найдете ссылки на саундскейпы отдельных игр, наряду с попытками их описания.
Все имеющиеся саундскейпы вы можете прослушать непосредственно в игре, используя консольную команду PlaySoundscape
. После ввода символов команды, выпадет список саундскейпов, который можно прокручивать стрелочками.
Конфигурирование саундскейпов
Саундскейпы могут кофигурироваться только через эти энтити:
Есть другие энтити, которые активируют саундскейпы, но только эти две фактически определяют свойства звукового оформления. Другие энтити могут указывать на них и включать удаленно. Всякий раз, когда энтити активируют саундскейп, воспроизводится позиционный звук в соответствии с заданными свойствами. Template:Tip:ru
Активация саундскейпов
Саундскейпы активируются игроком или программно. Они работают до тех пор, пока не сменится карта или их не отключит другой саундскейп. Template:Tip:ru
Сущности саундскейпов
Саундскейпы активируются любой из следующих сущностей:
- env_soundscape
- env_soundscape_triggerable (в свою очередь активируется trigger_soundscape.)
- env_soundscape_proxy (в свою очередь активируется env_soundscape или env_soundscape_triggerable.)
Саундскейпы основаны на точке, но включаются, когда игрок входит в сферу их действия и находятся в зоне прямой видимости.
Два исключения из этого правила - env_soundscape_proxy (вызываемый через env_soundscape или env_soundscape_triggerable), и env_soundscape_triggerable (обычно вызываемый trigger_soundscape).
Всегда активен только один саундскейп, но если одновременно срабатывают несколько саундскейпов, то приоритет отдается ближайшему. (Радиус саундскейпа всегда имеет приоритет над брашами trigger_soundscape.)
Обратите внимание, что саундскейп не остановит воспроизведение звука, если игрок выйдет из радиуса его действия или прямой видимости.
Soundscape Placement
At first, a good rule is to place only as many soundscapes as you absolutely need. Try to choose from a similar set of soundscapes to be played, and then pick one that will be your primary soundscape. After that, place your secondary soundscapes at every contrasting location (e.g. house, generator room). Make sure that every location with localized sound effects has its own master soundscape that is tied to the proper targets.
Once you've gotten a general idea of where your soundscapes will be located, you'll then be able to start adding/configuring the entities that will trigger your soundscapes and create a kind of blueprint for how soundscapes will flow from one to another. In many cases, you'll be placing entities that block off all exits from your contrasting locations with triggers to your primary soundscapes. Basically, the goal is to anticipate the player's movement throughout the map, and to block off each area in such a way that it will always have the proper soundscape activated.
After your flow is organized, you'll be able to specialize your soundscapes/triggers to behave in complex ways (e.g responding to game events).
Custom Soundscapes
Creation
Soundscape scripts are very similar to soundscripts, but still remain entirely different things.
Soundscapes require a few of their own rules, and are placed in plain text files that are separate from normal soundscript files. A typical soundscape file might be named soundscape_mall.txt
and may contain anywhere from 5-30 different soundscapes that take on the following format...
<name> { <rule> { <keyvalue> ... } ... }
Common keyvalues
wave <string>
- The path and filename of the sound to play, relative to
game\sound\
. volume <normal>
- 1 is full power, 0 is silent.
pitch <integer>
- Percentage value. +/-30 is the useful range.
position <0-7>
- One of eight locations in the world (defined by the mapper) from which a sound can be emitted.
position random
- As above, but the sound emits from a completely random location near the player.
attenuation <float>
- How quickly the sound's volume drops as the camera moves away from it. Only relevant with a
position
specified.Нужно сделать: What are the rules? soundlevel <string>
- Can be used instead of
attenuation
. Accepts one of the engine's pre-set values.

Randomized values
Some rules accept 'upper' and 'lower' parameter values. For example:
"pitch" "80,120"
Whenever the rule is executed the value will be randomly selected within the given range.
Rules
playlooping
Plays a sound constantly. Does not allow random values.

"playlooping" { "volume" "0.98" "pitch" "110" "soundlevel" "SNDLVL_85dB" "position" "0" "wave" "ambient/swamps/water_Lap_loop_st.wav" }
playrandom
Plays a sound after given number of seconds. Allows random values.
Playrandom requires all wave
KVs to be inside rndwave
(even if there is only one). A random selection will be made every time the rule is executed.

"playrandom" { "time" "1,4" "volume" "0.4,1" "pitch" "90,105" "soundlevel" "SNDLVL_85dB" "position" "0" "rndwave" { "wave" "ambient/wind/wind_med1.wav" "wave" "ambient/wind/wind_hit1.wav" } }
playsoundscape
Plays a complete soundscape. DSP presets in the 'sub-scape' are ignored.
name
- Name of the soundscape to play.
position <int>
- Offsets each position index of the sub-scape. Нужно сделать: What does that mean?
positionoverride <int>
- Forces all positioned sounds in the sub-scape to emit from one location.
ambientpositionoverride <int>
- Forces all unpositioned (i.e. ambient) sounds in the sub-scape to emit from one location.
"SubScape" { "playsoundscape" { "name" "GenericIndoor" // Overall sub-scape volume to 50% "volume" "0.5" // Emit all positioned sounds from position 0 "positionoverride" "0" // Emit all ambient sounds from position 1 "ambientpositionoverride" "1" } }
dsp
Overrides the current DSP preset (which would otherwise be derived from the $surfaceprop of nearby materials).
For a list of values, open scripts\dsp_presets.txt
. You may need to extract this from the relevant engine GCF with GCFScape. To preview a DSP preset, submit room_type <int>
to the console.


dsp_volume
to define how loud the dsp effect is.// Disable DSP and play no ambient sounds "Empty" { "dsp" "0" "dsp_volume" "1" }
soundmixer
Selects a custom soundmixer. Soundmixers manage the priority and volume of groups of sounds; create new ones in scripts\soundmixers.txt
(ALWAYS use Default_Mix as a template).
"quiet" { "soundmixer" "Citadel_Dialog_Only" ... }
Example
"swamp.water.slow" { "dsp" "1" "playlooping" { "volume" "0.98" "pitch" "110" "soundlevel" "SNDLVL_85dB" "position" "0" "wave" "ambient/swamps/water_Lap_loop_st.wav" } "playrandom" { "time" "1,4" "volume" "0.4,1" "pitch" "90,105" "soundlevel" "SNDLVL_85dB" "position" "1" "rndwave" { "wave" "ambient/wind/wind_med1.wav" "wave" "ambient/wind/wind_hit1.wav" } } }
Looping MP3 Files E.G.
//////////// Outside bird sounds (loop mp3 sound file trick by gtamike_TSGK) ////////////
//////////// The 2 .mp3 files are the same as each other just not the same file name ////////////
//////////// MP3 Sound file runtime 3.29mins = 3 X 60 + 29 = 209secs ////////////
// mp3_loop
"mp3_loop"
{
"dsp" "1"
"playlooping"
{
"volume" "1.0"
"pitch" "100"
"soundlevel" "SNDLVL_150dB"
"wave" "loop_mp3_soundscape/outside_1MB_20KB_part_1.mp3"
}
"playrandom"
{
"time" "209"
"volume" "1.0"
"pitch" "100"
"soundlevel" "SNDLVL_150dB"
"rndwave"
{
"wave" "loop_mp3_soundscape/outside_1MB_20KB_part_1.mp3"
"wave" "loop_mp3_soundscape/outside_1MB_20KB_part_2.mp3"
}
}
}

Storing and using custom soundscapes
The engine uses the soundscapes_manifest.txt
file to find all its soundscapes files.
It will look for this manifest (and typically the soundscapes as well) in the scripts\
folder on map start. Where this folder (and the root of custom soundscapes) is located, depends on whether the game is a modification (created through Create a Mod), or an original Valve game:
- If it's a modification, the engine will look for it in the root folder of the mod.
- If it's an original Valve game, the engine will instead look for it in the games
game abbreviation\
folder. (For example, in the case of Half-Life 2: Episode 1 the engine will look for the manifest in theSteam\SteamApps\user\half-life 2 episode one\episodic\scripts\
folder.) In this case thescripts\
folder has to be created manually, and any customsoundscapes_manifest.txt
found there, will override the original file.
To list a new soundscape in the manifest, simply add the line
"file" "location and file name"
within the curly brackets.
Typically the location and file name will be "scripts/soundscapes_custom map name.txt".


See also
|