Is adding music possible?
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
-
- Posts: 1155
- Joined: Tue, 30. Oct 07, 18:46
Is adding music possible?
I know you can replace music. That's easy, just replace the file.
But is it possible to add more? I've got plenty of fitting tracks, but they'd only get old if i had about 2 at a time.
Edit: Hmm, i just recalled XTM did it, so it's definitely possible. Does it require some special modding tool?
But is it possible to add more? I've got plenty of fitting tracks, but they'd only get old if i had about 2 at a time.
Edit: Hmm, i just recalled XTM did it, so it's definitely possible. Does it require some special modding tool?
-
- Posts: 9837
- Joined: Wed, 25. Jan 06, 14:26
Yes you can, but it requires a little work.
You have to edit the universe file and add/change the new tracks you want to each sector. In my last game I had about 260 individual tracks.
The catch is, when you edit the universe/map file, you need to start a new game for the changes to take affect.
The other hard thing right now, is the lack of an editor. But you can change it in notepad/similar.
Example:
First line in x3_universe.txt (Kingdom End)
<o id="26" f="4" t="1" x="0" y="0" r="2" size="14000000" m="8101" p="1247631758"
Music track value in red.
As far as I know, there's still only 5 "battle" tracks, which I was hoping they'd expand on.
You have to edit the universe file and add/change the new tracks you want to each sector. In my last game I had about 260 individual tracks.
The catch is, when you edit the universe/map file, you need to start a new game for the changes to take affect.
The other hard thing right now, is the lack of an editor. But you can change it in notepad/similar.
Example:
First line in x3_universe.txt (Kingdom End)
<o id="26" f="4" t="1" x="0" y="0" r="2" size="14000000" m="8101" p="1247631758"
Music track value in red.
As far as I know, there's still only 5 "battle" tracks, which I was hoping they'd expand on.
-
- Posts: 1155
- Joined: Tue, 30. Oct 07, 18:46
-
- Posts: 207
- Joined: Sun, 29. Apr 07, 17:58
-
- Posts: 22500
- Joined: Sat, 23. Apr 05, 21:42
@Elucca and fud: Could you add some details, like where to put/replace the tracsk; format; how to name the files; etc? What you already have here looks like a start of a "tutorial and resource", so I added a link to the sticky. A bit more flesh on the bones by you, and the link is fully justified, don't you think? 

