ModAudio
Replace game audio with your own mixtape.
Date uploaded | a month ago |
Version | 1.0.2 |
Download link | Marioalexsan-ModAudio-1.0.2.zip |
Downloads | 212 |
Dependency string | Marioalexsan-ModAudio-1.0.2 |
This mod requires the following mods to function
BepInEx-BepInExPack
BepInEx pack for Mono Unity games. Preconfigured and ready to use.
Preferred version: 5.4.2100README
ModAudio
Replace game audio with your own mixtape.
This mod can either be used stadalone, or it can be used to make audio pack mods.
Currently, .ogg
, .mp3
and .wav
formats are supported.
Standalone Usage
To replace game audio, put your custom audio files under BepInEx/plugins/Marioalexsan.ModAudio/audio/
.
If you're using a mod loader such as r2modman, you will have to navigate to that mod loader's BepInEx folder and put your files there.
There are two ways to do the replacement:
Audio files named after audio clips
Name your custom audio the same as the audio clip you want to replace. For example:
_mu_wonton5.ogg
would replace the_mu_wonton5
clip that is the Crescent Grove combat music_mu_flyby.wav
would replace the_mu_flyby
clip (main menu music)weaponHit_Fire(average).mp3
would replaceweaponHit_Fire(average)
, i.e. one of the hit sounds
You can use any of the supported audio formats, but there should be only one format used per audio clip (i.e. if you have both foo.ogg
and foo.wav
, only one will be selected).
Audio files routed to audio clips
Put your custom audio in the audio folder, the name doesn't matter in this case.
Afterwards, make an association between the audio file's name (without extensions) and the clip it's supposed to replace in the __routes.txt
file from the audio
folder (create it if it doesn't exist).
An example __routes.txt
file that would map multiple hit sounds to a pow.ogg
audio file you've placed in the audio
folder:
weaponHit_Air(average) = pow
weaponHit_Air(heavy) = pow
weaponHit_Air(light) = pow
This can be useful to avoid duplication and to keep meaningful names for your custom audio.
Audio Pack Mods
You can specify custom audio via mods that depend on ModAudio. Here's an example plugin that does that:
[BepInPlugin(PluginInfo.PLUGIN_GUID, PluginInfo.PLUGIN_NAME, PluginInfo.PLUGIN_VERSION)]
[BepInDependency("Marioalexsan.ModAudio")]
public class MyCustomAudio : BaseUnityPlugin
{
private void Awake()
{
Marioalexsan.ModAudio.ModAudio.Instance.LoadModAudio(this);
}
}
This will load audio in a similar way to how it's done for Standalone Usage, using audio files and __routes.txt
from the audio
folder next to your mod's assembly.
This allows you to create audio pack mods that you can distribute easily.
If you need to load audio from a different folder, you can specify it using a second parameter:
[BepInPlugin(PluginInfo.PLUGIN_GUID, PluginInfo.PLUGIN_NAME, PluginInfo.PLUGIN_VERSION)]
[BepInDependency("Marioalexsan.ModAudio")]
public class MyCustomAudio : BaseUnityPlugin
{
private void Awake()
{
Marioalexsan.ModAudio.ModAudio.Instance.LoadModAudio(this, "C:\\mycoolmusicpath");
}
}
Mod Compatibility
This mod version targets ATLYSS v1.6.0b. Compatibility with other game versions is not guaranteed, especially for updates with major changes.
CHANGELOG
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[1.1.0] - 2025-Jan-01
Added
- You can now specify multiple audio files per source clip in __routes.txt. ModAudio will play one at random, based on their weights.
- Each clip in __routes.txt can now specify a weight using the format
source = replacement / weight
(where weight is a decimal number, i.e.1.0
). This is used for random rolls when there are multiple clips present. - You can now use the
___default___
identifier when replacing audio. This allows you to include the vanilla audio as a clip that should be played randomly. - Added an
OverrideCustomAudio
option that can be used to override any custom audio from mods with whatever you specify in ModAudio itself. __routes.txt
now supports line comments. Lines starting with#
will be treated as a comment and ignored.
[1.0.4] - 2024-Dec-28
Changed
- Improved audio loading from root folder, it will now also load audio from root if there's at least one clip with a known vanilla name
[1.0.3] - 2024-Dec-27
Changed
- The mod will now load assets from mods that don't have a DLL plugin. It will load any audio from the "audio" folder (i.e.
BepInEx/plugins/Your-Mod/audio
) if it exists. It will also load audio from the root folder (BepInEx/plugins/Your-Mod/
) if there is a__routes.txt
file present
Fixed
- Fixed an issue related to using the mod without any audio under
ModAudio/audio
[1.0.2] - 2024-Dec-23
Changed
- Removed NAudio dependency in favor of UnityWebRequestMultimedia
Fixed
- Audio played via
AudioSource.PlayOneShot
should now be replaced correctly
[1.0.1] - 2024-Dec-23
Added
- Option to enable verbose logging of audio sources that are being replaced, and audio sources that are loaded in
Changed
- Improve reliability of audio replacement when scenes are loaded
[1.0.0] - 2024-Dec-22
Changed
Initial mod release