Transport Fever 2

Transport Fever 2

CommonAPI2 - Modular rail station adapter
48 Comments
eis_os  [author] 6 Sep, 2022 @ 2:32am 
Technical it's possible to use this mod on Mac in failback mode without CommonAPI2,
anyway all old rail mods should work perfectly without the adapter.
Nikomta 5 Sep, 2022 @ 11:53am 
Excuse me: 1. Can I subscribe separately? 2. Do you support Mac os?
eis_os  [author] 10 Apr, 2022 @ 8:46am 
Should be fixed
jbalazs87 9 Apr, 2022 @ 7:11pm 
Hello! I got this error, cannot modify/build new stations in old/new games:
"...
Details:

Error message: error: [string "C:/Program Files (x86)/Steam/steamapps/worksh..."]:712: attempt to index global 'commonapi' (a nil value)
stack traceback:
=[C](-1): __index
C:/Program Files (x86)/Steam/steamapps/workshop/content/1066780/1947635847/res/construction/station/rail/modular_station/modular_station.con(712): ?
@res/config/base_config.lua(41): ?


File name: C:/Program Files (x86)/Steam/steamapps/workshop/content/1066780/1947635847/res/construction/station/rail/modular_station/modular_station.con

Key: game/config/ConstructWithModules

Minidump: C:/Program Files (x86)/Steam/userdata/909604929/1066780/local/crash_dump/55320111-7eda-422c-be78-0a337aa21dce.dmp

Mod: "CommonAPI2 - Modular rail station adapter" (*1947635847, 1) (consider removing this mod and contacting the mod author)

In file: ..\..\src\Lib\lua\State.cpp:592

In function: void __cdecl lua::State::Call(int,int)"
eis_os  [author] 28 Jan, 2021 @ 2:52am 
The crash is in UGs trackmodule.script calling UGs trainstationutil.script, both files are vanilla game files my adapter doesn't replace, change or modifies.

Some other station mod replaces trainstationutil.script with an older version.

Please test the adapter on a new map without other station mods, then it should still work
3236766189 27 Jan, 2021 @ 12:06pm 
"
Exception type: Lua exception

This error is usually caused by modding. Some game resources contain incorrect data.

Details:

Error message: error: [string "res/construction/station/rail/modular_station..."]:9: attempt to call field 'findOrMakeNewEdgeListNum' (a nil value)
stack traceback:
=[C](-1): findOrMakeNewEdgeListNum
res/construction/station/rail/modular_station/trackmodule.script(9): tab
@res/config/base_config.lua(88): ?


File name: D:/steam/steamapps/workshop/content/1066780/1947635847/res/construction/station/rail/modular_station/modular_station.con

Key: game/config/ConstructWithModules

Minidump: C:/Program Files (x86)/Steam/userdata/1032230213/1066780/local/crash_dump/8bd9053c-60b8-42d0-8dba-7bf4d634cecc.dmp

Mod: "CommonAPI2 - Modular rail station adapter" (consider removing this mod and contacting the mod author)

In file: c:\build\tpf2_steam\src\lib\lua\state.cpp:586

In function: void __cdecl lua::State::Call(int,int)
"
add mod track error
eis_os  [author] 4 Dec, 2020 @ 8:52am 
Uploaded hotfix, 1.8.2 should fix this error...
3236766189 4 Dec, 2020 @ 6:47am 
Error message: error: [string "D:/steam/steamapps/workshop/content/1066780/1..."]:618: attempt to index global 'commonapi' (a nil value)
stack traceback:
=[C](-1): __index
__CRASHDB_CRASH__ struct lua::LuaException: c:\build\tpf2_steam\src\lib\lua\state.cpp:586: void __cdecl lua::State::Call(int,int): error: [string "D:/steam/steamapps/workshop/content/1066780/1..."]:618: attempt to index global 'commonapi' (a nil value)
stack traceback:
=[C](-1): __index

crash when electrified tools are used at stations
meRlinX_AT 21 Jul, 2020 @ 2:40pm 
commonapi2.uiparameter: ERROR UI Parameter creation failed because _getEntriesAsList is empty, should not happen if native dll is loaded!
stack traceback:
...066780/1947572332/res/scripts/commonapi2\uiparameter.lua:455: in function <...066780/1947572332/res/scripts/commonapi2\uiparameter.lua:443>
(...tail calls...)
[string "C:/Program Files (x86)/Steam/steamapps/worksh..."]:72: in function 'makeParams'
[string "C:/Program Files (x86)/Steam/steamapps/worksh..."]:102: in function <[string "C:/Program Files (x86)/Steam/steamapps/worksh..."]:86>
meRlinX_AT 21 Jul, 2020 @ 2:40pm 
es ging bis vor dem Update.

hab den mod deaktivert .. es sind aber noch immer Fehler im Logfile:

