This logistic train system will be the only train group you ever need.
Checkout my video about it: https://www.youtube.com/watch?v=Zp6RhK8l6k4
Features:
- Automatic refueling.
- Automatic select provider station (just like provider chest)
- Automatic set requester pickups (just like requester chests)
- No more train prioritizing the closest station
- How many trains you want from 1 to N
- Allow for trains with different capacity size
- Auto calculate train capacity
- Loader station (provider) have to have some sort of loading balancer.
- Uses radar as logistic network in the red wire, so no using radar for other items, green in radar is free for use.
- All loader station (providers) have to have the same name.
- All trains have to be the same size.
To be checked:
train limit signal, to allow multiple trains in a single station. Currently it is designed to have multiple providers/requesters over a higher train limit.
Note on the train capacity, it is required that all trains have the same length, however, the wagon capacity can be reduced in game, or if you have mods that add extra-large wagons it will also works. Just read "Wagon Capacity" as how many stacks fits into one wagon; you can have it as minimum as only 1 stack, to any size a mod provides.
Also worth, note that this is made for items, so if you want to have a smart liquid train, you can have the exact same configuration, but your liquid providers have to have a different name then the item providers, and of course you will have to have a separated group for the liquid wagon. The icon you want for the brain is the liquid wild card, since the item wild card will only work for items, full cargo and empty cargo still works, then only difference is that you want fluid count > 0 instead.
Train group:
Make one train group with some name.
On your station schedule, add only one station, that will have the name of your provider station, if you use the bp below, it is called Provider station. That will be the only scheduled station.
On the interrupt, add the first as fueling, as print below: select your fueling station, make sure it is robust enough to receive loads of trains, or just have multiples spread on the map with the same name.
Make sure you take into account the stack size of your fuel, for instance if you use rocket fuel that don't stack. Each locomotive has only 3 slots for fuel, so for rocket fuel I would use fuel < 2
Next, add another interrupt as your waiting dock: Select whatever station you want as a waiting dock, make sure it is robust enough to receive loads of trains, or just have multiples spread on the map with the same name.
Next, add your interrupt brain:
Your train group should look like this:
Blueprints
If you don't have selector combinator unlocked, replace it with a constant combinator, using any signal with your stack quantity for the item and connect with the GREEN cable.
Provider station without balancer, only the station and combinator for wagon customization, use your own balancer:
Feed into A signal the total amount of your loader chests, see next blueprint for sample, simplest way is to just connect all your boxes and have a math combinator with Each+0, output into A
Provider station with basic balancer:
Requester station without balancer, only the station and combinator for wagon customization, use your own balancer:
Just as before, feed into A signal the total amount of your loader chests, see next blueprint for sample, simplest way is to just connect all your boxes and have a math combinator with Each+0, output into A
If you don't want a calculated minimum stock based on your train capacity, just remove the math combinator with division that outputs into M signal, replace it with a constant combinator outputting into M signal the minimum stock you want. Use bp below as example.
Requester station with basic balancer:
Sample provider:
Sample requester:
Full scale sample:
Note that priority on station max at 255, so don't go crazy low on the priority delay, keep it above 5k, having a low value in the priority delay, will result in all station having max priority which will lead to the train only attending to the closest station again.