Module:SkillTreeGraph

local p = {} local mw = mw local cargo = mw.ext.cargo

function p.skillChart(frame) local name=frame.args["Name"] local query1 = cargo.query('Skills', '_pageName,Name,Required', {		where = '(Required HOLDS NOT "" AND _pageName="' .. name .. '") OR (Required HOLDS "' .. name .. '")',   	groupBy = 'Name',		limit = 500,	}) local query2 = cargo.query('WeaponEvolutions', '_pageName=N,EvolvesInto', {		where = '_pageName="' .. name .. '" OR EvolvesInto="' .. name .. '"',   	groupBy = '_pageName',		limit = 500,	})

local t='digraph "' .. name .. '" {' --	if not query1 == nil then for k,v in ipairs(query1) do t= t .. '"' .. v.Required .. '"->"' .. v.Name .. '";' end --	end --	if not query2 == nil then for k,v in ipairs(query2) do t= t .. '"' .. v.N .. '"->"' .. v.EvolvesInto .. '";' end --	end t=t .. '}'	return t end

return p