Page 1 of 1

RecipePrototype::allow_productivity = true not actuating in Space Age

Posted: Mon Oct 28, 2024 4:31 pm
by aram
Hello,

I've been trying to enable productivity module on a recipe I made.
Following the new Factorio 2.0 / Space Age changes I added:
allow_productivity = true

However, this doesn't seem to do anything. I tried this in an existing save as well as a new save.

Code: Select all

data:extend(
{
  {
    type = "recipe",
    name = "assembling-machine-test",
    enabled = true,
    ingredients =
    {
      {type="item", name="iron-plate", amount=20}
    },
    results = {{type="item", name="assembling-machine-test", amount=1}},
    allow_productivity = true
  },
I also tried changing the base assembling machines to enable productivity in data-final-fixes.lua:

Code: Select all

data.raw['recipe']['assembling-machine-1'].allow_productivity = true
data.raw['recipe']['assembling-machine-2'].allow_productivity = true
data.raw['recipe']['assembling-machine-3'].allow_productivity = true
and that doesn't seem to do it either.

I then proceeded with actually adding that in the Factorio's base installation folder just for sanity check and yet I cannot add productivity modules to those machines and I get the productivity limitation message.

If you happen to know what's going on and have a solution, I appreciate if you could point me in the right direction.

Thanks

Re: RecipePrototype::allow_productivity = true not actuating in Space Age

Posted: Mon Oct 28, 2024 5:09 pm
by Xorimuth
Can you post a screenshot of the "allowed modules" tooltip that shows all the other modules but not productivity? (Don't crop it, show the whole screen)

Re: RecipePrototype::allow_productivity = true not actuating in Space Age

Posted: Mon Oct 28, 2024 11:34 pm
by aram
Xorimuth wrote: Mon Oct 28, 2024 5:09 pm Can you post a screenshot of the "allowed modules" tooltip that shows all the other modules but not productivity? (Don't crop it, show the whole screen)
Here you go:
Assembling-Machine-2.png
Assembling-Machine-2.png (240.15 KiB) Viewed 132 times
I noticed something just now, even though the assembling machine 2 has allow_productivity = true, it works for some recipes (military science for example) but not for some others (pierced ammo).

Does this mean that the assembling machine itself which used to have the limitation function to specify before 2.0 now it is specify on recipes themselves and not the "recipe of assembling machine" ?

If so, how would I loop through the recipes to enable them? or is it recommended to specify them one by one?

What about the beacons? what recipe is it producing since it won't allow using productivity module either?