Page 1 of 1

[2.0.77] Train ID is sent before the train content can be read

Posted: Tue Sep 22, 2026 2:22 am
by Scowlader
I was trying to fill one stack of an item type from a chest to a wagon. However the inserter always inserts 12 (max stack size) instead of the required amount when the train just arrived. That's because I am sending the stack size S when the train id T > 0. However when the train just arrived the content of the train is not read yet, so the stack size I am sending is MAX STACK SIZE - TRAIN CONTENT (0) = MAX STACK SIZE. It would make more sense for T to be set only when the train content is readable already otherwise there is no way to know when it is the case.

To reproduce:

The train has 99 plates, the inserter should insert 1 but it's going to insert 12.
Set the train to automatic for it to reach the station.
It only happens when the train just reached the station.
The circuit checking the condition if T > 0 then send S should not be true before the train content is readable.

What the circuits do:
== : for each signal in chest send train signal (so we only get the plate signal from the train)
- : max stack size from chest item type - filtered signal from the train (how many plates we need to fill one full stack in our train)
> : if T (train id) > 0 then send S (stack size)
inserter : enable if S > 0, stack size set to S

Image


Re: [2.0.77] Train ID is sent before the train content can be read

Posted: Tue Sep 22, 2026 11:16 am
by Scowlader
This may be because I do not understand the circuits limitations. I will run the editor and delete the post if it is a design limitation.

Re: [2.0.77] Train ID is sent before the train content can be read

Posted: Tue Sep 22, 2026 11:27 am
by boskid
Thanks for the report however there are no bugs here. Train ID is sent at the same time as content of the train. Issue you are having is due to decider combinator and arithmetic combinator in the upper part introducing delay of 1 tick each so the bottom left decider sees signal-T 2 ticks earlier than it sees a processed signal-S

Re: [2.0.77] Train ID is sent before the train content can be read

Posted: Tue Sep 22, 2026 12:33 pm
by Scowlader
I see. Thank you for taking the time to explain it.