[0.15.34] stuck recipe when results[i].amount > stack_size

Things that has been reported already before.
Post Reply
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2916
Joined: Sat Jun 11, 2016 6:41 am
Contact:

[0.15.34] stuck recipe when results[i].amount > stack_size

Post by Optera »

While writing a mod to give settings for stack sizes for various items I noticed some broken fix with recipe.results.
If recipe result amount > item.stack_size factorio correctly splits the result into multiple results by itself which is great, but it doesn't update the amount of each result resulting in a machine getting stuck after the first recipe is completed.

Example:

Code: Select all

recipe.results = 
{
 { type = "item", name = stone, amount = 100 }
}
will result in

Code: Select all

recipe.results = 
{
 { type = "item", name = stone, amount = 100 },
 { type = "item", name = stone, amount = 100 }
}
Edit:
The confusing part about this is the recipe in game will show 2x 50 stacks of stone even if stone has a stack size of e.g. 60.
Last edited by Optera on Wed Sep 20, 2017 6:27 pm, edited 2 times in total.

Bilka
Factorio Staff
Factorio Staff
Posts: 3128
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: [0.15.34] stuck recipe when results amount > item.stack_size

Post by Bilka »

Duplicate: 51625
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2916
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [0.15.34] stuck recipe when results amount > item.stack_size

Post by Optera »

Bilka wrote:Duplicate: 51625
Your link is about recipe.result_count > item.stack_size. I'm already handling that.

This report is about factorio generating additional results when results.amount > item.stack_size without setting results.amount to stack_size or lower.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13202
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.15.34] stuck recipe when results[i].amount > stack_size

Post by Rseding91 »

I don't understand what you're saying but it seems to work correctly in 0.16: the recipe produces 100 stone and it goes into the single output slot of the assembling machine as a single stack of 100.
If you want to get ahold of me I'm almost always on Discord.

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2916
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [0.15.34] stuck recipe when results[i].amount > stack_size

Post by Optera »

What i perceived as automatically splitting results in stacks was actually an undesired effect of another mod in my dev setup.
Removing the interfering mod makes a recipe using recipe.resultsamount consistently get stuck exactly like recipe.result_count. Knowing there is no faulty fix for this in place made adding the fix in my mod easy.

Post Reply

Return to “Duplicates”