Module:Infobox Skill: Difference between revisions

From Eco - English Wiki
[unchecked revision][unchecked revision]
No edit summary
No edit summary
 
(43 intermediate revisions by 2 users not shown)
Line 1: Line 1:
-- Credit: Original Infobox (now known as Infobox_Item) created by Pradoxzon was then edited by Nesphit and TreeNuts0. Fyre (FishAus) and Scotty (ZeelNightwolf) further edited the Infobox_Item. They then duplicated and used as a base for Infobox_Skill, Infobox_Plant, and Infobox_Animal.
local p = {}
local p = {}


Line 17: Line 19:
end
end


-- Main entry point for the Module
function p.SkillMain()
    -- get args from the Template
    local args = norm()
   
-- create values outside of if statements to ensure they are available to whole function
local skills = ''
local check = ''
    -- assign variables for skill or talent whatever is passed. Skill has priority so if both are passed only skill will continue.
    if args.skill ~= nil then
        skills = args.skill
        check = 'skill'
    elseif args.talent ~= nil then
        skills = args.talent
        check = 'talent'
    end
 
-- check to see if skills was actually passed in
if skills == '' then
return 'skill or talent must be specified.'
    end
 
local skillData = {}
local skillTable = {}
 
    -- checks if skill  and assigns correct modules based on check
    if check == 'skill' then
        skillData = require( "Module:Skills" )
        skillTable = skillData.skills[skills]
    else
        skillData = require( "Module:TalentData" )
        skillTable = skillData.talents[skills]
    end


-- Build an Infobox_Skill
     -- checks if skills can be found in plant data or tree data based on what was requested
function skillBox( args, skillData)
     if skillTable == {} then
     -- check that all necessary arguments are passed correctly
        if check == 'skill' then
     if args.name == nil or args.name == '' then
            return skills .. ' could not be found in Module:Skills.'
        return '\'name\' must be specified.'
        else
            return skills .. ' could not be found in Module:TalentData.'
        end
     end
     end
   
local skill = args.name


local skillimagename = string.gsub(skill, ' ', '')
    -- From now on using skillsTable."KeyValue" will return the value from that key. for most things a check for skills type is not necessary
 
local skillTable = skillData.skills[skill]
-- Build an Infobox_Plant
if skillTable == nil then
-- string used to build the infobox
            if item ~= nil then
return item .. ' could not be found in Module:Skills.'
            end
end   
    -- string used to build the infobox
     local infobox = '{| class=\"infobox\"\n'
     local infobox = '{| class=\"infobox\"\n'
   
 
     -- name of the skill
     -- name of the skill/talent
    infobox = infobox .. '|- style=\"background-color: darkred; text-align: center;\"\n| colspan=\"2\" | \'\'\'<big>' .. skill .. '</big>\'\'\'\n'
  infobox = infobox .. '|- style=\"color: white; background-color: #1165AF; text-align: center;\"\n| colspan=\"2\" | \'\'\'<big>' .. skills .. '</big>\'\'\'\n'
     
    -- Prof,Spec,Skill box
      infobox = infobox .. '|- style=\"text-align: center;color: white; background-color: goldenrod;\"\n| colspan=\"2\"'
    infobox = infobox .. '|- style=\"text-align: center; background-color: #af8d33;\"\n| colspan=\"2\"'
     if skillTable.root == true then
     if skillTable ~= nil then
        infobox = infobox .. '| \'\'\'Profession\'\'\'[[Category:Profession]]\n'
        if skillTable.root == true then
    elseif skillTable.specialty == true then
            infobox = infobox .. '| \'\'\'Profession\'\'\'\n'
        infobox = infobox .. '| \'\'\'Specialty\'\'\'[[Category:Specialty]]\n'
        elseif skillTable.specialty == true then
    elseif skillTable.group == 'Talents' then
            infobox = infobox .. '| \'\'\'Specialty\'\'\'\n'
         infobox = infobox .. '| \'\'\'Talent\'\'\'[[Category:Talent]]\n'
         else
else
            infobox = infobox .. '| \'\'\'Skill\'\'\'\n'    
         infobox = infobox .. '|\n'
         end
     end
     end
 
