Page 1 of 1

Simple arthimetric operations in logistic requests boxes

Posted: Sat Jul 30, 2016 5:06 pm
by Vatharian
TL;DR: allow three basic arithmetic operations: +/-/* in logistic request box.

whenever you have to request something, be it chests or your own logistic slots, sometimes I want precisely given amount of resources in this particular spot. I can quickly calculate in my head 20 x 16, but for example 15 x 36 - 7 (that's already in place) makes me stop, and alt-tab to calculator, or grab a pen and multiply on a paper. If I could write 15*36-7, and when cursor leaves (I click somewhere else) the box, Factorio would permanently convert it to a final number and commit.

Operations permitted would be +, -, and *, without floating point to minimise error and impact

Side effect of parsing would be to Factorio accept "5k" as 5000 or something like this.

Re: Simple arthimetric operations in logistic requests boxes

Posted: Sun Jul 31, 2016 2:08 pm
by ssilk
This is a simple idea with high game-play value. :)

Re: Simple arthimetric operations in logistic requests boxes

Posted: Sun Jul 31, 2016 3:48 pm
by British_Petroleum
I'm curious, what are some examples of when this would be useful? I can't think of any reason to do this

Re: Simple arthimetric operations in logistic requests boxes

Posted: Sun Jul 31, 2016 8:52 pm
by ssilk
For example: Copy from assembly to requester chest. The requester chest requests now basic number of materials for the assembly.
But in most cases this is too less. With this suggestion you can multiply that numbers with a factor.

Re: Simple arthimetric operations in logistic requests boxes

Posted: Mon Aug 01, 2016 5:29 pm
by mattj256
Let's say I have an assembler that makes transport belts.
Transport belts require one iron plate and one iron gear wheel.
The default with copy-paste is that the requester chest will request 2x all the raw materials, so two iron plates and two iron gear wheels.
Instead, maybe I want 5x or 10x or 20x.

The requester chest should have two GUI entries:
- What's the end product? (example: Transport Belt)
- What's the multiplier? (example: 5)

NOT general arithmetic, which is complicated and hard to use.
If someone really wants general arithmetic they can use combinators or an external calculator. (Or a mod.)

Re: Simple arthimetric operations in logistic requests boxes

Posted: Tue Aug 02, 2016 11:01 am
by siggboy
Vatharian wrote:Side effect of parsing would be to Factorio accept "5k" as 5000 or something like this.
I love this idea especially.

Could be used in any place where you can enter a number.

It would also make it easier to enter a number such as 2147483647 (2^31-1), which you need quite frequently for advanced circuitry. Of course that would require for exponentation to be recognized by the parser (why not?).

The parsing of the numbers is nothing that gets in the way if you don't know about it. So to allow for expressions like "4k", "2G" or "2^31-1" would not really hurt the gameplay experience for anybody who doesn't know it's possible, but it would help with advanced usage.