X3TC: Editing/changing music files

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

wolfmaster1979
Posts: 255
Joined: Fri, 13. Feb 04, 05:29
x3tc

X3TC: Editing/changing music files

Post by wolfmaster1979 »

Is it possible to change the music files in x3tc?

What I mean is.... is it possible to swap out the OC music files with other music files? For example... the music theme for kingdom's end.. if I wanted that theme to play in every sector is it possible? Would it be a case of copying the file and renaming it?

I wonder if I could replace the current music with older X game music file or my own personal music files... maybe have the BSG theme play in specific sectors or something...

Has anyone tried anything like this??
User avatar
Carlo the Curious
Posts: 16999
Joined: Mon, 5. Mar 07, 22:03
x4

Post by Carlo the Curious »

They're just mp3 files in the soundtrack folder.

So long as you replace them with files with the same name, I think it should work (although I don't know which is which).
Thelic
Posts: 464
Joined: Fri, 20. Jun 08, 07:12
x4

Post by Thelic »

http://www.pagemark.nl/x3activemap/music_guide.htm

This guide is from Reunion, but most of it is the same.
wolfmaster1979
Posts: 255
Joined: Fri, 13. Feb 04, 05:29
x3tc

Post by wolfmaster1979 »

Thelic wrote:http://www.pagemark.nl/x3activemap/music_guide.htm

This guide is from Reunion, but most of it is the same.
Thanks!!! :D :D
_Axel
Posts: 20
Joined: Fri, 2. Sep 11, 22:47
x3tc

Post by _Axel »

Sorry for upping the topic, but is there a way to change the music file of a specific sector via scripts, or add music files (to add combat musics or additional sector themes) ?
User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 25130
Joined: Sun, 2. Apr 06, 16:38
x4

Post by X2-Illuminatus »

What music file is played in which sector is defined in the map. It can be changed by using the MD. Simply copy the following code into an empty .xml file:

Code: Select all

<?xml version="1.0" encoding="iso-8859-1" ?>
<?xml-stylesheet href="director.xsl" type="text/xsl" ?>
<director name="template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="director.xsd">
  <cues> 
     <cue name="ChangeSectorSound"> 
       <action> 
         <do_all> 
           <find_sector name="sector" x="0" y="0"/> 
           <alter_sector sector="sector" music="8512"/> 
         </do_all> 
       </action> 
     </cue> 
   </cues>
</director>
And save it in the "director" folder (if you don't have one, simply create one) in your X3:TC main directory.
The parts you have to change for a specific sector are the x,y-coordinate ( x="0" y="0" ) of this sector and the number of the music file in the "soundtracks"-folder you like to play ( music="8512" ). This example will play track number 08512.mp3 (the X3:TC teaser soundtrack) in Kingdom End.
It's possible to give every sector in the map a specific soundtrack. However, the combat music is limited to the known 5 (?) files afaik.
Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten

Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)

Neuauflage der fünf X-Romane als Taschenbuch

The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!
_Axel
Posts: 20
Joined: Fri, 2. Sep 11, 22:47
x3tc

Post by _Axel »

Thanks for your help :)
Ok so if I add a custom music in the 'soundtrack' folder under the name ?????.mp3 (5 numbers ?), I'll have to create a new .xml file with the code you quoted, replace the coordinates with the map's and the 5 numbers of the mp3, and it replaces it ?
Too bad for the fight music though :/
User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 25130
Joined: Sun, 2. Apr 06, 16:38
x4

Post by X2-Illuminatus »

Yes.
Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten

Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)

Neuauflage der fünf X-Romane als Taschenbuch

The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!
_Axel
Posts: 20
Joined: Fri, 2. Sep 11, 22:47
x3tc

Post by _Axel »

I have a little problem...
I tried this method and it works with default music that was already in the soundtrack directory, but when I add custom music and reference it in the Xml, it doesn't seem to affect the sector's music. :(
Smokeybacon
Posts: 2
Joined: Tue, 27. Sep 11, 03:40

Post by Smokeybacon »

_Axel wrote:I have a little problem...
I tried this method and it works with default music that was already in the soundtrack directory, but when I add custom music and reference it in the Xml, it doesn't seem to affect the sector's music. :(
Try replacing one of the redundant tracks in the soundtrack folder with your custom music. For example, 00005 is the publisher's intro theme and never used in the game, rename your custom music to that then reference it in the xml. 08505 and 06030 can also be used.
dillpickle
Posts: 1159
Joined: Mon, 3. Nov 08, 14:25
x3tc

Post by dillpickle »

_Axel wrote:I have a little problem...
I tried this method and it works with default music that was already in the soundtrack directory, but when I add custom music and reference it in the Xml, it doesn't seem to affect the sector's music. :(
If you have already used the above MD code to change the sector music once, and saved the game, then just changing the track number won't work. You'll need to change the cue name as well, as the game will have set that cue name as 'complete' and won't rerun it.
_Axel
Posts: 20
Joined: Fri, 2. Sep 11, 22:47
x3tc

Post by _Axel »

If I understand well the above xml code create a cue, so adding another xml file with the same cue name will just set the cue to the other value ?
Ok, so I'll just have to rename the cues in the other xml files/add other new cues in the same xml file for it to load correctly next time I load a save ?
Also thanks for your tip smokey :wink:

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”