[2.0.6] defaulting behaviour of localised recipe names when recipe prototype name does not match exactly

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
grandseiken
Burner Inserter
Burner Inserter
Posts: 14
Joined: Wed Aug 02, 2023 11:18 pm
Contact:

[2.0.6] defaulting behaviour of localised recipe names when recipe prototype name does not match exactly

Post by grandseiken »

The documentation for `main_product` says
For recipes with one or more products: Subgroup, localised_name and icon default to the values of the singular/main product, but can be overwritten by the recipe. Setting the main_product to an empty string ("") forces the title in the recipe tooltip to use the recipe's name (not that of the product) and shows the products in the tooltip.
However on 2.0.6, the `main_product` and/or singular result only causes the icon and subgroup of a recipe to be defaulted, unless the recipe prototype name is identical to the item prototype name of the main product. As well as not matching the documentation this seems like a bad change, since I don't know why you would ever want to default the icon and subgroup but not the localised name. Can it be reverted to the old behaviour?

Code: Select all

data:extend({
  {
    type = "recipe",
    name = "foo-iron-chest",  // works if name = "iron-chest"
    ingredients = {{type = "item", name = "iron-plate", amount = 10}},
    results = {{type = "item", name = "iron-chest", amount = 1}},
    main_product = "iron-chest",
    energy_required = 1,
  }
})
Attachments
Screenshot 2024-10-19 114555.png
Screenshot 2024-10-19 114555.png (2.17 MiB) Viewed 203 times
Last edited by grandseiken on Sun Oct 20, 2024 9:01 pm, edited 1 time in total.
grandseiken
Burner Inserter
Burner Inserter
Posts: 14
Joined: Wed Aug 02, 2023 11:18 pm
Contact:

Re: [2.0.6] revert defaulting behaviour of localised recipe names when recipe prototype name does not match exactly

Post by grandseiken »

I have been told this relates to encouraging better recipe names, or possibly to simplify the factoriopedia recipe/item-merging logic.
However, am I wrong, or isn't this the first time the game has made behavioural changes based on the byte contents of prototype names rather than treating them as arbitrary internal identifiers? (and there might be good reasons for mods to use a different naming scheme.)
It feels very surprising to me, I'm not sure why this isn't new behaviour isn't controlled by a bool in the recipe prototype instead.

edit: After actually looking at factoriopedia, I think my request is this: can we please have a bool in the recipe prototype where true indicates that a recipe should be merged in factoriopedia with its main product, and default its name to the item's name, even if the prototype names do not match exactly, false indicates it should not be merged, and nil is the current behaviour?
Adamo
Filter Inserter
Filter Inserter
Posts: 481
Joined: Sat May 24, 2014 7:00 am
Contact:

Re: [2.0.6] defaulting behaviour of localised recipe names when recipe prototype name does not match exactly

Post by Adamo »

I came here searching about a similar problem. Is this correct? Because this implies that only one recipe can have an item as its main_product. I found that the main_product is not acting as expected for a series of recipes that share the same main_product and I'm trying to figure out why.
Post Reply

Return to “Modding interface requests”