Cross surface rail connection

Post your ideas and suggestions how to improve the game.
Post Reply
mrvn
Smart Inserter
Smart Inserter
Posts: 2491
Joined: Mon Sep 05, 2016 9:10 am

Cross surface rail connection

Post by mrvn » Thu Sep 20, 2018 9:56 am

TL;DR
It would be nice if one could create a pair of rails on different surfaces and connect them so that trains can pass from one surface to another.

What ?
I suggest creating a special rail tile that has one that connects to any other rail tile on the same surface like normal rails and the other end connects to a second instance of the special rail tile. The special rail tiles would connect the 2 rail segments on different surfaces into a single segment. Trains would path across the special tiles and teleport from one surface to the other when they cross it.
Why ?
The use cases for this would be many. For example a mod can add underground surface and add tunnel entries and exits for trains. The inside of the tunnel would then be on the underground surface. Having underground mines with rail access would be another.

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 1661
Joined: Sat Jun 11, 2016 6:41 am

Re: Cross surface rail connection

Post by Optera » Thu Sep 20, 2018 10:09 am

As much as I'd love to have working tunnels or cross server rail connectors I can't see that implemented even as api.
My Mods:

Tekky
Filter Inserter
Filter Inserter
Posts: 808
Joined: Sun Jul 31, 2016 10:53 am

Re: Cross surface rail connection

Post by Tekky » Thu Sep 20, 2018 1:07 pm

I agree that it would be nice to have an underground layer. Maybe even several underground layers would be appropriate.

Here are a few suggestion threads regarding underground rail tunnels/bridges (but not specific to underground layers):
viewtopic.php?f=6&t=46978 Underground Rail
viewtopic.php?f=6&t=44338 Underground rails
viewtopic.php?f=6&t=49288 Tunnels
viewtopic.php?f=6&t=57178 bridge

Since your suggestion seems to be specific to adding this feature to the modding API, maybe it would be better to post your suggestion in the modding interface requests sub-forum.

mrvn
Smart Inserter
Smart Inserter
Posts: 2491
Joined: Mon Sep 05, 2016 9:10 am

Re: Cross surface rail connection

Post by mrvn » Thu Sep 20, 2018 2:03 pm

This is not a modding API request or anything for cross servers.

This needs to be an entity in vanilla that the train network recognizes. The train path finding has to know about the pair of cross surface rails so it can plan paths across them. Something that can't be modded.

Once the entity exists placing them and connecting them in pairs becomes the job of a mod unless vanilla wants to support tunnels itself. That step might need some modding API for it but that depends on the implementation of the entity itself.

Note: The 2 entities don't even have to be on different surfaces. You could build a train teleport portal by connecting 2 such rail entities on the same surface.

@Tecky: I know of those other threads but they discuss specific features that could all be implemented using this more generic entity.
For example a tunnel mod would create a new entity with a tunnel entry graphic. Probably including some rails and a hill into which the tunnel dives and an arc for the entry. Under/inside the arc would be the cross surface rail connection. The mod can then place a tunnel exit on the same map and connect the two (teleports the train from tunnel entry to exit). Or have an underground surface for the actual tunnel and use 4 cross surface rails alltogether.

Post Reply

Return to “Ideas and Suggestions”