Railway

Railway is the buildable structure which trains run on. Railways connect Train Stations and form a logistic network besides Conveyors, Drones and optional automated wheeled vehicles.

Theoretical maximum throughput
As there is currently no hitbox for the trains, and trains can clip through each other without collision, this means a single busy Railway segment can have infinite item throughput.

In case when the hitbox for train is implemented, then the maximum throughput would be: Assuming an infinite-long cargo train runs on the flat, horizontal rail at max speed of 120 km/h.

For items stacks to 100, such as ores, this is equivalent to This is equivalent to the throughput of 512 Mk.5 Conveyors.

Although the train can move this amount of items between stations, the limited ports at the station mean a much smaller transfer rate can be realized in end-to-end transfer using the train.

Construction
Railways can be laid directly on the ground or snapped to existing foundations, ramps, Train Stations, Freight Platforms, and Empty Platforms. Building a Railway costs one Steel Pipe and one Steel Beam for the first 18 meters, and one Steel Pipe and one Steel Beam for every 12 subsequent meters, making it slightly cheaper to build many small sections if short on materials.

Building Limitations
The building length of one segment of the Railway is limited to 100 meters, or the length of 12.5 foundations in a flat, straight line, which costs eight Steel Pipes and eight Steel Beams. The minimum length is 12 meters, which is the length of one and a half foundations; however, trying to build from the start of one foundation to the middle of another will strangely sometimes fail as if the Railway is somehow actually 11.999 meters long. The minimum turning radius for a perfect 90-degree turn on a foundation is 17 meters as measured by the center of the Railway at the end of the turn (where the cursor will aim when building). This means a 180-degree turn can be completed within an area of exactly five by two and a half foundation blocks and still allow snapping to the edges of that area (see image).

The maximum slope is more complicated, as it depends partially on the angle of the start and endpoints of the segment, due to the way curves will be "smoothed" from one section to the next. If the start and endpoints both lie on a flat surface such as a foundation, the maximum slope is 28 meters high over a distance of 94.5 meters, which is a ratio of 1:3.375. However, if the start and end points both lie on a Ramp 8m x 2m, the slope can be increased to a ratio of 1:2.7. You cannot build a rail on a ramp 8m x 4m, but you can use a combination of 2m ramps and 4m ramps to achieve a steeper grade than a chain of 2m ramps. The collision box of a Railway segment is six meters wide and one meter tall. Because of its short collision box and the fact that Locomotives have no collision, it is possible to "hide" a fully functional Railway beneath a floor of foundation with a 1-meter space beneath them, then more foundation to lay the Railway on (see image).

It cannot loop upside-down.

Building of curved section
The building of a Railway curve is currently glitchy. If the building is started from an existing Railway and a curved Railway with a free end is being built, it is usually easier to build. However, if an attempt to connect two existing Railways with a curve is made, it will show a 'Turning Radius too tight' warning, despite the radius being larger than 17 meters. Therefore if a curved Railway cannot be built, try to rebuild it with a different build order.

Build order
It is advisable to build the Train Station before building the rail. Attempting to build the station on top of the existing Railway will cause the station to be built on top of the rail but not connected to it. You could, however, build the Railway with the free end snapped to the foundation then build a train station at the end of it. The same is applied to Freight Platforms.

End of line loop
It is advised to put an end-of-line loop for single direction train. Building the loop itself takes trial and error, and separate the loop into several shorter curves are advised: the shorter the curve, the lesser chance that 'Too tight turn!' warning will appear.

Collision width
There is no collision box implemented at the moment, which means that the rail (and entire trains) can clip through the ground. Judging from the visual it is about six meters wide and one meter high.

Dismantle
You can dismantle the rail at any time. You cannot dismantle the rail in a train station; you have to dismantle the train station instead. Dismantling a rail segment with a train moving on it will stop the train. Dismantling a rail split way will remove the Railroad Switch Control together.

Supporting columns
There are no supporting columns for the rail, as opposed to what is displayed in the E3 trailer. The latitude curvature of a rail is only dependent on the slope of the starting and ending points, which means if the starting and ending points lie on a flat surface such as foundations, the rail will be perfectly horizontal, despite a large gap in between. On the other hand, attempting to build on uneven ground could lead to unexpected sloping of rail.

Derailing
A train cannot derail when approaching the end of the rail at high speed. Instead, it will simply stop abruptly at the end of the rail. The train segments will be 'compressed' together visually.

Building a perfectly straight Railway
When building a Railway, the angle of the segment you are building is affected by the curvature of the segment you snap to, which in turn affects the next piece you build. Because of this, it is possible to build every segment snapped to a straight line on your foundation, yet the entire track will curve endlessly back and forth. This most commonly happens when building a Railway from a segment placed directly on the ground and then connecting it to the foundation.

To avoid this, build one straight segment directly on the foundation without connecting to any other piece of Railway, then go back and connect that straight segment to the curve you were working on. Every segment placed on the foundation thereafter will remain perfectly straight until the next curve.

Splitway
Switches are made by joining two rail segments and then adding a third segment to that junction. A flag will be placed on the switch, but currently, it's wonky, and its setting is ignored by automated trains. A Railway split cannot be created directly before or after a Train station or freight platform, so a short piece of Railway is required in between.

Currently only Y-junction or 1:n junction work. X-junction, or n:m junction won't work, so consider merge them all followed by splitting if a multi-to-multi split way is required.

Power
Railways conduct Power to ridden Electric Locomotives and connected Train stations, which can be used as the backbone of a Power Grid. A simple crossroad will not conduct power to the crossing Railway; both Railways must be connected with a split way or intersection to do so.

Current issues

 * Sometimes when a Railway split is built, a Railroad Switch Control is not created automatically. In that case, the junction will not work, which means a train might get stuck on its route or it simply won't run on its automatic schedule. You need to ensure a Switch Control is created at every Railway split. Try to rebuild the Railway junction in a different order.
 * When an automated train passes through a Railway junction, some of the wagons will be teleported to the other junction, then merged back to the line. Its functionality is not affected.
 * If a Railway split leading to a 2-way train station is built too near the station, sometimes it can cause the 2-way train to move into the wrong split way, causing the train to get stuck. To prevent this, have at least 2 Railway segments between the split way and the train station.
 * This issue does not apply to a 1-way train or Railway with loops.

Trivia

 * Using the fact that rails currently do not have collision hitboxes, it is possible to make a Train line (or any other mode of transportation of Pioneers or Items) go through the most solid natural obstacles (terrain, building, etc.).

History

 * Patch 0.1.16: Now officially available