commonapi2.init 20200630
commonapi2.init: Your TPF2 version 'steam_29596_1' isn't listed as known good version, please update CommonAPI2
eis_os  [author] 21 Jul, 2020 @ 3:44am 
Nunja, es steht da:

Mod: "Extended Station Configuration Options" (consider removing this mod and contacting the mod author)

Bitte benutze den Adapter nicht mit anderen Bahnhofsmods, oder entferne den Adapter aus dem Spiel. Das mischen gibt leider nur Probleme...
meRlinX_AT 19 Jul, 2020 @ 3:10pm 
Beim konfigurieren einer Station bekomme ich keine Gleise angezeigt.
Zusätzlich verwende ich https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1945089731

Danke
meRlinX_AT 19 Jul, 2020 @ 3:09pm 
Details:

Error message: error: [string "res/construction/station/rail/modular_station..."]:9: attempt to call field 'findOrMakeNewEdgeListNum' (a nil value)
stack traceback:
=[C](-1): findOrMakeNewEdgeListNum
res/construction/station/rail/modular_station/trackmodule.script(9): tab
@res/config/base_config.lua(88): ?


File name: C:/Program Files (x86)/Steam/steamapps/workshop/content/1066780/1941075510/res/construction/station/rail/modular_station/modular_station.con

Key: game/config/ConstructWithModules

Minidump: C:/Program Files (x86)/Steam/userdata/199316036/1066780/local/crash_dump/ccfe4441-5023-42af-883f-727d6b13abea.dmp

Mod: "Extended Station Configuration Options" (consider removing this mod and contacting the mod author)

In file: c:\build\tpf2_steam\src\lib\lua\state.cpp:586
In function: void __cdecl lua::State::Call(int,int)
meRlinX_AT 19 Jul, 2020 @ 3:08pm 
Scheinbar verträgt sich da iwas nicht.

Fehlerlog:
commonapi2.init 20200630
commonapi2.init: Your TPF2 version 'steam_29596_1' isn't listed as known good version, please update CommonAPI2
Exception type: Lua exception

This error is usually caused by modding. Some game resources contain incorrect data.
LB_Industries 18 Jul, 2020 @ 11:34pm 
ausserhalb bei der normalen Gleisverlegung sind ja alle da bei den Modulen nicht, selbe Mod's
LB_Industries 18 Jul, 2020 @ 11:32pm 
@eis_os
weiß nicht ich habe diese von CC Johnson's
eis_os  [author] 18 Jul, 2020 @ 10:27am 
Dann hat vielleicht der Autor der Gleise die du nutzt die Module entfernt und oder es sind Gleise geladen, die mit dem "neuen" UG System nicht funktionieren.
LB_Industries 17 Jul, 2020 @ 10:12pm 
da sind nur noch blaue Kästchen.....wo die Gleismodule waren
eis_os  [author] 2 Jul, 2020 @ 4:01am 
Can you please post the error message so I can investigate the error? I did push a development version to workshop now. Maybe it fixes your problem already...

Note: The code paths should technical work more or less without CommonAPI2.
With CommonAPI2 loaded and actibe: old and new module system should work.
Without CommonAPI2: new ug style modules should work and the old modules should show failback tracks

If not please report, thank you.
Sea Level 1 Jul, 2020 @ 2:51pm 
The mod causes a console error which makes all of the tracks that come with it unusable.
Kalita_fox 26 Jun, 2020 @ 3:49am 
Hello. The game was recently updated and after that I do not work with the path modules where your mod is needed. Does your mod not require an update for the new version of the game?
<DMG>SoLaRiS 3 Apr, 2020 @ 9:20am 
@eis_os, tu
eis_os  [author] 3 Apr, 2020 @ 4:45am 
https://www.transportfever.net/lexicon/index.php?entry/259-commonapi2-bahnhofmodule-mit-eigenen-gleisen-via-bahnhofsadapter/ The examples are written in English

Technical, look if the construction supports the interface, if there is support call it:

