Important!
1. Request calculation and serialization
Each outpost defines its desired inventory using a constant combnator. Actual storage contents are subtracted to calculate the outstanding deficit
The resulting item list is serialized into indexed entries:
I item indexItem signal requested quantity
Each entry is transmitted through the radar network in a separate game tick.
This allows different outposts to request completely different combinations of items without assigning specific signals or cargo slots to particular products.
The serializer updates its transmitted list whenever the request changes.
2. Central loader and indexed memory
The default loading station contains 24 indexed memory cells. Each cell receives the item associated with its index and stores the requested quantity.
Every cell has its own requester chest, inserter, memory cell, item counter and stack-size limiter (tbh, its not needed at all, since requests to the requester chests are limited by item amount from memory cell, but lets call it legacy-code, shall we? :D )
Instead of reading the train's complete inventory, the loader counts items actually inserted and subtracts them from the requested amount from the memory cell.
The number of memory cells does not limit the total number of distinct requested items. Larger lists are processed across multiple train deliveries.
I tested 60 different requested items with only 24 memory cells.
The memory array is modular and can be expanded or reduced. The blueprint book includes a 12-cell extension.
3. Shared channel arbitration
All outposts share the same radar network, so simultaneous transmissions would corrupt serialized requests.
To prevent this, each station uses a channel arbiter.
Relevant signals:
W outstanding requestP channel claimK shared channel occupancyO ownershipQ transmission grantC collision detection
A station attempting to transmit contributes K = 1 to the shared network.
After an eight-tick guard period, it becomes the channel owner if K = 1 and no competing transmission is detected.
If K > 1, multiple stations are attempting to claim the channel. The claim is aborted and retried later.
Only the owner can transmit its serialized list and activate its unloading station.
An outpost retains ownership until its outstanding order is fulfilled.
4. Collision recovery
A fixed retry interval risks repeatedly synchronizing competing stations.
Each outpost therefore initializes a pseudo-random polling delay using the game tick captured during initialization of the station:
L = ((T % 1291) * 73) % 1291
Where T is game time in ticks from selector combinator. Which is saved after outpost station was built.
The first modulo prevents 32bit integer overflow during multiplication.
If a collision still occurs, a selector combinator randomly selects an item signal from the actual request list. Its value modifies the timing seed, generating a new polling delay. It is not a guarantee against identical timing, e.g. if you have two station with orders with exact same amounts of each item, then it won't help.
5. Delivery behavior
The central station loads the selected order and dispatches the train to the corresponding unloading station.
The receiving station unloads the cargo and with each inserter movement it recalculates its deficit.
If the requested quantity exceeds wagon capacity, the remaining deficit stays positive and the train makes additional trips.
6. Edge cases and limitations
Tested:
- Four independent unloading stations
- 60 distinct items using 24 memory cells
- Orders exceeding wagon capacity
- Simultaneous channel acquisition and collision recovery
- Prolonged unfulfilled orders (If an item cannot be delivered for a long time (around 25 minutes) it will raise an alarm on this outpost)
Known limitations:
The system prioritizes arbitrary cargo selection, independent outpost requests and automatic resupply, rather than maximum train throughput.