Stack Size Virtual Value for Signals

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
Gloweye
Burner Inserter
Burner Inserter
Posts: 8
Joined: Sun Aug 19, 2018 8:27 am
Contact:

Stack Size Virtual Value for Signals

Post by Gloweye »

The idea is to have a special "Stack Size Const" in the Arithmetic Operator. When applied to any signal, it will have the value of the signal's stacksize. This would be a unique thing much like Each/Anything/Everything is a unique thing as input.

This would make it easier to work with some things. For example, I use Logistic Train Networks, so I figure out how many wagon slots I can fill, but right now I if I want to calculate #max trains for a stop, I have to divide by stack size x 40, and therefore have to set it manually on each new station. After the Spidertron (and a few mods), this is the only reason I have to go to new stations.

Example:
Arithmatic Combinator:
(Each) / (Stacksize)
Output: (Each)

Given the following input signals:
250 Copper Plates
300 Coal
190 Batteries
The Virtual Value magnitude will be:
Copper Plate: 100
Coal: 50
Batteries: 200
Which makes for the outputs:
Copper Plate: 2 (250 / 100 -> 2)
Coal: 6 (300 / 50 -> 6)
Batteries: 0 (190 / 200 -> 0)

Sad_Brother
Fast Inserter
Fast Inserter
Posts: 209
Joined: Mon Jan 08, 2018 4:54 pm
Contact:

Re: Stack Size Virtual Value for Signals

Post by Sad_Brother »

Gloweye wrote:
Sun Sep 27, 2020 5:41 pm
...
if I want to calculate #max trains for a stop, I have to divide by stack size x 40, and therefore have to set it manually on each new station. After the Spidertron (and a few mods), this is the only reason I have to go to new stations.
I am not against your suggestion. But...
Can you set manually something like Constant or Arithmetic Combinator and copy it to Faraway station?

Gloweye
Burner Inserter
Burner Inserter
Posts: 8
Joined: Sun Aug 19, 2018 8:27 am
Contact:

Re: Stack Size Virtual Value for Signals

Post by Gloweye »

Well, I could, but that's basically 4 more blueprints to clutter up my library.

robot256
Filter Inserter
Filter Inserter
Posts: 596
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Re: Stack Size Virtual Value for Signals

Post by robot256 »

There is at least one mod that includes a stacksize combinator already: https://mods.factorio.com/mod/utility-combinators-plus

Sad_Brother
Fast Inserter
Fast Inserter
Posts: 209
Joined: Mon Jan 08, 2018 4:54 pm
Contact:

Re: Stack Size Virtual Value for Signals

Post by Sad_Brother »

This mod not as good as this suggestion.

whitecold
Inserter
Inserter
Posts: 46
Joined: Fri May 19, 2017 6:48 am
Contact:

Re: Stack Size Virtual Value for Signals

Post by whitecold »

robot256 wrote:
Sun Sep 27, 2020 7:12 pm
There is at least one mod that includes a stacksize combinator already: https://mods.factorio.com/mod/utility-combinators-plus
The mod only provides the stack sizes in a constant combinator. You'll need to extract the right signal, convert it into an appropriate constant and then multiply/divide your value by it.
I still don't see how to properly multiplex this assuming you have an arbitrary number of items and want to convert them to stack sizes or vice versa.

User avatar
NotRexButCaesar
Smart Inserter
Smart Inserter
Posts: 1120
Joined: Sun Feb 16, 2020 12:47 am
Contact:

Re: Stack Size Virtual Value for Signals

Post by NotRexButCaesar »

Yes please. There is no currently no way to do this without specifically setting a constant combinator for every item in your save.
—Crevez, chiens, si vous n'étes pas contents!

robot256
Filter Inserter
Filter Inserter
Posts: 596
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Re: Stack Size Virtual Value for Signals

Post by robot256 »

whitecold wrote:
Fri Nov 20, 2020 6:11 pm
robot256 wrote:
Sun Sep 27, 2020 7:12 pm
There is at least one mod that includes a stacksize combinator already: https://mods.factorio.com/mod/utility-combinators-plus
The mod only provides the stack sizes in a constant combinator. You'll need to extract the right signal, convert it into an appropriate constant and then multiply/divide your value by it.
I still don't see how to properly multiplex this assuming you have an arbitrary number of items and want to convert them to stack sizes or vice versa.
Right, the Stack Size combinator only prevents you from having to remember stack sizes or change a constant combinator when you install mods that change them.

I forgot once again that stock combinators can't do pairwise multiplication. The most elegant solution I've seen is to do it iteratively: viewtopic.php?f=5&t=29706

Or you have to use a modded combinator. Advanced Combinator can probably do it, Lua Combinator definitely can.

So I see now the appeal of adding the ability to multiply/divide by stack sizes in one operation with vanilla. I get how this is a special case in the game, but pairwise multiplication would be incredibly useful in other cases so I wonder if they would add it just for this one.

User avatar
NotRexButCaesar
Smart Inserter
Smart Inserter
Posts: 1120
Joined: Sun Feb 16, 2020 12:47 am
Contact:

Re: Stack Size Virtual Value for Signals

Post by NotRexButCaesar »

Please do some sort of thing, be it the virtual signal or pairwise multiplication
—Crevez, chiens, si vous n'étes pas contents!

Post Reply

Return to “Ideas and Suggestions”