Page 1 of 1

Strange Behaviour? What am I doing wrong?

Posted: Sat Aug 25, 2018 7:20 am
by evopwr
Hi, i'm not sure if this is meant to be like this?

I'm sure I must have something wrong..?

I want to tell my train to wait until a certain cargo is under 100.
This works fine for normal items, but I want it to wait until a fluid is under 100. But its not available as an option?
This might be because i'm running a combination of Bobs and Angels mods?

So, I came up with a work around, to read contents of train, AND send it back again.
Using a simple Decider, if water (on train) is under 100, send a green square signal of 1.
And change the train to wait until green square > 0.

For some reason, this doesnt work. It pulls in, and immediately leaves again. Its almost like it hasn't got the signal, done the calculation, and sent back a signal in time.
Adding a "AND Time Passed 1 sec" causes it to work correctly. The train waits until water is under 100.

But I also wanted other factors in play, that makes this not work.
eg, Wait Until:
cargo: copper plates < 100,
OR, cargo: tin plates < 100,
OR, cargo: iron plates < 100,
OR, green square > 1

So adding an "AND time passed 1 sec" causes undesired results. (wish I could define a better If statement, with brackets to define the OR/AND priorities...)

So i've now come up with an even bigger work around, where ALL calculations are done by Deciders, and the train simply has:
Time Passed 1 second, AND, green square > 1.

It works, but it seems like a lot of work arounds for something that should be easy?

Am I missing something?

Thanks in advance

Re: Strange Behaviour? What am I doing wrong?

Posted: Sat Aug 25, 2018 7:35 am
by Koub
You can filter with specific fluid cargo :
Factorio - Fluid count filter.jpg
Factorio - Fluid count filter.jpg (58.8 KiB) Viewed 1349 times
Or did I misunderstand your issue ?

Re: Strange Behaviour? What am I doing wrong?

Posted: Sat Aug 25, 2018 8:13 am
by evopwr
Ah! Thanks Koub,
omg, i'm an idiot. I didnt see the separate option to "Wait Until Fluid Count", as opposed to Cargo count.

BUT,

Question, for my workaround, why did I have to put a 1 second delay in, for the circuits to register train contents, and send back again? Is this as expected?

eg, put 1 copper in train.
Read train contents and Send to Train
Have a decider that takes read contents, does some calculation, which then goes back to train.
Train waits for that calculated condition.
Doesnt seem to work, without a 1sec delay to allow calculation to take place?

Hopefully attachments make it clearer,
20180825201748_1.jpg
20180825201748_1.jpg (42.38 KiB) Viewed 1344 times
20180825201755_1.jpg
20180825201755_1.jpg (37.95 KiB) Viewed 1344 times
20180825201804_1.jpg
20180825201804_1.jpg (49.08 KiB) Viewed 1344 times

Re: Strange Behaviour? What am I doing wrong?

Posted: Sat Aug 25, 2018 8:44 am
by Koub
[Koub] OK so I'll move this to Gameplay Help first.
I'm not a circuitery geek, but I think combinators and circuitery are not 0 time delay. There needs to be at least 1 tick to allow the combinators to do their stuff, and maybe another tick for the signal propagation (that kind of things). So you won't be able to read+compute+write+act on the same tick, thus the need for a minimal delay. I guess.

Re: Strange Behaviour? What am I doing wrong?

Posted: Sat Aug 25, 2018 8:48 am
by evopwr
Makes sense. Thanks for your help Koub, much appreciated!