-- Skill or Talent Image
local checkImage = {'_Icon.png','_Icon.jpg'}
local image = ''
if skillTable.skillID ~= nil then
skillId = skillTable.skillID
skillEN = string.sub (skillId, 1, -6)
skillsimagename = string.gsub(skillEN, ' ', '')
elseif skillTable.untranslated ~= nil then
talentEN = skillTable.untranslated
skillsimagename = string.gsub(talentEN, ' ', '')
end
for i,v in ipairs(checkImage) do
image = skillsimagename .. checkImage[i]
if mw.title.makeTitle('File', image).file.exists then
break
end
if table.getn(checkImage) == i then
image = 'NoImage.png'
if check == 'skill' then
image = image .. '|link=https://wiki.play.eco/index.php?title=Special:Upload&wpDestFile=' .. skillsimagename .. '_Icon.png|[[Category:Pages_with_missing_skill_Icon]]'
end
if check == 'talent' then
image = image .. '|link=https://wiki.play.eco/index.php?title=Special:Upload&wpDestFile=' .. skillsimagename .. '_Icon.png|[[Category:Pages_with_missing_talent_Icon]]'
end
end
end
        -- Skill Icon Image
if check == 'skill' then
    local image = 'NoImage.png|link=https://wiki.play.eco/index.php?title=Special:Upload&wpDestFile=' .. skillimagename .. '_Icon.png|[[Category:Pages_with_missing_skill_icon]]'
infobox = infobox .. '|-\n| colspan=\"2\" style=\"padding: 10px;\" | <div class="iconContainer"><div class="iconStack">[[File:' .. image .. '|frameless|class=iconOrange]]</div><div class=iconBorder style=\"position:absolute;\"></div></div> \n'
    if mw.title.makeTitle('File', skillimagename .. '_Icon.png').file.exists then
        image = skillimagename .. '_Icon.png'
    elseif mw.title.makeTitle('File', skillimagename .. '_Icon.jpg').file.exists then
        image = skillimagename .. '_Icon.jpg'
    end
   
infobox = infobox .. '|-\n| colspan=\"2\" style=\"padding: 10px;\" | [[File:' .. image .. '|center|frameless|95px]]\n'
elseif check == 'talent' then
infobox = infobox .. '|-\n| colspan=\"2\" style=\"padding: 10px;\" | <div class="iconContainer"><div class="iconStack">[[File:' .. image .. '|frameless|class=iconBrown]]</div><div class=iconBorder style=\"position:absolute;\"></div></div> \n'
else
infobox = infobox .. '|-\n| colspan=\"2\" style=\"padding: 10px;\" | <div class="iconContainer"><div class="iconStack">[[File:' .. image .. '|frameless|class=iconBlue]]</div><div class=iconBorder style=\"position:absolute;\"></div></div> \n'
end
   -- 'Description' section header
   -- 'Description' section header
     infobox = infobox .. '|- style=\"background-color: #4B9130; text-align: center;\"\n| colspan=\"2\" | \'\'\'Description\'\'\'\n'
     infobox = infobox .. '|- style=\"background-color: #4688C0; text-align: center;\"\n| colspan=\"2\" | \'\'\'Description\'\'\'\n'
if skillTable.description == nil then
if skillTable.description == nil then
Line 75: Line 132:
end
end


--SKILL
  -- 'Related Skills' section header
if check == 'skill' then
    infobox = infobox .. '|- style=\"background-color: #4B9130; text-align: center;\"\n| colspan=\"2\" | \'\'\'Related Skills\'\'\'\n'
  -- 'Skill Information' section header
infobox = infobox .. '|- style=\"background-color: #4688C0; text-align: center;\"\n| colspan=\"2\" | \'\'\'Skill Information\'\'\'\n'
-- Professsion  .rootSkill
if skillTable.rootSkill ~= nil then
-- Professsion  .rootSkill
        infobox = infobox .. '|-\n| Profession:\n| style=\"text-align: right;\" | ' .. skillTable.rootSkill .. '\n'
if skillTable.rootSkill ~= nil then
    end
infobox = infobox .. '|-\n| Profession:\n| style=\"text-align: right; padding: 3px;\" | ' .. skillTable.rootSkill .. '\n'
end
-- Specialty    .specialitySkill
if skillTable.specialitySkill ~= nil then
-- Specialty    .specialitySkill
        infobox = infobox .. '|-\n| Specialty:\n| style=\"text-align: right;\" | ' .. skillTable.specialitySkill .. '\n'
if skillTable.specialitySkill ~= nil then
    end
