[0.16.22]Changing recipe does not give back all items

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

[0.16.22]Changing recipe does not give back all items

Post by Bilka »

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 240 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: 14281
Joined: Wed Jun 11, 2014 5:23 am
Contact:

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

Post by Rseding91 »

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: 237
Joined: Sat Jul 09, 2016 11:43 am
Contact:

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

Post by FasterJump »

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: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

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

Post by kovarex »

It should work the other way. It shouldn't return the items ever.
Bilka
Factorio Staff
Factorio Staff
Posts: 3309
Joined: Sat Aug 13, 2016 9:20 am
Contact:

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

Post by Bilka »

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: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

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

Post by kovarex »

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: 14281
Joined: Wed Jun 11, 2014 5:23 am
Contact:

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

Post by Rseding91 »

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: 67
Joined: Wed Apr 26, 2017 3:11 pm
Contact:

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

Post by kitcat »

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: 3309
Joined: Sat Aug 13, 2016 9:20 am
Contact:

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

Post by Bilka »

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: 3716
Joined: Tue May 13, 2014 11:06 am
Contact:

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

Post by DaveMcW »

Can someone explain the productivity exploit? I thought the productivity bar is reset when the recipe is changed.
BenSeidel
Filter Inserter
Filter Inserter
Posts: 590
Joined: Tue Jun 28, 2016 1:44 am
Contact:

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

Post by BenSeidel »

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: 3716
Joined: Tue May 13, 2014 11:06 am
Contact:

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

Post by DaveMcW »

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: 2378
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 »

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.
User avatar
BlueTemplar
Smart Inserter
Smart Inserter
Posts: 3120
Joined: Fri Jun 08, 2018 2:16 pm
Contact:

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

Post by BlueTemplar »

kovarex wrote: Sat Feb 10, 2018 5:48 am It should work the other way. It shouldn't return the items ever.
So, should the (un)"official" Factorio Reddit change their "Words of Wisdom" ?
/u/talrich wrote: Namaste. You seek balance. Here is my wisdom. Your mistakes have no cost but time, and the deconstruction planner even reduces that cost. Most games punish you for building, demolishing and rebuilding. Not Factorio. Let your anxiety wash away as you perceive that every belt placed can be moved. Every assembler is but a visitor to where it resides. The only significance is life, which leads to the further wisdom. Look both ways before you cross the tracks.
BobDiggity (mod-scenario-pack)
Loewchen
Global Moderator
Global Moderator
Posts: 9196
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

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

Post by Loewchen »

If you want to discuss this topic further do it in the FFF or open a Idea suggestion topic, this is a closed bug report.
Post Reply

Return to “Resolved Problems and Bugs”