Help with some basic scripting

The place to discuss scripting and game modifications for X4: Foundations.

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

Post Reply
Madwack
Posts: 10
Joined: Sat, 7. Sep 19, 20:36
x4

Help with some basic scripting

Post by Madwack » Sun, 29. Sep 19, 23:13

Help with some scripting.......please :)

Ok I am trying to change the zoned sounds
(below is from sound_library.xml from the game .cat)

<!-- ... Zoned Sounds .... -->
<!-- ..................... -->
<sound id="zoned_sound_01" description="Ambient Zoned sound" repeat="-1" is3d="0" isunique="0" preload="0">
<sample start="sfx\ambient\zone\zoned_sound_01"/>
<effects>
<fade in="4.0" out="4.0" />
</effects>
<volume start="1.0" distance="1.0"/>
</sound>

I tried to use this as an example to help me but I could not get it to work after editing.....

<!-- ...... Xenon ...... -->
<replace sel="/soundlibrary/sound[@id='music_cluster_33']">
<sound id="music_cluster_33" description="Music for Matrix #79B" repeat="-1" is3d="0" preload="0">
<sample selection="random">
<select start="extensions\Some_Music\music\Jove\Front"/>
</sample>
<volume start="0.5"/>
<effects>
<fade in="1.66667" out="0.666667"/>
</effects>
</sound>
</replace>


I tried multiply ways of editing it but could not get it to work....anyone help meeeeee :)..... one attempt is below :(

Cheers

<!-- ... Zoned Sounds .... -->
<!-- ..................... -->
<replace sel="/soundlibrary/sound[@id='zoned_sound_01']">
<sound id="zoned_sound_01" description="Ambient Zoned sound" repeat="-1" is3d="0" isunique="0" preload="0">
<sample start="extensions\Some_Music\sfx\ambient\zone\zoned_sound_01"/>
<effects>
<fade in="4.0" out="4.0" />
</effects>
<volume start="1.0" distance="1.0"/>
</sound>
</replace>

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Re: Help with some basic scripting

Post by UniTrader » Mon, 30. Sep 19, 12:06

you forgot to edit the mod folder in the file path I think

<sample start="extensions\Some_Music\sfx\ambient\zone\zoned_sound_01"/>
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 ;)

argon_emperor
Posts: 1225
Joined: Mon, 12. Dec 05, 07:41
x4

Re: Help with some basic scripting

Post by argon_emperor » Mon, 30. Sep 19, 15:56

Have you put the <diff></diff> tags across the entire changes?
[ external image ]
***modified***
"You can get more of what you want with kind words and a gun, than you can with just kind words" - Al Capone

Madwack
Posts: 10
Joined: Sat, 7. Sep 19, 20:36
x4

Re: Help with some basic scripting

Post by Madwack » Mon, 30. Sep 19, 21:17

argon_emperor wrote:
Mon, 30. Sep 19, 15:56
Have you put the <diff></diff> tags across the entire changes?
Yes I did

<!-- ...... Xenon ...... -->
<replace sel="/soundlibrary/sound[@id='music_cluster_33']">
<sound id="music_cluster_33" description="Music for Matrix #79B" repeat="-1" is3d="0" preload="0">
<sample selection="random">
<select start="extensions\Some_Music\music\Jove\Front"/>
</sample>
<volume start="0.5"/>
<effects>
<fade in="1.66667" out="0.666667"/>
</effects>
</sound>
</replace>
<!-- ..................... -->
<!-- ... Zoned Sounds .... -->
<!-- ..................... -->
<replace sel="/soundlibrary/sound[@id='zoned_sound_01']">
<sound id="zoned_sound_01" description="Ambient Zoned sound" repeat="-1" is3d="0" isunique="0" preload="0">
<sample start="extensions\Some_Music\sfx\ambient\zone\zoned_sound_01"/>
<effects>
<fade in="4.0" out="4.0" />
</effects>
<volume start="1.0" distance="1.0"/>
</sound>
</replace>
</diff>

So in my edit this final entry is to change Music and it works, but is not my work and I just borrowed it and editing it. my attempt at changing things on my own is added at the end and there are 14 of these Zoned sounds.

This is an example...13 are not shown.

Maybe someone will see something I do not...CUZ I R NOOB :(



EDIT - OH HELL YEAH I GOT IT TO WORK !!!!!

Post Reply

Return to “X4: Foundations - Scripts and Modding”