Page 1 of 1

"Enable/disable" AND "Set filter" possible for filter inserter

Posted: Thu Apr 30, 2020 6:13 pm
by Till223
TL;DR
Filter inserters should be able to have filters set and be enabled/disabled by circuit conditions. This would open up new possibilities for black list mode.
What ?
Right now you can only select either "enable/disable" or "Set filters" as a circuit network mode of operation for filter inserters:
Image

My suggestion is to change these radio buttons to check boxes and enable the player to use both at the same time:
Image
Why ?
For normal filter inserters, you can just remove all filters to essentially "disable" the inserter. This however isn't possible for black list mode. There is no way to set filters and disable a black list mode inserter at the same time, except cutting electricity. Adding this would create new possibilities for the rarely used black list mode, like e.g. disable the inserter once 5 items are blacklisted.

This was suggested before here, but without mentioning black list mode.

Re: "Enable/disable" AND "Set filter" possible for filter inserter

Posted: Thu Apr 30, 2020 8:07 pm
by Optera
Not sure this would be useful.

1) In whitelist mode no filter = disabled.
2) Disabled inserters still update according to pickup location, inserters without filters do not.

Re: "Enable/disable" AND "Set filter" possible for filter inserter

Posted: Thu Apr 30, 2020 11:37 pm
by SupplyDepoo
I think this would be quite useful. I've wanted this many times before.

1) In blacklist mode you cannot disable it by erasing filters.
2) Performance isn't the driving concern here and adding the option won't prevent you from disabling the inserters the traditional way if you do care about performance.

Re: "Enable/disable" AND "Set filter" possible for filter inserter

Posted: Wed Nov 10, 2021 2:59 am
by byteme8bit
+1 on this. Would be a welcomed addition!

Edit: found and tested out a "hack" by using a decider combinator to set the filter when my condition is true and confirmed that the inserter doesn't move any other items when condition is not true. Not sure how/why this works but love it!

Re: "Enable/disable" AND "Set filter" possible for filter inserter

Posted: Wed Nov 10, 2021 9:50 am
by Stringweasel
Till223 wrote:
Thu Apr 30, 2020 6:13 pm
Filter inserters should be able to have filters set and be enabled/disabled by circuit conditions. This would open up new possibilities for black list mode.
It's possible to build your own blacklist filter using a inserter in whitelist mode and a few combinators.

IMO this is what makes Factorio really fun, it gives you very useful - but limited - tools. But it's also usually possible to surpass those limits with good design or some circuitry.

Re: "Enable/disable" AND "Set filter" possible for filter inserter

Posted: Sun Nov 21, 2021 10:31 pm
by Pence128
Stringweasel wrote:
Wed Nov 10, 2021 9:50 am

It's possible to build your own blacklist filter using a inserter in whitelist mode and a few combinators.
You can simulate "set stack size" by grabbing items from a belt and disabling the insterter when its hand contents equal your signal. Do you want to do that?

There's no more reason for filters to be a radio button than for stack size. This should be changed for consistency's sake at the very least.

Re: "Enable/disable" AND "Set filter" possible for filter inserter

Posted: Mon Nov 22, 2021 12:57 am
by robot256
Train stops and roboports allow more than one circuit function to be active at a time, and they didn't always but were changed to be that way. Asking for the same addition to filter inserters so that white/blacklist modes can be used the same way seems reasonable.

Re: "Enable/disable" AND "Set filter" possible for filter inserter

Posted: Mon Nov 22, 2021 5:50 am
by ssilk
I think it has some reasons, that inserters have these two modes of operation.
Mainly the CPU issue. But also that you need to program the inserters behavior totally differently, if all modes can be on at the same time.

What I want to say with it?

The inserters are one of the most optimized entities in Factorio. The code is immensely tuned. But this suggestion means, that the inserters needs to be re-programmed from scratch.
Now: do either this exclusive-or that. Wanted: do this-and-that in all possible conditions — which is a completely new behavior. At least many routines need to be reprogrammed, because of this deep change of functionality.

Which I think will be not impossible, but very unlikely to happen, because it takes such a long time and even very well programmed it looks for me so, that — even done very well — the implementation will be slower. Because possibly doing both it cannot be as efficient — it needs to think about edge-cases every turn.
And inserters are extremely optimized which is not so important for roboports and other entities, because there are so many inserters per game.

And it won’t be used as much. These cases where this could be useful are extremely rare (over all games of all players) AND they can be simply worked around with circuits.

So seen, this is also a gameplay value which this suggestion will remove.

Shrug. I think it should be moved to won’t implement. Other opinions?
What specific cases are there, that really cannot be made other, than with this patch?

Re: "Enable/disable" AND "Set filter" possible for filter inserter

Posted: Mon Nov 22, 2021 9:29 am
by Stringweasel
Pence128 wrote:
Sun Nov 21, 2021 10:31 pm
Stringweasel wrote:
Wed Nov 10, 2021 9:50 am

