Music Mod

Please post here for questions and discussion about data, event, art and sound modding and the game editor for Distant Worlds.

Moderator: MOD_DW2

Post Reply
User avatar
rxnnxs
Posts: 625
Joined: Sat Jun 01, 2013 10:25 am
Location: what goes on
Contact:

Music Mod

Post by rxnnxs »

This is a Music Mod that just replaces EVERY FILE in the music folder, but.. that is not enough.
Somehow some music steals itself in from the original.
Maybe you just rename the music folder in the data folder of the game to musicX.

Maybe you just get jused to it.
Maybe you make your own music.

I know there are other possibilities to replace the music, but since nothing is really working flawless, i just made some placeholders.

This can be a base to start with
JustMusic.7z
(1.98 MiB) Downloaded 48 times
User avatar
rxnnxs
Posts: 625
Joined: Sat Jun 01, 2013 10:25 am
Location: what goes on
Contact:

Re: Music Mod

Post by rxnnxs »

Question 1:
What is this XML File doing (see below)?
The Music is not at the places the File is referring to.

Thought:
If a file like this could be used to point to directions of our own music in the mod folder, evershing would be fine.

Question 2:
If those music files are in a bundle, could we just replace the music with or own if we place that files in our mod-folder?
Is there a file structure that goes some folders deeper that we have to use?
This is what I mean by: We need to know the structure in a bundle.

Question 3:
If some files are not used, the original files are taken. We should know all of them so we can use empty files to override those other unwanted music files.
This brings me to the last Quesion:

Question 4:
under data/music is music that is very redundant.
Where is the xml file that controls this part?

Why is .wav und .mp3 used besides each other?
The .wav is huge and has the same content as the same named .mp3 (or almost)?!

Why is there sometimes low high and medium and when are they played? Is this working in any way?

Because I have the feeling only ONE track is played for every zoom-level.

Question 5:
I have the feeling that even when I replace ALL files, still some music is brought in from the original folder that I can only stop playing by renaming the data/music folder into i.e. musicX.

The easiest way to play custom music is by placing ONE music file into the original music folder.
Even a second one is not played, only one file is played. At least that is my impression.

SO, how can we talk about this :-)


File mentioned is under

Code: Select all

X:\DW2\Distant Worlds 2\data
named MusicTracks.xml

The content:

Code: Select all

<?xml version="1.0"?>
<ArrayOfMusicTrack xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <MusicTrack>
    <Mood>Action</Mood>
    <Layers>
      <MusicTrackLayer>
        <Filepath>Sounds/Music/DistantWorlds2-LayerTest1-Layer1</Filepath>
        <RaceId>-1</RaceId>
      </MusicTrackLayer>
      <MusicTrackLayer>
        <Filepath>Sounds/Music/DistantWorlds2-LayerTest1-Layer2</Filepath>
        <RaceId>-1</RaceId>
      </MusicTrackLayer>
      <MusicTrackLayer>
        <Filepath>Sounds/Music/DistantWorlds2-LayerTest1-Layer3</Filepath>
        <RaceId>-1</RaceId>
      </MusicTrackLayer>
      <MusicTrackLayer>
        <Filepath>Sounds/Music/DistantWorlds2-LayerTest1-Layer4</Filepath>
        <RaceId>-1</RaceId>
      </MusicTrackLayer>
    </Layers>
    <Stingers>
      <MusicTrackStinger>
        <Filepath>Sounds/Music/DistantWorlds2-Stinger1</Filepath>
      </MusicTrackStinger>
    </Stingers>
    <BeatsPerMinute>104</BeatsPerMinute>
    <Weighting>1</Weighting>
  </MusicTrack>
</ArrayOfMusicTrack>
User avatar
rxnnxs
Posts: 625
Joined: Sat Jun 01, 2013 10:25 am
Location: what goes on
Contact:

Re: Music Mod

Post by rxnnxs »

Ok, regarding Question 5 and my "Feeling".

I checked it again.
When I place the files
DistantWorlds2-MusicIdeas2-S1-FullExport2.mp3
and
DistantWorlds2-MusicIdeas2-S1-FullExport2.wav
into my mod folder "music" like in this picture:
modfolder.jpg
modfolder.jpg (15.1 KiB) Viewed 1218 times
those files are only played, when i rename the music folder under data like in this picture:
musicx.jpg
musicx.jpg (17.12 KiB) Viewed 1218 times
I guess this is not intended.

