Page 1 of 1

Custom constant value output for combinators

Posted: Fri Jul 06, 2018 9:37 pm
by cyfrov
TL;DR
Slight tweak to combinators to allow for much more compact and concise circuit represenetation and improve game performance.

What ?
The arithmetic combinator should be able to take the "EACH" input as either operand to the function, i.e. (A) - (Each)

The decider combinator should have the binary output be editable. Currently, it gives the option to output 1, when the condition is met, user should be able to set the constant value output.
i.e. When (A > 0) return (-1).

The decider combinator should have an extra option where instead of passing the input count, it passes the value of another signal.
i.e. When (each > 0) return (A as each)
Why ?
The main reason for this suggestion is to make expression of logic much more compact and accessible, by reducing the need for all those signal value inverters (Arithmetic times negative constant) .
In terms of game performance, it should be rather free and simple to implement, as well as improve game performance by reducing the number of combinators needed in a circuit network.

Re: Custom constant value output for combinators

Posted: Fri Jul 06, 2018 10:06 pm
by thedarkbunny
Agreed on all of the above, plus another thing that belongs in this category:

For decider combinators, comparisons should be possible between "each" and "everything", or between "each" and "anything". As it stands, getting the maximum value (or the values tied for maximum) of a group of signals requires a complicated error-prone beast of a circuit when it would ideally be a single "each >= everything, output each" decider combinator.

Re: Custom constant value output for combinators

Posted: Sat Jul 07, 2018 7:12 am
by Optera
I often wanted to set decider outputs to a specific value on a trigger.

Re: Custom constant value output for combinators

Posted: Tue Jul 10, 2018 2:25 pm
by BloodyRain2k
I'd love the suggested improvements for the deciders, I actually came here to suggest that too.

In addition to the suggested improvement for the arithmetic I'd also like to add the options to negate the inputs and output.

As in an arithmetic set to A + B = C should let me toggle a negate for A, B or C (or all of them).

The obvious WHY? would be: why just not use more arithmetics with "* -1"?
And that's also the answer, so we don't need to spam them just for negating a value.

I really love Factorio's logic system, even if basic logic gates are a little difficult to understand at first, but the one thing I really dislike about it is the negate spam of arithmetics : (

Being able to individually negate the inputs and output would really make that easier.

Re: Custom constant value output for combinators

Posted: Mon Jan 14, 2019 6:53 am
by cyfrov
Yeah, plus, with fewer delays, the z^-1 analysis becomes slightly more bearable to achieve a stable feedback control system

Re: Custom constant value output for combinators

Posted: Tue Jun 02, 2020 7:01 pm
by BloodyRain2k
BloodyRain2k wrote:
Tue Jul 10, 2018 2:25 pm
In addition to the suggested improvement for the arithmetic I'd also like to add the options to negate the inputs and output.

I really love Factorio's logic system, even if basic logic gates are a little difficult to understand at first, but the one thing I really dislike about it is the negate spam of arithmetics : (

Being able to individually negate the inputs and output would really make that easier.
Sooo, over a year later it seems the demand for this isn't that big after all? Bummer ._.

Re: Custom constant value output for combinators

Posted: Sun Jun 14, 2020 7:18 pm
by MiniHerc
Basically, Factorio needs a Computercraft (minecraft mod) equivalent. Maybe like creating a custom script and injecting it into a combinator.

Re: Custom constant value output for combinators

Posted: Sun Jun 14, 2020 8:07 pm
by BloodyRain2k
That actually is a thing already, as far as I know. There's a mod that lets you write lua into it.

Still, the more base level stuff is a charming part of Factorio, even if it's frustrating at times. So just adding a little help to that is more the way to go in my opinion.

Re: Custom constant value output for combinators

Posted: Mon Jun 15, 2020 1:01 am
by Laogeodritt
Ambaire wrote:
Sun Jun 14, 2020 7:18 pm
Basically, Factorio needs a Computercraft (minecraft mod) equivalent. Maybe like creating a custom script and injecting it into a combinator.
I have like zero time to mod, but if I ever get the time, I'm tempted to make an FPGA/Digital Logic mod that allows cleaner digital electronics engineering-style circuit networks. Stuff like single-item configurable clocks and PLLs, resettable D latches/flip flops, look up tables (pure combinational or maybe FPGA-style ones with optional latches), compact/lightweight delay lines for z-domain filters, in-game oscilloscope for specific circuit nodes or signals, maybe even simple/modular z-filter primitives, etc.

It's all stuff you can do in the game as it is, just ends up being multiple items and connections and setting up the signal you want to use across those multiple items (which can make ploppable blueprints challenging - can involve multiple configuration steps anyway).

(As a hardware designer myself, I wouldn't want the solution to be "here's a programming environment for Lua", as in the mod BloodyRain2k mentioned—for me personally, I'd rather have more fundamental hardware-y solutions rather than just write code in an in-game editor! Not that I don't appreciate software engineering too, it's just less the kind of thing I want in a technical game like this).
the z^-1 analysis becomes slightly more bearable to achieve a stable feedback control system
I've talked with a few players who've done simple windowed averages or exponential decay averages, but I think you're the first to actually mention digital/z-domain filtering! ... over a year ago, but still.

Re: Custom constant value output for combinators

Posted: Mon Jun 15, 2020 11:51 pm
by ssilk
Some mod, that may be tried out:

https://mods.factorio.com/mod/circuitissimo