Goner Pancake Protector X
Insanity included at no extra charge.
There is no Box. I am the sand.
Insanity included at no extra charge.
There is no Box. I am the sand.
-
- Posts: 9837
- Joined: Wed, 25. Jan 06, 14:26
I'll skip the replacing of tracks, as that's just renaming them (if memory serves, 00019-00040 are the sector tracks, with 08101-08105 (give or take) being the specials, like Kingdom End, Seizewell, etv).
To add a new sector track:
Step 1:
Take any mp3 you like. Bitrate really didn't seem to matter when I did it, I had some as high as 517Kb/s and others at 256/etc. As far as which codec, I don't know. I was using tracks that I ripped with EAC and Lame. I suppose as long as it's not something completely exotic, it should work.
Rename them to anything you want, I used numeric values, I didn't test alpha-numeric, but I don't know why it wouldn't work. Drop them in the "x3 terran conflict\soundtrack\" folder.
Step 2:
Editing the x3_universe file (universe map, that has every bit of data in it for all sectors in the game).
Since there's no updated editor, the instructions here are a little different than they were in X3R. But, you'll still use Doubleshadow's X3R mod manager [held for link].
Once you have the mod manager installed, launch it and "open" 03.cat in the x3 terran conflict folder. Inside that catalog, scroll down to \map\x3_universe.pck, right click and extract.
Close mod manager.
Go to the location you extracted the universe file, open it with winrar/7zip, whichever you have/choose (I have winrar).
Extract the file.
Rename the file (which won't have an extension) to x3_universe.txt.
Now you can edit it in notepad/notepad2 (whichever you choose).
On the first line of any given sector entry, is the x/y coordinates and the music track.
From the post above:
<o id="26" f="4" t="1" x="0" y="0" r="2" size="14000000" m="8101" p="1247631758"
Music track value in red.
Change that to correspond with your file, and you should have your own music in the game. it definitely adds a lot to it when each sector has it's own unique track.
You can either put the file back into a cat and use it as a mod/false patch, or, you can drop it in the "x3 terran conflict\map\folder", making one if there's not one there. I will say this is untested, as I've only done this in X3R, and this ability wasn't there for it. But I do have modded files in subfolders in the main install folder that work, without needing a cat/dat pair like in R.
This WILL require a new game start though.
As for the battle music, I've looked in every conceivable file to see if ANYTHING references it, and I can't seem to find it. It leads me to believe it's in the code somewhere... Really wish you could change/add those as well. 5 tracks for a game that you're in battle 80% of the time (well, ME anyway
) gets a little monotonous. I end up lowering the music volume to 0 as a result, and it's a shame.
If this confuses anybody, speak up and I'll try to clarify. "Technical Writing" wasn't really a class I excelled at in college.
To add a new sector track:
Step 1:
Take any mp3 you like. Bitrate really didn't seem to matter when I did it, I had some as high as 517Kb/s and others at 256/etc. As far as which codec, I don't know. I was using tracks that I ripped with EAC and Lame. I suppose as long as it's not something completely exotic, it should work.
Rename them to anything you want, I used numeric values, I didn't test alpha-numeric, but I don't know why it wouldn't work. Drop them in the "x3 terran conflict\soundtrack\" folder.
Step 2:
Editing the x3_universe file (universe map, that has every bit of data in it for all sectors in the game).
Since there's no updated editor, the instructions here are a little different than they were in X3R. But, you'll still use Doubleshadow's X3R mod manager [held for link].
Once you have the mod manager installed, launch it and "open" 03.cat in the x3 terran conflict folder. Inside that catalog, scroll down to \map\x3_universe.pck, right click and extract.
Close mod manager.
Go to the location you extracted the universe file, open it with winrar/7zip, whichever you have/choose (I have winrar).
Extract the file.
Rename the file (which won't have an extension) to x3_universe.txt.
Now you can edit it in notepad/notepad2 (whichever you choose).
On the first line of any given sector entry, is the x/y coordinates and the music track.
From the post above:
<o id="26" f="4" t="1" x="0" y="0" r="2" size="14000000" m="8101" p="1247631758"
Music track value in red.
Change that to correspond with your file, and you should have your own music in the game. it definitely adds a lot to it when each sector has it's own unique track.
You can either put the file back into a cat and use it as a mod/false patch, or, you can drop it in the "x3 terran conflict\map\folder", making one if there's not one there. I will say this is untested, as I've only done this in X3R, and this ability wasn't there for it. But I do have modded files in subfolders in the main install folder that work, without needing a cat/dat pair like in R.
This WILL require a new game start though.
As for the battle music, I've looked in every conceivable file to see if ANYTHING references it, and I can't seem to find it. It leads me to believe it's in the code somewhere... Really wish you could change/add those as well. 5 tracks for a game that you're in battle 80% of the time (well, ME anyway

If this confuses anybody, speak up and I'll try to clarify. "Technical Writing" wasn't really a class I excelled at in college.

-
- Posts: 371
- Joined: Wed, 18. May 05, 22:34
-
- Posts: 9837
- Joined: Wed, 25. Jan 06, 14:26
-
- Posts: 126
- Joined: Tue, 14. Oct 08, 12:56
Did you like music in Home of Light? Want it back?
I always liked the background music in HoL sector. It's one of a kind, very tranquil and nice. Why it was replaced by just ordinary track which sounds also in other sectors? May be it'll be better to bring the old track back? Can you, guys?
P.S. I know that it's possible to replace files in sound game folder, but in this case the same track will be playing in other sectors. My proposal is to bring back the melody for HoL only.
{Merge to thread that already has the answer. jlehtone}
P.S. I know that it's possible to replace files in sound game folder, but in this case the same track will be playing in other sectors. My proposal is to bring back the melody for HoL only.
{Merge to thread that already has the answer. jlehtone}
-
- Posts: 126
- Joined: Tue, 14. Oct 08, 12:56
So, my post was moved from Tech thread... Therefore let me ask few questions here. I assume that after changing of Universe file, the game will be "modified", won't it? If the answer is "yes", then it's not my case. I've tried to pay attention to possibility of bringing back the old HoL track without having "modified" game. Pleased to hear.
-
- Posts: 9837
- Joined: Wed, 25. Jan 06, 14:26
-
- Posts: 126
- Joined: Tue, 14. Oct 08, 12:56
-
- Posts: 9837
- Joined: Wed, 25. Jan 06, 14:26
-
- Posts: 4447
- Joined: Tue, 2. Dec 03, 22:28
-
- Posts: 126
- Joined: Tue, 14. Oct 08, 12:56
-
- Posts: 1094
- Joined: Mon, 9. Feb 04, 21:31
Sorry fud I admit I read your instructions but I'm still a bit confused about something.
I don't want to add any new tracks but I do want to swap around some of the sector music. For instance I find that a lot of the sectors have very quiet/dull music but I love the music in the Mars sector and some of the other sectors as well, is there a way I can have say the Mars music playing in some of the other quieter sectors please mate?
I don't want to add any new tracks but I do want to swap around some of the sector music. For instance I find that a lot of the sectors have very quiet/dull music but I love the music in the Mars sector and some of the other sectors as well, is there a way I can have say the Mars music playing in some of the other quieter sectors please mate?
My (new) PC:-
Intel® Core™ i7-4770 processor (3.4 GHz, 8 MB cache)
Microsoft Windows 10
16 GB DDR3 Ram
NVIDIA GeForce GTX 1060 6 GB GDDR5
Intel® Core™ i7-4770 processor (3.4 GHz, 8 MB cache)
Microsoft Windows 10
16 GB DDR3 Ram
NVIDIA GeForce GTX 1060 6 GB GDDR5
-
- Posts: 9837
- Joined: Wed, 25. Jan 06, 14:26
One way to do that, is to take the track played in Mars (08508.mp3), copy/paste it, then rename it to one of the main tracks (00019-00040).
That'll get it into a few more sectors, and you won't have to edit anything.
So:
1. \x3 terran conflict\soundtrack
2. Copy/paste 08508.mp3
3. Rename to anything between 00019.mp3 and 00040.mp3.
The new sectors have (fairly) unique tracks to themselves. Renaming something to the 00019-00040 batch is a blanket change, as the other 150 or so sectors share these 20-odd tracks. There are about 5-10 original X3R sectors that had tracks to themselves, Siezewell, Kingdom End, to name a couple.
That'll get it into a few more sectors, and you won't have to edit anything.
So:
1. \x3 terran conflict\soundtrack
2. Copy/paste 08508.mp3
3. Rename to anything between 00019.mp3 and 00040.mp3.
The new sectors have (fairly) unique tracks to themselves. Renaming something to the 00019-00040 batch is a blanket change, as the other 150 or so sectors share these 20-odd tracks. There are about 5-10 original X3R sectors that had tracks to themselves, Siezewell, Kingdom End, to name a couple.
-
- Posts: 1094
- Joined: Mon, 9. Feb 04, 21:31
wow if I read you correctly what your saying is that whenever you enter one of these 150 or so sectors a soundtrack for it is just picked at random from the 19-40 tracks so If I go though all those tracks and copy over the ones I'm not keen on with the tracks I am keen on then my favourite tracks will just start popping up randomly around these 150 odd sectors and Ill be guaranteed to like every one of them.fud wrote:One way to do that, is to take the track played in Mars (08508.mp3), copy/paste it, then rename it to one of the main tracks (00019-00040).
That'll get it into a few more sectors, and you won't have to edit anything.
So:
1. \x3 terran conflict\soundtrack
2. Copy/paste 08508.mp3
3. Rename to anything between 00019.mp3 and 00040.mp3.
The new sectors have (fairly) unique tracks to themselves. Renaming something to the 00019-00040 batch is a blanket change, as the other 150 or so sectors share these 20-odd tracks. There are about 5-10 original X3R sectors that had tracks to themselves, Siezewell, Kingdom End, to name a couple.
Wow that's even better than I was hoping for, I thought I'd have to assign a track to each sector one by one -thanks a lot fud



My (new) PC:-
Intel® Core™ i7-4770 processor (3.4 GHz, 8 MB cache)
Microsoft Windows 10
16 GB DDR3 Ram
NVIDIA GeForce GTX 1060 6 GB GDDR5
Intel® Core™ i7-4770 processor (3.4 GHz, 8 MB cache)
Microsoft Windows 10
16 GB DDR3 Ram
NVIDIA GeForce GTX 1060 6 GB GDDR5
-
- Posts: 1094
- Joined: Mon, 9. Feb 04, 21:31
-
- Moderator (English)
- Posts: 28245
- Joined: Thu, 15. May 03, 20:57
Not quite, as I understand it. 'Shared' means that the Universe file assigns the same track to multiple sectors. As far as I can tell, the same track plays whenever you enter any given sector. You don't hear a different one each time. But by modifying the Universe file, and adding enough tracks, every sector can have its own unique soundtrack.shireknight wrote:...
wow if I read you correctly what your saying is that whenever you enter one of these 150 or so sectors a soundtrack for it is just picked at random....
fud or someone else in the know can correct me if I've got something wrong.

Have a great idea for the current or a future game? You can post it in the [L3+] Ideas forum.
X4 is a journey, not a destination. Have fun on your travels.
X4 is a journey, not a destination. Have fun on your travels.