In other languages:

User talk:HR248: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''Welcome to the Official Factorio Wiki!''' Now that you have an account, there are a few key places on this Wiki that will be helpful in your efforts to improve it. <br>
WIP
First and foremost, please be sure to read and understand the [[Factorio:Wiki rules|rules of this Wiki]]. If you have any questions or concerns with these rules, please don't hesitate to ask an Admin. <br>
{{Languages}}
Secondly, if you're new to editing Wikis and are unfamiliar with MediaWiki's formatting, please be sure to read the [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents help pages]. In addition to the help provided by MW, we also provide a [[Factorio:Style guide|style guide]] that we enforce. <br>
:''For the research see [[Railway (research)]]''
If you're unsure where to begin, please see the [[Factorio:Editor_noticeboard|editor noticeboard]], where information on the current objectives and projects of the Wiki may be found. <br>
 
Again, welcome, we hope you contribute as much high quality information as you can. :) [[User:Bilka|Bilka]] ([[User talk:Bilka|talk]]) - <span style="color:#FF0000">Admin</span> 08:06, 17 July 2018 (UTC)
'''The Railway''' is one of the main transport methods in Factorio. Although the installation of such a network can be complicated, and requires a large amount of resource and space, it is faster and more efficient than [[Belt transport system|belts]] and [[Logistic network|robot logistics]], especially over large distances.
 
Railway construction, however, is not understood instantly. It takes some time to learn the basics, such as automating transportation. Learning how to manage and maintain upkeep of a larger train network takes time and experience.
 
== Infrastructure ==
 
To build a railway, tracks (also called rails) must be built for the train to ride on. Typically, this is done via the [[rail planner]], but can also be done manually. Bear in mind that rails are placed on a two-tile grid, so a rail cannot be moved by only one tile.
 
=== Minimum manually operated railway ===
As a minimum a manually operated railway has to consist of:
* [[Rail]]s (tracks)
* [[Locomotive]]s
 
Locomotives can be entered and then manually operated by standing next to them and pressing the {{Key|ENTER}} button.
 
=== Switches ===
* There is no visual representation of a working switch, however the rails will appear to merge. Using the rail planner, the player must place a [[rail]] overlapping an existing rail to form a switch. Switches are forks in tracks that allow a train to pick between two directional options.
* The crossing of two straight tracks is not usable as switch, as trains have a limited turning radius. They do, however, connect [[Rail signal| signal blocks]] which helps prevent collisions.
* Parallel tracks do not interact with each other. However, switching from one track to the other can require extra resources if they are too close together; the track must turn away from the other parallel track and then turn back to it. This can create complicated networks of signals and, as such, one should generally not build parallel tracks unless they are spaced adequately. (Generally, 2 track widths apart works well)
 
[[File:fff-140-controlled-gates.gif|thumb|An example of a safe railway crossing.]]
=== Crossing tracks ===
 
'''Be careful when crossing tracks! Trains are one of the highest damaging entities in the game, and will kill most players instantly on contact.'''
 
A checklist of proper track crossing etiquette:
 
# Zoom out, so that you can see a train coming.
# Look left, then right.
# Check for signals nearby: If a [[rail signal]] suddenly jumps from green to red or green to yellow, a train is coming. Do not cross.
# Avoid walking near the tracks, as you do not need to be fully on the tracks to get hit.
# While it is possible to get into/out of a train while it is moving, a miss can cost your life. The sides of the train can still deal damage, as well as the player being able to slip between two rail cars.
# Heavy [[Energy shield|shields]] can be used to reduce the damage taken. In extreme cases, it is possible to stop a train with your body. This will require several shield modules to not be instantly killed, and will drain a large amount of the suit's energy.
# All entities with health will take damage getting hit by a train, so take care not to leave a [[Car]] or [[Tank]] on the tracks. However, this includes hostile forces!
# Trains far from a [[train stop]] will be traveling at (near) max speed, so take extra precaution when crossing and zoom out further. Trains near a [[train stop]] or signal will slow down to stop, and will be traveling slower. Trains of different configurations will also move slower or faster.
 
A safe railroad crossing like the example shown in the picture can be built. This works by restricting access to the tracks when an oncoming train has the rails reserved. When the player is on the rails, the signals are reserved by the [[circuit network]], and the train must stop and wait until the player leaves the tracks. When a player is inside the area crossing the tracks, the train gates are closed so the player can't get on the tracks outside the crossing. This is to completely ensure a safe crossing, and is often used on servers.
 
{{clear}}
 
== Trains ==
Train components:


{{Languages}}
{| class="wikitable"
|{{Imagelink|Locomotive}} || {{Imagelink|Cargo wagon}} || {{Imagelink|Fluid wagon}} || {{Imagelink|Artillery wagon}}
|}
 
[[File:Railway-assemble-train.png|thumb|left|300px|Placing a [[Cargo wagon]] so it is attached to the train.]]
 
* A train consists of at least one locomotive.
* Trains can have more than one locomotive, and any number of [[Wagon]]s.
* Locomotives can be '''manually''' driven forwards or backwards, however, they are generally slower going backwards. The left and right movement keys are used to change direction at switches.
* Trains can only drive forwards automatically. An automatic train can drive forwards and backwards when two locomotives facing different directions are connected to the train.
* A train needs [[fuel]] to drive. Fuel can be added by inserters when the train is in manual mode or parked at a station, not when waiting at a signal or standing on automatic mode.
 
The locomotives' inventory is only used for [[fuel]]. To transport items or fluids [[cargo wagon]]s and/or [[fluid wagon]]s have to be attached to the train. To attach rolling stock, whether a wagon or a locomotive, the player may either prepare to place one near an existing train, where a green graphic will show the player that the stock will be attached, showing a connection between the train and the new stock. Alternatively, the player may manually connect rolling stock to trains with the rolling stock connect key, if the cargo wagon was placed far away from a train. Rolling stock can likewise be disconnected with the rolling stock disconnect key. The cargo wagons can be filled or emptied manually or by up to twelve adjacent [[Inserters]] (six on each side), while fluid wagons can be filled or emptied with up to three [[pump]]s, which will automatically connect to the nipples on top.
 
{{clear}}
 
== Stations ==
[[File:station-example-1.png|thumb|right|256px|A very minimal train station.]]
Station Components:
{| class="wikitable"
|{{Imagelink|Train stop}} || {{Imagelink|Straight rail|Rail|Rails}} || {{Imagelink|Inserter|Inserters}} or {{Imagelink|pump|pump|Pumps}}
|}
 
 
A '''train station''' is a combination of at least one [[train stop]] plus a [[storage]] and/or distribution system, used to fill or empty [[cargo wagon]]s and/or [[fluid wagon]]s, load [[fuel]] into the [[Locomotive|locomotive(s)]], load ammunition into [[artillery wagon]]s, or repair trains.
 
'''Don't mix up ''train stations'' with ''train stops''.''' A train station is a concept, whereas a [[train stop]] is an item.
 