result.common_trackinterface.makeTrackByTrackType(result, transform, tag, slotId, addModuleFn, params, <tracknamelua>, <catenarybool>)
<DMG>SoLaRiS 1 Apr, 2020 @ 1:49pm 
Hello! How to provide support for track modules?
eis_os  [author] 26 Feb, 2020 @ 1:24am 
You can simple remove this mod from your savegame, I don't think my mod is the reason. Please report back about the result...
Spud607 21 Feb, 2020 @ 5:17am 
I downloaded this mod and ever since I have been unable to create road lines. I cannot do anything got to do with buses or trucks. it is an absolute pain. can someone please help me figure out what is wrong?
KaitouShunUS 17 Feb, 2020 @ 3:02am 
I'm not sure if it stopped working after game update or it is a compatibility issue with another mod, but there used to be 400m and 480m length in the station building menu but now they are gone...
Churryaa 14 Feb, 2020 @ 5:10pm 
Is this mod working? I can't find any additional tracks for station on the station config menu... :(
Doxs Roxs 29 Jan, 2020 @ 11:06am 
I think a large part of the performance issues with large stations is simply bad programming from the devs. Just editing a large station will cause lag even when you are not doing anything, seems like there is some recursive code constantly looping with exponential computing cost the more station modules you add. A way around that could perhaps be to change the station module size to something larger then 40 meters. I have not been able to get it to work properly myself. But perhaps someone else can? Personally Id be very happy with 100m modules or perhaps even larger since I almost never fiddle with special stations. Usually one picks one length and uses that for the mainline since the same is done for trains.
GeneralMacNut 18 Jan, 2020 @ 11:28am 
@ tsilaicosneknurd
I see, thank you for your answer.
Alessandra 16 Jan, 2020 @ 4:50pm 
Can you look into making it work with other mods like dutch station and station forever plz thank you 🙏
tsilaicosneknurd 16 Jan, 2020 @ 8:15am 
@eis_os
Wäre es möglich, analog zur Verbindung von Unterführungsmodulen, diese auch mit einer solchen Unterführung zu verbinden:
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1924671230&searchtext=underpass
tsilaicosneknurd 16 Jan, 2020 @ 8:01am 
@ General MacNut
the module must support common API, but there are none, yet
GeneralMacNut 14 Jan, 2020 @ 6:13am 
How to use mod custom train track for station?
MaVeRicK 7 Jan, 2020 @ 11:21am 
Ich habe die Option bigStation aktiviert. In der länge kann ich beliebig viele Gleise ansetzen, nur in de Breite ist es begrenzt ist das normal mache ich was falsch?
fableofgod 7 Jan, 2020 @ 3:27am 
Hi, I see that you can build longer tracks when modifying a station. How could you do that? What mod have you installed?
Roγo Μαλocco 6 Jan, 2020 @ 5:30am 
Untergrundstationen wären auch nicht schlecht
Hary 4 Jan, 2020 @ 5:09am 
"Längere Gleise mit 400m and 480m direkt bauen"
Wie geht das? Bei mir funktioniert das nicht!?
SmaSh 3 Jan, 2020 @ 6:29am 
Moin,
erstmal super für den tollen Mod! Ich hätte da ein paar Fragen:
- Muss ich das Feld am oberen Bildschirmrand immer offen lassen oder kann ich es schließen um den Mod zu nutzen?
- Ich verstehe die Anleitung für die größeren Bahnhofskonstruktionen nicht so ganz. Muss ich Änderungen vornehmen, damit das Spiel sauber und flüssig laufen kann?
Schlupauge 1 Jan, 2020 @ 10:08am 
bigger screenshot PLS
eis_os  [author] 30 Dec, 2019 @ 11:05am 
Hallo, du kannst keine Mods mischen. Ich denke du hast "Extend Station Configuration Options" benutzt oder es ist früher in deiner Modliste. Es ist von UG nicht geplant gewesen die Konstruktionsscript zu erweitern. Daher kann man nur immer nur ein Mod nutzen.

Ich kann meine Gleise immer noch updaten. Für weitere Probleme bitte die Foren auf https://www.transportfever.net/ nutzen, da kann auch gleich ein Screenshot mit hochladen,
dann muss man nicht so Rätseln und ich kann auch gezielt Antworten. Danke.

frank.eckes 30 Dec, 2019 @ 1:44am 
Vielen Dank für den tollen Mod! Leider habe ich kein Gleisupgrade-Button mehr, wenn der Mod aktiv ist. Die Bahnhöfe werden mir im Baumenü jetzt auch ohne Konfigurationsmöglichkeit für die Gebäudeanbauten angezeigt. Alle Bahnhöfe werden jetzt mit der kleinsten Gebäudekonfiguration gebaut. Irgend eine Idee woran das liegen kann?
eis_os  [author] 27 Dec, 2019 @ 12:34am 
Look at track mods with a lot of tracks or simple try a test game without any additional mods, except CommonAPI2 and Adapter...
CenariusPL 26 Dec, 2019 @ 3:40pm 
Dont know if is this mod or smth else, but i cant now use little wrench tool to fast upgrade tracks... (does not show at all)
Cr0ss 26 Dec, 2019 @ 8:39am 
My mistake I misinterpreted your indications, thank you
eis_os  [author] 26 Dec, 2019 @ 8:21am 
Both Mods (even if you see the CommonAPI Menu) needs to be loaded into your Savegame.
MainMenu -> Load Game.
At the right side under Delete (Savegame), you will see a plus sign (+).
Clicking on the plus sign, you can change/add/sort mods, add both CommonAPI2 and the Depot Adapter.

If you reopen the Mod Settings Window, you should see a list of all active mods and a Configuration Button
Cr0ss 26 Dec, 2019 @ 6:46am 
Hi, I installed and followed the procedures you described, (eis_os_commonapi2_1 and eis_os_com_modularstationadapter_1 but nothing appears in the mod menu, it is completely empty. Suggestions?