LuaCombinator 3 deprecated

by OwnlyMe

Like LuaCombinator2, but with full event support

Content
4 years ago
0.17 - 0.18
34
Circuit network

i Consider a version with isolated inputs / outputs

5 years ago

The LuaCombinator is a powerful tool for computing things of form f(red, green) -> some-unused-signals. However, it's not ideal to do things of the form f(red, green) -> some-subset-of-inputs when doing so will pollute the input node again.

It would be nice to be able to have a programmable combinator with outputs isolated from inputs (i.e. a generalised arithmetic / decider combinator).

5 years ago

you can use an decider combinator to pass through the signals to the lua combinator in one direction, then use a different wire for the output

5 years ago

Here is the solution I came up with.

https://imgur.com/a/1C4eeYQ

The LuaCombinator near the middle is taking the intersection-sum of the red and green network (here the green input is a LuaCombinator acting as a random number source, and the red input is a ordinary constant combinator).

The top arithmetic combinator is acting as a signal inverter, and takes the green signal source on a network isolated from the main LuaCombinator. (To get it there, we could optionally add additional combinator buffering the green input.)

The right arithmetic combinator is just a buffer to ensure synchronized timing.

The output of this contraption goes to the red network connected to the decider combinator, which is just acting here as a signal probe.

The intent is to subtract out the input to the green network, as otherwise the LuaCombinator adds its output on top of the green network and you can't cleanly extract its output value.

This works for my application, but would require 2 or 3 extra combinators, hence the pain point I raised earlier...

5 years ago

whats your combinator code? i still dont see why you'd need more than 1 additional combinator

5 years ago

this is what i was suggesting:
0eNrtl1uOmzAUhvfiZ1L5bsNbL7uoRogEz9QSmMgxo0YjFtBddG1dSQ9QgWfStBM86lPzEInY/vz7nPM7hye0b3pz9NYFVDwhe+jcCRWfn9DJPriqGX8L56NBBbLBtChDrmrHp9ocbG387tC1e+uq0Hk0ZMi62nxFBRnuMmRcsMGamTY9nEvXt3vjYcLCGfcLlQsxKEPH7gRrOzduD7wdz9AZFRh2qK03h3mIZuPq4Lum3Jsv1aOFpTD/3jbB+CuHeLQ+9PDLsv88Y/d+VH/o+jEKMjpHdgPjQ8SgGC8UehPlY0TJFwa7ifHpihI+3E0Dzs0xPI0sMn55U8d5svUcXusPvQ3TI+R0GEYVL1JJ/1QSl5nE78QNufyFLGGstovie+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ScrF1+XdRWqy1TQJQ9v5iIc1R3BbKOPnlEUUZrmWmy10zNYLqhUjOVqo69imOCcYM1yFrkrRRgnhPJVmNgMk0oTKkHdwpLbhWlBCWcUiwWmtkeMKcGk1nxh6YSIKUyJzHO6wPKU8DMtmBDRzY830yiWQkH1S73SSELQNBxV8fWvgKQYgOQ5ZlAdK227A4jkoExIEoWNp/kJajeSJpIOKjCUWpSDBBcoTHKNqVpdQFSS2TXmXKylSxKMoMFRDIBRgeRp1SapXDNKcYo0zpRk0UEpSXI8w3BLrnckTXCCkPAhPLo/aJITJFV5Hlme8rdMQoITFGeCw125wrYbQQoNSY1QamxGLnsRHvciUT/I/kkX8r+X/1svT8f3swdvjHs5UVzpLsUqq60a6Hsb2NXbw+7YNeYyqyLO6oXA3+4897Wga3rPLKLX0gxBk32a4IphaEkUXHdkGH4C31jCbw==

Combinator code:

on_nth_tick[5] = function(event)
   for k, v in pairs(rednet) do
      if greennet[k] ~= nil then
         output[k] = rednet[k] + greennet[k]
      end
   end
end
5 years ago
(updated 5 years ago)

the decider combinator will sum the signals from the networks, so indeed - you'd need 2 of these...

5 years ago

+1 I would love to see dedicated output networks, too. I feel like it would simplify things a lot.

5 years ago

+1 as well

New response