Members Online»
0 Active | 99 Guests
Online:
|
LATEST FORUM THREADS»
by StrYdeR
Posts: 3 / 163 The Future of MODSonline
In The News by KAZAM3766
Posts: 1 / 516 CoD: Battle Royale
CoD+UO Map + Mod Releases by morgawr
Posts: 1 / 2587 Damaged .pk3's
CoD Mapping by lazygit
Posts: 1 / 3100 heli to attack ai
CoD4 SP Mapping by DrBiggzz
Posts: 11 / 992 New Cod UO Rifle Mod.
CoD Mapping |
Polls»
|
How to add custom sound and music in a Left 4 Dead 2 map.
It is recommended to start with at least the following:
The following file types and specifications have been known to work:
There are a lot of great free and trial third-party programs for audio conversion.
First convert the audio file to a file type and specification that you may consider to work (or use the recommended specs). In most cases, it's just copying over audio files or embedding them.
.MP3 sound files will play in-game if they are added in the sound/music/ folder and do not need to be embedded to work in-game or when shipping a VPK.
During development, a custom .WAV file can be played on a test computer without the need to embed it within . This is done by updating the sound cache via console:
snd_updateaudiocache
The in-game menu will freeze up temporarily and will eventually output results regarding the sound cache update.
Custom .WAV files should be embedded in a BSP when shipped as a VPK. The files can be placed anywhere within the BSP, preferably under the sound folder for the internal path. Third-party tools like Pakrat currently do not work with L4D2 BSP files.
Create a list of files you would like to embed C:Program FilesSteamsteamappscommonleft 4 dead 2bin.txt:
internal_pathfile1
external_pathfile1
internal_pathfile2
external_pathfile2
...
materials/metal/new_steel.vmt
. C:UsersPublicour_mapsmaterialsmetalnew_steel.vmt
. cd C:Program FilesSteamsteamappscommonleft 4 dead 2bin
bspzip -addlist
bspzip -addlist -game "C:Program FilesSteamsteamappscommonleft 4 dead 2left4dead2"
Open with a text editor.
Soundscript Entries
An entry can be played in-game via console or entity, such as ambient_generic or ambient_music. An example entry:
entry.name
{
channel CHAN_AUTO
volume VOL_NORM
pitch PITCH_NORM
soundlevel SNDLVL_NORM
wave common/null.wav
}
If a value has a space or tab character within it, wrap it in "quote marks".
Ambience.Siren
{
channel CHAN_WEAPON
volume VOL_NORM
pitch PITCH_NORM
soundlevel SNDLVL_NORM
wave siren1.wav
}
Arbitrary.Song
{
channel CHAN_AUTO
volume VOL_NORM
pitch PITCH_NORM
soundlevel SNDLVL_NORM
wave music/singalongsong.wav
}
Foo.Song_mp3
{
channel CHAN_STATIC
volume VOL_NORM
pitch 100
soundlevel SNDLVL_NORM
wave music/songalongdong.mp3
}
map
playgamesound entry.name
stopsound
StopSound
. Ambient_music does not have this flag, but it is not necessary.map
ent_fire PlaySound
stopsound
All official in-game sound effects, vocalizations, and music rely on soundscripts to tweak the sound to the correct channels, volume, pitch, etc. With maps/ , you can customize those entries without causing conflicts with other addons and the official campaigns. Simply copy the entries you would like to change to the per-map soundscript.
Soundscript entries can be found in the scripts/game_sounds_*.txt folder by opening pak01_dir.vpk with GCFScape.
A lot of music entries rely on Map Properties, Post-Fix String and nav mesh attributes. For example, the Post-Fix String of the map c5m1_waterfront.bsp is "BigEasy" and it plays its style of intro music in-game, where the nav mesh is marked PLAYER_START
and CHECKPOINT
.
They're all interesting, but here are a couple of them:
When Valve ever adds or updates any of their sound files, may it be a change in the contents, length, loop position, etc, all they would have to do is include a new soundcache. This is not the case for custom add-ons.
The first time a custom sound is played in-game, /maps/soundcache/_master.cache is updated to include information about the sound file, such as the file location and a small portion of the sound file. Any changes to the sound file requires an update to the sound cache.
During development, the sound cache can be updated using a console command:
snd_updateaudiocache
The in-game menu will freeze up temporarily and will eventually output results regarding the sound cache update.
It would be really inconvenient for users to update their sound cache by console command whenever an add-on shipped with updated sound files. One workaround would be changing the filenames and soundscript entries of updated sound files. You can devise a naming scheme that denotes an updated sound file.
Latest Syndicated News»
Comments: 5
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which... Comments: 5
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ... Comments: 5
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead?
... Comments: 5
Codutility.com up and runn...
It seems to me the like the site is completely dead? Comments: 5
Codutility.com up and runn...
Yeeaahhhh.........
|
Latest Downloads»
OHMY Don Quixote
Call of Duty 2: Maps: Multiplayer (5.76Mb) OHMY Neuburg
Call of Duty 2: Maps: Multiplayer (6.84Mb) OHMY Tebessa
Call of Duty 2: Maps: Multiplayer (7.36Mb) OHMY POW Camp
Call of Duty 2: Maps: Multiplayer (2.15Mb) OHMY Valley
Call of Duty 2: Maps: Multiplayer (5.7Mb) |
Partners & Friends»
|
Site Links and Information
|
Partners
|
Friends
|
Copyright © MODSonline LLC
Tresware Content Management System © 2011
Website Designed by LKFX and Developed by Tresware