Module:Appearance

local p = {};

p.appearance = function(frame) CxEE = frame.args[1] appearance = frame.args[2] notes = frame.args[3] CxEE_length = string.len(CxEE) passalong = mw.ext.VariablesLua.vardefineecho('variablename', '') -- This will pass things down as if 	work = CxEE show = '' arc = '' categories = '' comma = ', ' if CxEE_length <= 7 then C = string.sub(CxEE, 1, string.find(CxEE, 'x') - 1) EE = string.sub(CxEE, string.find(CxEE, 'x') + 1) epSwitcher = require('Module:Ep') work = epSwitcher.ep(frame, reference) end if C == '1' then show = 'Campaign 1' if EE >= '01' and EE <= '23' then arc = 'the Kraghammer and Vasselheim arc' elseif EE >= '24' and EE <= '38' then arc = 'the Briarwoods arc' elseif EE >= '39' and EE <= '83' then arc = 'the Chroma Conclave arc' elseif EE >= '84' and EE <= '99' then arc = 'the Adventures of Taryon Darrington arc' elseif EE >= '100' and EE <= '115' then arc = 'the Vecna arc' end end if C == '2' then show = 'Campaign 2' if EE >= '01' and EE <= '25' then arc = 'the Come Together arc' elseif EE >= '26' and EE <= '47' then arc = 'the Bad Guys arc' elseif EE >= '48' and EE <= '69' then arc = 'the Bright Queen\'s Favor arc' elseif EE >= '70' and EE <= '91' then arc = 'the Swords and Angels arc' elseif EE >= '92' and EE <= '112' then arc = 'the Family Ties arc' elseif EE >= '113' and EE <= '141' then arc = 'the Weird Magic arc' end end

if C == '3' then show = 'Campaign 3' arc = '' end if C == 'E' or C == 'E1' or C == 'E2' then show = 'Exandria Unlimited and Exandria Unlimited: Kymal' end if C == 'E3' then show, arc = 'Exandria Unlimited: Calamity', '' end if C == 'LVM1' then show, arc = 'The Legend of Vox Machina', '' end if appearance == 'appear' or appearance == 'appeared' or appearance == 'vision' or appearance == 'scry' or appearance == 'scrying' or appearance == 'sending' or appearance == 'speak with dead' or appearance == '' then if arc == '' then categories = 'Category:Characters in ' .. show else categories = 'Category:Characters in ' .. show .. 'Category:Characters in ' .. arc end end if appearance == 'mention' or appearance == 'mentioned' or appearance == 'indirect' or appearance == 'corpse' or appearance == 'dead' then categories = 'Category:Characters mentioned in ' .. show end return work .. appearance .. comma .. notes .. categories .. passalong end

return p