[[Inserter]]s placed next to train tracks are used to load/unload trains at train stops. Inserters are the only way to automatically get items out of and into cargo and artillery wagons; pumps are the only way to automatically get fluids into and out of fluid wagons.
 
{{clear}}
 
== Signals ==
{| class="wikitable"
| {{Imagelink|Rail signal}} || {{Imagelink|Rail chain signal}}
|}
 
Rail signals are used to employ multiple trains automatically without the danger of trains crashing into each other. Rail signals split the network into blocks and ensure that only one train can be in every block at any time. Note that driving a train manually ignores all signals; so it is possible for automatic trains to crash into the player if the player ignores red/yellow signals. Always beware of automatic trains and give them the right of way.
 
The [[Tutorial:Train signals|train signals tutorial]] contains an in-depth explanation of rail signals, blocks and deadlocks.
 
=== Basic Signaling Rules ===
* There can only be one train in a block at any time. A train spanning multiple blocks occupies them all.
* A red signal means that the following block is occupied by a train.
* A yellow signal means that a train is approaching and already has the approval to enter the following block.
* [[Rail signal]]s separate a new block and reflect its state: green - free, yellow - reserved, red - occupied
* [[Rail chain signal]]s separate a new block and reflect the state of the next [[Rail signal]](s): see above, blue - at least one of the paths is blocked, but not all
* A train can only pass a signal on the right of the track, or if there is a signal on both sides on the same rail segment. Of course, manual driving overrides this.
 
== Automated transport ==
[[File:train-schedule-gui.png|thumb|300px|The scheduale tab in the train GUI: 1 - switch between automatic and manual driving mode; 2 - add new train station; 3 - delete selected station; 4 - send train to selected station; 5 - add wait condition for selected station; 6 - delete selected wait condition; 7 - change logical mode of selected wait condition]]


Das '''Elektrische System''' wird genutzt, um eine Vielzahl verschiedener Maschinen anzutreiben. Das Spiel kann kaum ohne Elektrizität gespielt werden. Wenn Strom erzeugt wird, wird dieser gleichmäßig auf alle Maschinen im Stromnetz verteilt.
Trains set on "Automatic" choose their destination stop and route on departure, and after waiting at a chain signal for five seconds, and when their destination stop disables itself by circuit condition. They choose the shortest route using a [[Railway/Train_path_finding|path finding algorithm]] that will get them to an enabled train stop with the right name, taking penalties for any apparent-at-the-time delays into account. If no such train stop exists they will skip the stop and go on to the next.


== Netzwerkmechanik ==
This section covers items used to make trains automatically transport items between stations. The player should be familiar with creating a rail system.
=== Erzeugung ===


Es gibt vier Arten, Strom zu erzeugen. Mehr Details über die jeweilige Methode gibt es auf der Seite [[Power production/de|Stromerzeugung]].
First, the player has to setup a rail system with at least two train stops, which are placed in the right-hand side of the  expected train arrival direction. By hovering over the train stop with the mouse you see the positions of the vehicles for better setting up the train station (including (un)loading machinery, refueling/repair installations).


# [[Steam engine/de|Dampfmaschine]] – Weit verbreitet, erfordert [[Boiler/de|Heizkessel]] (welche [[Water/de|Wasser]] und [[fuel/de|Treibstoff]] benötigen).
When you set up the train schedule (see below) and fuel the train, you can start the train on it's schedule by switching from manual to automatic driving mode.
# [[Solar panel/de|Solarmodul]] – Kostenloser Strom, aber nur am Tage. Wird normalerweise in Kombination mit Akkumulatoren verwendet.
# [[Accumulator/de|Akkumulator]] – Energiespeicher, siehe weiter unten.
# [[Steam turbine/de|Turbine]] – Hochleistungs-Dampfmaschine. Wird genutzt, um Strom aus dem Dampf eines [[Nuclear reactor/de|Kernreaktor]]s zu erzeugen.


Benötigt ein Stromnetz weniger Energie als produziert wird, reduzieren Dampfmaschinen und Turbinen ihre Leistung, damit keine Energie verschwendet wird.
=== Train schedule ===
The player can set up a list of train stations in the upper window. The train will route to stops in the given order, if it's at the end it will continue with the first. Currently, it's not possible to make a one-time schedule. Stations can be added by clicking button 2 (see picture). A pop-up appears with a list of all stop names. If you select one, another pop-up appears for you to select a wait condition.


=== Speicherung ===
Wait conditions are used to tell the train when to leave the station. There are 7 types of wait conditions:
[[File:electrical-network-example-2.png|thumb|256px|Ein Feld aus 48 Akkumulatoren und einem [[substation/de|Umspannwerk]] mit einer Kapazität von 240 MJ.]]
* '''Time passed'''
* '''Inventory full''' – All inventories of the train are full.
* '''Inventory empty''' – Same as above, but empty.
* '''Item count''' – The train (all cargoes summed) contains a specific amount of a certain item.
* '''Circuit condition''' – The train stop is connectable to the [[Circuit network]], so the signals can used for wait conditions.
* '''Inactivity''' – No items were added or removed for the specified amount of seconds.
* '''Fluid count''' – The train (all fluid wagons summed) contains a specific amount of a certain fluid.


Energie kann auf folgende Arten gespeichert werden:
Hereafter the word "term" is used to describe ''one'' type of wait condition, and the words "wait condition" are used to describe the whole set of terms (it turns a bit into maths).
* [[Fuel/de|Treibstoff]]. Kann verbranntwerden, um Strom zu erzeugen.
* [[Accumulator/de|Akkumulatoren]]. Akkumulatoren werden durch überschüssigen Strom aufgeladen und bieten Strom an, wenn der Bedarf die Produktion übersteigt.
* [[Steam/de|Dampf]]. Kann in [[boiler/de|Heizkessel]]n oder [[heat exchanger/de|Wärmetauscher]]n hergestellt und in [[storage tank/de|Lagertank]]s gespeichert werden. Ermöglicht es, dass Dampfmaschinen und Turbinen bei Bedarf mit Energie versorgt werden.


==== Dampftanks als Energiespeicher ====
If you add more than one term, you can change the connection of those using the logical operators AND and OR (button 7). An AND condition will result in true if all terms are true. An OR condition will return true if at least one of the terms is true.
Ein Lagertank mit Dampf aus einem [[heat exchanger/de|Wärmetauscher]] (500°C) speichert 2,425GJ; Ein Lagertank mit [[boiler/de|Heizkessel]]-Dampf (165°C) speichert 750MJ.


