ServerEvents.tags('item', event => {
    // 1. Group the Melee namespaces (Swords, Claymores, Daggers, Knuckles, etc.)
    const meleeMods = [
        /wizards:.*/, 
        /elemental_wizards_rpg:.*/, 
        /paladins:.*/, 
        /rogues:.*/, 
        /berserker_rpg:.*/, 
        /forcemaster_rpg:.*/, 
        /death_knights:.*/
    ]

    // 2. Group the Ranged namespaces (Bows, Crossbows, Spears)
    const rangedMods = [
        /archers:.*/
    ]

    // Apply standard weapon tags so Zenith "sees" them as valid equipment
    event.add('c:swords', meleeMods)
    event.add('c:weapons/melee', meleeMods)
    event.add('c:weapons/ranged', rangedMods)

    // Optional: Specifically tag heavy weapons for "Heavy" affixes (Slower but stronger)
    event.add('zenith:affix_heavy_weapons', [/paladins:.*hammer/, /paladins:.*claymore/, /death_knights:.*greatsword/])
})