Module:Disassemble/data

-- -- blank template --	[] = { often = , sometimes = , rarely = , itemqty = 1, compqty = 8,			alias = {}, cat = , name =  }, -- -- NOTES: -- Do not include an item quantity of 1, this is done in the parent module (other default amounts are fine to include)

local data = { ['default'] = { often = 'Simple', rarely = 'Variable', compqty = 1, alias = {}, cat = 'default', name = 'Default disassembly items' },

['clothing'] = { often = 'Cover, Padded, Simple', rarely = 'Variable', compqty = 1, x10 = true, alias = {}, cat = 'clothing', name = 'Clothing' },

-- invention ['gizmo'] = { often = '', sometimes = 'Simple', rarely = 'Base, Blade, Clear, Connector, Cover, Crafted, Deflecting, Delicate, Flexible, Head, Magic, Metallic, Organic, Padded, Plated, Smooth, Spiked, Spiritual, Stave, Tensile, Dextrous, Direct, Enhancing, Ethereal, Evasive, Healthy, Heavy, Imbued, Light, Living, Pious, Powerful, Precious, Precise, Protective, Refined, Sharp, Strong, Stunning, Subtle, Swift, Variable', itemqty = 1, compqty = 8, x10 = true, alias = { 'gizmos' }, cat = 'gizmo', name = 'Gizmos and gizmo shells', nocalc = true },

-- runecrafting ['talisman'] = { often = 'Magic', sometimes = 'Crafted', rarely = 'Powerful', compqty = 1, alias = {}, cat = 'runes', name = 'Runes and talismans' }, ['runes'] = { often = 'Magic', sometimes = 'Crafted', rarely = 'Powerful', itemqty = 50, compqty = 8, alias = {}, cat = 'runes', name = 'Runes and talismans' },

-- materials ['food'] = { often = 'Organic', sometimes = 'Crafted', rarely = 'Living, Healthy, Enhancing', compqty = 1, alias = { 'herbs', 'herb' }, cat = 'food', name = 'Food and herbs' },

['uncut gems'] = { often = 'Clear, Delicate, Smooth', rarely = 'Precious, Light', compqty = 1, alias = {}, cat = 'gems', name = 'Gems' }, ['gems'] = { often = 'Clear, Delicate, Smooth', rarely = 'Precious, Light', compqty = 2, alias = { 'gems' }, cat = 'gems', name = 'Gems' },

['logs'] = { often = 'Simple', rarely = 'Living', compqty = 1, alias = { 'hides' }, cat = 'logs', name = 'Logs and hides' },

['seeds'] = { often = 'Organic', rarely = 'Living', compqty = 1, alias = { 'seed' }, cat = 'seeds', name = 'Seeds' },

['potions'] = { often = 'Delicate, Organic, Crafted', rarely = 'Healthy, Enhancing', compqty = 1, potion = true, alias = { 'potion', 'flask', 'flasks' }, cat = 'potions', name = 'Potions and flasks' },

['ores'] = { often = 'Simple', compqty = 1, alias = {}, cat = 'ores', name = 'Ores' },

['bars'] = { often = 'Simple, Crafted', compqty = 2, alias = {}, cat = 'planks', name = 'Planks, bars, and leather' },

['planks'] = { often = 'Simple, Crafted', compqty = 1, alias = { 'plank', 'leather' }, cat = 'planks', name = 'Planks, bars, and leather' },

['glass'] = { often = 'Clear, Delicate, Smooth', rarely = 'Enhancing', compqty = 2, alias = {}, cat = 'glass', name = 'Glass items' },

-- summoning ['pouches'] = { often = 'Spiritual, Crafted, Flexible', rarely = 'Powerful', compqty = 3, alias = { 'pouch' }, cat = 'pouches', name = 'Pouches' },

['scrolls'] = { often = 'Spiritual, Crafted', rarely = 'Powerful', itemqty = 10, compqty = 2, alias = { 'scroll' }, cat = 'scrolls', name = 'Scrolls' },

['charms'] = { often = 'Spiritual', compqty = 1, alias = {}, cat = 'charms', name = 'Charms', nocalc = true },

['divination'] = { often = 'Magic', sometimes = 'Crafted', rarely = 'Ethereal', compqty = 3, alias = { 'divine location', 'portent', 'portents', 'sign', 'signs' }, cat = 'divination', name = 'Signs, portents, and divine locations' },

-- prayer ['remains'] = { often = 'Organic', rarely = 'Pious', compqty = 1, alias = {}, cat = 'bones', name = 'Bones and remains' }, ['bones'] = { often = 'Organic', rarely = 'Pious', compqty = 2, alias = {}, cat = 'bones', name = 'Bones and remains' },

['ashes'] = { often = 'Organic', rarely = 'Pious, Ethereal', compqty = 2, alias = {}, cat = 'ashes', name = 'Ashes' },

-- misc ['crystal tool'] = { often = 'Crystal', sometimes = 'Clear, Delicate, Smooth', compqty = 3, alias = {}, cat = 'crystal tool', name = 'Crystal tools', nocalc = true },

-- =================	-- EQUIPMENT -- =================	['jewellery'] = { often = 'Delicate, Connector, Smooth', rarely = 'Precious, Enhancing', compqty = 5, x10 = true, alias = { 'jewelry' }, cat = 'jewellery', name = 'Jewellery' }, ['unstrung jewellery'] = { often = 'Delicate, Connector, Smooth', rarely = 'Precious, Enhancing', compqty = 2, x10 = true, alias = { 'jewellery (u)'}, cat = 'jewellery', name = 'Jewellery' },

['shields'] = { often = 'Cover, Base, Deflecting', rarely = 'Strong, Protective', compqty = 8, x10 = true, alias = { 'melee shield', 'magic shield', 'ranged shield', 'hybrid shield' }, cat = 'shields', name = 'Shields' },

-- melee items ['melee armour'] = { group = true, often = 'Cover, Plated, Deflecting', rarely = 'Strong, Protective', x10 = true, cat = 'Melee armour', name = 'melee armour', members = { ['melee 8'] = { compqty = 8, alias = { 'melee body', 'melee legs' } }, ['melee 6'] = { compqty = 6, alias = { 'melee cape', 'melee helm' } }, ['melee 4'] = { compqty = 4, alias = { 'melee boots', 'melee gloves' } }, ['melee 2'] = { compqty = 2, alias = { 'melee crest' } }, ['melee 1'] = { compqty = 1, alias = { 'melee essence' } }, }	},

['dagger'] = { often = 'Base, Blade, Spiked', rarely = 'Precise, Light', compqty = 8, x10 = true, alias = {}, cat = 'dagger', name = 'Daggers' },

['hatchet'] = { often = 'Head, Blade, Connector', rarely = 'Sharp, Strong', compqty = 8, x10 = true, alias = {}, cat = 'hatchet', name = 'Hatchets' },

['mace'] = { often = 'Base, Head, Smooth', rarely = 'Heavy, Dextrous', compqty = 8, x10 = true, alias = {}, cat = 'mace', name = 'Maces' }, ['2h mace'] = { often = 'Base, Head, Smooth', rarely = 'Heavy, Dextrous', compqty = 12, x10 = true, alias = {}, cat = 'mace', name = 'Maces' },

['sword'] = { often = 'Base, Blade, Metallic', rarely = 'Precise, Dextrous', compqty = 8, x10 = true, alias = {}, cat = 'sword', name = 'Swords' },

['scimitar'] = { often = 'Base, Blade, Metallic', rarely = 'Sharp, Subtle', compqty = 8, x10 = true, alias = {}, cat = 'scimitar', name = 'Scimitars' },

['pickaxe'] = { often = 'Base, Head, Spiked', rarely = 'Heavy, Direct', compqty = 8, x10 = true, alias = {}, cat = 'pickaxe', name = 'Pickaxes' },

['maul'] = { often = 'Base, Head, Plated', rarely = 'Heavy, Strong', compqty = 12, x10 = true, alias = {}, cat = 'maul', name = 'Mauls' },

['longsword'] = { often = 'Base, Blade, Metallic', rarely = 'Sharp, Dextrous', compqty = 8, x10 = true, alias = {}, cat = 'longsword', name = 'Longswords' }, ['2h longsword'] = { often = 'Base, Blade, Metallic', rarely = 'Sharp, Dextrous', compqty = 12, x10 = true, alias = {'trouble brewing flags'}, cat = 'longsword', name = 'Longswords' },

['warhammer'] = { often = 'Base, Head, Smooth', rarely = 'Heavy, Strong', compqty = 8, x10 = true, alias = {}, cat = 'warhammer', name = 'Warhammers' },

['battleaxe'] = { often = 'Head, Blade, Smooth', rarely = 'Sharp, Direct', compqty = 8, x10 = true, alias = {}, cat = 'battleaxe', name = 'Battleaxes' },

['claw'] = { often = 'Connector, Blade, Spiked', rarely = 'Sharp, Swift', compqty = 8, x10 = true, alias = {}, cat = 'claw', name = 'Claws' },

['all 2h swords'] = { group = true, often = 'Base, Blade, Metallic', rarely = 'Sharp, Strong', x10 = true, cat = '2h sword', name = 'Two-handed swords', members = { ['2h sword'] = { compqty = 12 }, ['2h sword blade'] = { compqty = 6 }, ['2h sword blade parts'] = { compqty = 4, alias = { 'godsword shards' } }, ['2h sword shards'] = { compqty = 2, alias = { 'godsword shard' } }, }	},

['spear'] = { often = 'Stave, Blade, Crafted', rarely = 'Precise, Direct', compqty = 12, x10 = true, alias = {}, cat = 'spear', name = 'Spears and hastae' }, ['hasta'] = { often = 'Stave, Blade, Crafted', rarely = 'Precise, Direct', compqty = 8, x10 = true, alias = {}, cat = 'spear', name = 'Spears and hastae' },

['halberd'] = { often = 'Stave, Blade, Deflecting', rarely = 'Sharp, Stunning', compqty = 12, x10 = true, alias = {}, cat = 'halberd', name = 'Halberds' }, ['1h halberd'] = { often = 'Stave, Blade, Deflecting', rarely = 'Sharp, Stunning', compqty = 8, x10 = true, alias = { 'mjolnir' }, cat = 'halberd', name = 'Halberds' },

['defender'] = { often = 'Base, Deflecting', sometimes = 'Precise, Subtle', compqty = 8, x10 = true, alias = {}, cat = 'defender', name = 'Defenders, reprisers, and rebounders', nocalc = true },

['whip'] = { often = 'Connector, Flexible, Blade', rarely = 'Sharp, Subtle', compqty = 8, x10 = true, alias = {}, cat = 'whip', name = 'Whips' },

-- magic items ['magic armour'] = { group = true, often = 'Cover, Magic, Deflecting', rarely = 'Powerful, Protective', x10 = true, cat = 'Magic armour', name = 'magic armour', members = { ['magic 8'] = { compqty = 8, alias = { 'magic body', 'magic legs' } }, ['magic 6'] = { compqty = 6, alias = { 'magic cape', 'magic helm' } }, ['magic 4'] = { compqty = 4, alias = { 'magic boots', 'magic gloves' } }, ['magic 2'] = { compqty = 2, alias = { 'magic crest' } }, ['magic 1'] = { compqty = 1, alias = { 'magic essence' } }, }	},

['staff'] = { often = 'Stave, Magic, Padded', rarely = 'Powerful, Imbued', compqty = 12, x10 = true, alias = { 'staves' }, cat = 'staff', name = 'Staves' },

['wands'] = { often = 'Base, Head, Magic', rarely = 'Precise, Imbued', compqty = 8, x10 = true, alias = { 'wand' }, cat = 'wand', name = 'Wands' },

['orbs'] = { often = 'Delicate, Magic, Smooth', rarely = 'Enhancing, Ethereal', compqty = 8, x10 = true, alias = { 'orb', 'book', 'books' }, cat = 'orb', name = 'Magic off-hand weapons' },

-- ranged items ['ranged armour'] = { group = true, often = 'Cover, Tensile, Padded', rarely = 'Evasive, Protective', x10 = true, cat = 'Ranged armour', name = 'ranged armour', members = { ['ranged 8'] = { compqty = 8, alias = { 'ranged body', 'ranged legs' } }, ['ranged 6'] = { compqty = 6, alias = { 'ranged cape', 'ranged helm' } }, ['ranged 4'] = { compqty = 4, alias = { 'ranged boots', 'ranged gloves' } }, ['ranged 2'] = { compqty = 2, alias = { 'ranged crest' } }, ['ranged 1'] = { compqty = 1, alias = { 'ranged essence' } }, }	},

['shortbows'] = { often = 'Stave, Tensile, Flexible', rarely = 'Precise, Dextrous', compqty = 12, x10 = true, alias = { 'shortbow' }, cat = 'shortbows', name = 'Shortbows' }, ['shortbows (u)'] = { often = 'Stave, Tensile, Flexible', rarely = 'Precise, Dextrous', compqty = 4, x10 = true, alias = {}, cat = 'shortbows', name = 'Shortbows' },

['shieldbows'] = { often = 'Stave, Tensile, Flexible', rarely = 'Precise, Strong', compqty = 12, x10 = true, alias = { 'shieldbow', 'longbow', 'longbows' }, cat = 'shieldbows', name = 'Shieldbows' }, ['shieldbows (u)'] = { often = 'Stave, Tensile, Flexible', rarely = 'Precise, Strong', compqty = 4, x10 = true, alias = {}, cat = 'shieldbows', name = 'Shieldbows' },

['arrows'] = { often = 'Stave, Head, Crafted', rarely = 'Precise', itemqty = 50, compqty = 6, alias = {}, cat = 'arrows', name = 'Arrows and arrowheads' }, ['arrowheads'] = { often = 'Stave, Head, Crafted', rarely = 'Precise', itemqty = 50, compqty = 2, alias = {}, cat = 'arrows', name = 'Arrows and arrowheads' },

['bolts'] = { often = 'Base, Head, Spiked', rarely = 'Stunning', itemqty = 50, compqty = 6, alias = {}, cat = 'bolts', name = 'Bolts and bolt tips' }, ['bolt tips'] = { often = 'Head, Base, Spiked', rarely = 'Stunning', itemqty = 50, compqty = 2, alias = {}, cat = 'bolts', name = 'Bolts and bolt tips' },

['crossbows'] = { often = 'Connector, Tensile, Spiked', rarely = 'Stunning, Dextrous', compqty = 8, x10 = true, alias = { 'crossbow' }, cat = 'crossbows', name = 'Crossbows and stocks' }, ['stock'] = { often = 'Connector, Tensile, Spiked', rarely = 'Stunning, Dextrous', compqty = 2, x10 = true, alias = { 'limbs' }, cat = 'crossbows', name = 'Crossbows and stocks' }, ['unstrung crossbows'] = { often = 'Connector, Tensile, Spiked', rarely = 'Stunning, Dextrous', compqty = 4, x10 = true, alias = {}, cat = 'crossbows', name = 'Crossbows and stocks' },

['2h crossbows'] = { often = 'Connector, Tensile, Crafted', rarely = 'Stunning, Dextrous', compqty = 12, x10 = true, alias = {}, cat = '2h crossbows', name = 'Two-handed crossbows' },

['darts'] = { often = 'Simple, Blade, Spiked', rarely = 'Sharp, Swift', itemqty = 50, compqty = 8, alias = {}, cat = 'darts', name = 'Darts' },

['knives'] = { often = 'Simple, Blade, Metallic', rarely = 'Sharp, Swift', itemqty = 50, compqty = 8, alias = {}, cat = 'knives', name = 'Throwing knives' }, ['glaives'] = { often = 'Simple, Blade, Metallic', rarely = 'Sharp, Swift', compqty = 8, x10 = true, alias = {}, cat = 'knives', name = 'Throwing knives' },

['throwing axes'] = { often = 'Simple, Blade, Plated', rarely = 'Sharp, Swift', itemqty = 50, compqty = 8, alias = { 'throwing axe', 'javelin' }, cat = 'throwing axes', name = 'Throwing axes' }, ['chakram'] = { often = 'Simple, Blade, Plated', rarely = 'Sharp, Swift', compqty = 8, x10 = true, alias = {}, cat = 'throwing axes', name = 'Throwing axes' },

['cannonballs'] = { often = 'Simple, Head', rarely = 'Stunning, Direct', itemqty = 50, compqty = 8, alias = { 'bolas' }, cat = 'cannonballs', name = 'Cannonballs' },

-- hybrid items ['hybrid armour'] = { group = true, often = 'Cover, Deflecting', rarely = 'Powerful, Evasive, Protective', x10 = true, cat = 'hybrid armour', name = 'Hybrid armour', members = { ['hybrid 8'] = { compqty = 8, alias = { 'hybrid body', 'hybrid legs' } }, ['hybrid 6'] = { compqty = 6, alias = { 'hybrid cape', 'hybrid helm' } }, ['hybrid 4'] = { compqty = 4, alias = { 'hybrid boots', 'hybrid gloves' } }, ['hybrid 2'] = { compqty = 2, alias = { 'hybrid crest' } }, ['hybrid 1'] = { compqty = 1, alias = { 'hybrid essence' } }, }	} }

-- copy of data with nested groups unpacked local allgroups = {}

-- fields that are copied from group local copiedfields = { 'often', 'sometimes', 'rarely', 'x10', 'name', 'cat' }

-- nested grouping for w, n in pairs(data) do	-- if a group, then copy it	if n.group then -- for each member, named "x", take "y" for x, y in pairs(n.members) do			-- table to store local _temp = {}

-- copy the unique fields for z, t in pairs(y) do				_temp[z] = t			end

-- copy the group's fields for _, z in ipairs(copiedfields) do				_temp[z] = n[z] end

-- add to list allgroups[x] = _temp end -- otherwise store directly else allgroups[w] = n	end end

-- aliases

-- list of names to check local names = {}

for w, _ in pairs(allgroups) do	table.insert(names,w) end

for _, v in ipairs(names) do	local aliases = allgroups[v].alias or {} for _, y in ipairs(aliases) do		allgroups[y] = allgroups[v] allgroups[y].isAlias = true end end

return allgroups