[0.16.22]Changing recipe does not give back all items

This subforum contains all the issues which we already resolved.
Post Reply
Bilka
Factorio Staff
Factorio Staff
Posts: 1942
Joined: Sat Aug 13, 2016 9:20 am
Contact:

[0.16.22]Changing recipe does not give back all items

Post by Bilka » Sat Feb 03, 2018 2:30 pm

When you mine an entity that is currently crafting something, the items that are currently being used for crafting (already removed from the input inventory) are returned to the player, same if the player resets the recipe. This is not the case if the player instead sets the recipe to another one for example by copying a different one from another assembling machine, or by using LuaEntity::set_recipe().

I tested this by setting an assembler 1 to craft accumulators and inserting one stack of batteries and iron plate each and letting it start crafting. Within 10 seconds, mining and resetting recipe returns the full stacks of items, while setting the recipe to another one using copy paste or LuaEntity::set_recipe() does not, it returns 195 batteries and 98 iron plate. I expect the latter methods to also return the items currently being used for crafting, so the full stacks in this case.
Attachments
factorio-current.log
Included, but not needed :P
(52.23 KiB) Downloaded 21 times
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

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

Re: [0.16.22]Changing recipe does not give back all items

Post by Rseding91 » Sat Feb 03, 2018 5:26 pm

Thanks for the report. It's now fixed for the next version of 0.16.
If you want to get ahold of me I'm almost always on Discord.

FasterJump
Fast Inserter
Fast Inserter
Posts: 121
Joined: Sat Jul 09, 2016 11:43 am
Contact:

Re: [0.16.22]Changing recipe does not give back all items

Post by FasterJump » Wed Feb 07, 2018 10:39 pm

I was going to make a bug report since the bug is in the game since some time now. Then check "fixed bugs" thread, and I see this. Good job :)

kovarex
Factorio Staff
Factorio Staff
Posts: 7387
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.16.22]Changing recipe does not give back all items

Post by kovarex » Sat Feb 10, 2018 5:48 am

It should work the other way. It shouldn't return the items ever.

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

Re: [0.16.22]Changing recipe does not give back all items

Post by Bilka » Sat Feb 10, 2018 6:59 am

kovarex wrote:It should work the other way. It shouldn't return the items ever.
Why do you want to punish the player for changing a recipe/aborting crafting? You also get back the items when you cancel handcrafting, and automation should always be better than handcrafting.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

kovarex
Factorio Staff
Factorio Staff
Posts: 7387
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.16.22]Changing recipe does not give back all items

Post by kovarex » Sat Feb 10, 2018 7:05 am

Bilka wrote:
kovarex wrote:It should work the other way. It shouldn't return the items ever.
Why do you want to punish the player for changing a recipe/aborting crafting? You also get back the items when you cancel handcrafting, and automation should always be better than handcrafting.
Because of productivity bonus. It was decided long time ago, that once crafting machine starts crafting, the items used as ingredients are lost forever.

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

Re: [0.16.22]Changing recipe does not give back all items

Post by Rseding91 » Sat Feb 10, 2018 8:09 am

To punish every single player that plays the game that decides to move an in-progress because someone *might* abuse it slightly to get a few extra circuits through an extremely tedious process sounds like an incredibly bad idea to me.

It has worked this way for over 2 years and not one person has complained. The game doesn't punish players for re-designing or changing their mind.

If you're really that concerned with it we could change productivity to only apply after the normal recipe cycle finishes but it's going to add extra memory usage and save size per crafting machine in the game.
If you want to get ahold of me I'm almost always on Discord.

kitcat
Long Handed Inserter
Long Handed Inserter
Posts: 64
Joined: Wed Apr 26, 2017 3:11 pm
Contact:

Re: [0.16.22]Changing recipe does not give back all items

Post by kitcat » Sat Feb 10, 2018 12:43 pm

So I wanted to make a banana milkshake, peeled and cut a banana and stuffed it into a mixed together with milk but didn’t turn on the mixer. Then I decided I didn’t want a milkshake after all, so I turned the mixer over and dumped the contents on the table. Suddenly, the milk was back inside the carton and the banana in one piece inside the peel.
Getting back ingredients that are already being processed into something else doesn’t make any sense.

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

Re: [0.16.22]Changing recipe does not give back all items

Post by Bilka » Sat Feb 10, 2018 3:01 pm

kovarex wrote:
Bilka wrote:
kovarex wrote:It should work the other way. It shouldn't return the items ever.
Why do you want to punish the player for changing a recipe/aborting crafting? You also get back the items when you cancel handcrafting, and automation should always be better than handcrafting.
Because of productivity bonus. It was decided long time ago, that once crafting machine starts crafting, the items used as ingredients are lost forever.
The productivity bonus exploit is not something anybody will ever exploit in a normal game, it is simply too tedious. The item overcompression on belt rotation is almost exactly the same situation. Would be a nice exploit, but nobody uses it because it has to be done by hand, just like resetting the recipe just after getting products from productivity.

It is completely against the spirit of factorio to punish the player for rebuilding, especially for moving machines. So, just like the belt overcompression, the possible but never used exploit should be ignored in favor of playability.
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
DaveMcW
Smart Inserter
Smart Inserter
Posts: 2805
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: [0.16.22]Changing recipe does not give back all items

Post by DaveMcW » Sat Feb 10, 2018 11:22 pm

Can someone explain the productivity exploit? I thought the productivity bar is reset when the recipe is changed.

BenSeidel
Filter Inserter
Filter Inserter
Posts: 543
Joined: Tue Jun 28, 2016 1:44 am
Contact:

Re: [0.16.22]Changing recipe does not give back all items

Post by BenSeidel » Sat Feb 10, 2018 11:34 pm

Rseding91 wrote:If you're really that concerned with it we could change productivity to only apply after the normal recipe cycle finishes but it's going to add extra memory usage and save size per crafting machine in the game.
This sounds like the solution to me. If you are worried about the memory & save size, maybe this will work:
If you allow the productivity% to go over 100% (internally that is) so that when a craft completes it checks if Current_Prod% > 100%, if so, spit out two crafts & subtract 100%.
The UI then displays Current_Prod% mod 100 in the bar.
You could even add a +[Bonus Craft] somewhere on the machine for when you have a productivity bonus > 100%, like on drills etc showing you the number of extra items the machine will spit out next craft.


Edit:
DaveMcW wrote:Can someone explain the productivity exploit? I thought the productivity bar is reset when the recipe is changed.
That is when you have a productivity > 100%. The productivity bar will then fill up faster than the normal crafting bar allowing you to get the "free" item before the first item is crafted. If you cancel the craft at the right stage you get the ingredients back & get the free craft.

It also works for lesser productivity bonuses, but this example is the easiest to understand.

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 2805
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: [0.16.22]Changing recipe does not give back all items

Post by DaveMcW » Sun Feb 11, 2018 12:49 am

Ok, I see how that would require extra memory usage to fix.

A compromise would be to allow refunds of recipes only if they can't use productivity.

Jap2.0
Smart Inserter
Smart Inserter
Posts: 1998
Joined: Tue Jun 20, 2017 12:02 am
Contact:

Re: [0.16.22]Changing recipe does not give back all items

Post by Jap2.0 » Tue Feb 13, 2018 2:33 am

It isn't even possible to get > 100% productivity in vanilla, is it?
There are 10 types of people: those who get this joke and those who don't.

Post Reply

Return to “Resolved Problems and Bugs”

Who is online

Users browsing this forum: No registered users