Circuit Train Stop Renamer


Mod that renames train stops based on the first item or fluid that is passed over the red wire and resets disabled loading inserters.

Tweaks
17 days ago
2.0
21
Logistics Trains Circuit network
Owner:
floydwalker
Source:
N/A
Homepage:
N/A
License:
GNU GPLv3
Created:
17 days ago
Latest Version:
0.1.0 (17 days ago)
Factorio version:
2.0
Downloaded by:
21 users

A tiny mod to make a truly big bag of train network with many advantages, mostly efficiency of train use (less empty trains, less travel)

It does two things:

1: Whenever a train is finished at a station, this mod reads the first signal passed on the red wire.
If it's an item or fluid with count of 1, the station will rename to that fluid or item.

2: At the same time, all inserters in a radius of 80 tiles from the trainstop connected to over the green wire network, will rotate twice 180 degrees with a pause of between 30 & 60 ticks.
This will put any leftover items held in by inserters loading trains back into the box, I don't think this will work for direct insertion from assemblers and such. Easy solution for conditional train loading messing up that would otherwise happen when the next train picks up the leftover items from disabled inserters.

!Important!
A problem with train stop renaming is that when the only trainstop left with a certain name, for example: [plastic], is renamed to [copper], then any train with destination: [plastic] waiting for such station to become available, will change it's destination to [copper], and you could end up with a load of plastic when when you needed copper.

Solution: Have one dummy train station requesting each item, set to train limit 0 ( last screenshot ).

-- two bags of trains --
One for solids, one for fluids. That's all the scheduling you'll need to do.

An empty train goes to a pickup location (I used the FISH icon as station name for requesting empty solid trains). If it's loaded up with X, it goes to station X when full. If there's enough product Y there to fill a train, loading inserters are enabled and the train is loaded up until full and goes to a station requesting Y. This means any solid train could have a route from copper ore to plate to electronic circuit to red circuit to purple circuit and rocket silo, only then to return back to the nearest by station requesting an empty train.

I choose to only send empty trains with no path of full destination to a holding depot. This way, they don't block up factories needing resources. But trains loaded up full at factories are allowed to go into zZzz sleep mode, because it means that item is being overproduced and now you're automatically disabling such stations.

The holding depots (you don't need many) can be viewed to get an idea of production balance, when an item is in shortage, factory stations will be empty waiting for a train, so the depots will fill up with empty trains.
When everything is backed up, all stations will be occupied and the depots are thus empty.

When the holding depots are empty and stations are waiting for a train, it's time to add more trains :)
For best efficiency you want a few less trains then the sum of station limits in your base, so that especially from empty trains, they can choose a nearby pickup point.

Tips:
- Set the train limit to 1 for all stations requesting different items, 2 ore more for ore pickup locations, especially when far away.
- For loading conditions, make sure to read the train contents over the green wire which also reads the buffer store in order to enable loading inserters.
- the correct use of <= and > conditions are recommended when comparing which item is needed while they are equal.