This is completely optional, you can still use the old module here https://modworkshop.net/mydownloads.php?action=view_down&did=18106
Dunno if I need to even mention this. But, you need both BeardLib and SuperBLT for this to work https://superblt.znix.xyz/ https://modworkshop.net/mydownloads.php?action=view_down&did=14924
Thanks Waitin' For a M8 for the music files used in this template.
SuperBLT has brought a new sound library called XAudio. The library supports the OGG format and so I've decided to make new modules that utilize that library, MenuMusic and HeistMusic modules!
Differences between the old module:
- Now there's a module for music and one for heist instead of both in one module.
- The source paths have to be exact paths to the ogg files. AddFiles is not needed. tarting from the mod's path, or with heist music, it's the mod's path + directory that is defined in the top of the module (optional).
- The module uses OGG files instead of renamed bik files.
<MenuMusic id="my_menu_music_name" source="sounds/menu.ogg" volume="1"/>
Heist music:
<HeistMusic id="my_heist_music_name" directory="sounds" volume="1">
<event name="setup" source="stealth.ogg"/>
<event name="anticipation" source="buildup.ogg"/>
<event name="assault" source="assault.ogg"/>
<event name="control" source="control.ogg"/>
</HeistMusic>
Guide:
Mostly to create music mods you need to understand what each of the following values do:
id: the id of the music that you're about to add, this has to be unique, you cannot have a heist music and menu music with the same id.
the id is also used to localize the tracks(see template's en.txt file).
source: the file that the menu music or event of heist music should play, this has to be exact path to the file(excluding the mod's path and directory you defined which is currently 'sounds')
directory[only for heist music, optional]: a shorthand for the sources you will write for each event of a heist music, this has to be a path to the folder that holds the sources, if they're in the root of the folder then you don't need this value.
Extra:
start_source[menu music in the head of the module, heist music in the events]: same thing as source. However, this will play only once before playing the default 'source', can be used if you wish to have a starting sound for the music.
volume[head of the module, where id is]: a value between 0 to 1 to change the volume of that specific music track.
Crediting:
I don't force you to credit at all. But, if you want, you can share this template in your mod page.
Don't forget, you can mix the menu and heist templates into one folder and create as much music tracks in one folder as you like. Just name the sources differently.
Module(s) Documentation
https://github.com/simon-wh/PAYDAY-2-BeardLib/wiki/HeistMusicModule
https://github.com/simon-wh/PAYDAY-2-BeardLib/wiki/MenuMusicModule