infobox = infobox .. '|-\n| Specialty:\n| style=\"text-align: right; padding: 3px;\" | ' .. skillTable.specialitySkill .. '\n'
end
-- Skills Required .prerequisites
    if skillTable.prerequisites ~= nil then
-- Skills Required .prerequisites
        infobox = infobox .. '|-\n| Skills Required:\n| style=\"text-align: right;\" |[[ ' .. skillTable.prerequisites .. ']]\n'
if skillTable.prerequisites ~= nil then
    end
infobox = infobox .. '|-\n| Skills Required:\n| style=\"text-align: right; padding: 3px;\" |[[ ' .. skillTable.prerequisites .. ']]\n'
end
-- Leads to  childSkills
    if skillTable.childSkills ~= nil then
-- Leads to  childSkills
        infobox = infobox .. '|-\n| Leads to:\n| style=\"text-align: right;\" | ' .. skillTable.childSkills .. '\n'
        if skillTable.childSkills ~= nil then
    end   
            for i,v in pairs(skillTable.childSkills) do
 
infobox = infobox .. '|-\n| Leads to:\n| style=\"text-align: right; padding: 3px;\" | ' .. skillTable.childSkills[i] .. '</br>\n'
            end
  -- 'Skill Information' section header
        end
    infobox = infobox .. '|- style=\"background-color: #4B9130; text-align: center;\"\n| colspan=\"2\" | \'\'\'Skill Information\'\'\'\n'
-- maxlevel .maxLevel
if skillTable.maxLevel ~= nil then
-- maxlevel .maxLevel
infobox = infobox .. '|-\n| Max Level:\n| style=\"text-align: right; padding: 3px;\" | Level ' .. skillTable.maxLevel .. '\n'
    if skillTable.maxLevel ~= nil then
end
        infobox = infobox .. '|-\n| Max Level:\n| style=\"text-align: right;\" | Level ' .. skillTable.maxLevel .. '\n'
    end
-- items given .itemsGiven
if skillTable.itemsGiven ~= nil then
infobox = infobox .. '|-\n| Items Given:\n| style=\"text-align: right; padding: 3px;\" | ' .. skillTable.itemsGiven .. '\n'
end
-- Related Talents
if skillTable.talents ~= nil then
local listTalents3 = ''
local listTalents6 = ''
local talent3 = skillTable.talents.level3
local talent6 = skillTable.talents.level6
-- for each item in the listTalents3 (b is position, c is value)
            if talent3 ~= nil then
