Railway

Railway is the buildable structure which trains run on. Railways connect Train stations and form a logistic network besides belts and optional automated wheeled vehicles. As Railways have superior throughput advantage and use relatively low CPU over multiple parallel Conveyor Belts, they are almost essential for construction of a megabase.

Theoretical maximum throughput
As there is currently no hitbox for the trains, and train can clip through each other without collision, this means a busy railway 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 Conveyor Belt Mk.5.

Although the train can move this amount of items between stations, the limited ports at the station means a much less 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 1 Steel Pipe + 1 Steel Beam for the first 18 meters, and 1 Steel Pipe + 1 Steel Beam for every 12 subsequent meters, making it slightly cheaper to build many small sections if short on materials.

Building Limitations
The build length of one segment of railway is limited to 100 meters, or the length of 12.5 foundations in a flat, straight line, which costs 8 Steel Pipes + 8 Steel Beams. The minimum length is 12 meters, which is the length of one and 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 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 5 by 2.5 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 end points of the segment, due to the way curves will be "smoothed" from one section to the next. If the start and end points both lie on a flat surface such as 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 6 meters wide and 1 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 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 2 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 will 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. Same applied to Freight Platforms.

End of line loop
It is advised to put a 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 6 meters wide and 1 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 splitway 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 with 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 platfrom, 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 splitway 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 issue

 * Sometimes when a railway split is built, but a Railroad Switch Control is not created automatically. In that case, the junction will not work, that 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 different order.
 * When 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, sometime it can cause the 2-way train to move into the wrong splitway, causing the train to stuck. To prevent this, have at least 2 railway segments between the splitway and the train station.
 * This issue does not apply to 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 most solid natural obstacles (terrain, building, etc.).

History

 * Patch 0.1.16: Are now unlockable in game