Factorio

Factorio

View Stats:
Automated trains -
Greetings everyone.

I have a slight issue with my automated train system which works this way :

Any mining outpost (which I call provider) sends a signal when there is enough resources in its chests/tanks to fill one train ore more.
Any production outpost (which I call requester) sends a signal when the resources in its chests/tanks become low.

If there is at the same time both a provider AND a requester signal of the same resource, then both provider and requester stations activate, so a train which was waiting in a depot can go there, load, then unload and finally go back to depot (I'll pass combinators and latches shenanigans to keep everything fine).

However, the issue is that if I give the same name for stations of a same resource, all the trains responsible for that resource will go to the nearest station and wait one behind the others.
If i give different names for stations of a same resource, then I'll be a waste of time because a train could go elsewhere needed instead of waiting for its own assigned station to activate.
So if three trains are waiting for the same station, and the station chests become depleted on the first train load (and is thus deactivated), the two others came for nothing.

It's especially bothering because the throughput of the providers allows more than one train per provider (and they are sometimes ALL needed) so as soon as one provider activates, all trains go for it and do stupid things. Farthest outposts are more likely to be forsaken while every train tries to go to the nearest one.

I have no real control of how many trains are going out nor where they go.
I want every train outside the depot to be active, not idle waiting behind another one, that's why I can't use a "parking lot" behind a station.
I tried to use a mod that allows to tweak train penalties values and it doesn't seem to change anything in my system.
I also tried a mod called Train pause https://mods.factorio.com/mod/trainpause which did the job (preventing a train to leave its station if its next destination has already a train on its way) but it has been deprecated since 0.17. I tried to make it compatible with the latest version but that's all I can do and it doesn't seem to work correctly anymore.

In short
I would like to have control on how many trains departs from the train depot so they don't clog on one point.
I would like to have a minimum control on their destination so they dispatch themselves as much as possible

That's why I came here, asking for advices and I thank you in advance.
< >
Showing 1-15 of 24 comments
Stran_ge Jul 23, 2019 @ 4:32am 
try the mod LTN it does exactly what u want
Fel Jul 23, 2019 @ 5:04am 
Is there a specific reason why you want your trains to work in such a complex way?

Even if you only want your trains to go to the "requester" when its resources are low (which is not exactly hard to do with circuit network if you set the conditions properly on the trains themselves, it does get a bit harder to do cleanly when you have a lot of "provider" stations), it is still much easier to have each train wait at it's "provider" station, and it makes sure your trains are not bunching up to the same "provider" station when multiple of them are requesting a train.


But because I'm far from experienced enough to know absolutely every single use of trains, it is possible that your system has some major benefits I am not understanding.
So here is a tip that might help a bit, with a bit of clever circuit network it is possible to disable the station once a train stopped at it and keep it disabled until the signal before the station turns green again (meaning that the train is no longer there).
If you combine this with your current logic and provide a bypass for your "surplus" trains it is possible to stop the extra useless trains from waiting for no reason behind.
B1tchFight Jul 23, 2019 @ 5:26am 
Interesting concept but I prefer to stick with 1 train per crafting station. This train is waiting on the output end until it's empty or it waits on the input end until it's full. No blocking, no problems, pretty easy setup.

Purpleganja Jul 23, 2019 @ 6:38am 
You could make a ''bait station'' at the provider to call the train in, but they are actually filled in parallel while being trapped in a stacker. when they are full, they can exit the loading zone and go to the bait station for a second and leave for the requester.
That would fix one part of the problem. as far as I have tested things, trains go to the nearest station when there are many with the same name. You could add a timer to disable a station for a short while after filling many trains to make trains go to another station further away.
AlexMBrennan Jul 23, 2019 @ 6:51am 
What I found to work reasonably well is to just count the number of provided/requested trains:

* ore mines (etc) output however many trains they can fill
* factories output however many trains full of materials they need to fill their buffer

Stations activate if they provide/require at least one train's worth of stuff.

The depot takes both numbers, works out the minimum, and dispatches that many trains. This does result in trains ganging up on the closest stations but as those stations are filled/emptied they go offline and the remaining trains reroute to supply the other stations.

I would only split the station network for the main bus (i.e. general purpose trains handle all outposts, and a separate fleet of trains directly supplies the main bus) to avoid high volume requests clogging up the above system.
Last edited by AlexMBrennan; Jul 23, 2019 @ 6:52am
SeaBee Jul 23, 2019 @ 5:00pm 
Originally posted by Stran_ge:
try the mod LTN it does exactly what u want

+1
Zorz (Banned) Jul 24, 2019 @ 1:11am 
Originally posted by Stran_ge:
try the mod LTN it does exactly what u want
and how to do it without mods?
SeaBee Jul 24, 2019 @ 5:48pm 
Originally posted by BKNE Zorz:
Originally posted by Stran_ge:
try the mod LTN it does exactly what u want
and how to do it without mods?

This:

Vanilla Train Network by Haphollas
Zorz (Banned) Jul 25, 2019 @ 12:35am 
Originally posted by SeaBee:
Originally posted by BKNE Zorz:
and how to do it without mods?

This:

Vanilla Train Network by Haphollas
?oO
Fel Jul 25, 2019 @ 2:00am 
Originally posted by BKNE Zorz:
Originally posted by SeaBee:

This:

Vanilla Train Network by Haphollas
?oO
https://www.reddit.com/r/factorio/comments/aa3pz8/vanilla_train_network_by_haphollas/
Zorz (Banned) Jul 29, 2019 @ 9:46am 
Originally posted by Fel:
Originally posted by BKNE Zorz:
?oO
https://www.reddit.com/r/factorio/comments/aa3pz8/vanilla_train_network_by_haphollas/
isn't really the solution.. u still need stacker infront of each station..

aaand it just runs with specific items/ressources and not dynamic..
Grumpy Old Gamer Jul 29, 2019 @ 10:10am 
The mine station shodul disable itself when a train is present, there is a full load of ore, or there is ore present but the mine is no longer producing. The last one I usually accomplish by checkign the belts for the presence of ore, but I have made fancier systems that reset a timer whenever ore passes by.

I now use a different system btu this is what I used to do, and it works fine until very late game when it can take a rather logn time for the train to get to the station and disable it, so I ended up gettign2-3 trains headed to the same station, then havign to turn aroudn and drive across the entire map to get to the next station.

What I do now is every mine has its own train, that specifically runs the plates. I combine minign and smelting operations for 4 times as much per load. There is a small penalty for runngin the plates after prod module expansion, btu the 4X cargo stack size more than makes up for it.

The only time I run raw ore is if a recipe requires the raw ore , e.g. concrete production.
AlexMBrennan Jul 29, 2019 @ 10:15am 
isn't really the solution.. u still need stacker infront of each station..

aaand it just runs with specific items/ressources and not dynamic..
Since none of those requirement were mentioned by OP none of the offered solutions addressed what is essentially a totally different question you happened to tack on to an existing thread.

Next time you might have better luck making a new thread for totally unrelated questions.
Last edited by AlexMBrennan; Jul 29, 2019 @ 10:16am
Zorz (Banned) Jul 29, 2019 @ 11:40am 
Originally posted by AlexMBrennan:
isn't really the solution.. u still need stacker infront of each station..

aaand it just runs with specific items/ressources and not dynamic..
Since none of those requirement were mentioned by OP none of the offered solutions addressed what is essentially a totally different question you happened to tack on to an existing thread.

Next time you might have better luck making a new thread for totally unrelated questions.
i can't read a vanilla solution here.. and this was the request:
Originally posted by Jean-Pierre Coffe:
In short
I would like to have control on how many trains departs from the train depot so they don't clog on one point.
KatherineOfSky Jul 30, 2019 @ 7:34am 
Originally posted by BKNE Zorz:
Originally posted by AlexMBrennan:
Since none of those requirement were mentioned by OP none of the offered solutions addressed what is essentially a totally different question you happened to tack on to an existing thread.

Next time you might have better luck making a new thread for totally unrelated questions.
i can't read a vanilla solution here.. and this was the request:
Originally posted by Jean-Pierre Coffe:
In short
I would like to have control on how many trains departs from the train depot so they don't clog on one point.
The OP didn't ask for vanilla, in fact even mentioned using mods.

Through this thread it seems you are "fighting" on the OP's behelf, which is definitely not needed. If they have further clarifications, let them make it themselves.
< >
Showing 1-15 of 24 comments
Per page: 1530 50

Date Posted: Jul 23, 2019 @ 3:10am
Posts: 24