for b,c in ipairs(talent3) do
--if not these tags listed here
if c ~='[[]]'  then
-- add the tag to the list
listTalents3 = listTalents3 .. c
end
-- if not the last item in the list
if (c ~= talent3[#talent3]) then
-- add a comma
listTalents3 = listTalents3 .. ', </br>'
end
end
            end
-- for each item in the listTalents6 (e is position, d is value)           
            if talent6 ~= nil then
for e,d in ipairs(talent6) do
--if not these tags listed here
if d ~='[[]]' then
-- add the tag to the list
listTalents6 = listTalents6 .. d
end
-- if not the last item in the list
if (d ~= talent6[#talent6]) then
-- add a comma
listTalents6 = listTalents6 .. ', </br>'
end
end
            end
-- 'Talent Information' section header
infobox = infobox .. '|- style=\"background-color: #4688C0; text-align: center;\"\n| colspan=\"2\" | \'\'\'Talent Information\'\'\'\n'
infobox = infobox .. '|- style=\"border-bottom: solid #7BC2CE;\"\n| Level 3 Talents:\n| style=\"text-align: right; padding: 3px;\" | ' .. listTalents3 .. ' \n'
infobox = infobox .. '|-\n| Level 6 Talents:\n| style=\"text-align: right; padding: 3px;\" | ' .. listTalents6 .. ' \n'
end
-- 'IDs' section header
infobox = infobox .. '|- style=\"background-color: #4688C0; text-align: center;\"\n| colspan=\"2\" | \'\'\'IDs\'\'\'\n'
-- skill id (type)
infobox = infobox .. '|- valign=\"center\"\n| Item ID:\n| style=\"text-align: right; padding: 3px;\" | ' .. skillTable.skillID .. '\n'
end
--TALENT
if check == 'talent' then
-- 'Talent Information' section header
infobox = infobox .. '|- style=\"background-color: #4688C0; text-align: center;\"\n| colspan=\"2\" | \'\'\'Talent Information\'\'\'\n'
-- Talent Type
if skillTable.talentType ~= nil then
infobox = infobox .. '|-\n| Talent Type:\n| style=\"text-align: right; padding: 3px;\" |[[' .. skillTable.talentType .. ']]\n'
end
-- items given .itemsGiven
-- Skill Needed
    if skillTable.itemsGiven ~= nil then
if skillTable.owningSkill ~= nil then
        infobox = infobox .. '|-\n| Items Given:\n| style=\"text-align: right;\" | ' .. skillTable.itemsGiven .. '\n'
infobox = infobox .. '|-\n| Skill Needed:\n| style=\"text-align: right; padding: 3px;\" |[[' .. skillTable.owningSkill .. ']]\n'
    end
end
    -- 'IDs' section header
    infobox = infobox .. '|- style=\"background-color: #4B9130; text-align: center;\"\n| colspan=\"2\" | \'\'\'IDs\'\'\'\n'
   
    -- skill id (type)
    infobox = infobox .. '|- valign=\"center\"\n| Item ID:\n| style=\"text-align: right;\" | ' .. skillTable.skillID .. '\n'
   
    -- id number (type id)
    infobox = infobox .. '|- valign=\"center\"\n| ID Number:\n| style=\"text-align: right;\" | ' .. skillTable.skillIDNum .. '\n'
-- Talents Active at Level
if skillTable.activeLevel ~= nil then
infobox = infobox .. '|-\n| Active at Level:\n| style=\"text-align: right; padding: 3px;\" | ' .. skillTable.activeLevel .. '\n'
end
end
     infobox = infobox .. '|}'
     infobox = infobox .. '|}'
     return infobox
     return infobox
end
-- Main entry point for the Module
function p.SkillMain()
    -- get args from the Template
    local args = norm()
   
    -- get skill data
    local skillData = require( "Module:Skills" )
   
    return skillBox( args, skillData)
   
end
end


return p
return p

Latest revision as of 00:12, 31 December 2023

Documentation[edit source]

This module provides the back end functionality of the Template:Infobox_Skill.

If the template is passed an Infobox will be made using details from the following Modules:

Credit[edit source]

Original Infobox (now known as Infobox_Item) created by Pradoxzon was then edited by Nesphit and TreeNuts0. Fyre (FishAus) and Scotty (ZeelNightwolf) further edited the Infobox_Item. They then duplicated and used as a base for Infobox_Skill, Infobox_Plant, and Infobox_Animal.


-- Credit: Original Infobox (now known as Infobox_Item) created by Pradoxzon was then edited by Nesphit and TreeNuts0. Fyre (FishAus) and Scotty (ZeelNightwolf) further edited the Infobox_Item. They then duplicated and used as a base for Infobox_Skill, Infobox_Plant, and Infobox_Animal.

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

-- Main entry point for the Module
function p.SkillMain()
     -- get args from the Template
    local args = norm()
    
	-- create values outside of if statements to ensure they are available to whole function
	local skills = ''
	local check = ''
	
    -- assign variables for skill or talent whatever is passed. Skill has priority so if both are passed only skill will continue.
    if args.skill ~= nil then
        skills = args.skill
        check = 'skill'
    elseif args.talent ~= nil then
        skills = args.talent
        check = 'talent'
    end
   
	-- check to see if skills was actually passed in
	if skills == '' then
		return 'skill or talent must be specified.'
    end
   
	local skillData = {}
	local skillTable = {}
   
    -- checks if skill  and assigns correct modules based on check
    if check == 'skill' then
        skillData = require( "Module:Skills" )
        skillTable = skillData.skills[skills]
    else
        skillData = require( "Module:TalentData" )
        skillTable = skillData.talents[skills]
    end

    -- checks if skills can be found in plant data or tree data based on what was requested
    if skillTable == {} then
        if check == 'skill' then
            return skills .. ' could not be found in Module:Skills.'
        else
            return skills .. ' could not be found in Module:TalentData.'
        end
    end

    -- From now on using skillsTable."KeyValue" will return the value from that key. for most things a check for skills type is not necessary

-- Build an Infobox_Plant
	-- string used to build the infobox
    local infobox = '{| class=\"infobox\"\n'
   
    -- name of the skill/talent
   infobox = infobox .. '|- style=\"color: white; background-color: #1165AF; text-align: center;\"\n| colspan=\"2\" | \'\'\'<big>' .. skills .. '</big>\'\'\'\n'
 
       infobox = infobox .. '|- style=\"text-align: center;color: white; background-color: goldenrod;\"\n| colspan=\"2\"'
    if skillTable.root == true then
        infobox = infobox .. '| \'\'\'Profession\'\'\'[[Category:Profession]]\n'
    elseif skillTable.specialty == true then
        infobox = infobox .. '| \'\'\'Specialty\'\'\'[[Category:Specialty]]\n'
    elseif skillTable.group == 'Talents' then
        infobox = infobox .. '| \'\'\'Talent\'\'\'[[Category:Talent]]\n'  
	else
        infobox = infobox .. '|\n'	
    end
   
	-- Skill or Talent Image
	local checkImage = {'_Icon.png','_Icon.jpg'}
	local image = '' 

	if skillTable.skillID ~= nil then
		skillId = skillTable.skillID
		skillEN = string.sub (skillId, 1, -6)
		skillsimagename = string.gsub(skillEN, ' ', '')
	elseif skillTable.untranslated ~= nil then
		talentEN = skillTable.untranslated
		skillsimagename = string.gsub(talentEN, ' ', '')
	end
	
	for i,v in ipairs(checkImage) do 
		image = skillsimagename .. checkImage[i]
		if mw.title.makeTitle('File', image).file.exists then
			break
		end
		if table.getn(checkImage) == i then
			image = 'NoImage.png' 
			if check == 'skill' then 
				image = image .. '|link=https://wiki.play.eco/index.php?title=Special:Upload&wpDestFile=' .. skillsimagename .. '_Icon.png|[[Category:Pages_with_missing_skill_Icon]]'
			end
			if check == 'talent' then 
				image = image .. '|link=https://wiki.play.eco/index.php?title=Special:Upload&wpDestFile=' .. skillsimagename .. '_Icon.png|[[Category:Pages_with_missing_talent_Icon]]'
			end				
		end
	end
	
	if check == 'skill' then
		infobox = infobox .. '|-\n| colspan=\"2\" style=\"padding: 10px;\" | <div class="iconContainer"><div class="iconStack">[[File:' .. image .. '|frameless|class=iconOrange]]</div><div class=iconBorder style=\"position:absolute;\"></div></div> \n'
	
	elseif check == 'talent' then
		infobox = infobox .. '|-\n| colspan=\"2\" style=\"padding: 10px;\" | <div class="iconContainer"><div class="iconStack">[[File:' .. image .. '|frameless|class=iconBrown]]</div><div class=iconBorder style=\"position:absolute;\"></div></div> \n'
	else
		infobox = infobox .. '|-\n| colspan=\"2\" style=\"padding: 10px;\" | <div class="iconContainer"><div class="iconStack">[[File:' .. image .. '|frameless|class=iconBlue]]</div><div class=iconBorder style=\"position:absolute;\"></div></div> \n'
	end
 
  -- 'Description' section header
    infobox = infobox .. '|- style=\"background-color: #4688C0; text-align: center;\"\n| colspan=\"2\" | \'\'\'Description\'\'\'\n'	
	
	if skillTable.description == nil then
		infobox = infobox .. '|- style=\"text-align: center;\"\n| colspan=\"2\" | \'\'\'None\'\'\'\n'
	elseif skillTable.description == '' then
		infobox = infobox .. '|- style=\"text-align: center;\"\n| colspan=\"2\" | \'\'\'None\'\'\'\n'
	else
		infobox = infobox .. '|- style=\"text-align: center;\"\n| colspan=\"2\" | ' .. skillTable.description .. '\n'
	end

	--SKILL
	if check == 'skill' then	
	  -- 'Skill Information' section header
		infobox = infobox .. '|- style=\"background-color: #4688C0; text-align: center;\"\n| colspan=\"2\" | \'\'\'Skill Information\'\'\'\n'
		
		-- Professsion  .rootSkill
		if skillTable.rootSkill ~= nil then
			infobox = infobox .. '|-\n| Profession:\n| style=\"text-align: right; padding: 3px;\" | ' .. skillTable.rootSkill .. '\n'
		end
		
		-- Specialty     .specialitySkill
		if skillTable.specialitySkill ~= nil then
			infobox = infobox .. '|-\n| Specialty:\n| style=\"text-align: right; padding: 3px;\" | ' .. skillTable.specialitySkill .. '\n'
		end
		
		-- Skills Required .prerequisites
		if skillTable.prerequisites ~= nil then
			infobox = infobox .. '|-\n| Skills Required:\n| style=\"text-align: right; padding: 3px;\" |[[ ' .. skillTable.prerequisites .. ']]\n'
		end
		
		-- Leads to  childSkills
        if skillTable.childSkills ~= nil then
            for i,v in pairs(skillTable.childSkills) do
				infobox = infobox .. '|-\n| Leads to:\n| style=\"text-align: right; padding: 3px;\" | ' .. skillTable.childSkills[i] .. '</br>\n'
            end
        end		
		-- maxlevel .maxLevel
		if skillTable.maxLevel ~= nil then
			infobox = infobox .. '|-\n| Max Level:\n| style=\"text-align: right; padding: 3px;\" | Level ' .. skillTable.maxLevel .. '\n'
		end	
			
		-- items given .itemsGiven	
		if skillTable.itemsGiven ~= nil then
			infobox = infobox .. '|-\n| Items Given:\n| style=\"text-align: right; padding: 3px;\" | ' .. skillTable.itemsGiven .. '\n'
		end	
		
		-- Related Talents
		if skillTable.talents ~= nil then
			local listTalents3 = ''
			local listTalents6 = ''
			local talent3 = skillTable.talents.level3
			local talent6 = skillTable.talents.level6
			
			-- for each item in the listTalents3 (b is position, c is value)
            if talent3 ~= nil then
			for b,c in ipairs(talent3) do
				--if not these tags listed here
				if c ~='[[]]'  then
					-- add the tag to the list
					listTalents3 = listTalents3 .. c
				end
				-- if not the last item in the list
				if (c ~= talent3[#talent3]) then
					-- add a comma
					listTalents3 = listTalents3 .. ', </br>'
				end
			end
            end
			-- for each item in the listTalents6 (e is position, d is value)            
            if talent6 ~= nil then
			for e,d in ipairs(talent6) do
				--if not these tags listed here
				if d ~='[[]]'  then
					-- add the tag to the list
					listTalents6 = listTalents6 .. d
				end
				-- if not the last item in the list
				if (d ~= talent6[#talent6]) then
					-- add a comma
					listTalents6 = listTalents6 .. ', </br>'
				end
			end
            end
			-- 'Talent Information' section header
			infobox = infobox .. '|- style=\"background-color: #4688C0; text-align: center;\"\n| colspan=\"2\" | \'\'\'Talent Information\'\'\'\n'			
			infobox = infobox .. '|- style=\"border-bottom: solid #7BC2CE;\"\n| Level 3 Talents:\n| style=\"text-align: right; padding: 3px;\" | ' .. listTalents3 .. ' \n'
			infobox = infobox .. '|-\n| Level 6 Talents:\n| style=\"text-align: right; padding: 3px;\" | ' .. listTalents6 .. ' \n'
		end		
			
		-- 'IDs' section header
		infobox = infobox .. '|- style=\"background-color: #4688C0; text-align: center;\"\n| colspan=\"2\" | \'\'\'IDs\'\'\'\n'
		
		-- skill id (type)
		infobox = infobox .. '|- valign=\"center\"\n| Item ID:\n| style=\"text-align: right; padding: 3px;\" | ' .. skillTable.skillID .. '\n'
	end	
		
	--TALENT
	if check == 'talent' then 
		-- 'Talent Information' section header
		infobox = infobox .. '|- style=\"background-color: #4688C0; text-align: center;\"\n| colspan=\"2\" | \'\'\'Talent Information\'\'\'\n'
		
		-- Talent Type
		if skillTable.talentType ~= nil then
			infobox = infobox .. '|-\n| Talent Type:\n| style=\"text-align: right; padding: 3px;\" |[[' .. skillTable.talentType .. ']]\n'
		end		
		
		-- Skill Needed
		if skillTable.owningSkill ~= nil then
			infobox = infobox .. '|-\n| Skill Needed:\n| style=\"text-align: right; padding: 3px;\" |[[' .. skillTable.owningSkill .. ']]\n'
		end	
		
		-- Talents Active at Level
		if skillTable.activeLevel ~= nil then
			infobox = infobox .. '|-\n| Active at Level:\n| style=\"text-align: right; padding: 3px;\" | ' .. skillTable.activeLevel .. '\n'
		end		
	end
    infobox = infobox .. '|}'
    return infobox
end

return p