Levelgroups are referring to DOS2's item progression system. When items are created via stats (like from treasure tables), they naturally look to item progression to figure out what rarity to spawn in as for what levels.
So the stats you need are ItemProgressionVisuals, and ItemProgressionNames. ItemProgressionVisuals links ItemGroup to root templates and a namegroup - ItemProgressionNames defines your namegroups, which determines the item's name and description.
For example, say you have a sword:
new entry "WPN_Fighter_Sword_1H_Lizards"
type "Weapon"
using "_Swords"
data "ItemGroup" "WPN_Fighter_Sword_1H_Lizards"
data "Act part" "10"
data "Requirements" "Strength 0"
The "ItemGroup" is "WPN_Fighter_Sword_1H_Lizards". We take that and create a new ItemProgressionVisuals entry:
new itemgroup "WPN_Fighter_Sword_1H_Lizards"
add levelgroup 0,0,"All"
add rootgroup "ec4769e6-bcfc-44e0-9e9c-de62e0bdf407","LizardsCommon"
add namegroup "Lizard's Sword","",""
Since our levelgroup is 0,0,"All", this item will always spawn at all levels, and all rarities. The rootgroup value is the GUIDSTRING of a sword root template to use for this item, and "LizardsCommon" is an ItemColor to use.
The namegroup, "Lizard's Sword", is defined in ItemProgressionNames:
new namegroup "Lizard's Sword"
add name "Lizard Sword",""
add namecool "Vicious Sword",""
namecool is used when the item spawns at a higher rarity.
The second value (omitted with "") is the description:
new namegroup "Lizard's Sword"
add name "Lizard Sword","This is the best lizard sword in the world."
add namecool "Vicious Sword","Truly vicious."
If the description is left blank (""), the item will use the root template's description.
______________________________________
Note that defining rarities for your itemgroups to spawn at will require more entries - One for each level range to be exact. Here's some examples from Shared:
new itemgroup "Axes_2H"
add levelgroup 1,3,"Common"
add rootgroup "ce53e867-76fd-4682-b784-cd0147027459",""
add namegroup "Pickaxe","",""
add levelgroup 4,4,"Common"
add rootgroup "d446b3fb-acba-4545-a6a4-8c004f67c7c2",""
add namegroup "Felling Axe","",""
add levelgroup 1,1,"Uncommon"
add rootgroup "a2a344f9-20d3-4587-9d64-c69268d653a3","ElvesUncommon"
add namegroup "Wooden Elven Axe 2H","Cool",""
add levelgroup 2,2,"Uncommon"
add rootgroup "a2a344f9-20d3-4587-9d64-c69268d653a3","ElvesUncommon"
add namegroup "Wooden Elven Axe 2H 2","Cool",""
add levelgroup 3,3,"Uncommon"
add rootgroup "5a847433-a73b-4067-9767-326738f8636e","DwarvesUncommon"
add namegroup "Single-Headed Dwarven Axe 2H","Cool",""
add levelgroup 4,4,"Uncommon"
add rootgroup "5a847433-a73b-4067-9767-326738f8636e","DwarvesUncommon"
add namegroup "Single-Headed Dwarven Axe 2H 2","Cool",""
These entries keep going for each rarity and level range, up to Epic and level 19.
__________________________________________
One other thing to think about is that you can use a pre-existing ItemGroup to piggyback your item onto existing ItemProgression entries.
For instance, the ItemGroup "Bows" has level and rarity entries all the way up to level 19, so simply setting your weapon stat's ItemGroup to "Bows" is enough to include it in that range of levels and rarities.