- Auto-spawns jukeboxes on round_start.
- Admin command to spawn jukeboxes aligned to the wall and floor.
- Positions and angles based on a config (Attached below is a config with jukeboxes on every Valve map).
- Triggers a horde when track #4 is played.
- The jukebox plays a max of 7 tracks, the last 2 rarely play.
- Please note: Each jukebox creates 18 entities within the game. Maximum of 10 jukeboxes allowed (recompile for more).
- Please note: Sounds which loop will do so forever until you change track or use !jukestop.
Custom Tracks and Spawn Config:
- 8bit - for the idea.
- Mr.RuyC and NanX - For helping test the plugin on their server.
- Zuko & McFlurry for source code (full credits inside the source).
- The config is saved to l4d2_jukebox_spawns.cfg in your servers \addons\sourcemod\data\ folder.
- The position and angles for each jukebox are saved in a key value structure.
- Each map has it's own section (as seen below for Dead Center)
- Simply put "track#" (where # is 1-7 for the track to change or 1-64) followed by the soundscape name in quotes.
- Soundscape names can be found in the .snd files in your games \reslists\ folders.
Map Specific overrides:
When a jukebox is created, it will first check for 7 map specific tracks. In the example below "track1" is a map specific override within the "c1m1_hotel" section so that track will be loaded on that map.
"main" keyvalue tracks:
You can specify 7 tracks in the "main" section which force the specified track and track number on all maps. In the example "track4" will be the same on all maps while the rest could be random.
"random" keyvalue tracks:
Specifying "track1" to "track7" will override the relative original Valve track. This is how you would remove certain Valve default tracks from playing. Leaving 1 to 7 blank will allow them to play. To give the jukebox a wider selection of tracks, add them from "track8" onwards.
"angle1" "-0.000000 90.000000 0.000000"
"origin1" "412.860748 5683.539062 2880.000000"
"angle2" "-0.000000 90.000000 0.000000"
"origin2" "1854.047729 4510.630859 1216.031250"
Valve orignial tracks
// All players
sm_jukenext // Changes track on the closest jukebox, must be near by.
sm_jukestop // Stops the music playing from all jukeboxes.
// Admins only (requires "z" flag)
sm_juke // Spawns a jukebox where your crosshair is pointing (attempts to align with walls and floor).
sm_jukebox // Same as above, but saves the origin and angle to the jukebox spawns config.
sm_jukedel // Deletes the jukebox you are pointing at (point near the top above the menu).
sm_jukewipe // Removes all the jukeboxes in game and deletes the current map from the config.
sm_jukelist // Lists all the Jukeboxes on the current map and their locations.
sm_juketracks // Lists all the tracks read from the config and shows which will be playing.
Saved to l4d2_jukebox.cfg
in your servers \cfg\sourcemod\
// 0=Plugin off, 1=Plugin on.
// Create a panic event on these gamemodes when track #4 plays. Separate by commas (no spaces). "" = all.
// Display a chat message when the horde is triggered by track #4.
// How many seconds after track #4 plays before triggering a horde.
// -1=Infinite, 0=Off. Specify how many times a panic event may occur when track #4 plays.
// Turn on the plugin in these game modes, separate by commas (no spaces). (Empty = all).
// Turn off the plugin in these game modes, separate by commas (no spaces). (Empty = none).
// Turn on the plugin in these game modes. 0=All, 1=Coop, 2=Survival, 4=Versus, 8=Scavenge. Add numbers together.
// Jukebox Spawner plugin version.
- Fixed "IsAllowedGameMode" from throwing errors when the "_tog" cvar was changed before MapStart.
- Converted plugin source to the latest syntax utilizing methodmaps. Requires SourceMod 1.8 or newer.
- Removed Sort_Random work-around. This was fixed in SourceMod 1.4.7, all should update or spawning issues will occur.
- Added cvar "l4d2_jukebox_allow" to turn the plugin on and off.
- Added cvar "l4d2_jukebox_modes" to control which game modes the plugin works in.
- Added cvar "l4d2_jukebox_modes_tog" same as above.
- Removed max entity check and related error logging.
- Small changes and fixes.
- Added Jukeboxes to these maps: Crash Course, Dead Air, Death Toll, Blood Harvest, Cold Stream.
- Added command "sm_juketracks" to list tracks read from the config and which will play.
- Changed command "sm_jukelist" to list all Jukebox positions on the current map.
- Creates Jukeboxes when the plugin is loaded and removes when unloaded.
- Fixed "l4d2_jukebox_modes_disallow" cvar not working all the time.
- Fixed sm_jukestop not working.
- Fixed no tracks loading if a "random" section was not specified. Valve default tracks will be loaded into the "main" section.
- Fixed PrintToChatAll() error.
- Added a "main" section to the keyvalue config which sets a specific track to a specific number for all maps.
- Added a "random" section to the keyvalue config. Tracks will be randomly be selected from here.
- Added cvar "l4d2_jukebox_horde_notify" to display a hint when the jukebox triggers a horde.
- Added command "sm_jukelist" to display a list of randomly selected tracks as well as the override, random and main tracks loaded.
- Added a check to avoid spawning footlockers when there are too many entities.
- Added Jukeboxes to saferooms in the the Cold Stream campaign.
- Changed sm_juke and sm_jukebox to spawn jukeboxes with specified tracks from the "main" and "random" sections and uses overrides for that map if available.
- Limited sm_jukenext and sm_jukestop to survivor team and admins with 'z' flag only.
- Initial release.
Updating from 1.4 or older:
- Click "Get Plugin" and put the .smx file into your servers \addons\sourcemod\plugins\ folder.
- Optionally download "l4d2_jukebox_spawns.cfg" and save to your servers \addons\sourcemod\data\ folder. This has jukeboxes saved on every Valve map.
- New cvars have been added: use the Cvar Configs Updater, or delete the old cvars config or manually add them.