Documentation
Readme
View as plain text
The Custom Blood Moon Music Mod, Enhances 7 Days to Die by replacing the default Blood Moon audio with user-selected custom music tracks, adding a personalized touch to the game’s intense nights. NOT including music, you must provide your own local tracks.
This mod automatically plays your chosen music during Blood Moon events (every 7th day, 22:00–04:00), with options to control playback, shuffle tracks, and tweak settings via a config file. It supports various audio formats and provides in-game feedback through tooltips, making it easy to enjoy a custom soundtrack while surviving the horde.
Latest Changelog:
V1.7.0 (V2.0)
- Updated for 2.0 of 7 days to die
- Added New console commands, loop, cycletracks, yes media playback is still operated by console
- Updated tooltip error msg from previous version to new version of the game
- Updated dynamic music bloodmoon components as they were significantly changed to their new system
- Removed dynamic updated config json, while config json acts as a base, in game temporarily updates while leaving config json intact
- Added New folder location to track cacheing in the text file of the mod folder
- Added Label for (2.0) by the mod file for label consistency
- Tooltips are now prefixed with "[CBM]" label instead of the long mod name
Key Features:
Custom Music Playback:
The core function is to play music from a user-defined folder during Blood Moon events. The mod supports .mp3, .wav, .ogg, and .m4a audio formats.
Configuration: A config.json file allows for extensive customization:
Enable or disable the mod by default.
Set a custom hotkey to toggle the music on and off during gameplay.
Adjust the music volume and choose whether it respects the game's main music volume slider.
Automatically shuffle the playlist (shuffleTracks).
Enable playlist cycling (cycleTracks) or loop a single track (loop).
Define the cross-fade duration between songs.
Console Commands: The mod provides a suite of commands for in-game control:
togglemusic: Toggles the custom music on or off.
next: Skips to the next track in the playlist.
previous: Goes back to the previous track.
pause: Pauses the current track.
stop: Stops music playback.
shuffle: Manually shuffles the playlist and starts playing.
rescan: Forces the mod to re-scan the music folder for new tracks.
loop: If typed it would loop the playlist of tracks, but if disabled it would loop a single track
cycletracks: if type it would cycle tracks in the playlist, but if disabled it would play one song
State Handling:
The music automatically pauses when the player dies or pauses the game.
Music playback resumes when the player respawns during a Blood Moon if it was playing before death.
The system cleans up its components when a player disconnects from the game.
Technically, the mod uses the Harmony library to patch into the game's code, specifically targeting game events like GameManager.Update and the AIDirectorBloodMoonComponent to detect the start and end of a Blood Moon.
UPDATED 2.0 Default config json example
config json
{
"bloodMoonTracks": "Resources/BloodMoon",
"volume": 0.8,
"respectMusicSlider": true,
"shuffleTracks": false,
"fadeDuration": 2.0,
"loop": true,
"cycleTracks": true,
"maxBloodMoonTracks": 50,
"restoreVanillaMusic": true,
"enableCustomMusicByDefault": true,
"toggleKey": "Keypad9"
}
FOR CUSTOM FOLDERS
use
"bloodMoonTracks": "C:\\Music\\Rock", Use double backslashes or forward slashes for your custom music folder locationa...
EVEN MORE General Mod Key Features:
Automatic Playback:
Music starts when a Blood Moon begins or when spawning into an active one, stopping when it ends.
Supported Formats:
Loads .mp3, .wav, .ogg, or .m4a files from Mods\CustomBloodMoonMusic\Resources\ or a custom folder.
Controls:
Console Commands: /play (start/resume), /next (skip track), /pause (pause), /stop (pause with position), /shuffle (randomize tracks), /togglemusic (enable/disable), /rescan (reload tracks) i dont think you'd need the slash anymore just typing the word is fine in console.
Keybind: Numpad 9 toggles the mod on/off.
Customization:
Edit config.json to set:
tracks: for a custom folder and or using the existing Resources folder and within that folder the BloodMoon folder for your audio files. for example set "bloodMoonTracks": foir your Custom path (e.g., "C:\\Music\\"); leaving it empty uses default Resources/BloodMoon folder, if their are no tracks it plays vanilla music or at least it should.
volume:
0.0 (mute) to 1.0 (full) Default to 0.6
respectMusicSlider:
true, Toggles in-game music slider integration (default: true) but falls back to config json if set to false.
loop:
True loops current track; false stops unless cycling.
cycleTracks:
True plays next track after one ends.
maxBloodMoonTracks:
50,: Caps loaded tracks to (e.g., 50) but configurable.
restoreVanillaMusic:
True reverts to game audio when disabled.
Visual Feedback:
Tooltips display actions (e.g., “[CBM] Skipped to next track”) followed by current track info (e.g., “[CBM] Playing track 2/3 (track2.mp3)”).
enableCustomMusicByDefault:
true, -
- when set to true by default it will play the custom music, muting the vanilla music in place without needing the toggle unless you need to disable it with numpad key option it will disable and restore vanilla music,
IF set to false, it would need to be manually activated while during a bloodmoon if you prefer that way instead.
Example LOGGING:
Check logs: %APPDATA%\7DaysToDie\logs\output_log.txt.
Expected Logs like F1 for mod logs
Config Load EXAMPLE :
Loading config from: [modPath]\config.json
Config loaded - Tracks: 0, Volume: 0.8, Loop: True, Cycle: True, Folder: C:\Music\BloodMoonTracks
Audio Load:
Scanning for audio files in: C:\Music\BloodMoonTracks
Attempting to load: C:\Music\BloodMoonTracks\track1.mp3
Loaded track1.mp3
Commands:
Play issued for track 1/X (track1.mp3)
Tooltip set: [CBM] Music playing!
HOW TO USE:
IF USING A custom folder (e.g., C:\Music\BloodMoonTracks) with some .mp3, .wav, or .ogg files (no subfolders) or use an existing music folder with tracks in that root folder..
Update the config.json with the path of that location (use \\ or / for separators).
IF using the Mods Resources folder, create one, then Add the BloodMoon folder for your tracks if its easier if you want to listen to a few tracks instead of a whole custom folder of tracks.
Launch with EAC off. CLIENT ONLY , meaning, this will only work with your personal computer, not server compatible. Each client or pc that wants custom music would require this mod separate on their own pc and their own music to play their custom music when bloodmoon is active.
Load save, trigger the Blood Moon (settime 21 00 on day 7) or however time in DebugMenu and test away!
KNOWN ISSUES:
Trying to get it to work for just in the ingame chat box instead but thats seems to be failing... no ingame chat box by pressing T and entering those /commands ....just F1 console commands for now....
Non server sided...hopefully a future feature update.
Any other bugs PLEASE REPORT BACK
NOTES:
Any corrupted music files will say FMOD error in logs for saying unsupported format.. but will use that cache so it would be faster to load your tracks for the game and not load it each time manually.
( i. e Error: Cannot create FMOD::Sound instance for clip "" (FMOD error: Unsupported file or audio format. )
CustomBloodMoonMusic: [2025-03-26 06:19:14] Tracks cached to C:/Program Files (x86)/Steam/steamapps/common/7 Days To Die/7DaysToDie_Data/../Mods\CustomBloodMoonMusic\track_cache.txt )
Track caching:
will be located in a file called track_cache_bloodmoon.txt
just incase for those who want that extra log in the mod folder to see what songs exactly are being loaded.
NOT COMPATIBLE WITH ANY OTHER AUDIO MODS<,
and or if you happen to be using any silencing mods and or other custom music mods or overhauled audio mods it may or may not work with those said mods, who knows? it just might but as for my testing... this is mainly for vanilla users, whod wanna customize the bloodmoon music, a small guilty pleasure at most.
If musicFolder is empty ("") or invalid, it defaults to Resources folder in that mods folder.
If tracks is non-empty, it uses those specific files from musicFolder (or Resources if musicFolder is unset).
P.S you dont need the // leave empty or double blackslash info in the config json as those are comments, it wont read it anyways for those comments.
Disclaimer:
By using this mod, you acknowledge that TechFreq is not responsible for any issues, crashes, or conflicts caused by its use.
Use at your own risk. Please backup your game files before installing any type of mod.
Thanks for downloading and enjoy!
Installation:
Make sure harmony mod exist in the mod directory as it's required.
Download the mod files, Extract Mod files.
Please backup your world, save, and or game files.
Place them in your Mods directory of your 7 Days to Die Game.
EAC must be disabled, although i hope in the future that can be changed, as for now DLLS are not EAC supported however XML has no issue, unfortunately this is a dll modification.
THIS IS CLIENT SIDE ONLY but maybe perhaps this is also, server side and client side compatibility?
No further setup needed. Enjoy!
CREDITS:
Thank you again TheMeanOnes , huge shoutout to you for the idea thats that 20 percent and the rest is the 80 for my code! hope to see more projects and improvements in the future!
TheMeanOnes Discord Server: https://discord.gg/jvDuq9SUQR
7 Days to Mod Discord Server: https://discord.gg/XVXK7aJpDH
Thanks to TechFreq & A.I, ChatGPT or Microsoft CoPilot A.I or Grok AI from Twitter or X, for helping me create the modlet, aswell as with very little modding knowledge for the game and learning as i go i couldn't do this without it and overall brainstorming and or the modding community.
I’d very much appreciate it and or any feedback for the mod(s) aswell
Support Notice:
For those who’d like to support 'TechFreqs' work, This mod may or may not be crossposted. Downloading via 7daystodiemods website through ModsFire (ad-powered, which earns per download) and helps me a ton if posted on there or other example mod sites HOWEVER!
(although its 10 cents per download) There is also a direct mirror for using NexusMods website instead which also features direct links BUT those aren't earned per click or per downloads and run off Donation Points through a different system. The best way to support TechFreq other than downloading mods, sharing the mod with friends, leaving feedback and endorsing the mod in general is all that i ask for, but if you want to go the extra mile although not necessary you may use Donation Links through paypal or ko-fi pages which again helps me a bunch!
However, Donations aren't expected, every little bit of support helps along the way & fuels more mods, music, and bug fixes in the future,so thanks again for reading and being awesome in general and checking out the mod post.
Social Media:
If you appreciate 'TechFreqs' work and want to show support, use this donation link, although not necessary.
Kofi Page: https://ko-fi.com/techfreq
I appreciate it in general for just checking out the mod posts, sharing and enjoying any of the mods in itself. Thank you again! and Happy gaming!
Love this mod? Got feedback or ideas or need to troubleshoot?
Join the TechFreq Pretty Rad Squad Discord Server! https://discord.com/invite/SQCnGjNUhw
Chill with us on Discord for game chat, memes, and even more mod updates!
As for TechFreqs music, it's royalty-free music to use in your projects or for casual listening!
Source music files are available feel free to ask away, available in the discord! or for more content!
TechFreqs Socials: https://beacons.ai/techfreq
Checkout the behind-the-scenes vibes today! Thank you again for checking out the mod post.
Previous Changelog:
V1.6.0
- Fixed log spam upon death or bloodmoon is over with logs spamming is bloodmoonactive false
V1.5.9
- Fixed null error when toggling the button on or off , harmony patch fails after the second enable.
- Added new config feature, "shuffleTracks": false, configurable value if set to true, it will shuffle the tracks in the given playlist thats loaded instead of just playing the first track, you can still use the shuffle command andhave the simialir effect while if set to true or false
- Added new config feature,"fadeDuration": 2.0, configurable fade duration between the start and end of bloodmoon music defaulted to 2 seconds
V1.5.8
- Fixed issue with volume system, now configurable in config json if respectMusicSlider: is set to false.
- Added logs for volume checking and dynamic updates for volume in config json for better volume management and limit log spam for volume updates
- Music Slider integration so that way volume scales with music slider and falls back to config json if fails.
- Added Dynamic Config reloading or file watching to reload config json for changes due to volume during gameplay.
- Pause fixes to correctly resume and pause custom and or vanilla music when game is paused or players disconnected.
V1.5.6
- Fixed issue of music being muted after using custom dynamic music mod now changed to custom exploration music mod, it would play a song for a few seconds then end abruptly
- Fixed issue of it cycling tracks and only playing just one song despite cycletracks was set to true
- Fixed loop issue should now loop playlist of songs starting from the first once its cycled completely
- Fixed so it can work with custom exploration music mod , and restores vanilla blood moon music if disabled.
- Added more debug logs for bloodmoon state checks and remove excessive disable vanilla music message per track should only occur when mod is enabled or disabled.
- Better looping management, if Loop is active, it will loop the playlist of tracks when cycletracks is true, if cycle tracks is false it will loop the single track.
V1.2V
-Newly Added, "enableCustomMusicByDefault": true , value, so that way it can start automatically during a bloodmoon, without needing to manually toggle each time but can be setup that way setting it to false in config json if preferred,
-Newly added, configurable keypad binding default to numpad 9
-Newly added, even more robut logging but also less spammy but nice information no double timespamps
-Compatibility with v1.3 i hope and V1.4 as thats what i recently updated it for.
-uses previous song commands, track management,
- removes redundant or previous track attempts , fixed in my other mod for environemental audio like exploration suspsense and combat music to be custom.
Semi Latest Changelog:
-Fixed folder name issues, some users experienced the mod not working due to the folder name not being labeled right, the label has the match the modinfo xml name value property for it to work this small update fixes that problem, works for bloodmoon, tested but doesnt work for other exploration, combat and suspense tracks, i will provide a new update in the future with that removed when i have the time rebuild from scratch again lol anywho enjoy!!
Make sure your custom folders are double slashes and that loop means looping the playlist not the single song unless theirs only 1 track in the folder, if youd like random set cycletracks to off for it to be random.and vice versa in the config.
1.2L from 1.2B & D:
Added a more robust tracks folder, no more manual defining tracks in the config json for individual tracks, it should scan the folder as it is, or you can define it in the Config Json idk what i was thinking lol
Added /previous and or previous commands , for F1 Logs so that way it can go back to the previous track
Added Tooltip for when the mods disabld
Added extra functionality and debug logs for when the blood moon music is active
Added even more robust rescan or track caching to help preload tracks, although be aware of freezes or stutters for full rescan using the /rescan or rescan commands as i suppose even before loading in game it still rescans just in casebut sometimes uses the txt cache as a buffer to make sure it matches. BUT again makes track caching per category of music folders in resource folders and or even using custom ones , and uses that track cache in root folder of the mod itself.
Added even more debug logs or information in F1 logs for when a track is played and source as previous didnt mention source folders.
Added more options for config json for a FUTURE build, for also operating the Exploration,Suspense & Combat music tracks in game, but we shall as i had been dealing with more issues than what i could fathom, so ignore those ones or let alone define them to nothing in the config json.
Added a bit of code thanks to Rizzrd from his Custom Music Mod although not too much i had added as we have different concepts, althought a pleasure getting a quote from his open source code that has helped me figure out using EnumMusicutils for bringing back that bloodmoon music back FINALLY after disabling and or when bloodmoon music ends. https://www.nexusmods.com/7daystodie/mods/6035
Added ability to control volume, kinda, through the overall sound volume, thanks to rizzards code again, checkout his mod it does wonders aswell. although still independant in config json due to this issue.
ISSUES:
BEWARE, if mods enable after bloodmoon is over, then vanilla music is muted until i can that figure out that fix for the exploration , suspense and combat music combined with the bloodmoon music and more above in a future build, it would be muted, HOWEVER in config json if set to "" instead of the Resources\CombatMusic folder, as it looks for that to idenitfy tracks to be used, it will or should use vanilla music, if not found and vice versa.
so ignore the other code for now
Same issues as before no ingame chat commands, non server sided, but at least the vanilla blood moon music returns!
NOTE: NOT COMPATIBLE WITH ANY OTHER AUDIO MODS<, and or if you happen to be using any silencing mods and or other custom music mods or overhauled audio mods it may or may not work with those said mods, who knows? it just might but as for my testing... this is mainly for vanilla users, whod wanna customize the bloodmoon music, a small guilty pleasure at most.
Newer Example Default config json
{
"bloodMoonTracks": "Resources/BloodMoon",
"explorationTracks": "Resources/ExplorationMusic",
"suspenseTracks": "Resources/SuspenseMusic",
"combatTracks": "Resources/CombatMusic",
"homeDayTracks": "Resources/HomeDay",
"homeNightTracks": "Resources/HomeNight",
"volume": 0.8,
"loop": true,
"cycleTracks": true,
"maxBloodMoonTracks": 50,
"maxExplorationTracks": 20,
"maxSuspenseTracks": 20,
"maxCombatTracks": 20,
"maxHomeDayTracks": 20,
"maxHomeNightTracks": 20,
"restoreVanillaMusic": false
}
V1.3
-Change features from tracks config json to Resource folder to specifiy folder location for tracks no more manual input few tracks,
-Tracks cache for Resourece and now Custom folders
V1.2