CommonAPI2 Entwicklungsdiskussion, Fragen & Antworten

Willkommen in der Transport Fever Community

Welcome to the fan community of Transport Fever and Train Fever, the economic simulators of Urban Games. The community is free for you to share and inform yourself about the game. We cultivate a friendly and objective interaction with each other and our team will be happy to answer any questions you may have.

 

Registration and use is of course free for you.

 

We wish you a lot of fun and hope for active participation.

The Team of the Transport-Fever Community

  • Thanks Eis_os. I can't wait to use this!


    I was able to keep the native.dll file from getting auto-deleted by Windows 11 , however even with using the Build OverWrite ability, I can't get the latest version of Common API to work with TpF2 Build Version 35732.


    I get several errors before the game even starts:


    Is this build of the Game not supported in the newest version of the Mod? Should I download an older version of Common API 2?

  • No, 35732 isn't supported. Only the last version 35924. Your version is more then a year old, there is no download version fot this game build.

    That is exactly the reason why CommonAPI2 has a build version check in it. The build overwrite is not something to magical fix things... The whole structure of the game is different...

  • No, 35732 isn't supported. Only the last version 35924. Your version is more then a year old, there is no download version fot this game build.

    That is exactly the reason why CommonAPI2 has a build version check in it. The build overwrite is not something to magical fix things... The whole structure of the game is different...

    Damn, If I knew that the old versions would be even gone from the internet archives, I would have downloaded and backed it up so I could have eventually used it. I stick to TpF2 Build 35732 because it's way easier for me to build stuff underground (last version without the build lines for tracks and streets, and don't have to hold shift the entire time to make the stupid tunnel selection menu not appear).

    Looks like I'll either need to hunt down Version "1.8 20231215" somehow or just give up the idea of using this.

    Thanks Anyway

  • What do you mean exact with holding shift?

    To clarify context of what I'm referring to:

    After September 2024, if you decorate Train tunnels with assets, you will not be able to select them again without holding down shift. This is because the new Tunnel Entrance selector menu gets in the way the moment you try to (even if the Track segment is fully underground without a tunnel entrance portal anywhere in sight).



    ^This will appear instead of the "configure menu" box that allows me to rename a Sign.


    If you hold down shift, it prevents this menu from popping up, allowing you to rename the Sign appropriately (This was mentioned by UG as a method needed to select double slip switches in tunnels post December 2024 Update.)


    Since I work primarily underground, holding down shift the entire time while I work would give me carpal tunnel.


    Therefore, I simply chose to downgrade to the previous version as it doesn't have that problem. UG has no intentions on fixing it since most people don't decorate underground to begin with.

  • I am quite confident that the next CommonAPI2 will help with that


    Like the no snap option with improveui, there will be a new icon


    This will virtually change the game behavior, so technical it will only open tunnel type and bridge type when pressing shift.

    This way I can modify double slip switches and signals in tunnels, so the chance is quite high this will work for constructions too.

    For changing tunnel and or bridge types, you will need to press shift while this option is active.

  • Now we are cooking with Gas! I'm so happy that this was already on your to-do list. I'm looking forward to it's release. With it, I can finally update to the latest version of the game if it works as intended (I'm sure it will if you are able to select the switches again).

  • Ich habe mal ne Frage zum Node-Editor.

    Innerhalb des Kreisverkehrs kann ich einen BasisNode auswählen, habe aber keinen Zugang zu anderen Nodes innerhalb des Kreisverkehrs.

    Den Weg/die Gleise von rechts kommend nach unten möchte ich gerne abstellen.



    I5-7500, 16GB DDR4 RAM, GTX1070 8GB, Festplatte Crucial BX500 SSD 1TB

    Industie- u. Verkehrsgigant, ab 2005: LOCOMOTION, ab 2017 TF, TpF - SimCity 1-4, ANNO 1602-1404, Civilization 2-4 - und und und...

  • Wenn du die (Tram)Einmündung weiter in die Mitte legst, sollte es klappen.

    Ggf muss du die Nodedaten entfernen, die bei dem Tramgleisen liegen, das sieht komisch aus...


    Wenn nicht, bräuchte ich das Savegame...

  • Oh, das ging schnell :thumbup:

    Naja, ist zu überlegen, ob ich den unerwünschten Weg irgendwie akzeptiere oder eine enge Kurve für den Weg von oben nach rechts in kauf nehme...


    Was heißt Nodedaten entfernen, die bei den Tramgleisen liegen?

    I5-7500, 16GB DDR4 RAM, GTX1070 8GB, Festplatte Crucial BX500 SSD 1TB

    Industie- u. Verkehrsgigant, ab 2005: LOCOMOTION, ab 2017 TF, TpF - SimCity 1-4, ANNO 1602-1404, Civilization 2-4 - und und und...


  • Die NodeDaten an der Position des roten Pfeils sehen komisch aus. Ggf. darauf klicken und Entfernen.

    Normalerweise sollte die Position weiter unten sein.

    Ggf. die Gleise mehr wie Gelb legen, damit die "Kreuzung/Einmündung etwas weiter nach unten wandert und die Position der Nodes eindeutiger werden...


    (Du hast da an einem Punkt recht viele Nodes liegen)

  • Bug report:


    CAPI2 seems to trigger redownloading of mods by the in-game mod handler, which propagates out to Steam after closing the game. This happens very frequently, and to a lot of mods.


    I just went through a cycle of about 40 mods being downloaded. Closed the game. Steam finished downloading stuff. I open the game again, and after a little think, it wants to redownload another 28:



    Excerpt from stdout.txt:

    This does not happen without CAPI2. The behavior has been around pretty much since the in-game mod browser was released (and presumably CAPI2 was updated to interact with it).


    Apologies if this has already been reported.

  • CommonAPI2 can't trigger downloading mods, (The Steam API hasn't such a functionality, nor does CommonAPI2 tell TPF2/Steam to subscribe something without user interaction )


    Code
    Mods changed, recreating data...

    Is created by TPF2, maybe some mod crashes with CommonAPI2 in mod.lua.

    Code
    Loaded 7 of 3453 mod descriptions from disk

    Looks odd, technical you should have all mod descriptions in cache...


    Do others here have this problem?


    Haben andere dieses Problem?

  • TPF2 and CommonAPI2 can only subscribe to steam mods. Downloading is handled by Steam.

    CommonAPI2 reads the mod list via commonapi._native.dampf.getMods()


    That's the only interaction with Steam.

    if in doubt, you can replace local steammods = commonapi._native.dampf.getMods() with local steammods = {}


    And here is the c++ code:

    The steam api documentation is public https://partner.steamgames.com/doc/api/ISteamUGC



    The WorkshopBackupFolder system doesn't touch steam, but works one layer above. (works even with the gog version)

    But to be sure, you don't have a backup folder set?

  • if in doubt, you can replace local steammods = commonapi._native.dampf.getMods() with local steammods = {}

    Thanks, I'll give that a try just to confirm. But I believe you. ^^

    The WorkshopBackupFolder system doesn't touch steam, but works one layer above. (works even with the gog version)

    But to be sure, you don't have a backup folder set?

    I do not have a workshop backup folder set:



    Full stdout.txt if it is of any interest (from just starting the game, looking around the CommonAPI2 settings, and grabbing the above screenshot).


    Edit: Just another stdout.txt with lots of the same spam, but this time during re-downloading of mods.:


    Edited once, last by Imsvale ().

BlueBrixx