Module:Disassembly material calculator/data

From the RuneScape Wiki, the wiki for all things RuneScape
Jump to: navigation, search
Module documentation
This documentation is transcluded from Module:Disassembly material calculator/data/doc. [edit] [purge]
Module:Disassembly material calculator/data loads data from Module:Disassemble/matinfo.

Contains chances for each material when disassembling items. Each item is a string:int pair of simple material names (as used by Module:Disassemble/data and Module:Disassemble/mats) to the weight as integers (e.g. 30). The total is automatically calculated.

Automatically calculates the invention master cape modifier - see invention master cape#Details for more information.

mw.loadData compatible.


-- <nowiki>
-- category name from [[Module:Disassemble/data]]
-- materal name from [[Module:Disassemble/mats]]
-- data generated using [[User:Gaz Lloyd/Disassembly]]
-- sample size given in comments
local info = mw.loadData('Module:Disassemble/matinfo')

local data = {
	['default'] = { simple = 99, variable = 1 }, -- 10741
	-- materials
	['charms'] = { spiritual = 1 }, -- only one mat
	['ores'] = { simple = 1 }, -- only one mat
	
	['logs'] = { simple = 99, living = 1 }, -- 29542
	['gems'] = { clear = 35, delicate = 30, smooth = 30, precious = 3, light = 2, faceted = 1 }, -- 36175
	['seeds'] = { organic = 99, living = 1 }, -- 17492
	['ashed incense sticks'] = { organic = 49, simple = 48, living = 1, pious = 1, ethereal = 1 }, -- 40577
	['herbed incense sticks'] = { organic = 55, simple = 40, pious = 1, ethereal = 1, living = 1, crafted = 1, healthy = 1, enhancing = 1 }, -- 42000
	
	['bones'] = { organic = 98, pious = 2 }, -- 20935
	['ashes'] = { organic = 98, pious = 1, ethereal = 1 }, -- 17304
	
	-- products
	['divination'] = { magic = 85, crafted = 13, ethereal = 2 }, -- 35147
	['food'] = { organic = 89, crafted = 8, living = 1, healthy = 1, enhancing = 1 }, -- 20056
	['glass'] = { clear = 35, delicate = 32, smooth = 30, enhancing = 3 }, -- 27810
	['faceted glass'] = { clear = 30, delicate = 30, smooth = 30, faceted = 1, enhancing = 3 }, -- 43922
	['planks'] = { simple = 75, crafted = 25 }, -- shauny
	['clockwork'] = { simple = 76, crafted = 17, clockwork = 2 }, -- 11923, get more data in next beta
	['potions'] = { delicate = 35, organic = 32, crafted = 30, enhancing = 3, healthy = 1 }, -- shauny
	['pouches'] = { spiritual = 40, crafted = 30, flexible = 27, powerful = 3 }, -- 55182
	['scrolls'] = { spiritual = 60, crafted = 37, powerful = 3 }, -- 15411, maybe more
	['crystal fruit'] = { simple = 33, organic = 55, healthy = 2, crystal = 10 }, -- 15625,  could do with more
	
	-- gizmos
	-- shauny
	['gizmo'] = {
		clockwork = 2,
		simple = 20, base = 10, blade = 10, magic = 10, organic = 10, spiritual = 10, stave = 10, tensile = 10, head = 10, connector = 10, cover = 10, clear = 10, delicate = 10, crafted = 10, plated = 10, flexible = 10, deflecting = 10, metallic = 10, spiked = 10, smooth = 10, padded = 10,
		refined = 2, precise = 1, sharp = 1, powerful = 1, healthy = 1, heavy = 1, stunning = 1, enhancing = 1, protective = 1, evasive = 1, precious = 1, pious = 1, light = 1, living = 1, ethereal = 1, variable = 1, dextrous = 1, strong = 1, swift = 1, imbued = 1, direct = 1, subtle = 1
	},
	
	-- salvage
	-- shauny
	['bladed salvage'] = { base = 35, blade = 30, metallic = 30, sharp = 1, subtle = 1, dextrous = 1 },
	['blunt salvage'] = { stave = 35, head = 30, smooth = 30, stunning = 1, direct = 1, strong = 1 },
	['plated salvage'] = { cover = 35, plated = 30, deflecting = 30, protective = 1, heavy = 1, strong = 1 },
	['spiky salvage'] = { connector = 35, spiked = 30, crafted = 30, swift = 1, precise = 1, light = 1 },
	
	-- general equipment
	['hybrid armour'] = { cover = 45, deflecting = 45, powerful = 3, evasive = 3, protective = 3 }, -- 39523
	['jewellery'] = { delicate = 35, connector = 30, smooth = 30, precious = 3, enhancing = 2 }, -- 136791
	['shields'] = { cover = 35, base = 30, deflecting = 30, strong = 3, protective = 2 }, -- 46259
	['clothing'] = { cover = 35, simple = 35, padded = 29, variable = 1 }, -- 7285
	['crystal tool'] = { crystal = 70, clear = 10, delicate = 10, smooth = 10, faceted = 50 }, -- shauny
	
	-- melee equipment
	['melee armour'] = { cover = 35, plated = 30, deflecting = 30, strong = 3, protective = 2 },  -- 33805
	['battleaxe'] = { head = 35, blade = 30, smooth = 30, sharp = 3, direct = 2 }, -- 22944
	['claw'] = { connector = 35, blade = 30, spiked = 30, sharp = 3, swift = 2 }, -- 45393
	['dagger'] = { base = 35, blade = 30, spiked = 30, precise = 3, light = 2 }, -- 38514
	['halberd'] = { stave = 35, blade = 30, deflecting = 30, sharp = 3, stunning = 2 }, -- filling in from pattern
	['hatchet'] = { head = 35, blade = 30, connector = 30, sharp = 3, strong = 2 }, -- filling in from pattern
	['longsword'] = { base = 35, blade = 30, metallic = 30, sharp = 3, dextrous = 2 }, -- filling in from pattern
	['mace'] = { base = 35, head = 30, smooth = 30, heavy = 3, dextrous = 2 }, -- filling in from pattern
	['mattock'] = { base = 35, head = 30, spiked = 30, heavy = 3, direct = 2 }, -- filling in from pattern
	['maul'] = { base = 35, head = 30, plated = 30, heavy = 3, strong = 2 }, -- filling in from pattern
	['pickaxe'] = { base = 35, head = 30, spiked = 30, heavy = 3, direct = 2 }, -- 18927
	['scimitar'] = { base = 35, blade = 30, metallic = 30, sharp = 3, subtle = 2 }, -- 37563
	['spear'] = { stave = 35, blade = 30, crafted = 30, precise = 3, direct = 2 }, -- filling in from pattern
	['sword'] = { base = 35 , blade =  30, metallic = 30, precise =  3, dextrous = 2 }, -- 23727
	['2h sword'] = { base = 35, blade = 30, metallic = 30, sharp = 3, strong = 2 }, -- filling in from pattern
	['warhammer'] = { base = 35, head = 30, smooth = 30, heavy = 3, strong = 2 }, -- filling in from pattern
	['whip'] = { connector = 35, flexible = 30, blade = 30, sharp = 3, subtle = 2 }, -- 365817
	
	-- ER specialness
	['elder rune melee armour'] = { cover = 31, plated = 27, deflecting = 27, strong = 9, protective = 6 },
	['elder rune longsword'] = { base = 31, blade = 27, metallic = 27, sharp = 9, dextrous = 6 },
	['elder rune 2h sword'] = { base = 31, blade = 27, metallic = 27, sharp = 9, strong = 6 },
	['elder rune shields'] = { cover = 31, base = 27, deflecting = 27, strong = 9, protective = 6 },
	['elder rune pickaxe'] = { base = 31, head = 27, spiked = 27, heavy = 9, direct = 6 },
	
	-- ['defender'] = { base = , deflecting = , precise = , subtle =  }, -- unlikely to ever happen
	-- ['defender piece'] = { connector = , deflecting = , variable = , enhancing =  }, -- unlikely to ever happen
	
	-- magic equipment
	['magic armour'] = { cover = 35, magic = 30, deflecting = 30, powerful = 3, protective = 2 }, -- shauny
	['runes'] = { magic = 85, crafted = 13, powerful = 2 }, -- shauny
	['staff'] = { stave = 35, magic = 30, padded = 30, powerful = 3, imbued = 2 }, -- 30291
	['wand'] = { base = 35, head = 30, magic = 30, precise = 3, imbued = 2 }, -- 15099
	['orb'] = { delicate = 35, magic = 30, smooth = 30, enhancing = 3, ethereal = 2, faceted = 1 }, -- 52812
	
	-- ranged equipment
	['ranged armour'] = { cover = 35, tensile = 30, padded = 30, evasive = 3, protective = 2 }, -- 29062
	['arrows'] = { stave = 40, head = 30, crafted = 27, precise = 3 }, -- 14752
	['bolts'] = { base = 40, head = 30, spiked = 27, stunning = 3 }, -- ~20000
	['cannonballs'] = { simple = 50, head = 45, stunning = 3, direct = 2 }, -- 15671
	['darts'] = { simple = 35, blade = 30, spiked = 30, sharp = 3, swift = 2 }, -- 17741
	['throwing axes'] = { simple = 35, blade = 30, plated = 30, sharp = 3, swift = 2 }, -- filling in from pattern
	['knives'] = { simple = 35, blade = 30, metallic = 30, sharp = 3, swift = 2 }, -- filling in from pattern
	['shortbows'] = { stave = 35 , tensile = 30 , flexible = 30 , precise = 3 , dextrous = 2 }, -- 156789
	['shieldbows'] = { stave = 35, tensile = 30, flexible = 30, precise = 3, strong = 2 }, -- 86129
	['crossbows'] = { connector = 35, tensile = 30, spiked = 30, stunning = 3, dextrous = 2 }, -- filling in from pattern
	['2h crossbows'] = { connector = 35, tensile = 30, crafted = 30, stunning = 3, dextrous = 2 }, -- filling in from pattern
	
	-- ['spider leg'] = { simple = , stave = , variable =  }, -- $$$$$$$
	['spider eye'] = {magic = 1},
	['spider web'] = {tensile = 1},
	['spider fang'] = {blade = 1},
}
for _k,v in pairs(data) do
	local unctotal = 0
	local commontotal = 0
	for k,m in pairs(v) do
		if info[k] and info[k] == 'common' then
			commontotal = commontotal + m
		else
			unctotal = unctotal + m
		end
	end
	local total = unctotal + commontotal
	v._total = total
	
	if commontotal > 0 and unctotal > 0 then
		v._master_modifier = (total-unctotal*1.2)/commontotal
	else
		v._master_modifier = 1
	end
end

return data
-- </nowiki>