Name: Logistic Train Network
Description: Adds new train stops forming a highly configurable logistic network.
License: private use only, no modification, no redistibution, no commercial use
Download: Mod Portal
Tested with Factorio Version: 0.16.51 / 0.17.42
Tags: logistic, train
Demo Map:Small map running 5 trains in nearly realistic fashion. Showcasing station designs from simplistic 1 combinator to depots using train compositions and a truly universal provider/requester station.
Designs for stations, depots, control circuits and more can be found in the Design thread.
Thanks to Nilaus for creating this very basic tutorial.
Long Description:After brooding for weeks over ideas in this thread I sat down and wrote this as proof of concept.
Big thanks to Choumiko. Seeing how certain things work in Smarter Trains and Rail Tanker made writing this mod a whole lot easier.
This mod adds one new train stop "logistic-train-stop" acting as anchor points for building a train powered logistic network.
Stops consist of 3 entities, the stop itself and the automatic placed lamp (input) and yellow constant combinator (output). Stop: (behaves like base stop)
- read from train enable by default
- send to train enabled by default
Constant Combinator: (signal output)
- train composition: position of wagons & locomotives in parked train (all stops)
binary encoded signal of train composition up to 31 carriages with lsb at the train stop. More information about binary encoding here
- Expected train inventory after un-/loading is complete. (only Requester & Provider)
Lamp: (color coded status)
Values can only be read through green wire.
- green = 1: normal status
- blue = n: LTN Controlled Train parked at stop, n = number of trains
- yellow = n: Stop is part of a scheduled delivery, n = number of trains
- white = 1: Error - not initialized
- red = 1: Error - short circuit
- red = 2: Error - deactivated stop
- pink = 1: Error - duplicate station name (only Depots may use duplicate name)
Encoded Network ID - Binary coded signal assigning a stop to specific networks. (defaults to 0xFFFFFFFF = all networks)
Deliveries are only generated when between Depot, Provider, Requester within the same network. Stops can be assigned to multiple networks e.g. 6 assigns a stop to networks 2 and 4.
Depot: (ignores Requester & Provider signals)
Stop is Depot - flags this stop as depot (default=0 false)
Requester & Provider:
provided items (positive number) and requested items (negative number)
minimum train length (optional) - minimum length of locos + wagon allowed in this station (default=0 no limit)
maximum train length (optional) - maximum length of locos + wagon allowed in this station (default=0 no limit)
limit trains (optional) - number of trains (deliveries) allowed simultaneously at this station (default=0 no limit)
Request Threshold (optional) - Missing amount of items/fluids triggering a delivery. (global default=1000)
Request Stack Threshold (optional) - Missing amount of item stacks triggering a delivery. Takes priority over Request Threshold.
Request Priority (optional) - higher priority will be served first (default=0)
Disable Warnings (optional) - Suppresses warnings, like no station supplying x found, for this Requester. (default=0 false)
Provide Threshold (optional) - Amount of items/fluids required to act as provider. (global default=1000)
Provide Stack Threshold (optional) - Amount of item stacks required to act as provider. Takes priority over Provide Threshold.
Provider Priority (optional) - higher priority will be used first (default=0)
Locked Slots per Wagon (optional) - number of inventory slots per wagon locked for this provider (default=0 false)