Factorio

Factorio

View Stats:
Train interrupts. How cargo wildcard substed?
I want to make LTN trains on vanilla space age.
I want train staying in depo until it has both load and unload station for the same cargo.

I writing interrupt like:
conditions:
"load <wildcard> is not full"
AND "unload <wildcard> is not full"
targets:
"load <wildcard>", full load
"unload <wildcard>", full unload

Can I be sure conditions and targets are working with the same cargo?
Or I can face situation "load iron is not full" and "unload steel is not full" so train full of iron stuck?
Any documentation describes it?
< >
Showing 1-4 of 4 comments
Fel Jan 19 @ 4:24am 
Cargo wildcard is "what is in the cargo right now", so that's not what you want, it is used to automatically find an unload station for the current item and not for loading a train.

For a LTN-type system you usually want the loading to be based on circuit wildcard.
After all, LTN requests a train to be loaded with an item when there is space for that item to be unloaded.
Thankfully with the radars functioning as wireless circuit network, it is possible for the "requester" stations to easily send for example the item's signal with a value of 1 per train needed.

EDIT: Note that you would need to substract 1 from said "global" signal every time you send a train to be loaded with that item as well.
Last edited by Fel; Jan 19 @ 4:27am
Entiranz Jan 19 @ 4:24am 
I think its technically possible for that to happen, if you have more load station train slots open than unload ones.
Because the unload stations wont count as full until they actually have trains heading towards them, that condition will always be green.
And with the way train interrupts work, each train with an interrupt and accepted conditions will trigger simultaneously.

Say that you have 6 load iron and 3 unload iron available. The interrupt will trigger 6 trains, because there are 6 load iron slots free, and all unload slots count as free until you have trains heading towards them. This will leave 3 trains stuck at the load stations until there are available slots at the unload stations again.
RiO Jan 19 @ 5:33am 
Originally posted by Entiranz:
And with the way train interrupts work, each train with an interrupt and accepted conditions will trigger simultaneously.
Incorrect.

Interrupts are only evaluated when a train leaves a station.
If your fixed train schedule consists of nothing but "head to depot; wait for N seconds" then evaluation of interrupts is inherently staggered based on the arrival time of each individual train at a depot stop. Thus, the inherent entropy within the entire pickup-delivery system will ensure that your trains can never all synchronize and stampede.

A subset of them might, but only up to what the pickup station has set as its train limit. At which point those trains will be stuck there and will block allocation of further trains until they can empty themselves again at a delivery station. Which means the system self-recovers / self-balances.
Last edited by RiO; Jan 19 @ 5:35am
mergele Jan 19 @ 2:02pm 
This whole setup gets vastly easier if you just accept trains sitting at loading stations until a requester becomes active, and its not like a few trains cost anything.
< >
Showing 1-4 of 4 comments
Per page: 1530 50

Date Posted: Jan 19 @ 3:26am
Posts: 4