[2.0.15] Productivity resets when switching recipes in production building

Bugs that are actually features.
TornadoFS
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sun Nov 10, 2024 3:37 pm
Contact:

[2.0.15] Productivity resets when switching recipes in production building

Post by TornadoFS »

When switching a recipe using the "Set Recipe" circuit logic in a production building the productivity bar (the purple bar) inside the building resets back to 0 even if you switch back to the first recipe, it would be nice if the building remembered the productivity level it had when switching back to a recipe it has ever had before.

For example:
Building is at productivity 60% making item A
Circuit switches building to item B
Circuit switches building back to item A
Productivity bar is set back to 0%


This is especially important in the Eletromagnetic Plant because of its built-in 50% productivity, with this bug it essentially means wasting productivity when trying to reuse an Eletromagnetic Plant for multiple recipes (like having a single EM making multiple different modules which was the problem I personally ran into)


For example in this build, the EM switches recipe (between Quality Module 1/2/3) based on the contents of the requester chest, every time it switches I lose the productivity bar. It took me hours to realize I was wasting tons of high-quality materials
11-10-2024, 17-11-06.png
11-10-2024, 17-11-06.png (2.58 MiB) Viewed 677 times
Rseding91
Factorio Staff
Factorio Staff
Posts: 16419
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.0.15] Productivity resets when switching recipes in production building

Post by Rseding91 »

This is not a bug and specifically was programmed to work this way.
If you want to get ahold of me I'm almost always on Discord.
TornadoFS
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sun Nov 10, 2024 3:37 pm
Contact:

Re: [2.0.15] Productivity resets when switching recipes in production building

Post by TornadoFS »

Hi thanks for answering, just to make sure you understand what I pointed out.

The problem is not that the productivity bar resets when a recipe is switched
The problem is that when switched back to the original recipe the productivity bar is not restored back to its original value for that recipe
The solution is to have the productivity bar state be stored individually for each recipe

This is particularly bad when using the "Set Recipe" circuit logic with Eletromagnetic Plants because they have built-in +50% productivity. For other buildings it only matters if you have productivity modules and rarely that is the case when "Set Recipe" is used (usually those kind of circuits are part of quality-module production chains).

I have a very complex combinator setup for building stuff in Eletromagnetic Plants and it is basically wasting its 50% productivity when recipes switch, I would need to work around this by adding a "always build 2 of something before switching recipes" circuit logic which would increase the complexity quite a lot more.

I would say this is definitely a bug, but I understand if it is deemed not worth the effort given how niche its use case is and the potential for memory leaks.
Rseding91
Factorio Staff
Factorio Staff
Posts: 16419
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.0.15] Productivity resets when switching recipes in production building

Post by Rseding91 »

Yes that is intended. When the recipe changes the productivity bar is cleared and is not saved.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Not a bug”