Module:SkillDetails: Difference between revisions
From Eco - English Wiki
[unchecked revision] | [unchecked revision] |
Adding bullet points |
No edit summary |
||
(15 intermediate revisions by 2 users not shown) | |||
Line 41: | Line 41: | ||
-- load list of recipes | -- load list of recipes | ||
local skillData = require( "Module: | local skillData = require( "Module:SkillData" ) | ||
local skillTable = skillData.skills[skill] | local skillTable = skillData.skills[skill] | ||
if skillTable == nil then | if skillTable == nil then | ||
Line 50: | Line 50: | ||
-- Profession Skill | -- Profession Skill | ||
if skillTable.root == true then | if skillTable.root == true then | ||
wikibox = wikibox .. '==' .. skill .. ' Unlocks==\n' | wikibox = wikibox .. '==Profession: ' .. skill .. ' Unlocks==\n' | ||
wikibox = wikibox .. '{| class=\"wikitable\" \n' | wikibox = wikibox .. '{| class=\"wikitable\" \n' | ||
wikibox = wikibox .. '! style="width: | wikibox = wikibox .. '! style="width: 2em; text-align: center;" |Level \n' | ||
wikibox = wikibox .. '! style="width: | wikibox = wikibox .. '! style="width: 15em;" |Skills \n' | ||
wikibox = wikibox .. '|- \n' | wikibox = wikibox .. '|- \n' | ||
wikibox = wikibox .. '| 0 \n' | wikibox = wikibox .. '! style="text-align: center;" |0 \n' | ||
wikibox = wikibox .. '| ' | wikibox = wikibox .. '| ' | ||
if skillTable.childSkills ~= nil then | if skillTable.childSkills ~= nil then | ||
Line 68: | Line 68: | ||
-- Specialty | -- Specialty | ||
if skillTable.root ~= true and skillTable.specialty == true then | if skillTable.root ~= true and skillTable.specialty == true then | ||
local anyRecipes = skillTable.recipes ~= nil | |||
local anyBenefits = skillTable.benefits.level0 ~= nil or skillTable.benefits.level1 ~= nil or skillTable.benefits.level2 ~= nil or skillTable.benefits.level3 ~= nil or skillTable.benefits.level4 ~= nil or skillTable.benefits.level5 ~= nil or skillTable.benefits.level6 ~= nil or skillTable.benefits.level7 ~=nil | local anyBenefits = skillTable.benefits.level0 ~= nil or skillTable.benefits.level1 ~= nil or skillTable.benefits.level2 ~= nil or skillTable.benefits.level3 ~= nil or skillTable.benefits.level4 ~= nil or skillTable.benefits.level5 ~= nil or skillTable.benefits.level6 ~= nil or skillTable.benefits.level7 ~=nil | ||
local anyTalents = skillTable.talents.level0 ~= nil or skillTable.talents.level1 ~= nil or skillTable.talents.level2 ~= nil or skillTable.talents.level3 ~= nil or skillTable.talents.level4 ~= nil or skillTable.talents.level5 ~= nil or skillTable.talents.level6 ~= nil or skillTable.talents.level7 ~= nil | local anyTalents = skillTable.talents.level0 ~= nil or skillTable.talents.level1 ~= nil or skillTable.talents.level2 ~= nil or skillTable.talents.level3 ~= nil or skillTable.talents.level4 ~= nil or skillTable.talents.level5 ~= nil or skillTable.talents.level6 ~= nil or skillTable.talents.level7 ~= nil | ||
--Headings | --Headings | ||
wikibox = wikibox .. '==' .. skill .. ' Unlocks==\n' | wikibox = wikibox .. '==Specialty: ' .. skill .. ' Unlocks==\n' | ||
wikibox = wikibox .. '{| class=\"wikitable\" \n' | wikibox = wikibox .. '{| class=\"wikitable\" \n' | ||
wikibox = wikibox .. '! Level \n' | wikibox = wikibox .. '! style="width: 2em; text-align: center;" |Level \n' | ||
wikibox = wikibox .. '! Crafting | wikibox = wikibox .. '! style="width: 15em;" |Crafting Recipes\n' | ||
wikibox = wikibox .. '! | wikibox = wikibox .. '! style="width: 15em;" |Talents \n' | ||
if anyBenefits then | if anyBenefits then | ||
wikibox = wikibox .. '! Benefits \n' | wikibox = wikibox .. '! style="width: 50em;" | Player Benefits \n' | ||
end | end | ||
--Level 0 | --Level 0 | ||
wikibox = wikibox .. '|- \n' | wikibox = wikibox .. '|- \n' | ||
wikibox = wikibox .. '| 0\n' | wikibox = wikibox .. '! style="text-align: center;" |0 \n' | ||
wikibox = wikibox .. '| ' | wikibox = wikibox .. '| ' | ||
--Crafting 0 | --Crafting 0 | ||
if | if anyRecipes then | ||
wikibox = wikibox .. '| ' | |||
if skillTable.recipes.level0 ~= nil then | if skillTable.recipes.level0 ~= nil then | ||
for i,v in pairs(skillTable.recipes.level0) do | for i,v in pairs(skillTable.recipes.level0) do | ||
wikibox = wikibox .. '<li>' .. skillTable.recipes.level0[i] .. '</li>' | wikibox = wikibox .. '<li>' .. skillTable.recipes.level0[i] .. '</li>' | ||
end | |||
wikibox = wikibox .. '\n' | wikibox = wikibox .. '\n' | ||
end | end | ||
Line 114: | Line 116: | ||
--Benefits 0 | --Benefits 0 | ||
if anyBenefits then | if anyBenefits then | ||
wikibox = wikibox .. '| ' | wikibox = wikibox .. '|<div style=\"column-count:2;-moz-column-count:2;-webkit-column-count:2\">\n' | ||
if skillTable.benefits.level0 ~= nil then | if skillTable.benefits.level0 ~= nil then | ||
wikibox = wikibox .. p.benefits( skillTable.benefits.level0 ) | wikibox = wikibox .. p.benefits( skillTable.benefits.level0 ) | ||
Line 123: | Line 125: | ||
--Level 1 | --Level 1 | ||
wikibox = wikibox .. '|- \n' | wikibox = wikibox .. '|- \n' | ||
wikibox = wikibox .. '| 1\n' | wikibox = wikibox .. '! style="text-align: center;" |1 \n' | ||
wikibox = wikibox .. '| ' | wikibox = wikibox .. '| ' | ||
--Crafting 1 | --Crafting 1 | ||
if | if anyRecipes then | ||
wikibox = wikibox .. '| ' | wikibox = wikibox .. '| ' | ||
if skillTable.recipes.level1 ~= nil then | if skillTable.recipes.level1 ~= nil then | ||
Line 153: | Line 155: | ||
--Benefits 1 | --Benefits 1 | ||
if anyBenefits then | if anyBenefits then | ||
wikibox = wikibox .. '| ' | wikibox = wikibox .. '|<div style=\"column-count:2;-moz-column-count:2;-webkit-column-count:2\">\n' | ||
if skillTable.benefits.level1 ~= nil then | if skillTable.benefits.level1 ~= nil then | ||
wikibox = wikibox .. p.benefits( skillTable.benefits.level1 ) | wikibox = wikibox .. p.benefits( skillTable.benefits.level1 ) | ||
Line 162: | Line 164: | ||
--Level 2 | --Level 2 | ||
wikibox = wikibox .. '|- \n' | wikibox = wikibox .. '|- \n' | ||
wikibox = wikibox .. '| 2\n' | wikibox = wikibox .. '! style="text-align: center;" |2 \n' | ||
wikibox = wikibox .. '| ' | wikibox = wikibox .. '| ' | ||
--Crafting 2 | --Crafting 2 | ||
if | if anyRecipes then | ||
wikibox = wikibox .. '| ' | wikibox = wikibox .. '| ' | ||
if skillTable.recipes.level2 ~= nil then | if skillTable.recipes.level2 ~= nil then | ||
Line 192: | Line 194: | ||
--Benefits 2 | --Benefits 2 | ||
if anyBenefits then | if anyBenefits then | ||
wikibox = wikibox .. '| ' | wikibox = wikibox .. '|<div style=\"column-count:2;-moz-column-count:2;-webkit-column-count:2\">\n' | ||
if skillTable.benefits.level2 ~= nil then | if skillTable.benefits.level2 ~= nil then | ||
wikibox = wikibox .. p.benefits( skillTable.benefits.level2 ) | wikibox = wikibox .. p.benefits( skillTable.benefits.level2 ) | ||
Line 201: | Line 203: | ||
--Level 3 | --Level 3 | ||
wikibox = wikibox .. '|- \n' | wikibox = wikibox .. '|- \n' | ||
wikibox = wikibox .. '| 3\n' | wikibox = wikibox .. '! style="text-align: center;" |3 \n' | ||
wikibox = wikibox .. '| ' | wikibox = wikibox .. '| ' | ||
--Crafting 3 | --Crafting 3 | ||
if | if anyRecipes then | ||
wikibox = wikibox .. '| ' | wikibox = wikibox .. '| ' | ||
if skillTable.recipes.level3 ~= nil then | if skillTable.recipes.level3 ~= nil then | ||
Line 231: | Line 233: | ||
--Benefits 3 | --Benefits 3 | ||
if anyBenefits then | if anyBenefits then | ||
wikibox = wikibox .. '| ' | wikibox = wikibox .. '|<div style=\"column-count:2;-moz-column-count:2;-webkit-column-count:2\">\n' | ||
if skillTable.benefits.level3 ~= nil then | if skillTable.benefits.level3 ~= nil then | ||
wikibox = wikibox .. p.benefits( skillTable.benefits.level3 ) | wikibox = wikibox .. p.benefits( skillTable.benefits.level3 ) | ||
Line 240: | Line 242: | ||
--Level 4 | --Level 4 | ||
wikibox = wikibox .. '|- \n' | wikibox = wikibox .. '|- \n' | ||
wikibox = wikibox .. '| 4\n' | wikibox = wikibox .. '! style="text-align: center;" |4 \n' | ||
wikibox = wikibox .. '| ' | wikibox = wikibox .. '| ' | ||
--Crafting 4 | --Crafting 4 | ||
if | if anyRecipes then | ||
wikibox = wikibox .. '| ' | wikibox = wikibox .. '| ' | ||
if skillTable.recipes.level4 ~= nil then | if skillTable.recipes.level4 ~= nil then | ||
Line 270: | Line 272: | ||
--Benefits 4 | --Benefits 4 | ||
if anyBenefits then | if anyBenefits then | ||
wikibox = wikibox .. '| ' | wikibox = wikibox .. '|<div style=\"column-count:2;-moz-column-count:2;-webkit-column-count:2\">\n' | ||
if skillTable.benefits.level4 ~= nil then | if skillTable.benefits.level4 ~= nil then | ||
wikibox = wikibox .. p.benefits( skillTable.benefits.level4 ) | wikibox = wikibox .. p.benefits( skillTable.benefits.level4 ) | ||
Line 279: | Line 281: | ||
--Level 5 | --Level 5 | ||
wikibox = wikibox .. '|- \n' | wikibox = wikibox .. '|- \n' | ||
wikibox = wikibox .. '| 5\n' | wikibox = wikibox .. '! style="text-align: center;" |5 \n' | ||
wikibox = wikibox .. '| ' | wikibox = wikibox .. '| ' | ||
--Crafting 5 | --Crafting 5 | ||
if | if anyRecipes then | ||
wikibox = wikibox .. '| ' | wikibox = wikibox .. '| ' | ||
if skillTable.recipes.level5 ~= nil then | if skillTable.recipes.level5 ~= nil then | ||
Line 309: | Line 311: | ||
--Benefits 5 | --Benefits 5 | ||
if anyBenefits then | if anyBenefits then | ||
wikibox = wikibox .. '| ' | wikibox = wikibox .. '|<div style=\"column-count:2;-moz-column-count:2;-webkit-column-count:2\">\n' | ||
if skillTable.benefits.level5 ~= nil then | if skillTable.benefits.level5 ~= nil then | ||
wikibox = wikibox .. p.benefits( skillTable.benefits.level5 ) | wikibox = wikibox .. p.benefits( skillTable.benefits.level5 ) | ||
Line 318: | Line 320: | ||
--Level 6 | --Level 6 | ||
wikibox = wikibox .. '|- \n' | wikibox = wikibox .. '|- \n' | ||
wikibox = wikibox .. '| 6\n' | wikibox = wikibox .. '! style="text-align: center;" |6 \n' | ||
wikibox = wikibox .. '| ' | wikibox = wikibox .. '| ' | ||
--Crafting 6 | --Crafting 6 | ||
if | if anyRecipes then | ||
wikibox = wikibox .. '| ' | wikibox = wikibox .. '| ' | ||
if skillTable.recipes.level6 ~= nil then | if skillTable.recipes.level6 ~= nil then | ||
Line 348: | Line 350: | ||
--Benefits 6 | --Benefits 6 | ||
if anyBenefits then | if anyBenefits then | ||
wikibox = wikibox .. '| ' | wikibox = wikibox .. '|<div style=\"column-count:2;-moz-column-count:2;-webkit-column-count:2\">\n' | ||
if skillTable.benefits.level6 ~= nil then | if skillTable.benefits.level6 ~= nil then | ||
wikibox = wikibox .. p.benefits( skillTable.benefits.level6 ) | wikibox = wikibox .. p.benefits( skillTable.benefits.level6 ) | ||
Line 357: | Line 359: | ||
--Level 7 | --Level 7 | ||
wikibox = wikibox .. '|- \n' | wikibox = wikibox .. '|- \n' | ||
wikibox = wikibox .. '| 7\n' | wikibox = wikibox .. '! style="text-align: center;" |7 \n' | ||
wikibox = wikibox .. '| ' | wikibox = wikibox .. '| ' | ||
--Crafting 7 | --Crafting 7 | ||
if | if anyRecipes then | ||
wikibox = wikibox .. '| ' | wikibox = wikibox .. '| ' | ||
if skillTable.recipes.level7 ~= nil then | if skillTable.recipes.level7 ~= nil then | ||
Line 387: | Line 389: | ||
--Benefits 7 | --Benefits 7 | ||
if anyBenefits then | if anyBenefits then | ||
wikibox = wikibox .. '| ' | wikibox = wikibox .. '|<div style=\"column-count:2;-moz-column-count:2;-webkit-column-count:2\">\n' | ||
if skillTable.benefits.level7 ~= nil then | if skillTable.benefits.level7 ~= nil then | ||
wikibox = wikibox .. p.benefits( skillTable.benefits.level7 ) | wikibox = wikibox .. p.benefits( skillTable.benefits.level7 ) |
Latest revision as of 10:43, 25 June 2024
This module provides the back end functionality of the Template:SkillDetails.
If the template is passed, this module creates a list using details from the following Modules:
Credit[edit source]
Original SkillDetails was created by Fyre (FishAus) then edited by Scotty (ZeelNightwolf).
-- Credit: Original SkillDetails was created by Fyre (FishAus) then edited by Scotty (ZeelNightwolf).
local p = {}
-- Grabs args from the parent frame
-- Trims and parses the args into a table, then returns the table
function norm()
local origArgs = mw.getCurrentFrame():getParent().args
local args = {}
for k, v in pairs( origArgs ) do
v = mw.text.trim( tostring( v ) )
if v ~= '' then
args[k] = v
end
end
return args
end
function p.benefits( benTable )
local builder = ''
for i,v in pairs(benTable) do
builder = builder .. '<li>' .. v[1] .. ': ' .. v[2] .. ' the ' .. v[3] .. ' by ' .. v[4] .. '.</li>'
end
return builder
end
-- Main entry point for the Module
function p.main()
-- get args from the Template
local args = norm()
if args.skill == nil or args.skill == '' then
return '\'skill\' must be specified.'
end
-- assign variables for plant
local skill = args.skill
-- load list of recipes
local skillData = require( "Module:SkillData" )
local skillTable = skillData.skills[skill]
if skillTable == nil then
return skill .. ' could not be found in Module:Skills.'
end
local wikibox = ''
-- Profession Skill
if skillTable.root == true then
wikibox = wikibox .. '==Profession: ' .. skill .. ' Unlocks==\n'
wikibox = wikibox .. '{| class=\"wikitable\" \n'
wikibox = wikibox .. '! style="width: 2em; text-align: center;" |Level \n'
wikibox = wikibox .. '! style="width: 15em;" |Skills \n'
wikibox = wikibox .. '|- \n'
wikibox = wikibox .. '! style="text-align: center;" |0 \n'
wikibox = wikibox .. '| '
if skillTable.childSkills ~= nil then
for i,v in pairs(skillTable.childSkills) do
wikibox = wikibox .. '<li>' .. skillTable.childSkills[i] .. '</li>'
end
end
wikibox = wikibox .. '\n'
wikibox = wikibox .. '|}\n\n'
end
-- Specialty
if skillTable.root ~= true and skillTable.specialty == true then
local anyRecipes = skillTable.recipes ~= nil
local anyBenefits = skillTable.benefits.level0 ~= nil or skillTable.benefits.level1 ~= nil or skillTable.benefits.level2 ~= nil or skillTable.benefits.level3 ~= nil or skillTable.benefits.level4 ~= nil or skillTable.benefits.level5 ~= nil or skillTable.benefits.level6 ~= nil or skillTable.benefits.level7 ~=nil
local anyTalents = skillTable.talents.level0 ~= nil or skillTable.talents.level1 ~= nil or skillTable.talents.level2 ~= nil or skillTable.talents.level3 ~= nil or skillTable.talents.level4 ~= nil or skillTable.talents.level5 ~= nil or skillTable.talents.level6 ~= nil or skillTable.talents.level7 ~= nil
--Headings
wikibox = wikibox .. '==Specialty: ' .. skill .. ' Unlocks==\n'
wikibox = wikibox .. '{| class=\"wikitable\" \n'
wikibox = wikibox .. '! style="width: 2em; text-align: center;" |Level \n'
wikibox = wikibox .. '! style="width: 15em;" |Crafting Recipes\n'
wikibox = wikibox .. '! style="width: 15em;" |Talents \n'
if anyBenefits then
wikibox = wikibox .. '! style="width: 50em;" | Player Benefits \n'
end
--Level 0
wikibox = wikibox .. '|- \n'
wikibox = wikibox .. '! style="text-align: center;" |0 \n'
wikibox = wikibox .. '| '
--Crafting 0
if anyRecipes then
wikibox = wikibox .. '| '
if skillTable.recipes.level0 ~= nil then
for i,v in pairs(skillTable.recipes.level0) do
wikibox = wikibox .. '<li>' .. skillTable.recipes.level0[i] .. '</li>'
end
wikibox = wikibox .. '\n'
end
else
wikibox = wikibox .. '\n'
end
--Talent 0
if anyTalents then
wikibox = wikibox .. '| '
if skillTable.talents.level0 ~= nil then
if skillTable.talents.level0 ~= nil then
for i,v in pairs(skillTable.talents.level0) do
wikibox = wikibox .. '<li>' .. skillTable.talents.level0[i] .. '</li>'
end
wikibox = wikibox .. '\n'
end
else
wikibox = wikibox .. '\n'
end
end
--Benefits 0
if anyBenefits then
wikibox = wikibox .. '|<div style=\"column-count:2;-moz-column-count:2;-webkit-column-count:2\">\n'
if skillTable.benefits.level0 ~= nil then
wikibox = wikibox .. p.benefits( skillTable.benefits.level0 )
end
wikibox = wikibox .. '\n'
end
--Level 1
wikibox = wikibox .. '|- \n'
wikibox = wikibox .. '! style="text-align: center;" |1 \n'
wikibox = wikibox .. '| '
--Crafting 1
if anyRecipes then
wikibox = wikibox .. '| '
if skillTable.recipes.level1 ~= nil then
for i,v in pairs(skillTable.recipes.level1) do
wikibox = wikibox .. '<li>' .. skillTable.recipes.level1[i] .. '</li>'
end
wikibox = wikibox .. '\n'
end
else
wikibox = wikibox .. '\n'
end
--Talent 1
if anyTalents then
wikibox = wikibox .. '| '
if skillTable.talents.level1 ~= nil then
if skillTable.talents.level1 ~= nil then
for i,v in pairs(skillTable.talents.level1) do
wikibox = wikibox .. '<li>' .. skillTable.talents.level1[i] .. '</li>'
end
wikibox = wikibox .. '\n'
end
else
wikibox = wikibox .. '\n'
end
end
--Benefits 1
if anyBenefits then
wikibox = wikibox .. '|<div style=\"column-count:2;-moz-column-count:2;-webkit-column-count:2\">\n'
if skillTable.benefits.level1 ~= nil then
wikibox = wikibox .. p.benefits( skillTable.benefits.level1 )
end
wikibox = wikibox .. '\n'
end
--Level 2
wikibox = wikibox .. '|- \n'
wikibox = wikibox .. '! style="text-align: center;" |2 \n'
wikibox = wikibox .. '| '
--Crafting 2
if anyRecipes then
wikibox = wikibox .. '| '
if skillTable.recipes.level2 ~= nil then
for i,v in pairs(skillTable.recipes.level2) do
wikibox = wikibox .. '<li>' .. skillTable.recipes.level2[i] .. '</li>'
end
wikibox = wikibox .. '\n'
end
else
wikibox = wikibox .. '\n'
end
--Talent 2
if anyTalents then
wikibox = wikibox .. '| '
if skillTable.talents.level2 ~= nil then
if skillTable.talents.level2 ~= nil then
for i,v in pairs(skillTable.talents.level2) do
wikibox = wikibox .. '<li>' .. skillTable.talents.level2[i] .. '</li>'
end
wikibox = wikibox .. '\n'
end
else
wikibox = wikibox .. '\n'
end
end
--Benefits 2
if anyBenefits then
wikibox = wikibox .. '|<div style=\"column-count:2;-moz-column-count:2;-webkit-column-count:2\">\n'
if skillTable.benefits.level2 ~= nil then
wikibox = wikibox .. p.benefits( skillTable.benefits.level2 )
end
wikibox = wikibox .. '\n'
end
--Level 3
wikibox = wikibox .. '|- \n'
wikibox = wikibox .. '! style="text-align: center;" |3 \n'
wikibox = wikibox .. '| '
--Crafting 3
if anyRecipes then
wikibox = wikibox .. '| '
if skillTable.recipes.level3 ~= nil then
for i,v in pairs(skillTable.recipes.level3) do
wikibox = wikibox .. '<li>' .. skillTable.recipes.level3[i] .. '</li>'
end
wikibox = wikibox .. '\n'
end
else
wikibox = wikibox .. '\n'
end
--Talent 3
if anyTalents then
wikibox = wikibox .. '| '
if skillTable.talents.level3 ~= nil then
if skillTable.talents.level3 ~= nil then
for i,v in pairs(skillTable.talents.level3) do
wikibox = wikibox .. '<li>' .. skillTable.talents.level3[i] .. '</li>'
end
wikibox = wikibox .. '\n'
end
else
wikibox = wikibox .. '\n'
end
end
--Benefits 3
if anyBenefits then
wikibox = wikibox .. '|<div style=\"column-count:2;-moz-column-count:2;-webkit-column-count:2\">\n'
if skillTable.benefits.level3 ~= nil then
wikibox = wikibox .. p.benefits( skillTable.benefits.level3 )
end
wikibox = wikibox .. '\n'
end
--Level 4
wikibox = wikibox .. '|- \n'
wikibox = wikibox .. '! style="text-align: center;" |4 \n'
wikibox = wikibox .. '| '
--Crafting 4
if anyRecipes then
wikibox = wikibox .. '| '
if skillTable.recipes.level4 ~= nil then
for i,v in pairs(skillTable.recipes.level4) do
wikibox = wikibox .. '<li>' .. skillTable.recipes.level4[i] .. '</li>'
end
wikibox = wikibox .. '\n'
end
else
wikibox = wikibox .. '\n'
end
--Talent 4
if anyTalents then
wikibox = wikibox .. '| '
if skillTable.talents.level4 ~= nil then
if skillTable.talents.level4 ~= nil then
for i,v in pairs(skillTable.talents.level4) do
wikibox = wikibox .. '<li>' .. skillTable.talents.level4[i] .. '</li>'
end
wikibox = wikibox .. '\n'
end
else
wikibox = wikibox .. '\n'
end
end
--Benefits 4
if anyBenefits then
wikibox = wikibox .. '|<div style=\"column-count:2;-moz-column-count:2;-webkit-column-count:2\">\n'
if skillTable.benefits.level4 ~= nil then
wikibox = wikibox .. p.benefits( skillTable.benefits.level4 )
end
wikibox = wikibox .. '\n'
end
--Level 5
wikibox = wikibox .. '|- \n'
wikibox = wikibox .. '! style="text-align: center;" |5 \n'
wikibox = wikibox .. '| '
--Crafting 5
if anyRecipes then
wikibox = wikibox .. '| '
if skillTable.recipes.level5 ~= nil then
for i,v in pairs(skillTable.recipes.level5) do
wikibox = wikibox .. '<li>' .. skillTable.recipes.level5[i] .. '</li>'
end
wikibox = wikibox .. '\n'
end
else
wikibox = wikibox .. '\n'
end
--Talent 5
if anyTalents then
wikibox = wikibox .. '| '
if skillTable.talents.level5 ~= nil then
if skillTable.talents.level5 ~= nil then
for i,v in pairs(skillTable.talents.level5) do
wikibox = wikibox .. '<li>' .. skillTable.talents.level5[i] .. '</li>'
end
wikibox = wikibox .. '\n'
end
else
wikibox = wikibox .. '\n'
end
end
--Benefits 5
if anyBenefits then
wikibox = wikibox .. '|<div style=\"column-count:2;-moz-column-count:2;-webkit-column-count:2\">\n'
if skillTable.benefits.level5 ~= nil then
wikibox = wikibox .. p.benefits( skillTable.benefits.level5 )
end
wikibox = wikibox .. '\n'
end
--Level 6
wikibox = wikibox .. '|- \n'
wikibox = wikibox .. '! style="text-align: center;" |6 \n'
wikibox = wikibox .. '| '
--Crafting 6
if anyRecipes then
wikibox = wikibox .. '| '
if skillTable.recipes.level6 ~= nil then
for i,v in pairs(skillTable.recipes.level6) do
wikibox = wikibox .. '<li>' .. skillTable.recipes.level6[i] .. '</li>'
end
wikibox = wikibox .. '\n'
end
else
wikibox = wikibox .. '\n'
end
--Talent 6
if anyTalents then
wikibox = wikibox .. '| '
if skillTable.talents.level6 ~= nil then
if skillTable.talents.level6 ~= nil then
for i,v in pairs(skillTable.talents.level6) do
wikibox = wikibox .. '<li>' .. skillTable.talents.level6[i] .. '</li>'
end
wikibox = wikibox .. '\n'
end
else
wikibox = wikibox .. '\n'
end
end
--Benefits 6
if anyBenefits then
wikibox = wikibox .. '|<div style=\"column-count:2;-moz-column-count:2;-webkit-column-count:2\">\n'
if skillTable.benefits.level6 ~= nil then
wikibox = wikibox .. p.benefits( skillTable.benefits.level6 )
end
wikibox = wikibox .. '\n'
end
--Level 7
wikibox = wikibox .. '|- \n'
wikibox = wikibox .. '! style="text-align: center;" |7 \n'
wikibox = wikibox .. '| '
--Crafting 7
if anyRecipes then
wikibox = wikibox .. '| '
if skillTable.recipes.level7 ~= nil then
for i,v in pairs(skillTable.recipes.level7) do
wikibox = wikibox .. '<li>' .. skillTable.recipes.level7[i] .. '</li>'
end
wikibox = wikibox .. '\n'
end
else
wikibox = wikibox .. '\n'
end
--Talent 7
if anyTalents then
wikibox = wikibox .. '| '
if skillTable.talents.level7 ~= nil then
if skillTable.talents.level7 ~= nil then
for i,v in pairs(skillTable.talents.level7) do
wikibox = wikibox .. '<li>' .. skillTable.talents.level7[i] .. '</li>'
end
wikibox = wikibox .. '\n'
end
else
wikibox = wikibox .. '\n'
end
end
--Benefits 7
if anyBenefits then
wikibox = wikibox .. '|<div style=\"column-count:2;-moz-column-count:2;-webkit-column-count:2\">\n'
if skillTable.benefits.level7 ~= nil then
wikibox = wikibox .. p.benefits( skillTable.benefits.level7 )
end
wikibox = wikibox .. '\n'
end
wikibox = wikibox .. '|}\n\n'
end
return wikibox
end
return p