Left 4 Dead 2

Left 4 Dead 2

Not enough ratings
Making a Music Playlist
By Richard
You will learn how to create a custom in-game play list after reading this guide in just a few steps!
   
Award
Favorite
Favorited
Unfavorite
Intro

This is a simple tutorial I made for creating custom play list in game.

Skills
  • Knowledge with navigating through folders and files.
  • Enabling and opening console.
  • L4D2 Authoring Tools installed(unless you can create VPK without them). Otherwise this wont work if you cannot create VPK files.

Advantages
* You don't have to waste ram and run other players that consume power and memory. This means no slow performance or overheat.
* You can control when to play a new song.
* The volume is always adusted to match the game. Making things smoother.
Configure Music Play Button
Copy and paste the code below to your autoexec.cfg file. This registers the number of tracks you want to play to the "n" key.

alias track1 = Name of track.
"play mymusic/1.mp3; = file path/song
alias next track2" = next song.

alias next track1" = Should always be placed at the last track so it loops back to the top.

//MUSIC
alias next "track1"
alias track1 "play mymusic/1.mp3; alias next track2"
alias track2 "play mymusic/2.mp3; alias next track3"
alias track3 "play mymusic/3.mp3; alias next track4"
alias track4 "play mymusic/4.mp3; alias next track5"
alias track5 "play mymusic/5.mp3; alias next track1"
bind "n" "next"

Create a sound cache
To create a sound cache you need to go to your addons folder of your l4d2 game folder. There you will create a folder named "sound" and a sub folder inside the "sound folder" called "mymusic". Your songs will go in the mymusic folder renamed with numbers.

* Are extra help.

1) Navigate to your addons folder.
* My path is C:\Program Files (x86)\Steam\steamapps\common\Left 4 Dead 2\left4dead2\addons
* Right click your "Left 4 Dead 2" desktop icon and select "open file path location" to be navigated to "Left 4 Dead 2" folder. From there click "left4dead2" then "addons".
* If you don't have a "Left 4 Dead 2" desktop shortcut/icon then open steam and click library. Right Click "Left 4 Dead 2" game on the left panel and select "Create Desktop Shortcut". You can just search your game as well if you have too many games.

2) Create a new folder and name it "sound".

3) Open "sound" folder and create a new folder inside it named "mymusic".

4) Place all your songs there.

5) Rename your 5 songs 1.mp3 to 5.mp3.

6) Start "Left 4 Dead 2" and in the console copy & paste "snd_buildsoundcachefordirectory addons/sound".

7) Type "exit" to quit once it says finish in the console.

8) Go back to the "sound" folder and you should see "sound.cache" file. This file contains the paths to the music files.

9) Create a new folder called "root" and add the "sound" folder inside.

10) Go to your "bin" folder and drag the root folder on the "vpk" file to create a vpk file. Make sure none of your addons vpk aren't named root if you are a modder. If not then you should only have workshop folder.
* Path: C:\Program Files (x86)\Steam\steamapps\common\Left 4 Dead 2\bin

11) Launch game and press n.
Custom Music Playlist Add-On
If you are having problems then subscribe to this add-on to get you started.

Custom Music Playlist:
http://steamproxy-script.pipiskins.com/sharedfiles/filedetails/?id=751296741

It's basically everything done here. The difference between making your own and using mine is that you wont have sound issues and your song length can be higher than 4 minutes.
Extra
Adding More Tracks
To add a new track:
1) Change:
alias track5 "play mymusic/5.mp3; alias next track1"
To
alias track5 "play mymusic/5.mp3; alias next track6"

Explanation:
This will tell the program that there is a 6th track instead of going back up the list. All you did was change the last number into a 7.

2) Add the 6th track below the 5th track:
alias track6 "play mymusic/6.mp3; alias next track1"

Explanation:
"alias track6" is the name of the new track that the 5th track is calling. "alias next track1" will call the first track again so it loops.

Example:
alias track4 "play mymusic/4.mp3; alias next track5"
alias track5 "play mymusic/5.mp3; alias next track6"
alias track6 "play mymusic/6.mp3; alias next track7"
alias track7 "play mymusic/7.mp3; alias next track1"

MP3 in game folder instead of VPKS
I think it's better if you do not package the MP3's as it's more efficient if your PC calls the songs from the game folder instead. You don't even need the MP3 in VPK files anyways.

1) From the addons folder move up one directory. Basically you should be at "left4dead2" folder again. My path: C:\Program Files (x86)\Steam\steamapps\common\Left 4 Dead 2\left4dead2
2) Open "sound" folder
3) Drag your "mymusic" folder there.

And you're good to go.
1 Comments
the law 25 Jan, 2020 @ 6:44pm 
aight