• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.
got it
Here is how i get it to work:

Code:
function sModController:BuildMenu()

    local dir = self.ModDir.."UI/Icons/"
    local sBuildCategories = {
            { id = "yourid",     name = T{"yourname"},    img = dir .. "Menu.tga",    highlight_img = dir .. "Menu.tga" },
        }
    

    for _, Category in ipairs(sBuildCategories) do
        table.insert(BuildCategories, Category)
    end



thread can be closed
 
not sure what's up with the for loop you got there?
All you'd need is something like so:
Code:
local group_id = "EXAMPLE_ID"
local bc = BuildCategories
-- no sense in adding a group already there
if not table.find(bc,"id",group_id) then
    bc[#bc+1] = {
        id = group_id,
        name = "group name",
        image = "UI/Icons/bmc_placeholder.tga",
        highlight = "UI/Icons/bmc_placeholder_shine.tga",
    }
end