[0.17.66] Train leaves station despite conditions not met

Bugs that are actually features.
KrazyTygr
Inserter
Inserter
Posts: 41
Joined: Fri Apr 13, 2018 8:39 pm
Contact:

[0.17.66] Train leaves station despite conditions not met

Post by KrazyTygr »

I have a modded game which has a science train - it collects 800 of each of the science packs in one wagon, and delivers them to the science labs, where they get unloaded by filter inserters.
The train has a wait condition of: if (Cargo Automation Science = 0) OR (Cargo Logistics Science = 0) OR .... etc.
The train station 'Science <' is connected to a medium power pole, which has no other connections. There are no inputs to the station.

When all 'Mode of operations' of the train station are disabled, then the train acts as expected - it will unload science packs until one of them is depleted, then goes to refill.
If the mode of operation is set to 'Send to train', the train will immediately leave the station, even if none of the packs are 0. This occurs if the train arrives at the station when this mode is set, or if the mode is changed while the train is present.
Only the 'Send to train' has this effect - all other modes of operation do not affect the train.

I have removed all of the mods from the save, and still get this strange behaviour, although I have not been able to reproduce it in a clean vanilla game.

I've attached the save with no mods, so the factory will not run properly, but you should be able to see the train action if you keep sending it to 'Science <' and change the station mode of operation.
Attachments
Station wait condition.zip
(2.25 MiB) Downloaded 96 times
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 4164
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [0.17.66]Train leaves station when wait conditions are not met

Post by boskid »

Interesting catch. Cannot reproduce on my own map but this save is indeed weird.

Using editor i managed to catch this train and then using "tick once" find what is wrong.
- if in train station "Send to train" is off, then condition for "Production science pack == 0" is green(fulfilled) even if train still contains some production science packs
- if in tran station "Send to train" is on, then even if i remove every item from cargo wagons, "Production science pack == 0" is false even if it should be true. All other conditions (red,green,blue packs == 0) are green.

If i remove affected condition from schedule and recreate it again, it will work as expected.

-----

Not a bug
75155-circuit.png
75155-circuit.png (42.62 KiB) Viewed 1175 times
KrazyTygr
Inserter
Inserter
Posts: 41
Joined: Fri Apr 13, 2018 8:39 pm
Contact:

Re: [0.17.66] Train leaves station despite conditions not met

Post by KrazyTygr »

Darn it - I feel like such an idiot :cry:

Thanks for your detective work :)
Post Reply

Return to “Not a bug”