Asteroid Collector not counting own contents for "Set Filters"

Bugs that are actually features.
TrueMilli
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sun Nov 03, 2024 5:57 pm
Contact:

Asteroid Collector not counting own contents for "Set Filters"

Post by TrueMilli »

I'd expect this collector to filter for Carbonic & Oxide asteroids, but it doesn't:
12-05-2024, 00-35-18.png
12-05-2024, 00-35-18.png (174.56 KiB) Viewed 326 times
There is nothing on the red wire, it's just to enable circuit network.
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 3191
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: Asteroid Collector not counting own contents for "Set Filters"

Post by boskid »

This is actually a feature as otherwise reading contents and set filters would have to be made an exclusive mode of operation (so either read content or set filters) and we really wanted to have both possible to enable at the same time. That means there are 2 entities that have slightly different input behavior: asteroid collector and assembling machine, which for most of the input stuff are ignoring their own output values.
TrueMilli
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sun Nov 03, 2024 5:57 pm
Contact:

Re: Asteroid Collector not counting own contents for "Set Filters"

Post by TrueMilli »

I understand that in general, but it confused me when I wired "identical" collectors together, and they behaved differently - because of different individual contents.

Maybe add an info tooltip detailing the behavior? I'd like it even better if there was a checkbox to toggle the behavior (like for "count hand contents" and in other places).
IsaacOscar
Filter Inserter
Filter Inserter
Posts: 467
Joined: Sat Nov 09, 2024 2:36 pm
Contact:

Re: Asteroid Collector not counting own contents for "Set Filters"

Post by IsaacOscar »

TrueMilli wrote: ↑Thu Dec 05, 2024 1:03 pm I understand that in general, but it confused me when I wired "identical" collectors together, and they behaved differently - because of different individual contents.

Maybe add an info tooltip detailing the behavior? I'd like it even better if there was a checkbox to toggle the behavior (like for "count hand contents" and in other places).
If you want this behaviour, you can trivially do this with a combinator, although it will have a one tick delay.

Count hand contents however cannot be emulated with combinators, so it's more important.
TrueMilli
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sun Nov 03, 2024 5:57 pm
Contact:

Re: Asteroid Collector not counting own contents for "Set Filters"

Post by TrueMilli »

Another thing: Why is the same behavior not implemented for Requester Chests? There read contents and set filters is exclusive.
TrueMilli
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sun Nov 03, 2024 5:57 pm
Contact:

Re: Asteroid Collector not counting own contents for "Set Filters"

Post by TrueMilli »

IsaacOscar wrote: ↑Thu Dec 05, 2024 1:52 pm
TrueMilli wrote: ↑Thu Dec 05, 2024 1:03 pm I understand that in general, but it confused me when I wired "identical" collectors together, and they behaved differently - because of different individual contents.

Maybe add an info tooltip detailing the behavior? I'd like it even better if there was a checkbox to toggle the behavior (like for "count hand contents" and in other places).
If you want this behaviour, you can trivially do this with a combinator, although it will have a one tick delay.

Count hand contents however cannot be emulated with combinators, so it's more important.
Actually, it requires a non-trivial amount of combinators, as any cable connected to a collector will add the current contents again - so multiple levels of isolation are required (every collector needs to get the sum of all collectors as input which is not connected directly to another connector via the same wire).
computeraddict
Fast Inserter
Fast Inserter
Posts: 222
Joined: Sat Oct 07, 2023 6:44 am
Contact:

Re: Asteroid Collector not counting own contents for "Set Filters"

Post by computeraddict »

boskid wrote: ↑Thu Dec 05, 2024 12:16 am This is actually a feature as otherwise reading contents and set filters would have to be made an exclusive mode of operation (so either read content or set filters) and we really wanted to have both possible to enable at the same time. That means there are 2 entities that have slightly different input behavior: asteroid collector and assembling machine, which for most of the input stuff are ignoring their own output values.
Not knowing this was a feature, I made a circuit that enables you to use both anyway. If you provide a negative limit signal (say you want 10 metallic and 5 of the others, you'd send -10, -5, -5) then use an arithmetic to invert the sum of your control signal and the collector's read-contents with "each * -1, each", feeding it back to the collector with a different color wire.
IsaacOscar
Filter Inserter
Filter Inserter
Posts: 467
Joined: Sat Nov 09, 2024 2:36 pm
Contact:

Re: Asteroid Collector not counting own contents for "Set Filters"

Post by IsaacOscar »

TrueMilli wrote: ↑Thu Dec 05, 2024 3:44 pm
IsaacOscar wrote: ↑Thu Dec 05, 2024 1:52 pm
TrueMilli wrote: ↑Thu Dec 05, 2024 1:03 pm I understand that in general, but it confused me when I wired "identical" collectors together, and they behaved differently - because of different individual contents.

Maybe add an info tooltip detailing the behavior? I'd like it even better if there was a checkbox to toggle the behavior (like for "count hand contents" and in other places).
If you want this behaviour, you can trivially do this with a combinator, although it will have a one tick delay.

Count hand contents however cannot be emulated with combinators, so it's more important.
Actually, it requires a non-trivial amount of combinators, as any cable connected to a collector will add the current contents again - so multiple levels of isolation are required (every collector needs to get the sum of all collectors as input which is not connected directly to another connector via the same wire).
It's not clear to me exactly what you're trying to do,
But if you want to have a bunch of collectors, and ensure that they won't collect any asteroid types that aren't already in any of the collectors, you only need a single combinator:
Screenshot 2024-12-06 153528.png
Screenshot 2024-12-06 153528.png (1.03 MiB) Viewed 141 times
Screenshot 2024-12-06 153533.png
Screenshot 2024-12-06 153533.png (142.27 KiB) Viewed 141 times
Screenshot 2024-12-06 153541.png
Screenshot 2024-12-06 153541.png (567.38 KiB) Viewed 141 times
(In the above, none of the three collectors have any oxide chunks, hence they won't collect any either).
Locked

Return to β€œNot a bug”