Can we get a function to get the stacksize of an Item?

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
Ugotu
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sun Mar 28, 2021 3:09 pm
Contact:

Can we get a function to get the stacksize of an Item?

Post by Ugotu »

TL;DR
The stacksize is a vital information in many Traindistribution solutions, but we still have to set it manually.

What ?
With the new combinators we will have the possibility to set blueprints so we don't have to setup our stations manually. When we now have some blueprint to calculate the amount of trains that we can fill we still need to either set the stacksize for each station, or calculate how much a full train will take.

This could be improved if we had a "get stacksize of Item" function.

iron ore * stacksize = 50
iron plates * stacksize =100
Low density structures * stacksize = 10
Why ?
With this we could automate this part of the station setup to blueprintitem * stacksize * 40 * traincars = items per full train.

I also used the stacksize in space exploration to calculate how many empty slots were left before shooting more stuff into orbit.

Koub
Global Moderator
Global Moderator
Posts: 7204
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Can we get a function to get the stacksize of an Item?

Post by Koub »

I don't know if you have seen, but there will be an "S" unit meaning 1 stack. So you'll be able to set your blueprint variable to 40S of whatever item, and the blueprint will translate to 40 stacks of whatever item you've chosen.
Source : https://factorio.com/blog/post/fff-388
(search for smart number format)
Koub - Please consider English is not my native language.

toprakkoyun
Burner Inserter
Burner Inserter
Posts: 13
Joined: Sat Apr 02, 2022 9:41 am
Contact:

Stack Size Indication

Post by toprakkoyun »

Hello everyone. I think when you hover over an item in the crafting menu, it should also indicate its stack size. I always circuit condition my stations and setting them up requires for me to know the stack size of an item. I memorized it all since I am doing this for a long time but when I do forget one it is annoying to just cannot look at it and need to search for it in wiki to learn. This change will help a lot of people especially new players since there are a lot of items in the game, even more if you play modded.

[Edit by Koub] : I merged this into another thread about getting stack sizes for logistic needs, both threads running in //.

Illiander42
Filter Inserter
Filter Inserter
Posts: 412
Joined: Mon Feb 05, 2018 10:01 am
Contact:

Re: Can we get a function to get the stacksize of an Item?

Post by Illiander42 »

Koub wrote:
Fri Jan 19, 2024 6:43 pm
I don't know if you have seen, but there will be an "S" unit meaning 1 stack. So you'll be able to set your blueprint variable to 40S of whatever item, and the blueprint will translate to 40 stacks of whatever item you've chosen.
Source : https://factorio.com/blog/post/fff-388
(search for smart number format)
S for stack size isn't mentioned there.

I think you may be showing your 2.0 access.

Also, that doesn't let us do dynamic stuff like wiring a provider chest to request one stack of each recipie ingredient for a dynamically set assembler.

Murklak
Burner Inserter
Burner Inserter
Posts: 19
Joined: Thu Jan 18, 2024 9:49 pm
Contact:

Re: Can we get a function to get the stacksize of an Item?

Post by Murklak »

This can be done using the 2.0 preview mod, which is at https://mods.factorio.com/mod/pigo-selector-combinator. I use it to calculate the total volume of my trains, giving only my total inventory slots as a constant (40 * wagonCount). Give it a try.

Koub
Global Moderator
Global Moderator
Posts: 7204
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Can we get a function to get the stacksize of an Item?

Post by Koub »

Illiander42 wrote:
Sun Jan 21, 2024 3:24 pm
S for stack size isn't mentioned there.
Well you're right. I don't have any additional access to anything 2.0 related, I guess my brain just merged someone's assumption it would be 'S' with the part in the FFF saying there would be a way.
Illiander42 wrote:
Sun Jan 21, 2024 3:24 pm
Also, that doesn't let us do dynamic stuff like wiring a provider chest to request one stack of each recipie ingredient for a dynamically set assembler.
I think this will become possible. We're going to be able to :
1) read a crafting machine's current recipe's ingredients (https://factorio.com/blog/post/fff-394)
2) read in sequence the different signals with the selector combinator (https://factorio.com/blog/post/fff-384)
3) express numbers of items in stacks.

I guess that should make it possible to request multiples of stacks for each ingredient in a recipe.
Koub - Please consider English is not my native language.

Post Reply

Return to “Ideas and Suggestions”