Extend Combinators

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
gheift
Fast Inserter
Fast Inserter
Posts: 188
Joined: Tue Mar 03, 2015 9:20 pm
Contact:

Extend Combinators

Post by gheift »

I am currently playing with the combinators and i miss a few operations:
  • !=, <= or >= in the decider
  • bitwise and, or, xor in the decider
  • modulo, shr, shl, bitwise and, or, xor, not, k2? operation
  • the ability to select the signal, which should be used as output
  • the ability to specify the source wire of the signal (e.g. signal A of the green wire - signal B of the red wire)
  • the ability to specify, how the wire signals are combined before the operation (e.g. red + green as it is now, red - green, green - red)
  • check each signal condition on one wire and output corresponding signal of the other wire, where condition is met
  • vector arithmetic: each signal of green wire plus, minus, … of the red wire
  • display: show input/output signal sorted by name, not by amount
  • display: show input by source wire (like on the poles)
  • display: show operation of combinator
Most of this is more or less implementable with the current combinators, but some have a huge latency.

Any comments?

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Extend Combinators

Post by ssilk »

What you describe is a programming language, not a game. :)

I mean, that all can be done, but I think this gets very fast very overwhelming. Anywhere between your suggestions I would say: This is not fun anymore, I switch to a programming language.

Or how a good professor in my study-time said: Use the right tools/programming language for the problem. If you know only a hammer all your problems will look like nails.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

LordFedora
Filter Inserter
Filter Inserter
Posts: 310
Joined: Fri Nov 07, 2014 3:46 am
Contact:

Re: Extend Combinators

Post by LordFedora »

you don't need >= or <=, just use !(x < y) and !(x > y) :P

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Extend Combinators

Post by DaveMcW »

LordFedora wrote:you don't need >= or <=, just use !(x < y) and !(x > y) :P
You don't need !, <, >, AND. Just use a bunch of NAND gates.

MrDrummer
Fast Inserter
Fast Inserter
Posts: 131
Joined: Sat Nov 22, 2014 2:51 pm
Contact:

Re: Extend Combinators

Post by MrDrummer »

LordFedora wrote:you don't need >= or <=, just use !(x < y) and !(x > y) :P
And how would you make that with Combinators?

I personally need >= and <=, else it will double the combinators needed... >= and <= are used in basic programming languages so having this functionality in Factorio would be great.
Last edited by MrDrummer on Tue May 09, 2017 9:01 am, edited 1 time in total.

nikow
Burner Inserter
Burner Inserter
Posts: 8
Joined: Sun Mar 22, 2015 11:33 am
Contact:

Re: Extend Combinators

Post by nikow »

Hmm… This is actualy in game.
https://www.youtube.com/watch?v=YUCa2lAwNsc

So, if you need more or equal, you are using or gate for this both values, so you need 3 combinators.
Not equal is easy to get using not gate.

User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Extend Combinators

Post by bobingabout »

A bit overkill... I've seen other better ideas for extending Combinators...

EG, A grid(Similar to modular armour) where you draw a circuit in it.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.

leoch
Fast Inserter
Fast Inserter
Posts: 136
Joined: Fri Dec 16, 2016 9:37 pm
Contact:

Re: Extend Combinators

Post by leoch »

The original idea looks a bit overkill (bitwise arithmetic, shift operations), but I definitely miss a few of these:

Selecting input source: to compare "iron plates" from the green wire with "iron plates" from the red wire, currently you have to use an arithmetic combinator with a null-op (e.g. "+ 0") to change one signal from "iron plates" to the letter "I" or something.

Vector arithmetic: I've been playing with the idea of supplying a perimeter wall by train and a circuit signal telling it what it should keep in stock. I have a basic implementation using an array of roughly 30 arithmetic+comparison combinators to test whether there is enough of each item listed locally. (And this is only half of what I want to do.) But I fear that repeating this many combinators across many wall sections is going to cause major performance issues.

Yes, "vector arithmetic" is complex programming — but not so difficult. There is already an "each" operation in the game.

I would like the following:
  • To select input source: e.g. red iron plates, green iron plates or sum iron plates (the last one is what we have now, and not really necessary except for backwards compatibility).
  • Set negation arithmetic op: "each" operation which converts values > 0 to 0, and 0 to 1. (Effect on negative values isn't important.)
  • Set subtraction arithmetic op: e.g. "green set-subtract red" would result in the green value if the red value is zero, or zero if the red value is >0.
Note: we already have set-union. It's just red + green. (Currently, an arithmetic combinator with red and green inputs, "each" input and output, and a null-op like "+0".)

Examples:
  • Inserter connected to two coal chests, inputting into green, can be enabled if "green coal < red coal".
  • Constant combinator outputting a required set of items on the red wire. Roboport outputs logistic network contents on the green wire. A decider combinator has the rule "each red > each green output each, 1" to output a 1 for every item on the red wire in greater quantity than the green wire; this output is fed into a filter inserter to set its filter, and unload into a logistic chest (e.g. from a train).
Last edited by leoch on Tue May 09, 2017 9:15 am, edited 1 time in total.

leoch
Fast Inserter
Fast Inserter
Posts: 136
Joined: Fri Dec 16, 2016 9:37 pm
Contact:

Re: Extend Combinators

Post by leoch »

It looks like some of this was already implemented: binary AND, OR, XOR.

Also a decider combinator with "each > 0" output "each, 1" can be used to "standardise" input.

Two remaining issues:
  • We can't directly compare green and red signals, e.g. "each red - each green" or "each red < each green".
  • "Each" does not behave as I would expect, e.g. a decider combinator with "each == 0 output each" will output nothing. "Each > 0 output A, 1" can be used to count non-zero signals, but "Each == 0 output A, 1" will always output 0. As I understand it, there are a fixed set of names on the signal bus; each should be counted even if 0 on input.

Post Reply

Return to “Ideas and Suggestions”