-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Intercity trains despawn instead of returning to an outside connection #180
Comments
It's happening with some, but not all, cargo trains too - in some situations. Should be reproducible on the save linked in #140 which if memory serves has two cargo stations (one in Garnet district, one in Forestry district) both served by a the same cargo track which loops round in Forestry (ensuring the forward-only train can turn round and leave the map). After an external train deposits it's cargo:
I've not checked, but maybe passenger trains are showing same trait - despawning if there's no passengers for the "leaving city" journey? |
It seems to also be happening with cargo ships (and possibly passenger ships too, but not tested those yet). If an external cargo ship offloads goods, it then despawns rather than returning to whence it came. |
I finally found the reasons why this is happening. It's going to be a bit technical here. Passenger trainsPassenger trains may despawn if the the train station where they arrived at is located too close to the edge of the map. Of course, this is possible if the 81 tile mod is enabled for example, and in general it should be unproblematic. When passenger train stations are built next to the edge of the map the game assumes that the train reached an outside connection. If there are no passengers to pick up the game assumes that the train may safely despawn because
However, the map bound condition CO once wrote uses a rather rough metric. [technical stuff ahead] It checks whether the following condition is true for the last known world position ( A possible solution would be therefore to reduce the threshold (4800) to some higher value or to replace the check with something better. I would first have to check if other mods already provide "old-fashioned" (=non-"Harmony") detours for the Cargo trainsI have not tested cargo trains as extensively as passenger trains but a different condition seems to apply here. Cargo trains waiting at a cargo hub despawn when the hub is not able to provide any goods within 16 simulation steps. [technical stuff ahead] The check is performed in the method I guess the same is also happening for cargo ships. Same story: If other mods override the I will postpone the issue for at least version 1.11. |
That's a really nice investigration! Yes, IPT2 indeed overrides ArriveAtTarget methods, and I can try to implement the fixes there |
Issue affects cargo road vehicles too. |
I've noticed this is happening a lot less after the recent updates - maybe due to improved path finding increasing the likelihood that there's cargo/cims to load on to trains/ships/etc? |
As @aubergine18 reported here (#161), intercity trains cannot return to an outside connection after unloading. However, it is currently unclear what is causing this and whether it is a bug in TMPE or not.
VictorPhilipp/Cities-Skylines-Traffic-Manager-President-Edition#165
The text was updated successfully, but these errors were encountered: