Beruflich Dokumente
Kultur Dokumente
Automation
From Novice to Journeyman
by /u/Grays42
Introduction
Welcome to the Factorio Train Automation tutorials! This series is separated into
three parts: Novice, Apprentice, and Journeyman. Each part will help you
understand more complex workings of a functioning rail network in Factorio.
Before we get started, please make sure you are viewing in a slideshow format.
Many of the demonstrations will not flow smoothly if you are scrolling with a
mouse. For PDF readers, make sure you choose single page or fit to page
view. If you are viewing on imgur, make sure you put /all at the end of the
album address and choose Fullscreen at the right.
Part 1: Novice Stations, Signals, and Blocks
Lets begin with Part 1! Before we dive into automation, you should first learn to
run a train manually. Lay some track down, put down an engine, and move
around. Youll need to fuel it with this symbol: Enter gets in/out, W-A-S-D
moves and turns. W is always forward from where the train faces.
1. It first had to find a path to the station by tracing a line through all areas it is
explicitly allowed to go. (It will display No path if it cant find a route.)
2. It then began to move to the station, stopping for any areas occupied by
other trains. In this case, it encountered no other traffic and just went to its
station. It will stay there for a number of seconds set by the train scheduler.
This is the first function of the signal: explicitly allows the train to use the track in
that direction. Trains will never go through signals that dont point the correct
direction. Trains that cant find a correct signal will not be able to find a path!
Even though this second train isnt even on the path to the station, its still in the
third block. This prevents collisions!
Part 1: Novice Stations, Signals, and Blocks
Also, remember that our signals are one-way. If we put signals in the other
direction, the lights on those will show occupied blocks in that direction.
Part 1: Novice Stations, Signals, and Blocks
Creating and managing blocks are the basic function of signals and a
fundamental aspect of all rail networks.
Part 1: Novice Stations, Signals, and Blocks
I want to get
to that station.
Part 1: Novice Stations, Signals, and Blocks
Trains in Factorio will always move to the last available block on the path they
have chosen. In this case, it will move to the end of the second block and stop
until that block is clear.
Also, trains will always select the shortest route given multiple options.
Part 1: Novice Stations, Signals, and Blocks
However, the center is all one block. If one train enters, the second has to wait.
Part 1: Novice Stations, Signals, and Blocks
Any time you want to allow for multiple trains to pass, you can separate sections
of track into their own blocks with more signals.
Like this.
its a trap!
Part 1: Novice Stations, Signals, and Blocks
When you involve two, four, or twenty moving trains, things get considerably
more complicated. But we will come prepared!
Now our train, who could have waited before the crossing,
is blocking the intersection...and another train is coming.
Part 2: Apprentice Intersections, Chain Signals
From this example, we can come up with a rule we can enforce for all trains so
that they never encounter a situation with a blocked intersection:
Part 2: Apprentice Intersections, Chain Signals
From this example, we can come up with a rule we can enforce for all trains so
that they never encounter a situation with a blocked intersection:
Golden Rule
Trains must never enter intersections
that they cant completely exit.
Part 2: Apprentice Intersections, Chain Signals
From this example, we can come up with a rule we can enforce for all trains so
that they never encounter a situation with a blocked intersection:
Golden Rule
Trains must never enter intersections
that they cant completely exit.
They make blocks and check for obstructions just like regular signals.
Part 2: Apprentice Intersections, Chain Signals
However, they also look ahead to the next signal and turn red if its obstructed!
Part 2: Apprentice Intersections, Chain Signals
Now lets go back and re-signal our intersection. Our intersection encompasses
every encounter between different lines.
Remember the Golden Rule! The train must only proceed if its exit block is clear.
Now we want to address the incoming traffic and tell them to watch what
happens to the exit block so they know whether its safe to enter the
intersection at all. We do this with chain signals before every crossing.
The blockage cleared up and the train is ready to move forward into our
completely safe intersection. Except...what if another train is passing?
Part 2: Apprentice Intersections, Chain Signals
Were back to our original problem that the intersection is one big block! The
first time, we solved this by placing a signal in the middle, but that caused a
deadlock. Fortunately, we now have a much better option.
Part 2: Apprentice Intersections, Chain Signals
By placing a chain signal, not a regular signal, in the center of the intersection,
we have safely split the eastbound and westbound lines so traffic can flow
freely without causing deadlocks!
Part 2: Apprentice Intersections, Chain Signals
Notice what happened here, though: This isnt really a clear block! The upper
block being occupied is telling the northbound line that it is not safe to enter, but
allowing traffic through the eastbound line. This incredibly powerful behavior is
what enables huge intersections to be safely used by many trains at once.
Part 2: Apprentice Intersections, Chain Signals
From this we can deduce several Principles used to enforce the Golden Rule.
Part 2: Apprentice Intersections, Chain Signals
From this we can deduce several Principles used to enforce the Golden Rule.
As previously discussed, the exit block is the only thing that a train heading to
an intersection should be concerned about.
Part 2: Apprentice Intersections, Chain Signals
From this we can deduce several Principles used to enforce the Golden Rule.
An intersection only begins when one line encounters another. At the moment
this occurs, until reaching the exit block signals, every encounter must have a
chain signal. We never want the train to be able to enter the intersection
without taking into consideration what is happening at its exit block.
Part 2: Apprentice Intersections, Chain Signals
From this we can deduce several Principles used to enforce the Golden Rule.
Hint: it enforces the last part of the Golden Rule that requires you to completely exit the intersection.
Part 2: Apprentice Intersections, Chain Signals
However, when any one of the three enters the exit block,
both configurations perform exactly the same way.
We have one last thing to discuss about chain signals before we move on. A
train approaches a chain signal we will place here before the lane splits.
Hints:
A chain signal will act like a signal and be green if its block isnt occupied.
A chain signal turns red if its block, or the block following it, is occupied.
However, one exit block is green, one is red. So which will the chain signal be?
Part 2: Apprentice Intersections, Chain Signals
In Factorio, a moving train already knows the path it wants. A blue chain signal
tells the train to check the next block in its individual path, because chain signals
are global, not per-train. The chain signal itself has no idea which path the train
wants to take, it just knows that some exits are obstructed and some arent.
Part 2: Apprentice Intersections, Chain Signals
And thats it! Using those steps, based on the Principles, which enforce the
Golden Rule, you can correctly signal any intersection. Remember that were
missing one Principle; well learn about it in Part 3, when intersections interact.
Part 2: Apprentice Intersections, Chain Signals
its a tr
In Part 1 of this series, you learned the basic concepts of stations, signals, and
blocks. In Part 2, you learned how to build intersections and use chain signals.
So far, everything we have done has been in a vacuum; we havent made a rail
network and have had no discussion of how these pieces interact.
(far apart)
Part 3: Journeyman Rail Systems and Networks
This time, though, it cant exit; trains can only move forward.
Part 3: Journeyman Rail Systems and Networks
In order to get back onto the mainline, we have
to choose a rail system. The two rail systems
available to choose from are:
*The terminal system is often mis-stated as double-header, which means trains with two front engines.
Part 3: Journeyman Rail Systems and Networks
They occupy
considerably
more real and require more
estate consideration for For these reasons, loops
pathing/deadlock tend not to be as popular
issues. as terminal systems
for general-purpose use.
Part 3: Journeyman Rail Systems and Networks
Loop stations can also be implemented with a
second one-way intersection, but this
causes real estate problems as well.
In the end, the choice is
Also keep in mind that terminal yours, and since both work
trains can use loop stations, but on a double-track network,
loop trains (one engine) cant back you can use either for your
out of terminal stations. more specialized stations.
Part 3: Journeyman Rail Systems and Networks
Now lets talk block size. Small blocks are usually
fine, but in some cases can cause problems.
*as long as this station is only used by one train. (See links in the epilogue.)
Part 3: Journeyman Rail Systems and Networks
Well, good news! This just happens to be our final Intersection Principle!
Well, good news! This just happens to be our final Intersection Principle!
Following these Intersection Principles for the Golden Rule will make your rail
network almost* immune to deadlocks, as long as you have enough blocks.
Epilogue
So whats next?
Well, now you know how to build deadlock-resistant* rail networks to connect all
of your outlying outposts up to your main production hub.
There are going to be congestion concerns as your network gets bigger, but
theres a lot of subjectivity to how to handle those, which is outside the scope of
our tutorial. There are all kinds of community resources, but now you have the
tools to understand those pictures of giant intersections and how they work.
So congratulations on making it this far. You are now a Journeyman rail network
designer! Now, only practice and patience will make you a Master.
External Links
*It is important to note that high congestion and multiple trains using some stations can still cause
deadlocks. For more details, see Antaios guide to Stations, Junctions, and all things deadlock on the
official forums. As as your network grows, you will need to learn techniques to manage congestion.
There are also a few mods that enhance the rail design and management
experience that you might be interested in:
The Fat Controller is incredibly useful for remotely managing your trains.
Fully Automated Rail Layer (FARL) will place rail and blueprints while you
drive, making rail-laying in the late game much faster.
Resource Spawner Overhaul (RSO) spaces out ore patches and places rich
ore patches much further from the initial spawn, making rails necessary.
Credits
Special thanks to the redditors of /r/factorio who contributed advice, corrections,
and suggestions in discussion threads while I was building the tutorial series:
And of course, thanks to the developers of Factorio for making a fantastic game!
Goodbye!
/u/Grays42