Jump to content

How to add or replace music .wavs?


P3rf3ctVZer0

Recommended Posts

I'm not going to claim to be an expert in the music department, but I will explain to you what I've experienced with the in game music since A19.

Your starting Config file will be "dsmcontent.xml" - This is the file that most of the music is configured for the game.
(Program Files (x86)\Steam\steamapps\common\7 Days To Die\Data\Config\dsmcontent.xml)
Currently, there are only 7 listed Static sound tracks in game (Traders and your bed/home day/night) that are viewable in the XML.
Its not too hard to change any of these static tracks into another track by pointing it at a Unity package. [Can go into details more if desired]

The problem you will encounter is everything else that is not these static tracks. Exploring/Suspense/Combat tracks are all Dynamic.
The music is literally weaved together from 15-20 second wave files to generate a ~2 minute track.
If you look at the XML file mentioned above, you can see how they weave it all together. 

As noted in the patch notes for A19:

Quote

As of Alpha 19 there, are 31,558 unique combinations of music.


I can be wrong in this next statement, but as far as I am aware, people are still trying to understand the system and how best to use it.
There is no documentation from TFP in the xml files and we were just handed it to toy with when A19 was released. 

1 - Exploring Tracks -> Only occur while your "Spook Levels" are low
2 - Suspense Tracks -> Only occur while your "Spook Levels" are high
3 - Combat Tracks -> Only trigger while 4+ zombies are aware of you / aggroed
4 - Static Tracks -> Trigger based on zone/range of a point. 

So, while I don't think its impossible, just people don't fully know how the dynamic music works just yet and people still need to tinker / dissect it still. 

- Mala Zedik

Link to comment
Share on other sites

16 minutes ago, Mala Zedik said:

[Can go into details more if desired]


The short version of how to do this and since it was the original question posted... 

1) Create a Unity package "MyMusic.unity3d" with your music.
2) In your dsmcontent.xml modded file, you point the wave files you want to the unity3d file.
Example:

<set xpath="/root/content/property[@name='000ExpPri']/property[@value='#Sounds/Music?000aExpPri.wav']">#@modfolder:Resources/MyMusic.unity3d?rainbow_cemetary.wav</set>

That xpath will change the first wave file listed in the dsmcontent.xml to point to your "rainbow_cemetary.wav" file in your unity package. 

If thats the *only* change you plan to make, your modded dsmcontent.xml file would look like this:

<?xml version="1.0" encoding="UTF-8"?>
<configs>

<set xpath="/root/content/property[@name='000ExpPri']/property[@value='#Sounds/Music?000aExpPri.wav']">#@modfolder:Resources/MyMusic.unity3d?rainbow_cemetary.wav</set>

</configs>


So, when the wav file "000aExpPri.wav" were to play in game, it would in turn play your "rainbow_cemetary.wav" file in it's place. 
(Which is why it would be easier to do it with the static tracks, not the dynamic ones) 

Side note: If you've never modded before, your modded dsmcontent.xml would be in your mods folder and you never change the game default one. (You are welcome to change the game's default one for testing, but it will only effect your single player plays.)
 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...