The Alchemist Code Wiki
READ MORE
The Alchemist Code Wiki
Explore
Main Page
All Pages
Interactive Maps
Units
Team Building Tools
Global Tier List
ACDB Unit Builder
Raid Buffer/Debuffer List
Team Building
About Units
About Units
List of Units
Jobs
About Jobs
List of Jobs
Job Upgrades
Job+ List
Equipment
Unit Shards
Elemental Shards
Enlightenment
Truth Seals
Obtainables
Mementos
About Mementos
List of Mementos
Memento Quick Reference
Mementos Rated By Usefulness
Memento Leader Skills
Gear
About Gear
Free (Permanent)
Free (Event)
Summon
VCR (Memento)
PvP
Enlightened Gear Skills
Consumables
Gameplay & Guides
Gameplay
About the Game
Lore
Mechanics
New Player Help
Help Center
Beginner's Guide
Reroll Guide
Glossary of Terms
Recommended Free Units
Shard Farm Priority
Banners
Lore
Main Story
Ancient Story
Genesis Story
Sacred Stone Memories
Babel Chronicles
Character Stories
Event Stories
NPCs
News and Events
List of Events by Date
References
Update History
Shops
Milestones
Friends
Mercenaries
Alchemia Port
Experience Charts
Other Resources
Guides and Rankings
Discord
Alchemist Code Database
Quests
Story
Character Quests
Events
Multiplay
Raids
Battle
Babel Expedition
FANDOM
Fan Central
BETA
Games
Anime
Movies
TV
Video
Wikis
Explore Wikis
Community Central
Start a Wiki
Don't have an account?
Register
Sign In
FANDOM
Explore
Current Wiki
Start a Wiki
Don't have an account?
Register
Sign In
Sign In
Register
The Alchemist Code Wiki
21,532
pages
Explore
Main Page
All Pages
Interactive Maps
Units
Team Building Tools
Global Tier List
ACDB Unit Builder
Raid Buffer/Debuffer List
Team Building
About Units
About Units
List of Units
Jobs
About Jobs
List of Jobs
Job Upgrades
Job+ List
Equipment
Unit Shards
Elemental Shards
Enlightenment
Truth Seals
Obtainables
Mementos
About Mementos
List of Mementos
Memento Quick Reference
Mementos Rated By Usefulness
Memento Leader Skills
Gear
About Gear
Free (Permanent)
Free (Event)
Summon
VCR (Memento)
PvP
Enlightened Gear Skills
Consumables
Gameplay & Guides
Gameplay
About the Game
Lore
Mechanics
New Player Help
Help Center
Beginner's Guide
Reroll Guide
Glossary of Terms
Recommended Free Units
Shard Farm Priority
Banners
Lore
Main Story
Ancient Story
Genesis Story
Sacred Stone Memories
Babel Chronicles
Character Stories
Event Stories
NPCs
News and Events
List of Events by Date
References
Update History
Shops
Milestones
Friends
Mercenaries
Alchemia Port
Experience Charts
Other Resources
Guides and Rankings
Discord
Alchemist Code Database
Quests
Story
Character Quests
Events
Multiplay
Raids
Battle
Babel Expedition
Editing
Module:Page/Job
Back to page
Edit source
View history
Talk (0)
Edit Page
Module:Page/Job
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
local render_job_icon = require('Module:Render/Job')._icon local model = require('Module:Data').model local cargo = require('Module:CargoUtil') local skillFormula = require('Module:Data/SkillFormula') local p = {} local pageNameByType = function(iname, pageType) if iname == nil then return nil end return 'Data:Game/MasterParam/'..pageType..'/' .. string.gsub(iname, '_', ' ') end function p.jobSource(iname) local job_data = cargo.query{tables='EventObtainableJob', fields='_pageName', where = 'job_iname="'..iname..'"'} return (job_data[1] and job_data[1]['_pageName']) or nil end function p.jobInfoBox(job) local jobSource = p.jobSource(job.iname) if jobSource and jobSource ~= nil and jobSource ~= '' then jobSource = "|-\n"..'| colspan="4" style="text-align:center;" | '.."'''Source:''' [["..jobSource.."]]\n" else jobSource = '' end local output = { '{| class="wikitable jobInfoBox" style="float:right; margin-left: 15px;margin-bottom:0;"', '| style="padding:0;width:128px;white-space: nowrap" | '..render_job_icon({job.iname, data=job, size='large', name='none'}), '! style="padding:12px;font-size:140%;" | '..job.name..'<span style="font-size:65%"><br/>Job</span>', '|-', '| colspan="2" style="padding:0" |', '{| class="wikitable jobInfoBoxInner" style="margin: 0; width: 100%"'..jobSource, '|-', '| Move', '| '..(job.jmov or ' 0'), '| Jump', '| '..(job.jjmp or ' 0'), '|-', '| Avoid', '| '..(job.avoid or ' 0'), '| Initial Jewels', '| '..(100 + (job.inimp or 0))..'%', '|-', '| HP', '| '..(job.hp or ' 0'), '| Jewels', '| '..(job.mp or ' 0'), '|-', '| PATK', '| '..(job.atk or ' 0'), '| PDEF', '| '..(job.def or ' 0'), '|-', '| MATK', '| '..(job.mag or ' 0'), '| MDEF', '| '..(job.mnd or ' 0'), '|-', '| DEX', '| '..(job.dex or ' 0'), '| AGI', '| '..(job.spd or ' 0'), '|-', '| CRIT', '| '..(job.cri or ' 0'), '| LUCK', '| '..(job.luk or ' 0'), '|}', '|}', } return table.concat(output, "\n") end function p.jobAbilityOutput(job) local abilityOutput = { '{| class="wikitable" width="100%"', } if job.fixabl and job.fixabl ~= '' then local ability = cargo.query{ tables = 'Ability, AbilityLoc', join = 'Ability.iname = AbilityLoc.iname', fields = 'name, expr', where = { 'Ability.iname = "'..job.fixabl..'"', 'server = "gl"', 'lang="english"' } }[1] if ability then -- Main ability row table.insert(abilityOutput, '|-') table.insert(abilityOutput, '! style="font-size: 120%" align="center"|'..(ability.name or '')) table.insert(abilityOutput, '|-') table.insert(abilityOutput, '|\'\''..(ability.expr or '')..'\'\'') table.insert(abilityOutput, '|-') table.insert(abilityOutput, '| style="font-weight:bold" | Skill Description') table.insert(abilityOutput, require("Module:AbilitySkill2")._AbilitySkillList(job.fixabl)) end end -- local jobEquipList = mw.loadData("Module:Data/MasterParam/JobEquip") -- Other rows (sub ability, reaction and support) local rows = cargo.query{ tables = 'JobRank', fields = 'idx, eqid1, eqid2, eqid3, eqid4, eqid5, eqid6, learn1, learn2', where = 'job_iname = "'..job.iname..'" and server = "gl"', } -- if jobEquipList[job.iname] then for level, equipData in ipairs(rows) do -- for level,equipData in pairs(jobEquipList[job.iname]) do if equipData.learn1 and equipData.learn1 ~= '' then local abilityPageName = pageNameByType(equipData.learn1, 'Ability') local abilityName = model.getLoc(abilityPageName, 'name') local abilityDesc = model.getLoc(abilityPageName, 'expr') -- querying the type of ability to display the corresponding image -- local abilitTypeDetail = model.query("Ability", {'_pageName', 'type_detail'}, {where = 'iname="'..abilityPageName..'" and server = "gl"'})[1] or {} local abilityType = '' if abilityTypeDetail == 2 then abilityType = 'Action' elseif abilityTypeDetail == 3 then abilityType = 'Support' elseif abilityTypeDetail == 4 then abilityType = 'Reaction' end table.insert(abilityOutput, '|-') table.insert(abilityOutput, '! style="font-size:120%" align=center"|'..abilityName) table.insert(abilityOutput, '|-') -- Add the level in parentheses if level>2 if level > 2 then table.insert(abilityOutput, '|\'\''..abilityDesc..'\'\' (Learned at Rank '..(level-1)..')') else table.insert(abilityOutput, '|\'\''..abilityDesc..'\'\'') end table.insert(abilityOutput, require("Module:AbilitySkill2")._AbilitySkillList(equipData.learn1)) end -- end end table.insert(abilityOutput, '|}') return table.concat(abilityOutput, "\n") end function p.aiPriorityOutput(ai) if ai == nil then return '' end local enums = require('Module:Data/Enums') local renderSkillPriority = function(root, skillKeys) if skillKeys == nil or #skillKeys < 1 then return end root:tag('h3'):wikitext('Skill Priority') local ol = root:tag('ol') for index, key in ipairs(skillKeys) do ol:tag('li'):wikitext((enums.SkillCategory[key] or key)) end root:wikitext("\n\n") end local renderBuffPriority = function(root, buffKeys, selfOnly) if buffKeys == nil or #buffKeys < 1 then return end root:tag('h3'):wikitext('Buff Priority') if selfOnly and selfOnly == 1 then root:tag('b'):wikitext("Self Buffs only") root:wikitext("\n\n") end local ol = root:tag('ol') for index, key in ipairs(buffKeys) do ol:tag('li'):wikitext((enums.statNameFromType(key) or key)) end root:wikitext("\n\n") end local renderConditionPriority = function(root, condKeys) if condKeys == nil or #condKeys < 1 then return end root:tag('h3'):wikitext('Condition Priority') local ol = root:tag('ol') for index, key in ipairs(condKeys) do ol:tag('li'):wikitext(enums.enchantTypeNameFromKey(key)) end root:wikitext("\n\n") end local root = mw.html.create() root:tag('h2'):wikitext('AI Priority') renderSkillPriority(root, ai.skil_prio) renderBuffPriority(root, ai.skil_prio, ai.buff_self) renderConditionPriority(root, ai.cond_prio) return tostring(root) end local renderPage = function(iname, frame) local job = model.query("Job", "_pageName, iname, ac2d, mdl, type, wepmdl, master, origin, role, ai, artifact, fixabl, atk, atkskl, avoid, cri, def, dex, hp, inimp, jjmp, jmov, luk, mag, mnd, mp, spd", {where = 'iname="'..iname..'"'}) job = job[1] local getLoc = function(param) return model.getLoc(job._pageName, param) end local output = {} job.name = getLoc('name') -- If the job inherits from another job, output that information if job.origin and job.origin ~= '' and job.origin ~= job.iname then table.insert(output, job.name..' is a variation of the '..render_job_icon({job.origin, size='small'})..' job.') end -- Output job info box table.insert(output, p.jobInfoBox(job)) -- Output job mastery bonus if job.master and job.master ~= '' then table.insert(output, '== Job Mastery Bonus ==') table.insert(output, require("Module:JobMaster")._jobMasterBonusTable(iname)) end -- Output attack skill if job.atkskl and job.atkskl ~= '' then local attackSkillPage = pageNameByType(job.atkskl, 'Skill') local attackSkillName = model.getLoc(attackSkillPage, 'name') local attackSkillDesc = model.getLoc(attackSkillPage, 'expr') local atkSkill = cargo.query{tables='Skill', fields='dmg_atk, dmg_formula, iname', where = 'iname="'..job.atkskl..'"'} atkSkill = atkSkill[1] dmgFormula = skillFormula.completeFormula(atkSkill.dmg_atk, atkSkill.dmg_formula) table.insert(output, '== Attack ==') table.insert(output, ';'..attackSkillName) table.insert(output, ':'..attackSkillDesc) table.insert(output, ':'..dmgFormula) end -- Job/Page/Abilities table.insert(output, '== Abilities ==') table.insert(output, p.jobAbilityOutput(job)) -- Job/Page/JobUnits table.insert(output, '== Units With This Job ==') table.insert(output, require("Module:JobUnits")._jobUnitList(iname)) -- Job/Page/RelatedJobs table.insert(output, '== Related Jobs ==') table.insert(output, require("Module:JobRelationship")._relatedJobList(iname)) -- Job/Page/Equip table.insert(output, '== Equipment ==') table.insert(output, require("Module:JobEquipmentList")._jobEquipmentList(iname)) -- AI if job.ai and job.ai ~= '' then local ai = model.query("AI", "iname, buff_prio, cond_prio, skil_prio, buff_self", {where = 'iname="'..job.ai..'"'}) or {} if ai and ai[1] then table.insert(output, p.aiPriorityOutput(ai[1])) end end -- Category table.insert(output, '[[Category:Jobs]]') return table.concat(output, "\n") end local renderFuncs = {} renderFuncs.Icon = render_job_icon local renderTransclude = function(iname, args) local type = mw.text.trim(args[1]) args[1] = iname return (renderFuncs[type] or renderFuncs.Name)(args) end p.renderPage = renderPage function p._main(iname, args) if args.isPage then return renderPage(iname) else return renderTransclude(iname, args) end end function p.main(frame) local args = require("Module:Arguments").getArgs(frame) return p._main(args[1], args) end return p
Summary:
Please note that all contributions to the The Alchemist Code Wiki are considered to be released under the CC BY-NC-SA
Cancel
Editing help
(opens in new window)
Template used on this page:
Module:Page/Job/doc
(
edit
)
Follow on IG
TikTok
Join Fan Lab