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,533
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/Gear
Back to page
Edit source
View history
Talk (0)
Edit Page
Module:Page/Gear
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_item_icon = require('Module:Render/Item')._icon local render_gear_icon = require('Module:Render/Gear')._icon local render_job_icon = require('Module:Render/Job')._icon local model = require('Module:Data').model local skillLink = require("Module:LinkUtils").acdbLink local p = {} -- Weapon Enlightenment Output function p.inspirationList(insp_skill) if (insp_skill == nil or insp_skill == '') then return end local inspList = mw.loadData("Module:Data/MasterParam/InspirationSkill") local function abilPageName(iname) return 'Data:Game/MasterParam/Ability/' .. string.gsub(iname, '_', ' ') end local function abilityName(iname) return model.getLoc(abilPageName(iname), 'name') end local function abilityExpr(iname) return model.getLoc(abilPageName(iname), 'expr') end local function inspSkillData(iname) return inspList[iname] or nil end local printInspSkill printInspSkill = function(root, iname, level) local skillData = inspSkillData(iname) if skillData == nil then return end if (skillData.ability and skillData.ability ~= '') then local abilityData = model.query("Ability", "_pageName,skl1", {where = 'iname="'..skillData.ability..'" and server = "gl"'})[1] or {} local name = abilityName(skillData.ability) or skillData.ability local expr = abilityExpr(skillData.ability) or '???' local linkName = name if abilityData.skl1 then linkName = '['..skillLink(abilityData.skl1)..' '..name..']' end -- table.insert(root, (string.rep('*', level) .. " '''" .. name .. ":''' " .. expr)) root = root:tag('li') :tag('b'):wikitext(linkName..':'):done() :wikitext(' ' .. expr ) end if skillData.derivation then local ul for _, subData in ipairs(skillData.derivation) do ul = ul or root:tag('ul') printInspSkill(ul, subData['iname'], level + 1) end end end local output = mw.html.create() printInspSkill(output, insp_skill, 0) if mw.text.trim(tostring(output)) == '' then return end local root = mw.html.create() root:newline():tag('div'):addClass('clear') root:newline():tag('h2'):wikitext('Weapon Enlightenment Skills') root:newline():node(output) return root end local renderPage = function(iname) local rows = model.query('Artifact','_pageName,server,rini,rmax,icon,maxnum,type,kakera,jobs,tag,equip1,equip2,equip3,equip4,equip5,pvp_equip1,pvp_equip2,pvp_equip3,pvp_equip4,pvp_equip5,abils,abrares,attack1,attack2,attack3,attack4,attack5,insp_skill',{where='iname="'..iname..'"'}) if #rows == 0 then return ('`'..iname..'` not found in Artifact table. Check [https://www.alchemistcodedb.com/gear/'..string.lower(string.gsub(iname, '_', '-'))..' AlchemistCodeDB]') end local data = rows[1] local getLoc = function(param) return model.getLoc(data._pageName, param) end local name = getLoc('name') -- local infoboxIcon = render_gear_icon({iname, data=data, size='large', name='none', link='none'}) local root = mw.html.create() -- Info Box local infobox = root:tag('div'):addClass('infobox gear') :cssText('float: right; margin-left: 15px; width: 300px; border: 1px solid #aaa; background: #eee; font-size: 12px;') local heading = infobox:tag('div'):addClass('heading') :cssText('background: goldenrod; font-weight: 700; font-size: 140%; line-height: 1.25em; display: flex; flex-direction: row; justify-items: flex-start; text-align: center; min-height: 64px;') if data.icon then local infoboxIcon = heading:tag('div'):addClass('infobox-icon') :cssText('flex: 0 0 64px; padding: 0.25rem;') infoboxIcon:tag('div'):addClass('item-icon') :tag('div'):addClass('img x-'..data.rini..' y-2') :cssText('width:57px; height: 57px; padding:3.5px') :wikitext('[[File:Game,ArtiIcon,'..data.icon..'.png|57px]]') end heading:tag('div'):addClass('name') :cssText('flex: 1 1 100%; display: flex; text-align: center; align-items: center; justify-content: center; margin: 0; padding: 0.25rem;') :wikitext(name) local wrapper = infobox:tag('div'):addClass('wrapper') :cssText('flex: 1 1 100%; overflow: hidden;') local dl = wrapper:tag('dl') :cssText('display: grid; grid-template-columns: 100px 1fr;') local function printRow(t, label, content) if content == nil then return end t:tag('dt') :cssText('grid-column-start: 1; padding: 2px 8px 2px 3px; text-align: right; border-right: 2px solid #aaa; margin: 0 -2px 0 0;') :wikitext(label) t:tag('dd') :cssText('grid-column-start: 2; margin: 0; padding: 2px 7px; border-left: 2px solid #aaa;') :wikitext(content) end local rank if tonumber(data.rini) then rank = (data.rini + 1)..'β ' end if tonumber(data.rmax) > tonumber(data.rini) then rank = rank .. ' – '..(data.rmax + 1)..'β ' end printRow(dl, 'Rank', rank) -- Job list if data.jobs then local jobList = {} for i, jkey in ipairs(data.jobs) do local jobData = model.query('Job','iname',{where='iname="'..jkey..'"'}) if jobData[1] then table.insert(jobList, render_job_icon({jkey, size='small', name='none'})) end end if #jobList > 0 then printRow(dl, 'Jobs', table.concat(jobList, ' ')) end end printRow(dl, 'Requirement', getLoc('spec')) -- Gear type data printRow(dl, 'Type', 'Gear') local gearTypeMap = mw.loadData("Module:Data/Extra/GearTypeMap") if data.type and gearTypeMap['gearClass'][data.type] then printRow(dl, 'Gear type', gearTypeMap['gearClass'][data.type] .. (data.tag and ' ('..(gearTypeMap['gearType'][data.tag] or data.tag)..')' or '')) end -- Gear extra data local gearExtra = mw.loadData("Module:Data/Extra/Gear")[iname] local source = gearExtra and gearExtra.source or 'Unreleased' printRow(dl, 'Source', source) local releaseDates if gearExtra then if gearExtra['glDate'] then releaseDates = releaseDates or mw.html.create('ul') releaseDates:tag('li'):wikitext('GL: '..gearExtra['glDate']) end if gearExtra['jpDate'] then releaseDates = releaseDates or mw.html.create('ul') releaseDates:tag('li'):wikitext('JP: '..gearExtra['jpDate']) end printRow(dl, 'Release dates', releaseDates and tostring(releaseDates) or nil) if gearExtra['glOnly'] then printRow(dl, 'Global only', 'Yes') end end -- Shard source printRow(dl, 'Item shard', data.kakera and render_item_icon({ data.kakera, name = 'none' }) or nil) -- Transmute limit printRow(dl, 'Transmute limit', data.maxnum < 999 and data.maxnum or nil) -- Ext links printRow(dl, 'External links', '[http://www.alchemistcodedb.com/gear/' .. string.lower(string.gsub(iname, '_', '-')) .. ' AlchemistCodeDB]') -- Body root:tag('p'):wikitext(getLoc('flavor')) root:tag('p'):wikitext(getLoc('expr')) -- Stat Output local gearStats = require('Module:GearStats') root:newline():wikitext(gearStats.getGearStatOutput(data)) -- Ability Output root:newline():wikitext(gearStats.gearAbilityOutput(data, frame)) root:newline():node(p.inspirationList(data.insp_skill)) -- Category local cats = {} table.insert(cats, 'Gear') if source:find('Unreleased') then table.insert(cats, 'Unreleased gear') end if source:find('Free') then table.insert(cats, 'Free gear') end if source:find('PvP') then table.insert(cats, 'PvP gear') end if source:find('VCR') then table.insert(cats, 'Vision Clear Rewards') end if source:find('Limited Summon') then table.insert(cats, 'Limited summon gear') elseif source:find('Summon') then table.insert(cats, 'Summon gear') end if source:find('Gem') then table.insert(cats, 'Gem gear') end if data.insp_skill and data.insp_skill ~= '' then table.insert(cats, 'Gear with enlightened skills') end for i,cat in ipairs(cats) do root:wikitext('[[Category:'..cat..']]') end return tostring(root) end local renderFuncs = {} renderFuncs.Icon = render_gear_icon local renderTransclude = function(iname, args) local type = mw.text.trim(args[1]) args[1] = iname return (renderFuncs[type] or renderFuncs.Name)(args) end function p._main(iname, args) if args.isPage then return renderPage(iname) else return renderTransclude(iname, args) end end p.renderPage = renderPage function p.test() mw.log(p.renderPage('AF_ARMS_KATANA_MASAMUNE_01')) mw.log(p.inspirationList('INSP_SWORD_CANON')) 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/Gear/doc
(
edit
)
Follow on IG
TikTok
Join Fan Lab