Railway
- 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 can rails are placed on a two-tile grid, so you cannot move a rail by only one tile.
Minimum manually operated railway
As a minimum a manually operated railway has to consist of:
- Rails (tracks)
- Locomotives
Locomotives can be entered and then manually operated by standing next to them and pressing the RETURN 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 and generally have no problems. 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)
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 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.
Trains
Train components:
Diesel locomotive | Cargo wagon | Fluid wagon |- |
- 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. Despite being called Diesel Locomotives, they will take anything with a fuel value. Fuel can be added by inserters.
- A common way to refuel trains is using a requester chest that requests fuel, and then having a burner inserter loading the fuel into the locomotive.
The locomotives' inventory is only used for Fuel. To transport items Cargo wagons have to be attached to the train. To attach a Cargo wagon, the player may either prepare to place one near an existing train, where a green graphic will show the player that the cargo wagon will be attached, showing a connection between the train and the new wagon. Alternatively, the player may manually connect cargo wagons to trains with the stock connect key, if the cargo wagon was placed far away from a train. The cargo wagons can be filled manually or by adjacent Inserters.
- Railway/Train path finding - How trains find their path.
Stations
Station Components
Train stop | Rails | Inserters|}
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, load fuel into the locomotive(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. Inserters placed next to train tracks are used to load/unload trains at train stops. Inserters are the only way to get items off and onto cargo wagons.
SignalsThe two types of signals in Factorio:
Understanding rail signals can be difficult. Several terms critical to understanding them are below:
Rail signals are used to employ multiple trains automatically. Note that driving a train manually ignores most of the rules described here; other automatic trains will follow signaling indicted by the player's movement dynamically, however it will sometimes be not possible to avoid a collision for automatic trains if the player ignores red/yellow signals. Always beware automatic trains and give them the right of way. See this forum post for a good explanation about blocks. Basic Signaling Rules
DeadlocksA deadlock or gridlock can happen when every train is locked by another. In nearly every case two or more trains are standing so that every train blocks (by minimum) one other train. Deadlock occurrenceDeadlocks occur when two+ trains are prevented from continuing through an intersection, due to an unsolvable signal conflict. There are a few different types of deadlocks:
It's important to remember that deadlocks can happen by chance, and by mistake of the player. Sometimes even perfectly signaled rails have issues. The rate of deadlocks is inversely proportional to the quality of Signaling, however. Factors that influence the deadlock chance
Knowing the factors, how can deadlocks be reduced?
Automated transportThis 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 scheduleThe player can set up a list of train stops in the upper window. The train will run to the 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. Stops can be added by clicking button 2 (see picture). A pop-up appears with a list of all train stops. If you select one, another pop-up appears where you have to select a wait condition. Wait conditions are used to tell the train when to leave the station. There are 6 types of wait conditions:
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. ExamplesExpand 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
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. TroubleshootingBelow are some things to verify if a rail system or train is not working.
No pathWhen trains cannot reach the target, a "no path" symbol pops up over the locomotive. Check:
If you are still having problems, consider:
A pictorial summary of typical problems. A vague issue exists (at least in 0.15.9) where the following steps helped:
No bug report was created because the issue was non-reproducible.
Achievements
Connection to OpenTTDFactorio's railway system works basically exactly like the block signals in Open Traffic 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 |