Those things I mean with:
Please do not forget the music.
User avatar
rxnnxs
Posts: 625
Joined: Sat Jun 01, 2013 10:25 am
Location: what goes on
Contact:

Re: Music Mod

Post by rxnnxs »

if you want to try what I described with my mod to test, please download.
use it without renaming your music folder, then rename the music folder. The intro music is played out of the original folder.
JustMusic3.7z
(6.99 MiB) Downloaded 28 times
p.s. sorry, mod is called justmusic2 in the modmanager!

p.p.s.: and it is not only the title music but also ingame music that is taken from a bundle?! Did I oversee a file? If i do not rename the music folder this happens.
And when are the wav files played? and asking again: all the music, when is it played?
I not want to replace all files if they are not used.
User avatar
frankycl
Posts: 402
Joined: Mon Mar 01, 2021 5:16 pm

Re: Music Mod

Post by frankycl »

rxnnxs wrote: Tue Apr 25, 2023 9:08 pm if you want to try what I described with my mod to test, please download.
use it without renaming your music folder, then rename the music folder. The intro music is played out of the original folder.
JustMusic3.7z

p.s. sorry, mod is called justmusic2 in the modmanager!

p.p.s.: and it is not only the title music but also ingame music that is taken from a bundle?! Did I oversee a file? If i do not rename the music folder this happens.
And when are the wav files played? and asking again: all the music, when is it played?
I not want to replace all files if they are not used.
Hm - maybe they changed that (?)... I'm cetain, when I was testing it shortly after the release there was NO music when I deleted all files and folders - and when I only deleted the files, but didn't change the folders it always played the music from the root-folder (music) instead of the files I deleted... :?

...will test again soon (but I don't need a mod or a batch-file for this). ;)
User avatar
rxnnxs
Posts: 625
Joined: Sat Jun 01, 2013 10:25 am
Location: what goes on
Contact:

Re: Music Mod

Post by rxnnxs »

Ok, I do not understand what you mean and you did not understand what I meant, it was really a long text.

Just to make it short and describe ONE (or two..) of the things that do not work:

When the data/music folder is NOT renamed or deleted, contents of it are played, regardless what you have in your base mod folder.

IF it is deleted OR renamed, the music in the mod folder (the upmost folder and that music) will be played.
NOT CERTAIN aboout the mod/music-folders INSIDE the FOLDERS below MOD/MUSIC/FOLDERS..

SO, if I make a mod, all what is inside should replace the original files when they are at the same place and have the same name.
To make things easier, it would be great if we could have the .xml file that controls all the music and therefore we can overwrite the .xml folder with the locations for the music files.
then we do not have to replace every music file but can delete and modify it that way.

The musicTracks.xml file is not the file that controls it. it must be in the packed game files.

p.s.: you changed your post a bit - i guess you know now why I replace the files and do not want to delete or rename the music-folder.
User avatar
TylerIN
Posts: 100
Joined: Mon Mar 14, 2022 3:54 pm

Re: Music Mod

Post by TylerIN »

Are you able to access this post?

https://www.matrixgames.com/forums/view ... 1#p5073981

I don't know if that is accessible, here's a copy of the relevant bit;

We added a new mod.json flag,

Code: Select all

"disableDefaultMusic": true
so you can override the game music.

This is used by the Star Wars Music mod, the primary example of prior work in this case.

I recommend installing and giving it a listen as well as looking at the mod's files in the workshop directory.
Reach out to me on the official DW2 Discord #mods channel.
User avatar
rxnnxs
Posts: 625
Joined: Sat Jun 01, 2013 10:25 am
Location: what goes on
Contact:

Re: Music Mod

Post by rxnnxs »

Thank you very much tyler, this is working.
I can not open the thread, but this json command is working.
I tried it and yes, I can put my own music in the folder i.e. research, and even if it is a totally different name, this music is played.
Thank you very much, this helps so much!
andrrew
Posts: 1
Joined: Mon Jun 12, 2023 4:03 am

Re: Music Mod

Post by andrrew »

Thank you for sharing, it's very helpful, I set my phone ringtone for free
Post Reply

Return to “Design and Modding”