Module:Mod List

local p = {}

p.sort = function(cat, la) if f ~= mw.getCurrentFrame then f = mw.getCurrentFrame end local lang = f:getParent.args.lang or la       list = "" if lang == nil then list = f:callParserFunction{name = "#dpl:", args = {namespace = "", category = cat, nottitlematch = '%/%', allowcachedresults = "true"}} else list = f:callParserFunction{name = "#dpl:", args = {namespace = "", category = cat .. lang, titlematch = '%' .. lang, allowcachedresults = "true"}} end

local mods = {} for mod in list:gsub("", "¦"):sub(9,-11):gmatch("([^¦]+)") do           table.insert(mods,mod) end table.sort(mods) local list = "" for _,mod in ipairs(mods) do           list = list .. mod .. " &bull; " end return list:sub(1,-20) end

p.major = function(params) return p.sort("Mods", params.args.lang) end

p.minor = function(params) return p.sort("Minor Mods", params.args.lang) end

return p