Trainstop enabling/disabling
There was a question on yesterday’s post. I was just going to answer it right there in the notes, but my reply kept getting longer and longer, so I decided to just make a separate post instead.
---
@arraydotprototypedotreduce said: You can name stations the same and have them only call trains if they have a train load of resources available? This is a new one to me… Is it a mod?
Nope, no mods necessary for this at all! And it's not a new feature either, so you can even use it if you don't subscribe to the experimental branch of the game.
The basic idea of naming for example all copper mining the same and having a central smelting array is pretty straightforward. But since trains will normally go to the nearest destination with the scheduled name, you will probably just end up with all your trains queuing at the mining outpost closest to your smelting. Because even an express belt's worth of iron and generously upgraded stack inserters can only move so much product per minute!
So how do you make sure, trains will go to all the different stations and automatically pick one with enough product to actually fill up the cargo wagon as fast as possible? You just have to use the awesome power of circuit conditions!
You have to approach this issue from the other direction, so to speak. Instead of telling the trains where to go, you have to tell the trainstations, whether a train may go there. So first, you connect all the storage chests at a mining outpost with a single colour of circuit wire. For this you can just grab the wire item and with the wire in hand, click on the first chest to start the wire connection and then on another chest to choose a target for the wire connection.
Remember, bot placed blueprints with circuit conditions in them, will just magically add the wire. You can use this to get the wire for free, but more importantly (a couple of red wires shouldn't be too big a strain on your production) this will be a lot faster and more convenient, than doing it manually.
Chests connected by a wire will automatically send a signal with their content to the wire network. If you connect several, they will add their content together. So once you connect all the chests to each other, you have a signal with all your storage chests inventory going through the circuit wire.
If you want to see whats going through the circuit wire, you can connect it to a power pole and hover over it to look “inside“.
Now the next step is simple, connect the trainstop to the same circuit network and toggle on the "enable/disable" option in the trainstop's menu, which should pop up once it has a wire connection. Now you can set up a condition for when you want the trainstop to be enabled, like how much ore is in your storage!
For this you can calculate how much ore you need to fill your train. Ore is stored in stacks of 50, so one cargo wagon can hold up to 2k ore. (Since inventory isn't actually limited by a specific number of items, but by number of stacks, maximum stack size is important here!) In a one engine with four cargo wagons scenario, that means a total of 8k ore is needed to fill the train's cargo.
I usually reduce the number a little since there's still some travel time involved, so let’s go with 7.5k ore. Go to the “Enabled condition” part of the menu and change it to the number of iron ore (click on the first icon and select the iron ore from the menu that pops up) to be greater than (click on the sign to select the correct one from the dropdown menu) the number you decided on (ignore the icons for this and just use the slider or for more precision, manually type in the number in the little box at the bottom and click “Set”).
Now should end up with something like below. These settings mean, the trainstop will only be enabled, if there is enough ore in the storage chests to completely fill the train!
One caveat: since this system only checks the total number of ore, it won’t work properly if theres an uneven distribution of ore in the storage chests. Which can happen, depending on how you route the ore from the miners to your storage. So for example, the chests in front of your first cargo wagon might be filled up already, while the rest are still mostly empty. If the total number of ore is still greater than 7.5k, the trainstop will be enabled, but the cargo wagons won’t actually be filled quickly. However, this is an easy fix: a little bit of belt balancing will work wonders here!
And just like that, you can have a simple train network without having to name each individual outpost and making a unique schedule for every single one. You can even copy a trainstation’s name, color and circuit condition with the [shift]+[leftclick] and [shift]+[rightclick] feature! Which makes things a lot easier, when you have lots of outposts in a really big base. No mods necessary at all!









