Page 1 of 1
Sorting of Items in Crafting Window
Posted: Sun Mar 20, 2016 3:12 pm
by Paned
Hi there
i like to sort my Items at the Crafting Window.
I read much of it.. but most things are confusing me or just not what i am searching for..
The order at the item seams to only have affect at the sorting at the inventory.
how do i decide which crafting recipe is at the first line and which one is at the next and so on?
Re: Sorting of Items in Crafting Window
Posted: Mon Mar 21, 2016 8:15 am
by Ghoulish
Currently this isn't possible, even with mods, most of the UI elements are hard coded.
Re: Sorting of Items in Crafting Window
Posted: Mon Mar 21, 2016 5:22 pm
by orzelek
It is possible to reorder items inside the category.
There are item groups and sub-groups that you can assign items into.
Each defined sub-group will start from new row in item display.
You can take a look at files in data/base/prototypes/item folder inside Factorio to see how it is done for base items.
Re: Sorting of Items in Crafting Window
Posted: Mon Mar 21, 2016 6:07 pm
by Paned
Thank you, that helped me out
But now i know the answer to my next question.. i think it is not possible to locate my recipe for iron-plate, copper-plate and steel-plate to my tab without moving the original ones to that tab too?
for everyone else with the same Problem, here is the code of my item-groups.lua file
just replace the my_name with the item-group/ subgroup you want
Code: Select all
data:extend(
{
--item-group creation (for the new tab)
{
type = "item-group",
name = "my_itemgroup",
icon = "__mymod__/graphics/group.png",
icon_size = 128,
inventory_order = "f",
order = "e"
},
-- creation of the subgroups for my item-group (the letter at order decides in which line my items of that subgroup are displayed)
{
type = "item-subgroup",
name = "my_pulver",
group = "my_itemgroup", -- has to be the same as the name of the item-group to tell factorio that it is located in that tab
order = "a"
},
{
type = "item-subgroup",
name = "my_craft",
group = "my_itemgroup",
order = "b"
},
{
type = "item-subgroup",
name = "my_chemie",
group = "my_itemgroup",
order = "c"
},
{
type = "item-subgroup",
name = "my_machines",
group = "my_itemgroup",
order = "d"
}
})
and that is how it looks like: