"weight" in sound_library ???

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

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

Post Reply
Trajan von Olb
Posts: 545
Joined: Wed, 4. Feb 04, 21:39
x3tc

"weight" in sound_library ???

Post by Trajan von Olb » Sun, 11. Apr 21, 00:13

Hi,

can someone kindly tell me what the entry "weight" does in random compilations within the sound_library? I guess it can be used to influence the probability - or is it the volume after all?

Here is an example where it occurs (the lib from the Terran plot):

Code: Select all

    <sound id="music_dlc_terran_soundtrack_terran_core" description="Music for the terran core sectors." repeat="-1" is3d="0" preload="0">
      <sample selection="random">
        <select weight="10" start="extensions\ego_dlc_terran\music\3. Alexei Zakharov - The Traverse"/>
        <select weight="5" start="extensions\ego_dlc_terran\music\6. Alexei Zakharov - Savage Soul"/>
        <select weight="10" start="extensions\ego_dlc_terran\music\7. Alexei Zakharov - Citadel Rim"/>
        <select weight="10" start="extensions\ego_dlc_terran\music\8. Alexei Zakharov - Rise of the Protectorate"/>
        <select weight="1" start="extensions\ego_dlc_terran\music\13. Alexei Zakharov - Distant Dawn"/>
        <select weight="1" start="extensions\ego_dlc_terran\music\14. Alexei Zakharov - Insomnia"/>
      </sample>
      <volume start="0.3"/>
      <effects>
        <fade in="1.66667" out="0.666667"/>
      </effects>
    </sound>
So what is it? :gruebel:

Thanks for all the answers :-)

Greetings Schmollo
Mein Traum vom Glück ist der Traum von einer anderen Menschheit. (S. Lem)

User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13293
Joined: Sun, 15. Feb 04, 20:12
x4

Re: "weight" in sound_library ???

Post by euclid » Sun, 11. Apr 21, 12:43

It's the "probability" for that particular track to be played.

Cheers Euclid
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.”
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786

Trajan von Olb
Posts: 545
Joined: Wed, 4. Feb 04, 21:39
x3tc

Re: "weight" in sound_library ???

Post by Trajan von Olb » Sun, 11. Apr 21, 23:51

Thank you very much. And what exactly is the impact of these figures? So simply in relation to each other or somehow absolutely? So are they percentages of probability or can you do whatever you want...?

Greetings Schmollo
Mein Traum vom Glück ist der Traum von einer anderen Menschheit. (S. Lem)

Max Bain
Posts: 1461
Joined: Wed, 27. Jun 18, 19:05
x3ap

Re: "weight" in sound_library ???

Post by Max Bain » Mon, 12. Apr 21, 00:02

If u have one sound with weight 1 and another one with 2 and a third one with 3 the first one will be played in 1 of 6 cases where the last one will be played in 3 of 6. So it's the relation to each other.
XR Ship Pack (adds several ships from XR) Link
Weapon Pack (adds several new weapons) Link
Economy Overhaul (expands the X4 economy with many new buildings) Link
X4 Editor (view stats of objects and make your own mod within a few clicks) Link

Trajan von Olb
Posts: 545
Joined: Wed, 4. Feb 04, 21:39
x3tc

Re: "weight" in sound_library ???

Post by Trajan von Olb » Mon, 12. Apr 21, 20:13

thx :-)
Mein Traum vom Glück ist der Traum von einer anderen Menschheit. (S. Lem)

Post Reply

Return to “X4: Foundations - Scripts and Modding”