Page 1 of 1

[2.1.11] Recipe ignores localised_name of derived main_product when its internal name differs

Posted: Mon Jul 20, 2026 1:41 pm
by Shemp
When declaring a RecipePrototype whose internal name is different to that of the explicitly declared main_product, or implicitly derived from having a sole result, the localised_name of the main_product is ignored and not inherited.

In Factorio 1.1 this did work, but in 2.0/2.1 it has stopped working, but the documentation for main_product has been largely unchanged since 1.1.

Here is a simple reproduction mod with the following code in its data-updates.lua to change the internal name of an existing recipe:
zzz-ShempDebug_0.2.1.zip
(1 KiB) Downloaded 12 times

Code: Select all

local gear = data.raw.recipe["iron-gear-wheel"]
data.raw.recipe["iron-gear-wheel"] = nil
gear.name = "iron-gear-recipe"
data:extend{gear}
The recipe shows up separately from the item in Factoriopedia, which is expected because they no longer share their internal names. As documented in RecipePrototype::main_product, the recipe takes its subgroup/icon (and also the order) from the main product, but not the localised name.
iron-gear-recipe.png
iron-gear-recipe.png (223.72 KiB) Viewed 144 times
I am expecting the localised_name to be inherited from the "iron-gear-wheel" item product (because it is the sole product and main_product = nil), so the recipe name shows as "Iron gear wheel".

----------------

There are a few variations of this behaviour that I have tested as well:
  • Using a fluid recipe with a sole fluid result does the same thing too.
  • Leaving the recipe name as "iron-gear-wheel", but adding a new product to the recipe means that the localised name will only be inherited if the main_product = "iron-gear-wheel", and it can never inherit from the newly added product.
  • Explicitly declaring the localised_name on the RecipePrototype will always use that value as expected.

Re: [2.1.11] Recipe ignores localised_name of derived main_product when its internal name differs

Posted: Mon Jul 20, 2026 2:06 pm
by Rseding91
Thanks for the report. This is working as intended and was specifically changed to work this way in 2.0. The reasoning being: if the internal names differ there's a very good chance the recipe name should have some more complex/detailed name instead of simply 'the thing it produces'.