Selector combinator option

Place to get help with not working mods / modding interface.
taori
Burner Inserter
Burner Inserter
Posts: 11
Joined: Wed Nov 06, 2024 10:30 am
Contact:

Selector combinator option

Post by taori »

I want to have functionality where i can do a min/max operation based on comparing the green and red source. Is it possible to extend the options of that combinator at all?
dmikalova
Burner Inserter
Burner Inserter
Posts: 15
Joined: Thu Nov 26, 2020 7:48 am
Contact:

Re: Selector combinator option

Post by dmikalova »

It already has that option - select input with index 0 and sort descending is max and ascending is min.
torne
Filter Inserter
Filter Inserter
Posts: 346
Joined: Sun Jan 01, 2017 11:54 am
Contact:

Re: Selector combinator option

Post by torne »

No, it is not possible to change the behavior of combinators in mods.

What you can do:
- define custom entities that look like combinators but process their inputs/outputs with lua, but this can cause performance issues as the code has to run every tick
- define custom entities that actually create a bunch of invisible regular combinators that are wired up a certain way, but this requires a lot of logic to correctly deal with creating these composite entities and handling blueprinting/deconstruction/etc.

Since you can implement min/max between green and red using two just deciders, it would be possible to do the latter here, but it would be a lot of fiddly work compared to just blueprinting the two deciders. :)
Post Reply

Return to “Modding help”