[0.13.13] [Oxyd] Weird intermediate product behaviour

This subforum contains all the issues which we already resolved.
User avatar
Kayanor
Global Moderator
Global Moderator
Posts: 566
Joined: Sat May 10, 2014 7:20 am
Contact:

[0.13.13] [Oxyd] Weird intermediate product behaviour

Post by Kayanor »

As far as I know in Factorio 0.12 (or earlier), intermediate products (such as iron sticks when crafting lamps) were calculated somehow. (Ignore electronic circuits in the examples!)
Example: You right clicked twice on the lamp recipe, 8 pairs of iron sticks, 5 lamps, 7 pairs of iron sticks and 5 more lamps will get crafted in this order.
So Factorio added the single iron stick from the first 5 lamps to the second 5 lamps' iron sticks.

I tested this in Factorio 0.13 again and whoops, there is something different. I'll start with the example:
You right clicked once the lamp recipe, 8 pairs of iron sticks and then the 5 lamps. There will be 1 additional iron stick in your main inventory as 5 lamps need 15 iron sticks but the iron stick recipe always outputs 2 iron sticks, 8 * 2 = 16 - 15 = 1.
If you then right click the lamp recipe one more time, only 7 iron stick recipes will "run" before the lamps are being crafted as you already have the 15th iron stick in your inventory.

Now to the bug. If you right click the lamp recipe twice (without long delay in between the clicks), you will craft 8 pairs of iron sticks, 5 lamps, 8 more pairs of iron sticks and 5 more lamps. You get the 16th iron stick from both iron stick recipe "runs", so you have 2 iron sticks in your inventory then. The second "run" of recipes don't recognize the 16th iron stick from the first batch of iron sticks to craft with and makes an additional one.

For better understanding, click me, I'm a video!
If you need additional information, let me know.
Former moderator
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5411
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [0.13.13] Weird intermediate product behaviour

Post by Klonan »

The crafting queue system was rewritten in a major way to fix some critical issues,
So this may just be the new intended behavior, and not a bug, so i will leave it for him to review
User avatar
Kayanor
Global Moderator
Global Moderator
Posts: 566
Joined: Sat May 10, 2014 7:20 am
Contact:

Re: [0.13.13] [Oxyd] Weird intermediate product behaviour

Post by Kayanor »

Got something additional while watching my video:
The recipe count on the right side of the inventory (80 lamps before crafting) goes down to 74 after right clicking and then back up to 75 after the last pair of iron sticks was crafted. After the second right click, it decreases "normally" by 5.
Same on clicking twice: 70 -> 64 (-6 after first click) -> 59 (-5 after second click) -> 60 (+1 after all sticks were crafted).
Former moderator
User avatar
TruePikachu
Filter Inserter
Filter Inserter
Posts: 978
Joined: Sat Apr 09, 2016 8:39 pm
Contact:

Re: [0.13.13] [Oxyd] Weird intermediate product behaviour

Post by TruePikachu »

The recent rewrite in the crafting system makes it so that products which will be available when the current crafting queue is finished are only available for further crafting once they are actually produced.

Consider this situation: your inventory has nothing but smelted iron and copper in it, and your crafting queue is empty. You select to craft one inserter, then select to craft a long-handed inserter before the first step in crafting has been completed.

Under the older system, the long-handed inserter will consume the inserter; you will use seven iron and two copper to make one long-handed inserter and one copper cable. Under the new system, the long-handed inserter will only use raw materials; you will use eleven iron and four copper to make one long-handed inserter, one normal inserter, and two copper cable. If, under the old system, you added the things to the crafting queue in the opposite order, you would use eleven iron and three copper to make the inserters, with no cable left over.

The receipe count changing is expected; there is an extra stick produced from crafting 5 lamps, which will not be available to further receipes until after the stick has been produced; it is equivilant to half an iron plate.
Oxyd
Former Staff
Former Staff
Posts: 1428
Joined: Thu May 07, 2015 8:42 am
Contact:

Re: [0.13.13] [Oxyd] Weird intermediate product behaviour

Post by Oxyd »

Kajanor wrote:Now to the bug. If you right click the lamp recipe twice (without long delay in between the clicks), you will craft 8 pairs of iron sticks, 5 lamps, 8 more pairs of iron sticks and 5 more lamps. You get the 16th iron stick from both iron stick recipe "runs", so you have 2 iron sticks in your inventory then. The second "run" of recipes don't recognize the 16th iron stick from the first batch of iron sticks to craft with and makes an additional one.
This was intentional, actually. Nevertheless, I have changed it already, so that crafting can use leftover intermediates from recipes that are already queued. I just tested in 0.13.14 and I get 8 iron sticks for the first batch of 5 and 7 sticks for the second batch.
Kajanor wrote:The recipe count on the right side of the inventory (80 lamps before crafting) goes down to 74 after right clicking and then back up to 75 after the last pair of iron sticks was crafted. After the second right click, it decreases "normally" by 5.
Same on clicking twice: 70 -> 64 (-6 after first click) -> 59 (-5 after second click) -> 60 (+1 after all sticks were crafted).
That is a side-effect of the 0.13.13 behaviour – the extra stick isn't accounted for when calculating how many times you can craft the recipe either. Again, this'll be back to the behaviour you're expecting in 0.13.14.
TruePikachu wrote:Consider this situation: your inventory has nothing but smelted iron and copper in it, and your crafting queue is empty. You select to craft one inserter, then select to craft a long-handed inserter before the first step in crafting has been completed.

Under the older system, the long-handed inserter will consume the inserter; you will use seven iron and two copper to make one long-handed inserter and one copper cable. Under the new system, the long-handed inserter will only use raw materials; you will use eleven iron and four copper to make one long-handed inserter, one normal inserter, and two copper cable. If, under the old system, you added the things to the crafting queue in the opposite order, you would use eleven iron and three copper to make the inserters, with no cable left over.
I should like to point out that the changes I made in 0.13.14 will not do this. You click on an inserter and then a long-handed inserter, and you'll get an inserter and a long-handed inserter. Only intermediates – i.e. things that you didn't explicitly click on, but are required for the crafting – will be available for further recipes – such as the iron sticks above.

So, since everyone will hopefully be satisfied in 0.13.14, I'm moving this to resolved.
Post Reply

Return to “Resolved Problems and Bugs”