Trains and Rails

## Introduction

Trains can be used to move resources efficiently over long distances. Trucks are loaded onto a train at a station, then transported to another station and exit back onto the road system. Any type of resource can be transported by train.

Trains need to be researched, they are available once 'Four Lane Roads' have been researched. Once unlocked you can research 'High Speed Rails' and 'Lightning Rails' for faster trains.

### Step 1: Create at least 2 stations

There are 4 different types of stations to choose between. They are all unlocked as part of researching Trains.

* Small - 2 platforms. 1 in each direction
* Medium - 4 platforms. 2 in each direction.
* Large - 6 platforms. 3 in each direction.
* Main Line - 8 platforms. 4 in each direction.

All stations have 4 input roads and 4 output roads. Stations have quite a large footprint, so it does not save much space placing a small station rather than a Large. If you are unsure about future capacity needs, it is easier to place a larger station initially, rather than trying to upgrade from a small to large station at a later date.

### Step 2: Lay rails between stations

Unlike trucks, trains do not disappear when they reach their destination. Like a real train it needs to travel back and forth between the stations it is visiting. To allow this to happen all train lines must be a complete loop. I.e. the train must be able to travel from the first station, through all intermediate stations, reach it's destination, and then loop back on a track back to the first station.

The return path for the train track can go via the intermediate stations but it does not have to.

To allow a train to turn around at a station you can create a sharp turn by connecting platforms that are in opposite directions, this allows the train to turn around and start it's journey back to the originating station. The train will not stop at the platform for a second time.

### Step 3: Add a Train Line for the stations

Now you have some stations and train track running between them you can create a train line.

Click on the train line icon at the bottom of the left hand menu. Then click the '+' button on the left hand column. This will create a new train line.

Now you can add some stations to the line. Click the '+' button on the second column and the view will change so the train stations are highlighted in blue. Click on each station in order as you want them to appear on the train line.

Once complete click the '+' on the second column again to finish editing the line.

The stations should have a blue background in the list. If a station has a red background then it cannot be reached on the train tracks. There will be a connection problem between the last blue station and the first red station. Follow the line from one station to another to see if you missed a bit.

### Step 4: Add trains to the Train Line

Once you have created the train line you need to add train to it. To do this click the '+' to the right of the 'Trains on line' text. Trains are added to the line at the first station on the line. It is recommended to space out the trains on the line, to do this add one train, allow it to spawn and travel a reasonable distance and then add another train.

There is no cost in adding additional trains to the line, but you must keep an eye on capacity on the line. If you add too many trains you will create a train traffic jam which will cause resources to be delayed.

## Train Signals and Junctions

Train Signalling in Infraspace is automatic. It will automatically prevent two trains from colliding at a junction. To see the train signals in place click the 'Train Signal' button, which is available inside the road and rail menu, next to 'reverse road'

When toggled on you will see something like this:

Here there rails run left to right, with the two tracks merging into one.

When a train approaches the junction is reaches the orange rail. If there is no train currently in the orange or red part of the rail the train will proceed. If another train is already using the junction then the train will wait at the start of the orange segment before proceeding.

If two rails cross each other in an X pattern then a signals will also be created. To avoid unnecessary signals raise the height of one of the rails so it so trains can pass on both rails at the same time.

Note that the length of the orange segments match a length of line segment, i.e. between two nodes on the line. This can result in longer orange segments than desired. To fix this replace the rail with a shorter distance between each node.

### Why are trucks ignoring my trains?

Trucks travel on the 'shortest', i.e. 'quickest' route between their origination and their destination. If it is a shorter route to travel by road then resources will move by road. If you have a train line that has multiple stations you may find that resources are unloaded at a station earlier than you were expecting, because the remaining distance is shorter by road than rail. To resolve this issue either remove the road route, if possible, or try to make the train line shorter or faster (by upgrading the rails.)

### I've created my rail line but there are no trains on it?

You have forgotten to add any trains to the train line! Navigate to the train line and press the '+' button next to 'Trains on line'. This will spawn trains and the first train station.

### Can a train line use multiple platforms?

Yes it can. If you have a busy train line you might want to split the line so it is connected to more than one platform. The train routing algorithm will distribute the trains across the multiple platforms. Make sure that the other end of the platform is also connected to the train line! You will not be warned if a line is partially disconnected, but you will find out soon enough when you trains are stuck!

### Why are resources only using one of multiple train lines?

As you get more experience with trains you might want to run multiple different lines between the same two stations. This can work providing the different lines run on the same rails. If you have the different lines on different rails then only one line will actually be used to transport goods because one line will be 'shorter' than the other. This results in much less overall capacity than you might have expected.

## Rails

Rails can be unlocked from the Tech-Tree when selecting Trains research. All rails are one-way. Rails can be upgraded to High Speed Rails and Lightning Rails.

The maximum speed of a standard rail is '150'.

## High Speed Rails

High Speed Rails are one-way Rails. Trains can only go to the direction the Rails are placed in.

The maximum speed of a High Speed Rail is '300'. Which is 1.66x a standard rail.

## Lightning Rails

Lightning Rails are one-way Rails. Trains can only go to the direction the Rails are placed in.

The maximum speed of a Super High Speed Rail is '750'. Which is 3x a standard rail, or 1.8x a high speed rail.