Module:QuestDetails
From Granblue Fantasy Relink Wiki
More actions
Usage
edit sourceTemplate: Template:QuestDetails
Takes the following arguments:
- id
- name
- location
- locationimage
- description
Constructs an HTML card based on the provided arguments
Examples
edit source| id | name | description | island | location | locationimage | difficulty | type | power | timelimit | objective | petitioner | sidegoal1 | sidereward1 | sidegoal2 | sidereward2 | sidegoal3 | sidereward3 | fail | exp | rupies | msp | firstclear | clearreward | ranks3 | ranks2 | ranks | ranka | rankb | chest1 | chest2 | chest3 | chest4 | chest5 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 403308 | Collector's Digest | I heard a sandstorm on Dahli Island kicked up some historic artifacts, coins included. Unfortunately, the bane of coin enthusiasts everywhere, silver slimes, love a metallic scent, and they've also been sighted in the area. Get to those pennies before the slimes digest 'em all! | Dahli Island | Dahli Relicbelt | Hard | Explore | 3,600 | 4 | Collect ancient coins within the time limit | Adamant Coin Collector | Collect 50 Vallion coins | Defeat King Silverslime ×2 | Collect 150 Vallion coins | The critical gauge reaches 0 | 10,000 | 2,820 | 5 |
|
|
|
|
|
|
Collector's Digest
Dahli Relicbelt
Adamant Coin Collector
I heard a sandstorm on Dahli Island kicked up some historic artifacts, coins included. Unfortunately, the bane of coin enthusiasts everywhere, silver slimes, love a metallic scent, and they've also been sighted in the area. Get to those pennies before the slimes digest 'em all!
Side Goals
Reward
Collect 50 Vallion coins
Defeat King Silverslime ×2
Collect 150 Vallion coins
- Lot 1
- 60%
Prism Chip ×3
- 30%
Flawed Prism ×1
- 10%
Flawed Prism ×2
- Lot 2
- 8%
Fast Learner II ×1
- 8%
Rupie Tycoon II ×1
- 8%
Potion Hoarder II ×1
- 12%
Fast Learner III ×1
- 12%
Rupie Tycoon III ×1
- 12%
Potion Hoarder III ×1
- 40% Nothing
- Lot 3
- 50%
Desert Ash ×10
- 30%
Desert Ash ×12
- 20%
Desert Ash ×15
- Lot 4
- 30%
Red-Hot Cactus ×4
- 18%
Red-Hot Cactus ×6
- 12%
Red-Hot Cactus ×8
- 40% Nothing
- Lot 5
- 30%
Curio (T1) ×1
- 13.5%
Curio (T2) ×1
- 5%
Curio (T3) ×1
- 1.5%
Curio (T4) ×1
- 50% Nothing

- Lot 1
- 100%
Flawed Prism ×3
- Lot 2
- 10%
Knickknack Voucher ×1
- 90% Nothing

- Lot 1
- 100%
Flawed Prism ×3

- Lot 1
- 50%
Prism Chip ×5
- 30%
Prism Chip ×7
- 20%
Flawed Prism ×3
- Lot 2
- 100%
Champion Merit ×1

- Lot 1
- 100%
Champion Merit ×1

- Lot 1
- 100%
Champion Merit ×1
This quest has no drop chests.
local getArgs = require('Module:Arguments').getArgs
local tabber = require('Module:Tabber').renderTabber
local p = {}
function p.main(frame)
local args = getArgs(frame)
return p._main(args)
end
local function constructDetails(args)
-- Return early for bad data
if args.id == nil then return '' end
local questDetails = mw.html.create('div')
questDetails:addClass('quest-details'):attr('id', string.format('details-%s', args.id))
local questDetailsContent = mw.html.create('div'):addClass('quest-details-content')
-- Details header (data-driven loop)
local detailsHeader = mw.html.create('div'):addClass('details-h2')
local headerFields = {
{ class = 'details-name', key = 'name' },
{ class = 'details-location', key = 'location' },
{ class = 'details-petitioner', key = 'petitioner' },
}
for _, field in ipairs(headerFields) do
detailsHeader:tag('div'):addClass(field.class):wikitext(args[field.key] or 'Nil'):done()
end
questDetailsContent:node(detailsHeader)
-- Description
questDetailsContent:tag('div'):addClass('quest-description')
:wikitext(args.description or '')
:done()
-- Rewards section
local rewardsSection = mw.html.create('div'):addClass('rewards-section')
-- Side goals (data-driven loop)
local sideGoals = mw.html.create('div'):addClass('side-goals-container')
sideGoals:tag('div'):addClass('side-goal-row')
:tag('div'):addClass('side-goal'):wikitext('Side Goals'):done()
:tag('div'):addClass('side-reward'):wikitext('Reward'):done()
:done()
for i = 1, 3 do
local goal = args['sidegoal' .. i]
local reward = args['sidereward' .. i]
if goal or reward then
sideGoals:tag('div'):addClass('side-goal-row')
:tag('div'):addClass('side-goal'):wikitext(goal or ''):done()
:tag('div'):addClass('side-reward'):wikitext(reward or ''):done()
:done()
end
end
rewardsSection:node(sideGoals)
-- Chest rewards loop
local hasNonNilChest = false
local chestListBuilder = mw.html.create('div'):addClass('chest-rewards-list')
for i = 1, 5 do
local chest = args['chest' .. i]
if chest ~= nil then
hasNonNilChest = true
chestListBuilder:tag('ul'):tag('li'):wikitext(chest):done()
end
end
local chestListOutput
if hasNonNilChest then
chestListOutput = tostring(chestListBuilder)
else
chestListOutput = 'This quest has no drop chests.'
end
-- Rank rewards (data-driven loop)
local rankListBuilder = mw.html.create('div'):addClass('rank-rewards-list')
local rankRewards = {
{ file = 'Rank_5.png', key = 'ranks3' },
{ file = 'Rank_4.png', key = 'ranks2' },
{ file = 'Rank_3.png', key = 'ranks' },
{ file = 'Rank_2.png', key = 'ranka' },
{ file = 'Rank_1.png', key = 'rankb' },
}
for _, rank in ipairs(rankRewards) do
rankListBuilder:tag('div')
:wikitext(string.format('[[File:%s|center|50px|link=]]', rank.file))
:wikitext(args[rank.key] or '')
:done()
end
-- Tabber
local tabberData = tabber({
label1 = 'First-Clear Rewards',
content1 = args.firstclear,
label2 = 'Clear Rewards',
content2 = args.clearreward,
label3 = 'Rank rewards',
content3 = tostring(rankListBuilder),
label4 = 'Drop Items',
content4 = chestListOutput,
})
rewardsSection:node(tabberData)
questDetailsContent:node(rewardsSection)
questDetails:node(questDetailsContent)
-- Image
questDetails:tag('div')
:addClass('quest-image')
:wikitext(string.format('[[File:%s|link=]]', args.locationimage or ''))
:done()
return tostring(questDetails)
end
function p._main(args)
local frame = mw.getCurrentFrame()
local questDetails = constructDetails(args)
return tostring(questDetails) .. frame:extensionTag{
name = 'templatestyles',
args = { src = 'Template:Quests/styles.css' }
}
end
return p