Es gibt mehrere Vorteile, Energie in Lagertanks anstatt in Akkumulatoren zu speichern:
When mixing AND and OR terms, the logic is grouped by the OR terms. When evaluating the wait condition, the first term is evaluated along with all AND terms immediately following up to but excluding the next occurring OR term. If they all evaluate true, the wait condition evaluates true. Otherwise, evaluation continues with that next occurring OR term and all AND terms immediately following it, up to the next OR term. This continues until either an OR group evaluates true and the wait condition is satisfied, or all terms have been checked.
* Die Energiedichte ist deutlich höher.
** Bei Dampf mit 165°C (aus [[boiler|Heizkesseln]]), kann ein einzelner Lagertank so viel wie 150 Akkumulatoren speichern: <code>750MJ / 5MJ = 150</code>
** Bei Dampf mit 500°C (aus [[Heat exchanger/de|Wärmetauschern]]), speichert ein einzelner Lagertank so viel wie 485 Akkumulatoren: <code>2425MJ / 5MJ = 485</code>
* Ein [[nuclear reactor/de|Kernreaktor]] verbrennt immer eine ganze Einheit Kernbrennstoff und erzeugt dabei 8GJ (oder mehr mit dem Nachbarbonus), auch wenn der Verbrauch geringer ist. Überschüssige Energie kann als Dampf gespeichert werden.
* Ein [[accumulator/de|Akkumulator]] kann mit maximal 300kW ge- oder entladen werden. Bei hoher Belastung (z.B. Feuern von Laser-Geschütztürmen), kann eine geringe Anzahl an Akkumulatoren überlastet werden, was zu Stromausfällen führt. Eine Dampfmaschine kann 900kW aus dem gespeicherten Dampf erzeugen (das 3-fache eines Akkumulators), eine Turbine sogar 5800kW (6,4-fache Leistung). Somit kann eine geringe Anzahl Turbinen und/oder Dampfmaschinen kann viel höhere Spannungsspitzen abfangen.
* Dampf kann per Zug transportiert werden. Somit ist Strom auch weit entfernt von der Basis nutzbar.


=== Verteilung ===
==== Examples ====
<div class="toccolours mw-collapsible mw-collapsed" style="width:800px">
Expand for examples
<div class="mw-collapsible-content">
Wait until full, up to 30 seconds:


Strommasten werden für die Stromübertragung genutzt. Es gibt 4 Arten von Strommasten (3 Größen und das Umspannwerk), die jeweils unterschiedliche Eigenschaften in Bezug auf Anschlussreichweite und Verteilgebiet haben. Werden zwei unterschiedliche Masten verbunden, werden die Eigenschaften des kleineren angewendet.
<pre>
Full cargo inventory
OR 30 seconds passed
</pre>


# [[Small electric pole/de|Kleiner Strommast]] – Zweitkleinstes Verteilgebiet, kürzeste Anschlussreichweite. Ohne Forschung verfügbar.
Wait until cargo full, ''or'' circuit condition Oil > 3000:
# [[Medium electric pole/de|Mittelgroßer Strommast]] – Zweitgrößtes Verteilgebiet, mittlere Reichweite.
# [[Big electric pole/de|Großer Strommast]] – Kleinstes Verteilgebiet, größte Kabelreichweite.
# [[Substation/de|Umspannwerk]] – Größtes Verteilgebiet, zweitbeste Reichweite, aber sehr teuer in der Herstellung.


=== Verbrauch ===
<pre>
Full cargo inventory
OR Circuit condition - Oil > 3000
</pre>


The majority of machines in Factorio consume electricity. There are two aspects to a machine's energy use.
Wait until empty, ''and'' 30 seconds passed, ''and'' 5 seconds of inactivity:


* Energy consumption – The energy consumed by the machine while it is actively carrying out a process (crafting an item, moving an item, etc). If an electric network does not have enough power generation to supply all the machines in it, the electricity will be evenly spread across all machines in the network (based on each machine's demand), and all machines will slow down proportionally to the power available.
<pre>
** For example: If an [[Assembling machine 3]] (210kW) and an [[Electric mining drill]] (90kW) are on a network (90+210 = 300kW), but the network only has 3 [[Solar panel]]s (3x60kW = 180kW) to power them, the Assembling machine and Mining drill will both run at 60% speed (180/300=0.6).
Empty cargo inventory
* Drain – The energy consumed by the machine whether it is active or not. Most machines consume a small amount of power just being connected to a network. This is usually negligible, but can become notable in small factories where power is limited.
AND 30 seconds passed
AND 5 seconds of inactivity
</pre>


=== Verbindungen ===
Wait until iron ore is low, ''or'' copper ore is low ''and'' at least 30 seconds passed:
[[File:Electric-network-1.png|thumb|256px|Simple example of a small electric network.]]


A network is created by placing electrical generators ([[Steam engine]]s or [[Solar panel]]s) and electrical consumers, then ensuring a connection between the generator and consumer can be made using Distributors (such as [[Small electric pole]]s) that are connected together.  Electric poles cover differently sized areas depending on their type.  The area of coverage appears as a blue overlay around the pole.  If two poles are placed close enough, the poles connect automatically.  A building is connected if one tile of the building is in a covered area. Hovering the cursor over a pole reports the current satisfaction of power demands in that pole's network, and clicking on a pole will provide a detailed GUI about that pole's electric network. (See below)
<pre>
Cargo: Iron ore < 500
AND 30 seconds passed
OR Cargo: Copper ore < 500
AND 30 seconds passed
</pre>


* Use shift-click on a existing pole to remove all its connections to other poles.
Factorio's wait condition logic is read as disjunctive normal form ([https://en.wikipedia.org/wiki/Disjunctive_normal_form DNF]), and so this last example is processed as (note the parenthesis):
* Unconnected poles can be connected with a single [[Copper cable]] dragging from pole to pole (Left click on the ''bottom'' of the pole with the cable in hand.)
* Individual connections can be removed by "connecting" them with copper cable. This will not consume the cable.
* You can use place-key (default left mouse) while running/driving to auto-place poles at their greatest connectible distance while covering all unpowered entities on the way. This allows for complete efficiency when connecting long distances. If connecting over long distances, using [[Big electric pole]]s is recommended.


== Stromnetz-Anzeige ==
<pre>((Cargo: Iron ore < 500 AND 30 seconds passed) OR (Cargo: Copper ore < 500 AND 30 seconds passed))</pre>
[[File:Electric network info screen.png|thumb|400x400px|The Electric network info GUI]]


The Electric network info GUI can be accessed by left-clicking any electric pole nearby.
Which is the same as this:


'''You can see only the info from the electric network to which that pole is connected!''' Unlike the production-info (press P) the electric network info is not measured globally, but by network.
<pre>((Cargo: Iron ore < 500 OR Cargo: Copper ore < 500) AND 30 seconds passed)</pre>


# '''Satisfaction''' – The current amount of energy consumed by the network. This bar should be full. If it is not full, it means that the machines connected to the network are consuming more power than is produced, and the bar will change color to yellow (>50%) or red (<50%).
Unfortunately, there is no way to write that shorter form in the current UI.
# '''Production''' – The current energy produced by the network. This bar should never be full. If it is full, it means that the machines connected to the network are consuming all available energy. The less full this bar is, the more surplus energy is available.
</div></div>
# '''[[Accumulator|Accumulator]] capacity''' – How much energy is currently held inside of the accumulators connected to your network.  Measured in [[Units|joule]]s; 1 Joule = 1 Watt * 1 second (see also [[wikipedia:Joule]]). This bar should be able to fill fully before emptying again.
# '''Timespan''' - Set the [[Time|time]] span for the graphs below. "5s" means over the last 5 seconds.
# '''Detailed Consumption''' – A list of consumers from highest power consumption to lowest. In the picture example, 16 [[Radar|radars]] consume the most power, at 4.7 MW.
# '''Detailed Production''' – A list of producers from highest power production to lowest. In the picture example, 160 [[Steam engine]]s produce all the electricity in the factory.
# '''Consumption Graph''' – Shows the consumption of the different parts of the network over time.
# '''Production Graph''' – Shows the production of the different producers of the network over time.


Note that the timeframe influences the shown detailed production/consumption: the displayed watts is the total average power production or consumption over the full time. Setting longer timeframes also allows seeing the past production or consumption of machines even if they are not currently connected to the network.
=== Troubleshooting ===


== Netzwerkprioritäten ==
Below are some things to verify if a rail system or train is not working.


Electricity is provided on a priority basis. The demand for energy is satisfied by generators in following order:
* Is the train fueled? Ensure that the locomotive has [[fuel]] of some kind.
* Misplaced or non-functional switches? Ensure that the train can plan a path through the switches.
* Another train on the same [[Railway#Block|block]]? Make sure the path of the train is unobstructed.
* Train stops placed correctly? Make sure that the yellow arrows when hovering on the stop point towards the end or exit of the stop.
* Is the train allowed to enter signals from the right direction? Are the signals set correctly?
* If a track is supposed to be two-way, the rail signals should be opposite each other. You can verify they match up by hovering the cursor over one. For a matched pair, it will show the other.


* [[Solar panel]]s – Top priority; they always work at maximum performance available, unless they can cover all demand of the network, in which case they match demand.  
==== No path ====
* [[Steam engine]]s and [[Steam turbine]]s – They match whatever demand solar panels cannot satisfy; note that Engines and Turbines do have the same priority, leftover demand is equally divided among both.
When trains cannot reach the target, a "no path" symbol pops up over the locomotive. Check:
* [[Accumulator]] – Last resort. They are only discharged when demand cannot be met by other means. They are also only charged when all demand is met, and there is yet more power available.
* Can the train reach its current destination by '''only driving forward'''? Build turning slopes or place a locomotive at both ends of a train!
* Are the train stops standing in the right direction? Train stops must be on the right hand side of the track.
* If you use rail signals, check that the signals are all allowing traffic in the correct direction.
* Check for interruptions in the train tracks, drive to the station manually to check there are no rail parts missing. Especially near junctions these can be hard to spot if missing.


There may be situations where different behaviour is desired (such as solar panels combined with accumulators for night-and-day delivery), in which case clever use of a  [[power switch]] and the [[circuit network]] is in order.
If you are still having problems, consider:
* Driving the train manually, and as you pass each switch, try switching to automatic. When it works, you will know the rough area of the problem.
[http://imgur.com/a/Nq2Yk A pictorial summary of typical problems].


A newly-placed electric pole will be automatically connected to nearby poles according to the following rules:
== Achievements ==
# It will be connected to other available poles, starting with the closest one.
{{Achievement|trans-factorio-express}}
# It won't be connected to 2 poles connected to each other (it won't form a 3 pole triangle).
# It will not be connected to more than 5 other poles.


A player can manually connect poles together with Copper Wire, if they are within reach of each other, as long as either pole does not already have 5 connections.
== Connection to [http://www.openttd.org/ OpenTTD] ==
Factorio's railway system works basically exactly like [http://wiki.openttd.org/Signals#Block_signals≈ the block signals in Open Transport Tycoon Deluxe]. Players who have ever played that game will find some elements of it in Factorio. If not, they can learn from the OpenTTD documentation.


== Siehe auch ==
== See also ==
* [[Tutorial:Producing power from oil|Stromerzeugung aus Öl]] (Englisch)
* [[Tutorial:Train signals]]
* [[Power production/de|Stromerzeugung]]
* [[Locomotive]]
* [[Steam/de|Dampf]]
* [[Cargo wagon]]
* [[Fluid system/de|Flüssigkeiten]]
* [[Units/de|Einheiten]]

Latest revision as of 03:13, 30 October 2018

WIP

For the research see Railway (research)

The Railway is one of the main transport methods in Factorio. Although the installation of such a network can be complicated, and requires a large amount of resource and space, it is faster and more efficient than belts and robot logistics, especially over large distances.

Railway construction, however, is not understood instantly. It takes some time to learn the basics, such as automating transportation. Learning how to manage and maintain upkeep of a larger train network takes time and experience.

Infrastructure

To build a railway, tracks (also called rails) must be built for the train to ride on. Typically, this is done via the rail planner, but can also be done manually. Bear in mind that rails are placed on a two-tile grid, so a rail cannot be moved by only one tile.

Minimum manually operated railway

As a minimum a manually operated railway has to consist of:

Locomotives can be entered and then manually operated by standing next to them and pressing the ENTER button.

Switches

  • There is no visual representation of a working switch, however the rails will appear to merge. Using the rail planner, the player must place a rail overlapping an existing rail to form a switch. Switches are forks in tracks that allow a train to pick between two directional options.
  • The crossing of two straight tracks is not usable as switch, as trains have a limited turning radius. They do, however, connect signal blocks which helps prevent collisions.
  • Parallel tracks do not interact with each other. However, switching from one track to the other can require extra resources if they are too close together; the track must turn away from the other parallel track and then turn back to it. This can create complicated networks of signals and, as such, one should generally not build parallel tracks unless they are spaced adequately. (Generally, 2 track widths apart works well)
An example of a safe railway crossing.

Crossing tracks

Be careful when crossing tracks! Trains are one of the highest damaging entities in the game, and will kill most players instantly on contact.

A checklist of proper track crossing etiquette:

  1. Zoom out, so that you can see a train coming.
  2. Look left, then right.
  3. Check for signals nearby: If a rail signal suddenly jumps from green to red or green to yellow, a train is coming. Do not cross.
  4. Avoid walking near the tracks, as you do not need to be fully on the tracks to get hit.
  5. While it is possible to get into/out of a train while it is moving, a miss can cost your life. The sides of the train can still deal damage, as well as the player being able to slip between two rail cars.
  6. Heavy shields can be used to reduce the damage taken. In extreme cases, it is possible to stop a train with your body. This will require several shield modules to not be instantly killed, and will drain a large amount of the suit's energy.
  7. All entities with health will take damage getting hit by a train, so take care not to leave a Car or Tank on the tracks. However, this includes hostile forces!
  8. Trains far from a train stop will be traveling at (near) max speed, so take extra precaution when crossing and zoom out further. Trains near a train stop or signal will slow down to stop, and will be traveling slower. Trains of different configurations will also move slower or faster.

A safe railroad crossing like the example shown in the picture can be built. This works by restricting access to the tracks when an oncoming train has the rails reserved. When the player is on the rails, the signals are reserved by the circuit network, and the train must stop and wait until the player leaves the tracks. When a player is inside the area crossing the tracks, the train gates are closed so the player can't get on the tracks outside the crossing. This is to completely ensure a safe crossing, and is often used on servers.

Trains

Train components:

Locomotive.png
Locomotive
Cargo wagon.png
Cargo wagon
Fluid wagon.png
Fluid wagon
Artillery wagon.png
Artillery wagon
Placing a Cargo wagon so it is attached to the train.
  • A train consists of at least one locomotive.
  • Trains can have more than one locomotive, and any number of Wagons.
  • Locomotives can be manually driven forwards or backwards, however, they are generally slower going backwards. The left and right movement keys are used to change direction at switches.
  • Trains can only drive forwards automatically. An automatic train can drive forwards and backwards when two locomotives facing different directions are connected to the train.
  • A train needs fuel to drive. Fuel can be added by inserters when the train is in manual mode or parked at a station, not when waiting at a signal or standing on automatic mode.

The locomotives' inventory is only used for fuel. To transport items or fluids cargo wagons and/or fluid wagons have to be attached to the train. To attach rolling stock, whether a wagon or a locomotive, the player may either prepare to place one near an existing train, where a green graphic will show the player that the stock will be attached, showing a connection between the train and the new stock. Alternatively, the player may manually connect rolling stock to trains with the rolling stock connect key, if the cargo wagon was placed far away from a train. Rolling stock can likewise be disconnected with the rolling stock disconnect key. The cargo wagons can be filled or emptied manually or by up to twelve adjacent Inserters (six on each side), while fluid wagons can be filled or emptied with up to three pumps, which will automatically connect to the nipples on top.

Stations

A very minimal train station.

Station Components:

Train stop.png
Train stop
Straight rail.png
Rails
Inserter.png
Inserters or
Pump.png
Pumps


A train station is a combination of at least one train stop plus a storage and/or distribution system, used to fill or empty cargo wagons and/or fluid wagons, load fuel into the locomotive(s), load ammunition into artillery wagons, or repair trains.

Don't mix up train stations with train stops. A train station is a concept, whereas a train stop is an item.

Inserters placed next to train tracks are used to load/unload trains at train stops. Inserters are the only way to automatically get items out of and into cargo and artillery wagons; pumps are the only way to automatically get fluids into and out of fluid wagons.

Signals

Rail signal.png
Rail signal
Rail chain signal.png
Rail chain signal

Rail signals are used to employ multiple trains automatically without the danger of trains crashing into each other. Rail signals split the network into blocks and ensure that only one train can be in every block at any time. Note that driving a train manually ignores all signals; so it is possible for automatic trains to crash into the player if the player ignores red/yellow signals. Always beware of automatic trains and give them the right of way.

The train signals tutorial contains an in-depth explanation of rail signals, blocks and deadlocks.

Basic Signaling Rules

  • There can only be one train in a block at any time. A train spanning multiple blocks occupies them all.
  • A red signal means that the following block is occupied by a train.
  • A yellow signal means that a train is approaching and already has the approval to enter the following block.
  • Rail signals separate a new block and reflect its state: green - free, yellow - reserved, red - occupied
  • Rail chain signals separate a new block and reflect the state of the next Rail signal(s): see above, blue - at least one of the paths is blocked, but not all
  • A train can only pass a signal on the right of the track, or if there is a signal on both sides on the same rail segment. Of course, manual driving overrides this.

Automated transport

The scheduale tab in the train GUI: 1 - switch between automatic and manual driving mode; 2 - add new train station; 3 - delete selected station; 4 - send train to selected station; 5 - add wait condition for selected station; 6 - delete selected wait condition; 7 - change logical mode of selected wait condition

Trains set on "Automatic" choose their destination stop and route on departure, and after waiting at a chain signal for five seconds, and when their destination stop disables itself by circuit condition. They choose the shortest route using a path finding algorithm that will get them to an enabled train stop with the right name, taking penalties for any apparent-at-the-time delays into account. If no such train stop exists they will skip the stop and go on to the next.

This section covers items used to make trains automatically transport items between stations. The player should be familiar with creating a rail system.

First, the player has to setup a rail system with at least two train stops, which are placed in the right-hand side of the expected train arrival direction. By hovering over the train stop with the mouse you see the positions of the vehicles for better setting up the train station (including (un)loading machinery, refueling/repair installations).

When you set up the train schedule (see below) and fuel the train, you can start the train on it's schedule by switching from manual to automatic driving mode.

Train schedule

The player can set up a list of train stations in the upper window. The train will route to stops in the given order, if it's at the end it will continue with the first. Currently, it's not possible to make a one-time schedule. Stations can be added by clicking button 2 (see picture). A pop-up appears with a list of all stop names. If you select one, another pop-up appears for you to select a wait condition.

Wait conditions are used to tell the train when to leave the station. There are 7 types of wait conditions:

  • Time passed
  • Inventory full – All inventories of the train are full.
  • Inventory empty – Same as above, but empty.
  • Item count – The train (all cargoes summed) contains a specific amount of a certain item.
  • Circuit condition – The train stop is connectable to the Circuit network, so the signals can used for wait conditions.
  • Inactivity – No items were added or removed for the specified amount of seconds.
  • Fluid count – The train (all fluid wagons summed) contains a specific amount of a certain fluid.

Hereafter the word "term" is used to describe one type of wait condition, and the words "wait condition" are used to describe the whole set of terms (it turns a bit into maths).

If you add more than one term, you can change the connection of those using the logical operators AND and OR (button 7). An AND condition will result in true if all terms are true. An OR condition will return true if at least one of the terms is true.

When mixing AND and OR terms, the logic is grouped by the OR terms. When evaluating the wait condition, the first term is evaluated along with all AND terms immediately following up to but excluding the next occurring OR term. If they all evaluate true, the wait condition evaluates true. Otherwise, evaluation continues with that next occurring OR term and all AND terms immediately following it, up to the next OR term. This continues until either an OR group evaluates true and the wait condition is satisfied, or all terms have been checked.

Examples

Expand for examples

Wait until full, up to 30 seconds:

Full cargo inventory
OR 30 seconds passed

Wait until cargo full, or circuit condition Oil > 3000:

Full cargo inventory
OR Circuit condition - Oil > 3000

Wait until empty, and 30 seconds passed, and 5 seconds of inactivity:

Empty cargo inventory
AND 30 seconds passed
AND 5 seconds of inactivity

Wait until iron ore is low, or copper ore is low and at least 30 seconds passed:

Cargo: Iron ore < 500
AND 30 seconds passed
OR Cargo: Copper ore < 500
AND 30 seconds passed

Factorio's wait condition logic is read as disjunctive normal form (DNF), and so this last example is processed as (note the parenthesis):

((Cargo: Iron ore < 500 AND 30 seconds passed) OR (Cargo: Copper ore < 500 AND 30 seconds passed))

Which is the same as this:

((Cargo: Iron ore < 500 OR Cargo: Copper ore < 500) AND 30 seconds passed)

Unfortunately, there is no way to write that shorter form in the current UI.

Troubleshooting

Below are some things to verify if a rail system or train is not working.

  • Is the train fueled? Ensure that the locomotive has fuel of some kind.
  • Misplaced or non-functional switches? Ensure that the train can plan a path through the switches.
  • Another train on the same block? Make sure the path of the train is unobstructed.
  • Train stops placed correctly? Make sure that the yellow arrows when hovering on the stop point towards the end or exit of the stop.
  • Is the train allowed to enter signals from the right direction? Are the signals set correctly?
  • If a track is supposed to be two-way, the rail signals should be opposite each other. You can verify they match up by hovering the cursor over one. For a matched pair, it will show the other.

No path

When trains cannot reach the target, a "no path" symbol pops up over the locomotive. Check:

  • Can the train reach its current destination by only driving forward? Build turning slopes or place a locomotive at both ends of a train!
  • Are the train stops standing in the right direction? Train stops must be on the right hand side of the track.
  • If you use rail signals, check that the signals are all allowing traffic in the correct direction.
  • Check for interruptions in the train tracks, drive to the station manually to check there are no rail parts missing. Especially near junctions these can be hard to spot if missing.

If you are still having problems, consider:

  • Driving the train manually, and as you pass each switch, try switching to automatic. When it works, you will know the rough area of the problem.

A pictorial summary of typical problems.

Achievements

Trans-factorio-express-achievement.png Trans-Factorio express

Have a train plan a path 1,000 tiles or longer.

Connection to OpenTTD

Factorio's railway system works basically exactly like the block signals in Open Transport Tycoon Deluxe. Players who have ever played that game will find some elements of it in Factorio. If not, they can learn from the OpenTTD documentation.

See also