Random Train Generator

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


  • Hi!


    Me as an "Schönbau" creator i like when a line has a huge of variations of trains, many kinds of trains pass through.

    Previously, i solved this by creating one train storage station:

    Speciel Stations


    My problem was with this solution that the game had to simulate too much trains. This had an effect on performance. And the trains came continuously (not randomly).

    So I created a mode for my save game that can replace the trains randomly from an array, on the selected stations.

    I use my script with my save game with about 50 lines and the arrays have more than 100 vehicles.

    I made an simple save game to show how it works.

    SaveGame


    -It read the train arrays.

    -Checks the trains and their last stops in the update function.

    -If a train has departed from the "replacer" station, then the train got the id of next stop as "stopIndex".

    -The program will realise it and replace the train for another one from the correct array.

    More details in the: random_train_generator.lua


    -- Attention!!!!!!!!!!!!

    -- This mod works with only one save game! You have to copy it as a new one to reuse it for another save!

    -- If you want to delete a train or a line than you must delete first must it here and then in the game!

    -- The mod can be disabled in any time!

    -- Some modded vehicles does not work with this version. But most of them works correctly!

    -- If you have a dump than you can see the last replaced vehicle in the stdout.txt (Line name, array index, train id).

    -- If a vehicle cause a dump then you have to delete the line from the array (array index)!


    I am not a professional mod creator. I am a programmer for the business sector. I created it as a hobby.

    It's not a complete mod. It's an alpha version concept without error handling.

    It can be more dynamic and better.


    I just let it here. Maybe it's a good example for future mods.

  • Sounds super interesting! Thank you so much, Brunna!

    Btw: Are you "the brunna" that also created the train mods for Cities Skylines a few years ago? Really liked those (in case it is you ^^).

  • hah! Interesting :). Cool to have you here, honestly. I also "switched over" to Transport Fever (2) as I once realized that in C:S, I am only building cities/infrastructure to watch the trains... and not building the actual city. So, the "schönbau" in tpf fits way better to my playstyle than it is intended to be in C:S.


    anyway. Enjoy gaming! And maybe we even get a mod here and there from you :S;):saint:.

BlueBrixx