Useful Combinators


Adds many useful combinators that do various things! some simplify combinator logic whilst others add new functionality!

Content
2 years ago
0.14 - 1.1
6.67K
Circuit network

g Modifying

6 years ago

Hi, How can I mod the max/min combinator to have more than 5 signals? I play with bobs+angels and need to extend that to atleast 8.

6 years ago

Ok, I fixed that by increasing the for i loop to 1,8 and added extra params {signal = {type = "virtual"},

And I increased the colspan to 9.

I modded min-combinator the same way and it works too.

However, I tried to increase the converter-combinator to have 8 values aswell, but that didnt go so well. I've ran into a bug that I cant figure out how to fix:

Error while running event
UsefulCombinators::on_tick(ID 0)
Index out of bounds: 6
stack traceback:
UsefulCombinators/control.lua:1996:
in function 'on_tick'
UsefulCombinators/control.lua:2085:
in function <UsefulCombinators/control.lua:2080>

I increased the number of params-slots to 8 here aswell. And changed all loops etc.

Is there any way to fix this?

6 years ago

Where ever there is 5 of something in the Converter Combinator, just make it add up to 8, including the meta.params

6 years ago

I've gone through control.lua several times, and changed all corresponding values. But I still get that error. I've searched for ,5 etc and replaced all, and also searched for ,6 and ,4 if there would have been any offsets.

I've increased the number of {signal = {type = "virtual"}}, to eight, with the last one ending without a ,.

I have not touched the color-combinator or emitter-combinator code.
I increased the number of values in the statistic-combinator to eight, and increased the colspan to 11, not sure if that was necessary tho.
I added more {signal = {type = "item"}, count = 0, index = 8} to this.

As you can see, it fails on this code:
1994 control.parameters = {
1995 parameters = slots
1996 }

Which is inside the statistics-combiner, however this is not the combiner I was trying to set values in in game, when it crashes. I've mainly worked with the converter and min/max combiners.

6 years ago

Here is a pastebin link to the code I have in my edited file atm.
https://pastebin.com/k9ryZ43R

Its not listed on pastebin.

New response