R2API Sound
API for adding custom sounds or musics
About this mod Author’s original text
R2API.Sound - WWise Soundbank loading and MusicTrack addition
About
R2API.Sound is a submodule assembly for R2API that allows mod creators to easily load SoundBanks from WWise and implement new Music Tracks for the game.
Use Cases / Features
R2API.Sound works via two main classes, the SoundBanks class and the Music class.
SoundBanks class allows you to load your WWise SoundBanks to the game you can later use the SoundBank's event names in the game's Util.PlaySound method.
The Music class allows you to add new music tracks to the game, these new tracks can later be used for playing music in different stages, overriding music, and more.
The Music class is mainly used for mods that do not have access to properly populating the Game's MusicTrackDef scriptable object, as that scriptable object requires the mod creator to have access to WWise's Unity Integration.
Related Pages
A guide on how to add your own music can be found here, the guide uses R2API.Sound's Music class.
Changelog
'1.0.3'
- Initial fixes for SOTS DLC2 Release.
'1.0.2'
- Add missing BepInDependency to R2API.ContentManagement
'1.0.1'
- Fix the NuGet package which had a dependency on a non-existent version of R2API.Core.
'1.0.0'
- Split from the main R2API.dll into its own submodule.
Install & use Install: BepInEx plugin
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.
Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file.
Install these first, or the mod will not work: