Adding a new Inventory tab
Posted: Wed Jan 14, 2015 3:20 pm
Hi, I hope that someone can give me some advice because I've stared at this for a few hours and I'm not really sure what I'm missing. I would like to add a new tab to the inventory. After reading the documentation and looking at a few other mods it seems to me that all I should need to do is create a mod with a structure like this:
With the contents as follows:
info.json
data.lua
control.lua is blank
item-groups.lua
Did I set it up incorrectly? Does an item for that tab have to exist before it would show up in the inventory? Or did I just completely miss something and you can't add new inventory tabs
Code: Select all
MyMod_0.0.1
|- info.json
|- data.lua
|- control.lua
|- prototypes
| - item-groups.lua
info.json
Code: Select all
{
"name":"MyMod",
"title":"asdf",
"version":"0.0.1"
"homepage":"asdf",
"author":"DopplerEffect",
"contact":"example@gmail.com",
"description":"MyMod description",
"dependencies":["base >= 0.11.8"],
}
Code: Select all
require("prototypes.item-groups")
item-groups.lua
Code: Select all
data:extend(
{
{
type = "item-group",
name = "test-group",
icon = "__base__/graphics/technology/automation.png",
inventory_order = "f",
order = "e"
},
{
type = "item-subgroup",
name = "test-subgroup",
group = "test-group",
order = "a"
}
})