Filter Combinator


Provides a filter combinator, which lets you filter any number of signals from the input. Does not alter the signal level and is valid for every signal level. Implemented in terms of circuitry rather than on_tick for performance. 3 ticks of delay between input and output. Compatible with Space Exploration.

Utilities
a month ago
1.1
698
Circuit network

i [Done] Add support for Compact Circuit

1 year, 23 days ago

Compact circuits is a mod that let you design "module" with input/output using regular factorio circuitry/logic, Id use this mod in a jiffy if support for it could be added to it (as currently i basically have a small compact circuit that act as filter, but its 7 object and since its a circuit i use in a lot of places its starting to pile up performance wise xD.

I do not believe its complicated to add support but i could be mistaken, i havent done much modding beyond very basic tweaks.

theres a guide at the bottom of https://mods.factorio.com/mod/compaktcircuit

1 year, 22 days ago

Will have to look into it. Currently slightly confused as to why they require special handling.

1 year, 22 days ago

the way it work as i understand, is that when "packed" the circuit just has invisible sub object representing what is inside the circuit, outside in the "real world" so that its the same performance as if it was regular circuit stuff on the map and not the overhead of having a separate space maintained and connected for it.

the special handling is defining those invisible object i think.

10 months ago

Added support with 0.2.0
Let me know if there are any issues.

3 months ago

Thanks. i had stopped playing before you did the change, but im going for another factorio run, so im happy to see its now supported. I'll let you know if i hit any issue once i reach the point of actually using them .

3 months ago

Cool mod! Really cool that it supports Compact Circuit.

But it seems that currently filter combinator settings reset when:
1) filter combinator is inside CC
2) CC being set to packed mode and exited
3) CC is opened again
and after these steps all filter combinators inside CC are reset :(

Not a blocker, but quite pesky bug (especially for those filters, that have manual set of signals)

3 months ago

It appears as though CC does not follow its own documentation anymore, and does not actually call the function in the mod that they say they explicitly need.
So I don't really know what to do here, since there is no information on when an entity is unpacked. Not that I ever really understood their need for a "packed" entity in the first place.

a month ago
(updated a month ago)

It appears as though CC does not follow its own documentation anymore, and does not actually call the function in the mod that they say they explicitly need.
So I don't really know what to do here, since there is no information on when an entity is unpacked. Not that I ever really understood their need for a "packed" entity in the first place.

You should open a bug then, its dev is quite active on those things.
(Bugfix waiting room)

Upd.:

Reported: https://mods.factorio.com/mod/compaktcircuit/discussion/663feccec844daaa9c48386b

a month ago

The problem that the filter combinator loses its config in cc is a bug. See https://github.com/Sil3ntStorm/factorio-filter-combinator/pull/4/files for the fix. I run it with that change for a while now and it works just fine. Get Sil3ntStorm to merge and release it. ;-)

a month ago

(my understanding of the "packed" mode is that you do not need to maintain a separate surface for each compact circuit. The packed variant is invisible on the surface where the cc is).

a month ago

This has been fixed with 1.0.5, thanks (sorry it took a while).

a month ago

Thank you for the fix (and the housekeeping code that removes entities if the main entity was invalidated by compakt circuits)! It is still "bleeding" entries in the sil_filter_combinators map, the entry for the "main" entity does not get cleaned up (nor can I see a good way to do so because by the time this code is called, the main entity is gone and its unit_number was nowhere registered).

One possible fix is to use the main unit_number as the index in the sil_fc_data map (and therefore as the value registered in the sil_filter_combinators map).

A data migration to rebuild that array when upgrading the FC version would make this compatible with the current version of the FC.

a month ago

Yeah I had thought about that, but decided against changing that for the quick fix. It's merely some dangling references to deleted stuff that will never get used. At least there won't be any actual entities around on the map anymore, although until compact circuits tells mods about things it deletes there will be new ones when killing compact circuit entities.
To get rid of those simply change a startup setting of any mod, or add / remove / update mods and load the game, which will run the cleanup code that removes them.

a month ago

Understood. The cleanup code still leaves the sil_filter_combinators[<unit number of the already deleted main entity>] = <index of the data element that was deleted> entries in place because it does not have the main unit_number anymore to remove it (the unit being invalid is where this code is triggered).

The current code removes all the references to the secondary units (everything but main). I guess this is good enough, unless you use FCs extensively (in the thousands), it should not create a lot of additional data.

a month ago

Yeah I know, like I said it's just a few references that even in the thousands won't have any effect, except a minor increase in save game size I reckon. I might change that at some point in the future, but that is not something that needed to be done right now.

New response