The Game Modding Community - Since 2001

SV_Startsound: file.wav not precached (0)

A Forum Thread for Left 4 Dead 2

Updates

Solution found!
  • 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"
}

}
1y
Different Approach
  • Asking a different question
1y
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?

Posts

  • 2y
    Doktor haus avatar
    Doktor haus username pic Joined 7y ago
    Offline
    Destiny Flag Affiliation: Destiny
    14,813 points Ranked 296th
    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
    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
  • 1y
    RndwaveIsMyFriend avatar
    RndwaveIsMyFriend Joined 2y ago
    Offline
    449 points Ranked 10419th
    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!
  • 1y
    Cyber Moonlight avatar
    Cyber Moonlight username pic Joined 3y ago
    Wandering
    1,916 points Ranked 2683rd
    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
    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!
  • 1y
    RndwaveIsMyFriend avatar
    RndwaveIsMyFriend Joined 2y ago
    Offline
    449 points Ranked 10419th
    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!
  • 1y
    RndwaveIsMyFriend avatar
    RndwaveIsMyFriend Joined 2y ago
    Offline
    449 points Ranked 10419th
    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!

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!
Sign up to access this!

Category

Share

  • Share on Reddit
  • Share on Twitter
  • Share on Facebook
  • Share on Google+

Stats

  • 2,542 Views
  • 5 Posts
  • 2y Submitted
  • 1y Updated

Hey, you! Mascot

GameBanana is one of the oldest mod sites on the net. Sign up and maximize your browsing experience.

  • Subscribe: Get notified of new submissions like this.
  • Say Thanks: Show your appreciation - send modders points.
  • Post: Give modders your thoughts on their work.
  • Vote: Help your favorite modders win monthly awards.
  • Flag: Alert moderators and warn members of problems with mods.
  • Watch: Get notified when mods are updated.

Interested? Sign up now!

Already a Bananite? Login

bcp.crwdcntrl.net tracking pixel