SV_Startsound: file.wav not precached (0)

A Forum Thread for Left 4 Dead 2

Updates

ThreadParentSubmitterStats
  • Hahaha, fuck you, game!

Turns out if you use the files that the game won't precache in an event that doesn't happen in that level, the game will suddenly realize it's supposed to use these files and will precache them! Yay!

Example, in c2m1_highway_level_sounds:

//An event that isn't used in this level, but the game still sees it, and will precache the files this event uses.
//This means I can force it to precache files that, for some *REALLY* *FUCKING* *STUPID* reason, it won't otherwise.
"c2m2.carousel_music"

{
"channel" "CHAN_STATIC"
"volume" "1.0"
"soundlevel" "SNDLVL_NONE"

"rndwave"

{
"wave" "WitchSongs/SongOfRuin.wav"
"wave" "WitchSongs/Nick/RuinBomb1.wav"
}

}

And later in the script:

//GRENADE!
"Gambler_Grenade01"

{
"channel" "CHAN_STATIC"
"soundlevel" "SNDLVL_NONE"

"rndwave"

{
"wave" "WitchSongs/SongOfRuin.wav"
"wave" "WitchSongs/Nick/RuinBomb1.wav"
}

}

Solution found! 2y
  • Asking a different question
Different Approach 2y
This message keeps popping up in the console every time the custom sound for the fireworks boxes fails to play. This doesn't appear with any of my other custom sounds, it doesn't matter what the file is called, and it doesn't matter if it's an mp3 or wav. Does anyone know how to precache sound files so I can fix this?
Sign up to access this!

Replies

  • Doktor haus avatar
    Doktor haus username pic Joined 8y ago
    Offline
    Destiny Flag Affiliation: Destiny
    15,193 points Ranked 304th
    26 medals 1 legendary 5 rare
    • Reached 100 subscribers Medal icon
    • 3rd Place - Original Weapons Skinning Contest Medal icon
    • Reached 50 subscribers Medal icon
    • Received thanks 50 times Medal icon
    • 6 years a member Medal icon
    • Returned 1000 times Medal icon
    Doktor haus avatar
    Doktor haus
    Destiny Flag
    Affiliation
    Destiny
    2y
    Enter this console command in game:

    snd_buildsoundcachefordirectory/addons/myfolder

    Replace "myfolder" with the name of your custom addon folder . That generates a sound.cache file in the folder, which should then be packed into a VPK.

    L4D2 modder avatar
    Mantra
    L4D2 modder
    URL to post:
  • RndwaveIsMyFriend avatar
    RndwaveIsMyFriend Joined 3y ago
    Offline
    449 points Ranked 10915th
    2y
    I think I managed to work around it the first time by renaming the file to the one I was replacing and copying the directory path, but that won't work this time.

    There are a handful of audio files that have a chance of playing when Nick says one of his pipe bomb lines. Using the old method would only allow one replacement file per line, which I suspect will grow old fast.

    Currently, I'm only testing 2 per line, one with the voice line included (RuinBombVoice) and one that's just the song (RuinBomb). Interestingly enough, the game will always try to play RuinBombVoice and then give the "sound not precached" error in the console. Forcing it to play RuinBomb instead doesn't show an error in the console, but it is likewise nonfunctional.

    I tried moving the mod folder to addons and using the suggested console command, but got the same results. Does anyone know why this message shows up and how to beat it?
    ALL the sound files!
    URL to post:
  • Cyber Moonlight avatar
    Cyber Moonlight username pic Joined 3y ago
    Wandering
    2,006 points Ranked 2660th
    12 medals 4 rare
    • GameBanana’s Christmas Giveaway 2016 Day Eighteen Winner! Medal icon
    • 8-14 Entries! GameBanana’s Christmas Giveaway 2016 Medal icon
    • Returned 1000 times Medal icon
    • 8-14 Entries! GameBanana’s Christmas Giveaway 2017 Medal icon
    • One month a member Medal icon
    • 2016 Survey Participant Medal icon
    2y
    Posted by RndwaveIsMyFriend

    I think I managed to work around it the first time by renaming the file to the one I was replacing and copying the directory path, but that won't work this time.

    There are a handful of audio files that have a chance of playing when Nick says one of his pipe bomb lines. Using the old method would only allow one replacement file per line, which I suspect will grow old fast.

    Currently, I'm only testing 2 per line, one with the voice line included (RuinBombVoice) and one that's just the song (RuinBomb). Interestingly enough, the game will always try to play RuinBombVoice and then give the "sound not precached" error in the console. Forcing it to play RuinBomb instead doesn't show an error in the console, but it is likewise nonfunctional.

    I tried moving the mod folder to addons and using the suggested console command, but got the same results. Does anyone know why this message shows up and how to beat it?

    You haven't rebuilt your overall sound cache. Enter the game open the console type snd_rebuildaudiocache and wait for it to finish. Note that you cannot do anything while this is working.
    Power core: Online! avatar
    Mantra
    Power core: Online!
    URL to post:
  • RndwaveIsMyFriend avatar
    RndwaveIsMyFriend Joined 3y ago
    Offline
    449 points Ranked 10915th
    2y
    Posted by Evil King Sombra

    You haven't rebuilt your overall sound cache. Enter the game open the console type snd_rebuildaudiocache and wait for it to finish. Note that you cannot do anything while this is working.
    Unfortunately, that didn't work, either. You think maybe it's something that you just can't modify with sound scripts?
    ALL the sound files!
    URL to post:
  • RndwaveIsMyFriend avatar
    RndwaveIsMyFriend Joined 3y ago
    Offline
    449 points Ranked 10915th
    2y
    So, it seems like this could be fixed by precaching the audio files. Problem is, I don't know how to do that, and apparently neither does Google, as my searches have produced no useful results.

    Does anyone happen to know how to precache audio files for a mod of an official campaign, step-by-step?
    ALL the sound files!
    URL to post:

Embed

Share banner
Image URL
HTML embed code
BB embed code
Markdown embed code

Author

Sign up to access this!
Sign up to access this!
Sign up to access this!

Game

Sign up to access this!

Category

Share

  • Share on Reddit
  • Share on Twitter
  • Share on Facebook
  • Share on Google+
  • 3.0k Views
  • 5 Posts
  • 2ySubmitted
  • 2yUpdated

More from Submitter

More Help Threads

bcp.crwdcntrl.net tracking pixel