Professional Documents
Culture Documents
Introduction
Some of you may know the fantastic mod Logistic Train Network (LTN) which can be found on the
factorio mod portal. But when you want to play without mods you have to find a solution for the
train logistic system.
I tried to implement a dynamic system with circuits which can send out material trains to locations
where the material is needed.Here I present you a possible solution how you can manage your
trains in vanilla.
The system is inspired by many different circuitry videos on Youtube. I would recommend you to
take a look at the channel of ShredGuy991 for some good tutorials on combinators and circuit
networks.
To achieve what we want we have to fulfill a few prerequisites:
Firstly, we need a wired train network with red and green wires along the tracks.
Secondly, we need one station and at least one train per material.
Lastly, all supply and request stations need to have the same name (e.g. IRON PLATE - Out for
supply stations and IRON PLATE - In for request stations)
I have used this system on several community servers of Nilaus2 (Vanilla and Angel + Bobs) and
on a server of cl0wnt0wn3 with the Angels + Bobs modpack. The system worked pretty stable on
both of them. Nilaus also made a review of one Community map where we are using this system.
You can find the video here:
Factorio Engineering - BLOCK BASED TRAIN NETWORK - Community Map Review (YouTube)
Tutorial on the Vanilla train setup (Nilaus):
https://www.youtube.com/watch?v=v4VgZv35yUI&t=1s
On the following pages I will try to explain the circuits at each station. If you have any questions
feel free to contact me on Discord (Haphollas#6927)
You can find a link to the blueprint book which includes all stations at the end of this guide but I
strongly recommend to read everything to understand what is going on.
1
ShredGuy99: Youtube, Twitch
2
Nilaus: YouTube, Discord
3
cl0wnt0wn: Twitch,YouTube
Request Station Setup
Overview
We want to activate the station if the threshold is below a predefined threshold. As soon as there is
less material in the storage we want a train to deliver the material.
All request stations have the same name (in the shown case: Wood - In)
Circuit diagram
The general idea here is to call a train if there is enough material in the storage to fully load
it. To achieve this we will send a material signal on the red wire as soon as there is enough
material in the storage.
After the train is loaded it should only leave if there is a demand on the train network which
will be transferred on the green wire of the train system.
We need to check both signals in several combinators and enable/disable the station
regarding to the storage amount as well as sending a signal to the train when it should leave to
deliver the goods.
Like the request stations all Supply stations for one type of material will have the same
name (e.g. Wood - Out)
Circuit diagram:
The idea here is to fill the trains with fuel and send them out into the world if a supply
station is ready for pickup.
If you remember: The Supply station will send a signal of material = 1 onto the red
wire of the train network.
All we need to do here is to send the signals of the red wire to the trains (which will
be used later in the train schedule)
Train schedules
Until this point you should have a general idea how the Train network works. To finish our
system we need to take a look at the train schedules. You can tweak the schedule of the train if
you want but the initial setup should look like the schedule in the table
I usually recommend to use 2 trains per signal in the depot. This means:You have two trains which
have the depot condition ‘Circuit Network <material> >=1’; two trains with <material >=2;...
This is the easiest way to scale the system for longer distances.
Remark:
If you want to carry several different materials you need to reserve one wagon per material
or lock the slots within the wagon and use filter inserters for unloading.
Example:
You are running a general green/red/blue circuit train (1st wagon: green circuits, 2nd wagon
red, 3 blue) if you need only red circuits then unload only the 2nd wagon (you can use filter
rd
The main issue with this system is that nearby stations always will have a higher priority
over stations which are further away.
This behaviour can be tweaked by adding ‘unused’ train stations in front of your supply /
request stations. The vanilla train pathfinding will add a penalty of 2,000 tiles to the
trainpath if a station which is not in the schedule lies on the path.
You could also control nearby rail signals with a circuit to increase the penalty for a
specific part of your tracks. A rail signal which is set to red by a circuit will add a penalty of
1000 tiles to the pathfinding. You could for example read the train signal at the train station
(T) and use a decider combinator.
Input of the decider combinator: T > 0 Output: red = 1.
Rail signal: Close signal: red > 0
I would strongly recommend that you take a look at the Factorio Wiki to see how different
modifiers affect the vanilla pathfinding. You can find the article here:
https://wiki.factorio.com/Railway/Train_path_finding
Troubleshooting
If you have problems with your stations you should check the corresponding circuits.
Common mistakes:
● Train schedule
○ you used OR (default) instead of AND for the circuit conditions
○ you used less (default) instead of greater for the circuit signals
○ make sure that you use the proper item for the trains (e.g. copper signal for
iron stations)
● Stations
○ a signal for the amount of cargo wagons is missing
○ the storage amount is multiplied by the cargo capacity (default) instead of
subtracted
○ The ‘close’ signal for the train station is not setup correctly (S > 0)
○ If you have more than one material in the request station: you must isolate
the wanted signal by changing the ‘each’ * -1 into <material> * -1
○ if a train doesn’t leave a station/doesn’t go to a requester station: check if the
wires to the global network are hooked up
Summary:
I’m using the described system on several maps and it is pretty stable if you pay attention to
the wiring. One have to keep in mind that the nearby stations will be served before the stations that
are further away. You might have to adjust the thresholds if some stations are not served at all (or
increase the production of the supply station).
Possible things to optimize the system:
You could add an arithmetic combinator to the supply station for sending out more trains to
one far away outpost. Additionally, you could add some train stops to guide dedicated trains to a
station (just disable them as soon as a train enters the block with the station in it by reading out the
next rail signal and disable the station at a red signal)
Pro:
- ‘dynamic’ management of material to several locations
- Trains are not running back and forth permanently
- demand driven system
- no need for fueling locomotives at every station (centralized depot)
- easy to connect new request stations without the need of editing schedules
Cons:
- requires one station per material (huge station setups)
- it may take some time to find a good threshold (rule of thumb: two times the max. cargo
capacity)
- complicated if you look only at the combinators and don’t take the time to understand it
- the system will break if the red and green wires on the rail network are disconnected
- a nearby opened station will always be served first before stations further away will be
served
Haphollas
The big power poles are the connection to the train network.