Constant combinator improvment
Moderator: ickputzdirwech
Constant combinator improvment
Hi everyone
This item is usefull, but when you have a lot of signals to set is painfull.
So I think a good idea is to add 3 options
1 is checkbox to set numbers as negative
2 is checkbox with input to multiply
3 is not only here, to set signal as default stack size
This item is usefull, but when you have a lot of signals to set is painfull.
So I think a good idea is to add 3 options
1 is checkbox to set numbers as negative
2 is checkbox with input to multiply
3 is not only here, to set signal as default stack size
Re: Constant combinator improvment
You mean to multiply every value with -1 before output?
Could be already be done with an arithmetic combinator.2 is checkbox with input to multiply
Don’t understand what you mean. The default stack size is in inserters not constant combinator?! You can set it already to a constant value in the inserter.3 is not only here, to set signal as default stack size
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Re: Constant combinator improvment
I think he means that when you select a new signal to output by the constant combinator and it is an item that the default value then is the stack size of the item. I think there used to be an option to have default size for selected items be 1 or stack size for something. Was it requester chests? Players request slots?ssilk wrote: ↑Wed Oct 20, 2021 5:33 amYou mean to multiply every value with -1 before output?
Could be already be done with an arithmetic combinator.2 is checkbox with input to multiply
Don’t understand what you mean. The default stack size is in inserters not constant combinator?! You can set it already to a constant value in the inserter.3 is not only here, to set signal as default stack size
Looking up the stack size of items and entering it in a combinator is one of the annoying things left every time I blueprint a train station. So +1 for having constant combinators default to stack size for new items, at least as an option.
Re: Constant combinator improvment
with negative numbers should be usefull cuz a lot circuit desings use negative numbers, using aritmetic combinator on constant combitator is not efficient.
2nd statment like upstairs.
with 3rd idea, maybe i could make mod if it's possible to make vallidation for input method
Example:
All aritmetics writed will work 2+2=4, 4*5=20 etc.
about stack size: if you write (-)*20 for iron ore wil give you (-)20*50=10k
for fluids will be amount of storage tank
2nd statment like upstairs.
with 3rd idea, maybe i could make mod if it's possible to make vallidation for input method
Example:
All aritmetics writed will work 2+2=4, 4*5=20 etc.
about stack size: if you write (-)*20 for iron ore wil give you (-)20*50=10k
for fluids will be amount of storage tank
Re: Constant combinator improvment
I'm sorry if this is too self promoty...
I don't know if you're using LTN or not, but LTN Combinator Modernized has _some_ of what you're looking for. While it is mostly intended for use with LTN, it can be used as a stand alone constant combinator.
https://mods.factorio.com/mod/LTN_Combinator_Modernized
I don't know if you're using LTN or not, but LTN Combinator Modernized has _some_ of what you're looking for. While it is mostly intended for use with LTN, it can be used as a stand alone constant combinator.
https://mods.factorio.com/mod/LTN_Combinator_Modernized
Re: Constant combinator improvment
I don't understand point 1, if you want a negative number for the signal, just input that negative number as the signal value.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Re: Constant combinator improvment
I don't get the request for checkboxes. But I do like the suggestion that you could just input an expression and it gets computed.Pat4yczek wrote: ↑Wed Oct 20, 2021 2:38 pm with negative numbers should be usefull cuz a lot circuit desings use negative numbers, using aritmetic combinator on constant combitator is not efficient.
2nd statment like upstairs.
with 3rd idea, maybe i could make mod if it's possible to make vallidation for input method
Example:
All aritmetics writed will work 2+2=4, 4*5=20 etc.
about stack size: if you write (-)*20 for iron ore wil give you (-)20*50=10k
for fluids will be amount of storage tank
Not sure what to think about (-)*20. That seems overly complicated to type and ambigious to evaluate. Why not simply have "S" to denote stack size. So you type in "20 * S" or "20S" for short. And then you can just do 1K, 1M, 1G, too. Also ~32 and 2^17.
Would be best if the combinator remembers the original while outputing the resulting value. Shouldn't be too hard to mod if you have the time and incling to learn. Would love to use it or see it added to the LTN combinator mod (which would be a good place to look at as example).
Re: Constant combinator improvment
I don't try lua too much, don't know it have some RE module
It will have than great, long time ago I wrote CNC decoding lib, so write RE expression for one line it's not big deal.
(-) mean optional negative number
* at beginning mean to muliply by stack size
with S it's not problem
It will have than great, long time ago I wrote CNC decoding lib, so write RE expression for one line it's not big deal.
(-) mean optional negative number
* at beginning mean to muliply by stack size
with S it's not problem
Re: Constant combinator improvment
Well, - before a number already works. That just falls naturally out of any string to int conversion.
And, yes, LUA has a regular expression module. But that seems like the wrong tool. You want an expression evaluator. Expressions can be arbitrarily complex. So you want to implement a stack machine or simple recursive parser. There are tons and tons of examples on how to evaluate a math expression as it's usually the first example in anything about parsers and grammars.
If you make the GUI side work I would be happy to pitch in with evaluating the strings the user input.
And, yes, LUA has a regular expression module. But that seems like the wrong tool. You want an expression evaluator. Expressions can be arbitrarily complex. So you want to implement a stack machine or simple recursive parser. There are tons and tons of examples on how to evaluate a math expression as it's usually the first example in anything about parsers and grammars.
If you make the GUI side work I would be happy to pitch in with evaluating the strings the user input.
Re: Constant combinator improvment
It’s super nervy, if you don’t have a number block on your keyboard. On German keyboard for example the minus is then easy to miss type because of the big distance between minus and numbers.
I really like the idea of having a input for the stack size. I lately searched for example the stack size of some item. I searched about 15 minutes around and there is no way (o.k. I didn’t find one) to find that out in game but by producing that numbers. I don’t understand why this isn’t printed in the item-window.
Or - to find that out by using a constant combinator…
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Re: Constant combinator improvment
You can get that information (and basically anything else) in-game with the Prototype Browser - Ctrl+Shift+E.
It is weird that the only way to just look it up is with a debug tool though. I've needed that info a few times in my Space Exploration save and keep having to check there.
Re: Constant combinator improvment
F4 -> show-debug-info-in-tooltip and then hover over the item. Works inside the constant combinator so you don't first have to produce one to hover over. Works in recipes or crafting menu too.
Re: Constant combinator improvment
Besides that, there is also a mod, that does exactly this:
https://mods.factorio.com/mod/stack-combinator
And as part of https://mods.factorio.com/mod/utility-combinators-plus
https://mods.factorio.com/mod/stack-combinator
And as part of https://mods.factorio.com/mod/utility-combinators-plus
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Re: Constant combinator improvment
Forget about stack-combinator. That uses a LUA script to compute the values in the on_tick event. You can use 1, 2 or 10 but each one will cut into the UPS.ssilk wrote: ↑Sat Oct 23, 2021 5:19 am Besides that, there is also a mod, that does exactly this:
https://mods.factorio.com/mod/stack-combinator
And as part of https://mods.factorio.com/mod/utility-combinators-plus
The suggestion was to just have the input have a stack "unit" so you enter iron plates: 2 stacks and it configures the constant combinator to 200 iron plates. No runtime cost please.