Display recipe ingredients and results in the order they're declared in the prototype
Posted: Wed Sep 03, 2025 12:08 pm
Hi, even when playing with item order and subgroup, I couldn't get a consistent ordering of items/fluids in recipe tooltips.
The most logical ordering for me would be to prioritize items that are declared the most (for example, if the recipe needs 12 steel and 1 plastic, it'd make sense for the tooltip to display the steel first)
The solution to that, and to avoid any unwanted behavior, I suggest that recipes should keep the recipe/ingredient ordering of the prototype.
Another solution would be to allow for an "order" string in https://lua-api.factorio.com/latest/typ ... otype.html and https://lua-api.factorio.com/latest/typ ... otype.html
example:
(I searched for a similar request and couldn't find one)
The most logical ordering for me would be to prioritize items that are declared the most (for example, if the recipe needs 12 steel and 1 plastic, it'd make sense for the tooltip to display the steel first)
The solution to that, and to avoid any unwanted behavior, I suggest that recipes should keep the recipe/ingredient ordering of the prototype.
Another solution would be to allow for an "order" string in https://lua-api.factorio.com/latest/typ ... otype.html and https://lua-api.factorio.com/latest/typ ... otype.html
example:
Code: Select all
{
type = "recipe",
name = "silicon",
category = "chemistry",
energy_required = 2,
ingredients = {
{type = "item", name = "sand", amount = 5, order = "a"},
{type = "item", name = "coal", amount = 1, order = "b"},
{type = "fluid", name = "steam", amount = 10, order = "c"},
},
results = {
{type = "item", name = "silicon", amount = 1, order = "a"}
{type = "fluid", name = "water", amount = 1, order = "b"}
},
allow_productivity = true,
enabled = false,
},