[WIP] Yo TrackLib (testing and opinions needed)

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, all.
    After making 2 mods with tracks I found out that stations require hard coded edits to be able to use modded track types, so I made a mod that can be used by track makers to add their custom track types, and station builders to actually use them without further updates.
    Additionaly there's a script that contains functions to build tracks in any direction in your station not just curved stations or straight.
    TrackLib mod must be loaded before the track and stations that use it.


    Track mods modified to register with TrackLib will work even if the library is not present but stations that use it will crash on load.
    Modded stations will work without any additional modded tracks because TrackLib registers the default standard and high-speed tracks.


    In the attached file there are 3 folders:
    yo_tracklib_1 - mod folder of current tracklib (complete)


    yo_model_tracks_1 - modified scripts of Yo ModelTracks to use TrackLib
    yo_tracks_1 - modified scripts of Yo Tracks to add them to TrackLib



    Documentation about using TrackLib with your mods is in yo_tracklib_1/documents/ folder.


    If you have some spare time please test it and give me some feedback to see if it's ok for me to continue polishing it and release it or just make something else.
    Thanks :)

  • After some bug hunting i've found a way to tamper with stations that use paramsutil.lua and railstationconfig.lua so most of the station mods will work without any update from the author. It doesn't overwrite any of those scripts.
    Updated TrackLib attached without the other stuff.


    TrackLib doesn't modify any station files. just adds a dummy one for initialization that cannot be built. I've made a track type just for testing that will be removed at release. Just in test phase, tracklib changes the track count up to 16 (just because it is possible)
    Proof that it works:
    Only with tracklib mod:
    With tracklib and curved stations mod:


    I've added some configuration variables for station builders to disable tracklib interference or only allow some of them

  • Thank you for making this script. But I have some question, not quite sure how to use it eventhough I have read the instructions in your document folder.


    Basically what I want to achieve is. I have some Tracktypes with German Poles and some Tracktypes with Swiss Poles (vanilla). I want to use them both at the same time on my map. But the problem is. All the Station and Depots use the vanilla poles (like the Swiss poles). So if I want to use your script. It should be possible to use my tracktypes with the german Poles for all station and Depots as well?

  • @wicked1133
    Kennst du dich mit Scripterei aus? :)
    Weil ich stelle mir es so vor:
    eine .mdl sorgt ja dafür, dass das dann im Spiel verfügbar ist.
    D.h wenn du Vanilla spielst sollte es möglich sein, die beiden mdl Dateien in einen Mod packen und dort steht sicherlich eine Weiterleitung (allermeistens eine group-Datei) zu den Oberleitungen.
    So, die deutschen Oberleitungen sind ja ein Mod. Also raussuchen, wie dort die ganzen Dateien heißen und in den Scripts abändern. Somit hättest du die Vanilla Gleise mit Schweizer Oberleitungen und deinen Mod mit Deutsche.
    Ist jetzt als reine Textform sicherlich schwer zu verstehen, aber für dein klasse Projekt werde ich mich nach meinem Urlaub (leider erst ab 4.9) mal ran setzen :)
    Wenn du so lange warten kannst ok, wenn es in der Zwischenzeit jemand anderes gemacht hat, auch ok, ist halt jede Menge Umscripterei :| Aber das mag ich :)

  • I've posted it to downloads as beta
    https://www.transportfever.net…p/Entry/3240-Yo-TrackLib/


    That version works without error even if you remove the res/config and res/construction folders and leave only the res/scripts folder.
    The custom track and the hidden station are there to be modified later if it will be a patch that changes loading order. Probably i will hide the tracklib track in future versions.


    LE: I didn't test it on linux and mac. (noticed your signature) I'll install a linux to see if it crashes

    Einmal editiert, zuletzt von adisadicul ()

  • I know that this mod is uploaded as beta. Now I test this mod, get this error and want to help to get a stable version by reporting it.

    Xubuntu 18.04 64bit – MSI Z170A GAMING PRO Carbon – Intel Core i7-6700K – ZOTAC GeForce GTX 970 OC (Treiber 384.90) – 40GB DDR4 RAM Transport Fever Build 15434

  • Thank for testing. I thought that you downloaded the mod from this thread :)


    I've modified the mod and now it should work on linux also, and it is attached here.
    If it still crashes, could you post pls what is written in the gamelog starting from "Yo TrackLib: Finish mod hunting" and to the last "scandir=..." ?
    It will help debugging it.
    Thanks

  • Great work. I can start game without error and the selection is working well. Now we can build stations with all activated tracks in game.

    Xubuntu 18.04 64bit – MSI Z170A GAMING PRO Carbon – Intel Core i7-6700K – ZOTAC GeForce GTX 970 OC (Treiber 384.90) – 40GB DDR4 RAM Transport Fever Build 15434

  • Hi,


    I'm testing your mod and everything seems to be working up to the point where you want to select station tracks. All selections offered by mods are visible in the station construction menu but whatever track type I choose from the menu there is only one track type assigned for all available options. I tested it with:


    Open-cut Station & Retaining Wall - http://steamcommunity.com/shar…filedetails/?id=952878196
    Bahnhof Viersen - http://steamcommunity.com/shar…filedetails/?id=886980331
    Flying Junction - http://steamcommunity.com/shar…filedetails/?id=837486389
    Flying Junction Road Extension - http://steamcommunity.com/shar…iledetails/?id=1114711628 (trackType)
    Multi-Track-Mod - Multi-Track-Mod


    I took your advice from the first post at the top and put Yo TrackLib as the first thing to load. There are no more mods activated except your track library and listed above in the game.


    I wish I could take a screenshot but I'm on GOG version and there are no screenshot shortcut available (checked ingame key assignments - how come such a superb game offers no screenshot option?) and PrintScr doesn't work (the game window seems to be completely transparent for PrintScr key, screenshots are being taken but only for windows "underneath" the game).


    I'm on Windows 10 x64, game version 13505.


    Cheers.


    ---------------------------------------------------------------------------------------


    EDIT:


    I managed to produce two screenshots:




    Despite High Speed track being selected only ballast shows up. I noticed that sometimes the mod works good, especially when the game is started in windowed mode (switching to full screen after the map is loaded keeps the mod working). it breaks very often when the game is started in full screen mode. Also switching between modes when the map is loading breakes the mod. At least that's what I observed.



    ---------------------------------------------------------------------------------------


    EDIT 2:


    I've noticed there are two files for download in filebase section Yo TrackLib - ver 1.1 and ver 1.2fix - but they're both in fact the same version -> 1.1, which is NOT working most of the time.


    I've downloaded ver 1.2test from this thread and it seems to be working most of the time. What's more it shows up as ver 1.2 in the mod selection window which is supposedly the one which should be available for download as 1.2fix in the filebase. I'll keep testing it as, in my opinion, it's one of the most valuable mods released so far :) .


    t work!

    God's in his heaven - all right with the world.

    4 Mal editiert, zuletzt von Junglized () aus folgendem Grund: Add some more content.

  • I was away for some days but now i'm back and i'll look into these.


    TrackLib must be activated before the mods that add tracks. Mods that are loaded before tracklib are not "seen" by tracklib and it cannot scan them for tracks.
    For stations tracklib hooks into the libraries used when constructing them so they work regardless of loading order.
    I'll change the code for track selection to ignore end date of tracks if set and if it is after 1850. That way is much more reliable.
    Some station mods have custom tracks used only for station building with end date like 1800 or 1850 and tracklib doesn't load those.


    I'll make some changes tomorrow and post an updated version.


    After some beers and without anything else to do ... updated at downloads. Beer version. Should work. At least it worked ok with a savegame, new game and a lot of Alt-Enter :D

    Einmal editiert, zuletzt von adisadicul ()

  • Grimes

    Hat das Thema geschlossen
BlueBrixx