It's possible to build your own blacklist filter using a inserter in whitelist mode and a few combinators.
You can simulate "set stack size" by grabbing items from a belt and disabling the insterter when its hand contents equal your signal. Do you want to do that?
No, I don't meaning using the stack size. You set the inserter to set-whitelist-mode, which allows you to control exactly which items it may pick up. Then I have a constant-combinator with a list of blacklist signals it may not pick up - and there's no real limit to how many items to blacklist. Then I read the contents of the chest it's picking up from, and only send those item signals to the inserter's set-filter if it's not present in the constant combinator. It works really well and the inserter will never get blocked trying to pick something up that doesn't exist. This circuit can be easily expanded to not send anything to the inserter if some other condition is not met - essentially disabling it.

I'm not saying OP's suggestion shouldn't be implemented, there's many good points raised here. I'm only saying it's technically possible to work around it, albeit with a little more effort a few combinators.

Re: "Enable/disable" AND "Set filter" possible for filter inserter

Posted: Mon Nov 22, 2021 12:59 pm
by robot256
I've done the combinator thing many times before as well. Trying to think of drawbacks, I realized you could even use it at a belt and a train directly. It would not work at an assembler,
or a car or an unconnected wagon. Only very specific tasks would need circuit-set blacklists + enable for those. Besides using a cargo wagon as a big chest, the others probably involve mods. The Inventory Sensor mod can be used to do Stringweasels suggestion even in this case.

Re: "Enable/disable" AND "Set filter" possible for filter inserter

Posted: Mon Nov 22, 2021 3:09 pm
by ptx0
ssilk wrote:
Mon Nov 22, 2021 5:50 am
this suggestion means, that the inserters needs to be re-programmed from scratch.
can't you just let the developers come along and say that, if it's the case? because as a developer, i can say it's probably not. it just needs an extra conditional combined with the existing one in an OR state. if condition1 or condition2 are true...

Re: "Enable/disable" AND "Set filter" possible for filter inserter

Posted: Mon Nov 22, 2021 5:34 pm
by ssilk
Enabled-Mode:
- Am I turned on? No, then go away!
- Look what's needed in the target / has it changed?
- Look if there are the needed items at my source-position?
- If yes: Grab it and try to put it into/onto target

Filtered-Mode:
- Am I an whitefilter? Any filter set? No, then go away!
- Look what's needed in the target / has it changed?
- Look if there are the needed items at my source-position?
- Look if the current filter allows me to grab them
- If yes: Grab it and try to put it into/onto target

This is veeeerrry simplified, but yes, ptx0 may be right, that this looks simpler than I thought.
Hmm. Could also be totally wrong. :) 8-) :lol:

Because of that I would NOT put any more thinking into the effort of programming this (it's the wrong discussion here, I'm sorry, that I begun it; that is totally unkown unknowns) and brings us away from the topic.

Re: "Enable/disable" AND "Set filter" possible for filter inserter

Posted: Mon Nov 22, 2021 7:02 pm
by Pence128
Stringweasel wrote:
Mon Nov 22, 2021 9:29 am
No, I don't meaning using the stack size. You set the inserter to set-whitelist-mode, which allows you to control exactly which items it may pick up. Then I have a constant-combinator with a list of blacklist signals it may not pick up - and there's no real limit to how many items to blacklist. Then I read the contents of the chest it's picking up from, and only send those item signals to the inserter's set-filter if it's not present in the constant combinator. It works really well and the inserter will never get blocked trying to pick something up that doesn't exist. This circuit can be easily expanded to not send anything to the inserter if some other condition is not met - essentially disabling it.
Clever. Reading the source items neatly solves the limited slot problem. I only thought of cycling through a bunch of constant combinators with 5 signals each.
Stringweasel wrote:
Mon Nov 22, 2021 9:29 am
I'm not saying OP's suggestion shouldn't be implemented, there's many good points raised here. I'm only saying it's technically possible to work around it, albeit with a little more effort a few combinators.
You sounded against when you said limited tools are what make Factorio fun. I suggested that removing "set stack size" would make inserters even more limited but I don't think that would make them more fun for anyone.

Re: "Enable/disable" AND "Set filter" possible for filter inserter

Posted: Tue Nov 23, 2021 7:44 am
by Stringweasel
Pence128 wrote:
Mon Nov 22, 2021 7:02 pm
You sounded against when you said limited tools are what make Factorio fun. I suggested that removing "set stack size" would make inserters even more limited but I don't think that would make them more fun for anyone.
I guess it did sound like I was against it, but it wasn't the intention. There's of course a balance between giving the player enough tools and enough obstacles to keep the game fun to play. IMO the current inserter behaviour fits this balance well, but I also don't think giving the inserter the ability to enable/disable and filter will disrupt this balance. My intent was more to give OP a workaround so he can continue playing.