- Switched from OnGUI to Unity Canvas/UI system - Added VerticalLayoutGroup for flexible layout - Added ContentSizeFitter for auto-sizing - Added resizable panel with drag handle in corner - Fixed TMPro and UnityEngine.UI references in csproj - Panel is now draggable and resizable (350x400 to 800x900)
HomuraHime Audio Mod
A BepInEx mod for HomuraHime that fixes audio glitches and improves enemy behavior audio indicators.
Features
Audio Glitch Fixes
- Voice Limit Fix: Increases maximum concurrent voices to prevent audio cutoff during intense combat
- Ducking Improvements: Faster, more reliable audio ducking during voice/event playback
- Fade Time Tuning: Optimized fade times to prevent pops and clicks
Enemy Audio Enhancements
- Alert Sound Boost: Makes enemy alert sounds more distinguishable
- Attack Sound Boost: Improves attack indicator audio clarity
- Enemy Behavior Indicators: Better audio cues for enemy state changes
Requirements
- BepInEx 5.x
- HomuraHime (Steam)
- .NET Framework 4.8 or .NET SDK
Installation
Automatic (Recommended)
- Run
Build.ps1script to build and install:cd src/HomuraHimeAudioMod .\Build.ps1
Manual
-
Build the project:
dotnet build -c Release -
Copy
HomuraHimeAudioMod.dllto:C:\apps\steam\steamapps\common\Homura Hime\BepInEx\plugins\ -
Launch the game once to generate config files
Configuration
Config file location:
C:\apps\steam\steamapps\common\Homura Hime\BepInEx\config\com.homurahime.audiomod.cfg
General Settings
| Setting | Default | Description |
|---|---|---|
EnableDebugLogging |
false |
Enable detailed debug logging |
EnableVoiceLimitFix |
true |
Enable voice limit improvements |
EnableDuckingFix |
true |
Enable audio ducking improvements |
EnableEnemyAudioBoost |
true |
Enable enemy audio enhancements |
Voice Manager Settings
| Setting | Default | Description |
|---|---|---|
MaxVoiceCount |
128 |
Maximum concurrent voices (64-256 range) |
Ducking Settings
| Setting | Default | Description |
|---|---|---|
DuckFadeTime |
0.05 |
Fade time for ducking (seconds) |
DuckVolume |
0.3 |
Volume level during ducking (0.0-1.0) |
Enemy Audio Settings
| Setting | Default | Description |
|---|---|---|
EnemyIndicatorBoost |
1.2 |
Volume multiplier for indicators |
AlertSoundBoost |
1.3 |
Volume multiplier for alert sounds |
AttackSoundBoost |
1.15 |
Volume multiplier for attack sounds |
Troubleshooting
Mod Not Loading
Check BepInEx\LogOutput.log for errors. Common issues:
- Missing .NET Framework 4.8
- BepInEx not installed correctly
- Conflicting mods
Audio Glitches Persist
- Try reducing
MaxVoiceCountif CPU is struggling - Increase
DuckFadeTimefor smoother transitions - Disable other audio mods to check for conflicts
Game Crashes
- Disable all patches and re-enable one at a time
- Check for game updates that may have changed audio code
- Verify FMOD bank files are not corrupted
FMOD Bank Modifications (Optional)
For deeper audio improvements, modify FMOD banks directly:
- Extract banks using AssetRipper
- Open in FMOD Studio 2.02.x
- Adjust voice limits, ducking, and enemy indicators
- Reimport modified banks
See docs/FMOD_MODIFICATION_GUIDE_PHASE3.md for detailed instructions.
Building from Source
Prerequisites
- .NET Framework 4.8 SDK or .NET SDK
- Visual Studio 2022 (optional, for IDE support)
Build Commands
# Restore packages
dotnet restore
# Build Debug
dotnet build
# Build Release
dotnet build -c Release
# Clean
dotnet clean
Output
Built DLL: bin\Release\net48\HomuraHimeAudioMod.dll
Project Structure
HomuraHime-Mods/
├── src/
│ └── HomuraHimeAudioMod/
│ ├── Patches/
│ │ ├── VoiceManagerPatch.cs # Voice limit and ducking patches
│ │ ├── AudioDuckingPatch.cs # Snapshot and fade patches
│ │ └── EnemyAudioPatch.cs # Enemy audio enhancement patches
│ ├── Plugin.cs # Main BepInEx plugin
│ ├── ModConfig.cs # Configuration management
│ └── HomuraHimeAudioMod.csproj # Project file
├── docs/
│ ├── SETUP_PHASE1.md # Tool installation guide
│ ├── AUDIO_ANALYSIS.md # Game audio system analysis
│ ├── CODE_ANALYSIS_PHASE2.md # Deep code analysis
│ └── FMOD_MODIFICATION_GUIDE_PHASE3.md # FMOD bank editing guide
└── tools/
└── ExtractBanks.ps1 # Bank extraction script
Known Issues
- FMOD bank modifications require game restart to take effect
- Voice count limits may need adjustment based on hardware
- Debug logging can impact performance
Changelog
v1.0.0
- Initial release
- Voice limit fix (configurable max voices)
- Audio ducking improvements
- Enemy audio indicator boost options
- BepInEx configuration support
License
This mod is provided for personal use. Please respect the game's EULA and copyright.
Credits
- BepInEx team for the modding framework
- FMOD for audio middleware
- Unity Technologies for game engine