How to add music? please help.

The place to discuss scripting and game modifications for X Rebirth.

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

Privata
Posts: 719
Joined: Mon, 19. Dec 11, 22:59
x4

How to add music? please help.

Post by Privata »

Know I know I have asked this sort of question over and over.
right so here is the albion cluster
</sound>
<sound id="music_cluster_b" description="Music for cluster_b" repeat="-1" is3d="0" preload="0">
<sample selection="random">
<select start="music\clusterb\Argon Peace Space (f moll) [melodic]" />
<select start="music\clusterb\Argon Space [ambience 3]" />
<select start="music\clusterb\Argon Space [ambience 5]" />
<select start="music\clusterb\Boron Space [ambience 2]" />
<select start="music\clustera\Paranid Space [ambience 1]" />
<select start="music\ambience\ambience_01" />
<select start="music\ambience\ambience_02" />
</sample>
<volume start="0.3" />
<effects>
<fade in="0.01" out="0.025" />
</effects>
</sound>

how would I do XML magic to add music with out replacing anny I still dont understand the system
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

first you need the full xml path (you just posted a part of the file, but you have to specify the path from the document root), then you do this:

<diff>
<add sel="FullXMLPath">
<select start="music\Idolmaster\relations" />
<select start="music\Idolmaster\Overmaster" />
<select start="music\Idolmaster\Yakusoku" />
</add>
</diff>

here an example for a full path inside the xml document (NOT the file path :roll: )
Source Document:
<root>
.<foo id="1" something="doesnt matter">
..<bar name="A" nomusic="true">
...<entry>a</entry>
..</bar>
..<bar name="B" nomusic="true" >
...<entry>a</entry>
...<!-- here <ou want to add something -->
..</bar>
.</foo>
.<foo id="2" something="doesnt matter">
..<bar />
.</foo>
</root>

then the full path would be:
/root/foo[@id='1']/bar[@name='B']

note that you have to use " " and ' ' for diffrent things (best use " " for the full path and ' ' for marking attributes, it works the other way around too, though)

EDIT: added dots and colors to make xml path more obvious
Last edited by UniTrader on Thu, 5. Dec 13, 21:09, edited 1 time in total.
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)
Privata
Posts: 719
Joined: Mon, 19. Dec 11, 22:59
x4

Post by Privata »

ok thanks I will give it some goes and see how I get on
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

reworked my post a bit, should be more obvious now what is meant..
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)
Privata
Posts: 719
Joined: Mon, 19. Dec 11, 22:59
x4

Post by Privata »

is the correct?
<diff>
<add sel="music_cluster_b" description="Music for cluster_b" repeat="-1" is3d="0" preload="0">
<select start="extensions\OldM\Music\00019" />
<select start="extensions\OldM\Music\00020" />
<select start="extensions\OldM\Music\00021" />
</add>
</diff>
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

Privata wrote:is the correct?
<diff>
<add sel="music_cluster_b" description="Music for cluster_b" repeat="-1" is3d="0" preload="0">
<select start="extensions\OldM\Music\00019" />
<select start="extensions\OldM\Music\00020" />
<select start="extensions\OldM\Music\00021" />
</add>
</diff>
almost. i have marked whats wrong in red. thats where the internal xml path must be put, which you have to put together from the whole file, not just copy some snippets you find near where you want to change something.
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)
Privata
Posts: 719
Joined: Mon, 19. Dec 11, 22:59
x4

Post by Privata »

here my current version
<?xml version="1.0" encoding="UTF-8"?>
<diff>
<add sel="/soundlibrary">
<sound id="music_cluster_b" description="Music for cluster_b" repeat="-1" is3d="0" preload="0">
<select start="extensions\OldM\Music\00019" />
<select start="extensions\OldM\Music\00020" />
<select start="extensions\OldM\Music\00021" />
</diff>

but it still dosent work

EDIT :I seem to be hopless at this lol
I trying lots of ways and nothing works , could you , if possible give me a template to work upon?
Isbeorn
Posts: 41
Joined: Sat, 10. Dec 05, 13:28
x3tc

Post by Isbeorn »

try this:

<diff>
<add sel="/soundlibrary/sound[@id='music_cluster_b']/sample">
<select start="extensions\OldM\Music\00019" />
<select start="extensions\OldM\Music\00020" />
<select start="extensions\OldM\Music\00021" />
</add>
</diff>
Privata
Posts: 719
Joined: Mon, 19. Dec 11, 22:59
x4

Post by Privata »

Isbeorn wrote:try this:

<diff>
<add sel="/soundlibrary/sound[@id='music_cluster_b']/sample">
<select start="extensions\OldM\Music\00019" />
<select start="extensions\OldM\Music\00020" />
<select start="extensions\OldM\Music\00021" />
</add>
</diff>
I LOVE YOU !
thanks so much.

I sorted out everything know just need to of course put the musics in logical fashion

Return to “X Rebirth - Scripts and Modding”