Left 4 Dead 2

Left 4 Dead 2

Level Background Music Support
 このトピックはピン留めされているので、おそらく重要です
ChimiChamo  [開発者] 2024年4月9日 15時10分
How to make your custom background music.
"Aight ChimiChanga that's all great but how do I actually use this?" - You presumably

This assumes you know the basics of setting up a folder in your addons and how to turn it into a VPK.

First get the actual music files you want and put them in the "sound" folder of your addon directory. Ensure that the music files are UNDER 48000Hz, are .wav files and have loop points set up.

Then create the file with this folder path in your addon directory -> "scripts/vscripts/director_base_addon.nut"
You could call the script differently as long as it isn't mapspawn_addon but the one above will fire automatically.

Now open the file in your text editor of choice, and now to actually set up playing the music. To add a track with a "calm" and "battle" variant put this in the script:
getroottable().ChCh_AddBackgroundMusic(map,calm,angry,consistent)

The "map" bit is the filename of the map to add the music to, setting it to "all_maps" will add the music to all maps.
The "calm" and "angry" bits correspond with the filenames of the "calm" and "battle" versions of the music to play.
The "consistent" bit is a true or false on whether to have the 2 sounds be synced. If set to true, the music will blend into each other at the same position in the track. Having at as false will pause the respective tracks when the other is playing

So say for example I wanted to add 2 consistent tracks located in the directory "sound/music/ultrakill/" for map 2 of Dead Center then I would write:
getroottable().ChCh_AddBackgroundMusic("c1m2_streets","music/ultrakill/4-2 Clean.wav","music/ultrakill/4-2.wav",true)
Make sure not to include "sound" at the start of the filename or else it won't work.

You can also just have 1 track play the whole time without changing like this:
getroottable().ChCh_AddBackgroundMusicSingular(map,angry)

Again, the "map" is for the map filename and "angry" is for the sound to play at all times.

Further functions for customisability are in the "Further Utility Functions" discussion.

And there you go, build a soundcache for your sounds and your music should play in the map you chose.
最近の変更はChimiChamoが行いました; 2024年4月21日 15時33分
< >
1-15 / 22 のコメントを表示
please add support for permanent angry music during crescendo events
ChimiChamo  [開発者] 2024年4月14日 4時47分 
JermaDrink の投稿を引用:
please add support for permanent angry music during crescendo events
theres not really a way to check whether specifically a crescendo is happening, it just checks for whether at least 14 common infected are rushing the survivors + some other stuff. i could add a "force angry" or "force calm" music thing though
ChimiChamo の投稿を引用:
JermaDrink の投稿を引用:
please add support for permanent angry music during crescendo events
theres not really a way to check whether specifically a crescendo is happening, it just checks for whether at least 14 common infected are rushing the survivors + some other stuff. i could add a "force angry" or "force calm" music thing though
that might work, depends on the implementation and whether it functions by ignoring the drop below 14 commons or more than 14 commons rushing the player once the specified music is triggered
最近の変更はbunny buster θΔが行いました; 2024年4月14日 4時51分
alternatively, being able to customize the amount of infected needed to trigger the angry music if possible would be a cool addition since it would prevent issues like what i'm experiencing testing my mod
ChimiChamo  [開発者] 2024年4月14日 4時58分 
JermaDrink の投稿を引用:
alternatively, being able to customize the amount of infected needed to trigger the angry music if possible would be a cool addition since it would prevent issues like what i'm experiencing testing my mod
yeah thats a good idea, ill implement that as well
ChimiChamo の投稿を引用:
JermaDrink の投稿を引用:
alternatively, being able to customize the amount of infected needed to trigger the angry music if possible would be a cool addition since it would prevent issues like what i'm experiencing testing my mod
yeah thats a good idea, ill implement that as well
thank you, it's very much appreciated
ChimiChamo  [開発者] 2024年4月14日 5時19分 
JermaDrink の投稿を引用:
I've added some of the stuff you wanted, it's written about in the new "utility functions" discussion.
Can you do random track shuffle? Like im subscribe to 3 mods. And they gonna play in random sequence if im gonna add command in autoexec.cfg (Of course mod will be loaded as VPK without mod subscribing, because autoexec command will not find command)
It would be logical to add another "transition" when the track switches to "angry" state but with an instrument like "WOOSH" or supercharged with another musical instrument. I saw this mechanic in the recent Project Zomboid update with its music overhaul.
Pc 2024年4月20日 0時19分 
help i novice to this i try to do it so far but i cant do nothing so can someone pls break it down for me thx :)
最近の変更はPcが行いました; 2024年4月20日 0時21分
It would be nice for some of us to know where or what the maps are called...not like the "c5m5 known as bridge.
it might just be a me issue, but I've noticed that with tracks that have consistency set to 'false' it ignores horde size and only plays the angry track when someone's pinned, down, or when there's a tank around. am I missing something?
ChimiChamo  [開発者] 2024年4月29日 14時36分 
Clockwork_Crow の投稿を引用:
it might just be a me issue, but I've noticed that with tracks that have consistency set to 'false' it ignores horde size and only plays the angry track when someone's pinned, down, or when there's a tank around. am I missing something?
That’s odd. I’ll take a look tomorrow
< >
1-15 / 22 のコメントを表示
ページ毎: 1530 50