Problem With Sound Sets

Willkommen in der Transport Fever Community

Wir begrüßen euch in der Fan-Community zu den Spielen Transport Fever und Train Fever, den Wirtschaftssimulatoren von Urban Games. Die Community steht euch kostenlos zur Verfügung damit ihr euch über das Spiel austauschen und informieren könnt. Wir pflegen hier einen freundlichen und sachlichen Umgang untereinander und unser Team steht euch in allen Fragen gerne beiseite.

 

Die Registrierung und Nutzung ist selbstverständlich kostenlos.

 

Wir wünschen euch viel Spaß und hoffen auf rege Beteiligung.

Das Team der Transport-Fever Community


  • Hey everyone,
    I am trying to figure out how the sound sets work and I fail miserably, so I like to get some help here.



    In the no.1 part of the coding, I noticed in some file has it but some don't. why is that?


    In no.2 part, Is there any meaning of the audio files listing in this way? and how do they play out inside the game?


    In no.3 part, In transport fever wiki it says "an audio file is randomly picked from the list." So... it adds the variation to the game? or is there any other function to it?


    In no.4 & 5 part, I have no idea what the hell that even means...


    I realize that the acceleration & deceleration sound effect is possible in other mods, but I don't know how they did it. How can I make that happened?

    • This part just loads additional scripts. If these scripts aren't needed, there's also no need to have these lines in your file.
    • The order of the files is not fixed, it must be the same as in in part 5 however, because thats the code which decides when and in which way they are played.
    • These Sounds are just played randomly while the vehicle ist moving. In most cases this is used for the noise that happens if a train drives over a connection of two rails, that is only fixed with screws. Another usage are noises form a steam locos cylinders ("chuffs").
    • Just a variable definition, nothing more
    • Decides at which volume and speed the sound files defined in part 2 and 3 are played, based on some imput paramaters, e.g. vehicle speed, power output or weight.
      For the tracks part, the first entry in this table is used for the first sound file in part 2, the second entry for the second file and so on.

    You propably should have a look into the Lua manual, to learn the basic functions used in TPFs script files.

  • Also you can use the "soundsetutil" :



    local soundsetutil = require "soundsetutil"


    local clackNames = {
    "vehicle/clack/modern/part_1.wav",
    "vehicle/clack/modern/part_2.wav",
    "vehicle/clack/modern/part_3.wav",
    "vehicle/clack/modern/part_4.wav",
    "vehicle/clack/modern/part_5.wav",
    "vehicle/clack/modern/part_6.wav",
    "vehicle/clack/modern/part_7.wav",
    "vehicle/clack/modern/part_8.wav",
    "vehicle/clack/modern/part_9.wav",
    "vehicle/clack/modern/part_10.wav"
    }


    function data()


    local data = soundsetutil.makeSoundSet()


    soundsetutil.addTrackParam01(data, "vehicle/train_electric_modern/drive.wav", 25.0,
    { { .0, .0 }, { 1.0, 1.0 } }, { { .0, 1.0 }, { 1.0, 1.15 } }, "speed01")


    soundsetutil.addTrackSqueal(data, "vehicle/train/wheels_ringing1.wav", 25.0)
    soundsetutil.addTrackBrake(data, "vehicle/train_electric_modern/_brakes.wav", 25.0, .5)


    soundsetutil.addEventClacks(data, clackNames, 15.0, 10.0)
    soundsetutil.addEvent(data, "horn", { "vehicle/train_electric_modern/horn_11.wav" }, 50.0)


    return data


    end

BlueBrixx