base_productivity applies regardless of the productivity limitation for recipes

Place to get help with not working mods / modding interface.
rhynex
Long Handed Inserter
Long Handed Inserter
Posts: 78
Joined: Tue Apr 17, 2018 9:55 am
Contact:

base_productivity applies regardless of the productivity limitation for recipes

Post by rhynex »

EDIT: boskid and Stringweasel explained so my question is different now. see my last post below.

hello devs, I would like to raise this issue to your attention even though I would accept it marked as "not a bug". it just nags me and maybe there is a better way for communicating this thing.

I am looking at base_productivity prototype property of assembler machine (for ex). what I did was to create a new assembler machine with base_productivity. as you can guess, my first test was to use barrel-unbarrel to see if it creates some fluid out of nowhere. surprisingly it worked very good, no fluid was created. "I thought" the base_productivity property heeded to the intermediate product list that we add recipes when we want productivity modules to be applied (like gear, but not pipe). I went ahead and created my machine but realized in fact barrel-unbarrel recipes are the only ones that are not affected by base_productivity of the machine. every other recipe works with base_productivity (pipe or ammo even), gets productivity bonus.

so the bug report is like this:
- create a new assembler machine and set base_productivity to 1 (%100, so input one, get two)
- use barrel-unbarrel to expect two fluid instead of one, but game does not apply base_productivity.

it looks silly to make this bug work actually so I would wish other way around, base_productivity not applying to recipes that are not accepted by productivity modules either.

maybe the reason of introduction of base_productivity was something else but as I see and expected, the machine should still heed to that intermediate product list if recipe accepts productivity modules.

v2.0 is approaching so I would like to know if there is a change on handling this issue or have a new way of limiting recipes not affected by base_productivity. I think I remember this, you also created machines with this property in expansion so maybe you already have a different solution

my wish would be actually storing this information (accept productivity or not) at recipe prototype. such a breaking change can be applied at 2.0. I believe it is suggested but I cannot find any post about it. maybe mods can help about this.

to mods, feel free to move or merge this with another topic if you feel appropriate.
Last edited by rhynex on Sun Aug 11, 2024 3:17 pm, edited 2 times in total.
User avatar
Stringweasel
Filter Inserter
Filter Inserter
Posts: 411
Joined: Thu Apr 27, 2017 8:22 pm
Contact:

Re: [1.1.109] base_productivity is not always applied

Post by Stringweasel »

This is due to the recipe. The unbarreling recipes have catalyst_amount set, meaning no productivity will be applied.
Alt-F4 Author | Factorio Modder
My Mods: Hall of Fame | Better Victory Screen | Fluidic Power | Biter Power | Space Spidertron | Spidertron Dock | Weasel's Demolition Derby
Official Contributor to Space Exploration
rhynex
Long Handed Inserter
Long Handed Inserter
Posts: 78
Joined: Tue Apr 17, 2018 9:55 am
Contact:

Re: base_productivity is not always applied

Post by rhynex »

aha, another property. thanks a lot @Stringweasel. one mystery is resolved while the actual issue remains.
Stringweasel wrote: Sat Aug 10, 2024 2:14 pm This is due to the recipe. The unbarreling recipes have catalyst_amount set, meaning no productivity will be applied.
the documentation and behavior is a little inconsistent. doc says "Amount that should not be affected by productivity modules (not yielded from bonus production) and should not be included in the item production statistics.". I do not use productivity modules at all. it is base machine's property and catalyst_amount thing is taken into consideration about productivity set by base_productivity: it ignores both productivity module effects and also base_productivity while a non-intermediate random recipe (like pipe) is not treated same. I actually expect both (productivity modules and base_productivity) to be taken same but maybe that is not so easy.

that is the actual question to devs actually. should such inconsistency be treated as a bug or not.
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2976
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: base_productivity is not always applied

Post by boskid »

From the machine point of view there is no distinction between productivity from modules, productivity from machine or (for 2.0) productivity from technology's recipe productivity research. It is all counted as "productivity" and affects speed of bonus progress bar being incremented while machine is crafting.

catalyst_amount affects what happens when bonus progress reaches 100%: for each product only the amount that exceeds the catalyst_amount is given extra. If crafting the ingredients required some amount of item that your recipe gives back, that item was a catalyst and in order to not introduce positive feedback loop where the catalyst amount would be growing, catalyst is not given in bonus products.
rhynex
Long Handed Inserter
Long Handed Inserter
Posts: 78
Joined: Tue Apr 17, 2018 9:55 am
Contact:

Re: base_productivity is not always applied

Post by rhynex »

boskid wrote: Sun Aug 11, 2024 2:36 pm From the machine point of view there is no distinction between productivity from modules, productivity from machine or (for 2.0) productivity from technology's recipe productivity research. It is all counted as "productivity" and affects speed of bonus progress bar being incremented while machine is crafting.
thanks for explanation @boskid. I think I understand it better now.

the "productivity" you mentioned is not same when it comes to that list, about recipe selection on machine: https://github.com/wube/factorio-data/b ... tem.lua#L4 here. well, not different but it is applied at different stages. the list just prevents recipe selection, nothing else.

that is what I am (trying) asking in first post as well, why base_productivity and productivity modules apply differently at final output? (for barrel-unbarrel I got it, catalyst_amount is the reason). then that list prevents recipes to be chosen when machine has productivity modules but it is fine to select the recipe in a machine that has base_productivity and furthermore productivity from base_productivity applies, which means list does not apply same here.

"is this normal?" because if they are meant to be same thing as "productivity" then game has a bug. if not then no. recipe selection is prevented only (because module does not accept it), that is all but then what is the overall reason for that list? is not it to prevent the "productivity" you described to be applied on excluding recipes? this is what I (tried to) question about. I will try to change title of post if possible

thanks for your replies.
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2976
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: base_productivity applies regardless of the productivity limitation for recipes

Post by boskid »

If you carefully take a look at `productivity_module_limitation` you will notice that it is used by modules, not by recipes. When there are no modules inserted into the machine then that machine does not know (does not care) about which modules are incompatible with it, it knows there is base productivity to be applied so it counts bonus progress and gives bonus items. `productivity_module_limitation` on the modules says that if a machine sees this module while recipe does not support that module then the module is ejected (if it was a module in the machine's module inventory) or is ignored (if it happened to be in the beacon's module inventory).

There are multiple changes that are scheduled to be released with 2.0 so a lot of stuff mentioned here will be outdated after.
rhynex
Long Handed Inserter
Long Handed Inserter
Posts: 78
Joined: Tue Apr 17, 2018 9:55 am
Contact:

Re: base_productivity applies regardless of the productivity limitation for recipes

Post by rhynex »

boskid wrote: Sun Aug 11, 2024 4:25 pm If you carefully take a look at `productivity_module_limitation` you will notice that it is used by modules, not by recipes. When there are no modules inserted into the machine then that machine does not know (does not care) about which modules are incompatible with it, it knows there is base productivity to be applied so it counts bonus progress and gives bonus items. `productivity_module_limitation` on the modules says that if a machine sees this module while recipe does not support that module then the module is ejected (if it was a module in the machine's module inventory) or is ignored (if it happened to be in the beacon's module inventory).

There are multiple changes that are scheduled to be released with 2.0 so a lot of stuff mentioned here will be outdated after.
that is a shame that it does not apply to recipes in general but it is also exciting to see how this flow will go with v2.0. thanks for your patience and answer @boskid
Post Reply

Return to “Modding help”