From Dark and Darker Wiki

Revision as of 04:22, 22 December 2024 by Sur (talk | contribs) (move icon file to localized name column instead)

Overview

Functions for Data:Achievements.json

Functions

create_achievements_table_body

Creates the body of a html function with 6 pre-set columns

Parameters

  • hidden_or_nonhidden - defaults to nonhidden - must be hidden or nonhidden - Displays only hidden or nonhidden achievements

Examples

Ensure to surround it by html table and its headers:

<table class="wikitable sortable">
<tr>
    <th>Name</th>
    <th>Icon</th>
    <th>Category</th>
    <th>Sub-Category</th>
    <th>Pre-requisite</th>
    <th>Description</th>
</tr>
{{#invoke:Achievements|create_achievements_table_body}}
</table>

Name Icon Category Sub-Category Pre-requisite Description
Crawl Into Darkness
Icon Achievement Level.png
Classes Reach level 5 on any character.
Dungeon Delver
Icon Achievement Level.png
Classes Crawl Into Darkness Reach level 10 on any character.
Journeyman Explorer
Icon Achievement Level.png
Classes Dungeon Delver Reach level 20 on any character.
Veteran Adventurer
Icon Achievement Level.png
Classes Journeyman Explorer Reach level 50 on any character.
Herald of the Depths
Icon Achievement Level.png
Classes Veteran Adventurer Reach level 100 on any character.
Warden of the Damned
Icon Achievement Level.png
Classes Herald of the Depths Reach level 200 on any character.
Crown of Despair
Icon Achievement Level.png
Classes Warden of the Damned Reach level 300 on any character.
Fully Equipped
Icon Achievement SetPerks.png
Classes Fill every perk slot.
Fighter Initiate
Icon Achievement Fighter.png
Classes Fighter Reach level 20 as a Fighter.
Sword for Hire
Icon Achievement Fighter.png
Classes Fighter Fighter Initiate Reach level 100 as a Fighter.
Weapon Master
Icon Achievement Fighter.png
Classes Fighter Sword for Hire Reach level 200 as a Fighter.
Champion of Arms
Icon Achievement Fighter.png
Classes Fighter Weapon Master Reach level 300 as a Fighter.
Barbarian Whelp
Icon Achievement Barbarian.png
Classes Barbarian Reach level 20 as a Barbarian.
Barbarian Brute
Icon Achievement Barbarian.png
Classes Barbarian Barbarian Whelp Reach level 100 as a Barbarian.
Savage Barbarian
Icon Achievement Barbarian.png
Classes Barbarian Barbarian Brute Reach level 200 as a Barbarian.
Barbarian Chieftain
Icon Achievement Barbarian.png
Classes Barbarian Savage Barbarian Reach level 300 as a Barbarian.
Novice Rogue
Icon Achievement Rogue.png
Classes Rogue Reach level 20 as a Rogue.
Seasoned Rogue
Icon Achievement Rogue.png
Classes Rogue Novice Rogue Reach level 100 as a Rogue.
Veteran of Deception
Icon Achievement Rogue.png
Classes Rogue Seasoned Rogue Reach level 200 as a Rogue.
Master Thief
Icon Achievement Rogue.png
Classes Rogue Veteran of Deception Reach level 300 as a Rogue.
Apprentice Ranger
Icon Achievement Ranger.png
Classes Ranger Reach level 20 as a Ranger.
Bow Bearer
Icon Achievement Ranger.png
Classes Ranger Apprentice Ranger Reach level 100 as a Ranger.
Veteran Hunter
Icon Achievement Ranger.png
Classes Ranger Bow Bearer Reach level 200 as a Ranger.
Eagle Eye
Icon Achievement Ranger.png
Classes Ranger Veteran Hunter Reach level 300 as a Ranger.
Novice Spellcaster
Icon Achievement Wizard.png
Classes Wizard Reach level 20 as a Wizard.
Adept Mystic
Icon Achievement Wizard.png
Classes Wizard Novice Spellcaster Reach level 100 as a Wizard.
Archmage
Icon Achievement Wizard.png
Classes Wizard Adept Mystic Reach level 200 as a Wizard.
Master Magus
Icon Achievement Wizard.png
Classes Wizard Archmage Reach level 300 as a Wizard.
Acolyte of Light
Icon Achievement Cleric.png
Classes Cleric Reach level 20 as a Cleric.
Adept Clinician
Icon Achievement Cleric.png
Classes Cleric Acolyte of Light Reach level 100 as a Cleric.
Archpriest
Icon Achievement Cleric.png
Classes Cleric Adept Clinician Reach level 200 as a Cleric.
Divine Crusader
Icon Achievement Cleric.png
Classes Cleric Archpriest Reach level 300 as a Cleric.
Minstrel of Melody
Icon Achievement Bard.png
Classes Bard Reach level 20 as a Bard.
Adept Troubadour
Icon Achievement Bard.png
Classes Bard Minstrel of Melody Reach level 100 as a Bard.
Songweaver
Icon Achievement Bard.png
Classes Bard Adept Troubadour Reach level 200 as a Bard.
Balladeer Maestro
Icon Achievement Bard.png
Classes Bard Songweaver Reach level 300 as a Bard.
Coven Initiate
Icon Achievement Warlock.png
Classes Warlock Reach level 20 as a Warlock.
Conduit of Blood
Icon Achievement Warlock.png
Classes Warlock Coven Initiate Reach level 100 as a Warlock.
Dark Disciple
Icon Achievement Warlock.png
Classes Warlock Conduit of Blood Reach level 200 as a Warlock.
Elder of the Pact
Icon Achievement Warlock.png
Classes Warlock Dark Disciple Reach level 300 as a Warlock.
Keeper of Sprouts
Icon Achievement Druid.png
Classes Druid Reach level 20 as a Druid.
Adept Shapeshifter
Icon Achievement Druid.png
Classes Druid Keeper of Sprouts Reach level 100 as a Druid.
Nature's Emissary
Icon Achievement Druid.png
Classes Druid Adept Shapeshifter Reach level 200 as a Druid.
Avatar of the Grove
Icon Achievement Druid.png
Classes Druid Nature's Emissary Reach level 300 as a Druid.
Sorcerer's Apprentice
Icon Achievement Sorcerer.png
Classes Sorcerer Reach level 20 as a Sorcerer.
Master Caster
Icon Achievement Sorcerer.png
Classes Sorcerer Sorcerer's Apprentice Reach level 100 as a Sorcerer.
Power Overwhelming
Icon Achievement Sorcerer.png
Classes Sorcerer Master Caster Reach level 200 as a Sorcerer.
Sorcerer Supreme
Icon Achievement Sorcerer.png
Classes Sorcerer Power Overwhelming Reach level 300 as a Sorcerer.
Light at the End
Icon Achievement Escape.png
Dungeon Escape Successfully escape for the first time.
Run It Back
Icon Achievement Escape.png
Dungeon Escape Light at the End Successfully escape twice.
The Quick and the Dead
Icon Achievement Escape.png
Dungeon Escape Run It Back Successfully escape 10 times.
Edge of Escape
Icon Achievement Escape.png
Dungeon Escape The Quick and the Dead Successfully escape 100 times.
Painted in Red
Icon Achievement EliteMonster.png
Dungeon Monster Kill any Elite monster.
The Nightmare Ends
Icon Achievement NightmareMonster.png
Dungeon Monster Kill any Nightmare monster.
Crowned with Ash
Icon Achievement BossMonster.png
Dungeon Monster Kill any Boss monster.
Court Wizard's Demise
Icon Achievement Lich.png
Dungeon Monster Kill the Lich.
Banished Beyond
Icon Achievement GhostKing.png
Dungeon Monster Kill the Ghost King.
Breaker of Bone Thrones
Icon Achievement SkeletonWarload.png
Dungeon Monster Kill the Skeleton Warlord.
The Bigger They Are, The Harder They Fall
Icon Achievement Troll.png
Dungeon Monster Kill the Cave Troll.
Eye for an Eye
Icon Achievement Cyclops.png
Dungeon Monster Kill the Cyclops.
Cold Case Closed
Icon Achievement Wyvern.png
Dungeon Monster Kill the Frost Wyvern.
Silence the Specter
Icon Achievement SpectralKnight.png
Dungeon Monster Kill the Spectral Knight.
She Screams No More
Icon Achievement Banshee.png
Dungeon Monster Kill the Banshee.
Undead Slayer
Icon Achievement UndeadSlayer.png
Dungeon Monster Kill 1000 undead enemies.
Demon Slayer
Icon Achievement DemonSlayer.png
Dungeon Monster Kill 1000 demonic enemies.
Beast Slayer
Icon Achievement BeastSlayer.png
Dungeon Monster Kill 1000 beast-type enemies.
Insect Slayer
Icon Achievement InsectSlayer.png
Dungeon Monster Kill 1000 insectoid enemies.
Goblin Slayer
Icon Achievement GoblinSlayer.png
Dungeon Monster Kill 1000 goblins.
Kobold Slayer
Icon Achievement KoboldSlayer.png
Dungeon Monster Kill 1000 kobolds.
Giant Slayer
Icon Achievement GiantSlayer.png
Dungeon Monster Kill 1000 giants.
A Quick Fix
Icon Achievement Bandage.png
Dungeon Consumable Use 10 Bandages.
Field Medic
Icon Achievement Bandage.png
Dungeon Consumable A Quick Fix Use 50 Bandages.
Master of Mending
Icon Achievement Bandage.png
Dungeon Consumable Field Medic Use 100 Bandages.
First Sip
Icon Achievement Potion.png
Dungeon Consumable Use 10 Potions of Healing.
Potion Lover
Icon Achievement Potion.png
Dungeon Consumable First Sip Use 50 Potions of Healing.
Elixir Addict
Icon Achievement Potion.png
Dungeon Consumable Potion Lover Use 100 Potions of Healing.
Steady Hand
Icon Achievement SurgicalKit.png
Dungeon Consumable Use 10 Surgical Kits.
Trauma Technician
Icon Achievement SurgicalKit.png
Dungeon Consumable Steady Hand Use 100 Surgical Kits.
Sparks of Survival
Icon Achievement Campfire.png
Dungeon Consumable Use 10 Campfire Kits.
Fire Starter
Icon Achievement Campfire.png
Dungeon Consumable Sparks of Survival Use 100 Campfire Kits.
The First Cut
Icon Achievement KillPlayer.png
Dungeon Challenge Kill an enemy player for the first time.
Keeper of the Eternal's Fall
Icon Achievement LichHR.png
High-Roller Monster Kill the Lich in High-Roller.
Kingbreaker
Icon Achievement GhostKingHR.png
High-Roller Monster Kill the Ghost King in High-Roller.
Deliverer of Judgment
Icon Achievement SkeletonWarloadHR.png
High-Roller Monster Kill the Skeleton Warlord in High-Roller.
Crusher of the Colossus
Icon Achievement TrollHR.png
High-Roller Monster Kill the Cave Troll in High-Roller.
Bringer of Blindness
Icon Achievement CyclopsHR.png
High-Roller Monster Kill the Cyclops in High-Roller.
Cold-Blooded Killer
Icon Achievement WyvernHR.png
High-Roller Monster Kill the Frost Wyvern in High-Roller.
Chivalry Shattered
Icon Achievement SpectralKnightHR.png
High-Roller Monster Kill the Spectral Knight in High-Roller.
The Last Wail
Icon Achievement BansheeHR.png
High-Roller Monster Kill the Banshee in High-Roller.
Gravebound No More
Icon Achievement RankNeophyte.png
High-Roller High-Roller Rank Reach the Neophyte rank in High-Roller.
Apprentice of the Abyss
Icon Achievement RankApprentice.png
High-Roller High-Roller Rank Reach the Apprentice rank in High-Roller.
A Curious Wanderer
Icon Achievement RankWanderer.png
High-Roller High-Roller Rank Reach the Wanderer rank in High-Roller.
Trailblazer
Icon Achievement RankPathfinder.png
High-Roller High-Roller Rank Reach the Pathfinder rank in High-Roller.
Herald of Paths
Icon Achievement RankVoyager.png
High-Roller High-Roller Rank Reach the Voyager rank in High-Roller.
Paragon of Excellence
Icon Achievement RankExemplar.png
High-Roller High-Roller Rank Reach the Exemplar rank in High-Roller.
Mortal No More
Icon Achievement RankDemigod.png
High-Roller High-Roller Rank Reach the Demigod rank in High-Roller.
First Blood
Icon Achievement WinningArena.png
Arena Win an Arena match for the first time.
Rising Challenger
Icon Achievement WinningArena.png
Arena First Blood Win an Arena match 10 times.
Bloodstained Champion
Icon Achievement WinningArena.png
Arena Rising Challenger Win an Arena match 50 times.
Legend of the Arena
Icon Achievement WinningArena.png
Arena Bloodstained Champion Win an Arena match 100 times.
Lucky Streak
Icon Achievement ConsecutiveArena.png
Arena Win in the Arena 2 times consecutively.
You're on Fire
Icon Achievement ConsecutiveArena.png
Arena Lucky Streak Win in the Arena 5 times consecutively.
Unstoppable
Icon Achievement ConsecutiveArena.png
Arena You're on Fire Win in the Arena 10 times consecutively.
Relentless Executioner
Icon Achievement ConsecutiveArena.png
Arena Unstoppable Win in the Arena 20 times consecutively.
Fresh Meat
Icon Achievement ArenaRankTiro.png
Arena Arena Rank Reach the Tiro rank in Arena.
Pit Scrapper
Icon Achievement ArenaRankScrapper.png
Arena Arena Rank Reach the Scrapper rank in Arena.
Gladiator
Icon Achievement ArenaRankGladiator.png
Arena Arena Rank Reach the Gladiator rank in Arena.
Veteran of the Pit
Icon Achievement ArenaRankVeteran.png
Arena Arena Rank Reach the Veteran rank in Arena.
Contending Challenger
Icon Achievement ArenaRankContender.png
Arena Arena Rank Reach the Contender rank in Arena.
The Crimson Vanquisher
Icon Achievement ArenaRankVanquisher.png
Arena Arena Rank Reach the Vanquisher rank in Arena.
Rise of the Warlord
Icon Achievement ArenaRankWarload.png
Arena Arena Rank Reach the Warlords rank in Arena.
It's a Start...
Icon Achievement EquipItemGrade.png
Item Gear Equip Uncommon grade items or higher in your main slots.
Fit Check
Icon Achievement EquipItemGrade.png
Item Gear Equip Rare grade items or higher in your main slots.
Nice Threads
Icon Achievement EquipItemGrade.png
Item Gear Equip Epic grade items or higher in your main slots.
Flawless Drip
Icon Achievement EquipItemGrade.png
Item Gear Equip Legendary grade items or higher in your main slots.
Dagger Wielder
Icon Achievement KillDagger.png
Item Gear Kill 100 enemies with a Dagger type weapon.
Dagger Expert
Icon Achievement KillDagger.png
Item Gear Dagger Wielder Kill 500 enemies with a Dagger type weapon.
Bloodletter
Icon Achievement KillDagger.png
Item Gear Dagger Expert Kill 1000 enemies with a Dagger type weapon.
Sword Wielder
Icon Achievement KillSword.png
Item Gear Kill 100 enemies with a Sword type weapon.
Sword Expert
Icon Achievement KillSword.png
Item Gear Sword Wielder Kill 500 enemies with a Sword type weapon.
Blade of Woe
Icon Achievement KillSword.png
Item Gear Sword Expert Kill 1000 enemies with a Sword type weapon.
Axe Wielder
Icon Achievement KillAxe.png
Item Gear Kill 100 enemies with a Axe type weapon.
Axe Expert
Icon Achievement KillAxe.png
Item Gear Axe Wielder Kill 500 enemies with a Axe type weapon.
Bone Cutter
Icon Achievement KillAxe.png
Item Gear Axe Expert Kill 1000 enemies with a Axe type weapon.
Mace Wielder
Icon Achievement KillMace.png
Item Gear Kill 100 enemies with a Mace type weapon.
Mace Expert
Icon Achievement KillMace.png
Item Gear Mace Wielder Kill 500 enemies with a Mace type weapon.
Deliverer of Justice
Icon Achievement KillMace.png
Item Gear Mace Expert Kill 1000 enemies with a Mace type weapon.
Polearm Wielder
Icon Achievement KillPolearm.png
Item Gear Kill 100 enemies with a Polearm type weapon.
Polearm Expert
Icon Achievement KillPolearm.png
Item Gear Polearm Wielder Kill 500 enemies with a Polearm type weapon.
Spear of Judgment
Icon Achievement KillPolearm.png
Item Gear Polearm Expert Kill 1000 enemies with a Polearm type weapon.
Staff Wielder
Icon Achievement KillStaff.png
Item Gear Kill 100 enemies with a Staff type weapon.
Staff Expert
Icon Achievement KillStaff.png
Item Gear Staff Wielder Kill 500 enemies with a Staff type weapon.
Arcane Arbiter
Icon Achievement KillStaff.png
Item Gear Staff Expert Kill 1000 enemies with a Staff type weapon.
Bow Wielder
Icon Achievement KillBow.png
Item Gear Kill 100 enemies with a Bow type weapon.
Bow Expert
Icon Achievement KillBow.png
Item Gear Bow Wielder Kill 500 enemies with a Bow type weapon.
Deadeye
Icon Achievement KillBow.png
Item Gear Bow Expert Kill 1000 enemies with a Bow type weapon.
Crossbow Wielder
Icon Achievement KillCrossbow.png
Item Gear Kill 100 enemies with a Crossbow type weapon.
Crossbow Expert
Icon Achievement KillCrossbow.png
Item Gear Crossbow Wielder Kill 500 enemies with a Crossbow type weapon.
Trigger Finger
Icon Achievement KillCrossbow.png
Item Gear Crossbow Expert Kill 1000 enemies with a Crossbow type weapon.
Coin Snatcher
Icon Achievement LootedCoins.png
Item Loot Collect 100 Gold Coins in the Dungeon.
Gold Hoarder
Icon Achievement LootedCoins.png
Item Loot Coin Snatcher Collect 1000 Gold Coins in the Dungeon.
Wealth Enthusiast
Icon Achievement LootedCoins.png
Item Loot Gold Hoarder Collect 10000 Gold Coins in the Dungeon.
Plunderer
Icon Achievement InteractHoard.png
Item Loot Interact with a treasure hoard.
Prospect Miner
Icon Achievement Mining.png
Item Loot Succeed in mining 10 times.
King of the Quarry
Icon Achievement Mining.png
Item Loot Prospect Miner Succeed in mining 100 times.
Gold Digger
Icon Achievement GoldOre.png
Item Loot Succeed mining for Gold Ore.
Lobster Bait
Icon Achievement RubysilverOre.png
Item Loot Succeed mining for Rubysilver Ore.
Iced Out
Icon Achievement FroststoneOre.png
Item Loot Succeed mining for Froststone Ore.
Epic Spoils
Icon Achievement LootedItemGrade.png
Item Loot Collect Epic grade items of Looted state.
Legendary Bounty
Icon Achievement LootedItemGrade.png
Item Loot Collect Legendary grade items of Looted state.
Uniquely Yours
Icon Achievement LootedItemGrade.png
Item Loot Collect Unique grade items of Looted state.
A Barrel of Stories
Icon Achievement QuestComplete.png
Quest Complete all of the Tavern Master's quests offered during the Season.
The Fortune's End
Icon Achievement QuestComplete.png
Quest Complete all of the Treasurer's quests offered during the Season.
Connoisseur of Curiosities
Icon Achievement QuestComplete.png
Quest Complete all of the Collector's quests offered during the Season.
Gobbo's Favorite Fleshy
Icon Achievement QuestCompleteGoblin.png
Quest Complete all of the Goblin Merchant's quests offered during the Season.
The Old Man's Determination
Icon Achievement QuestComplete.png
Quest Complete all of the Leathersmith's quests offered during the Season.
Lifelong Regrets
Icon Achievement QuestComplete.png
Quest Complete all of the Armourer's quests offered during the Season.
Fabric of Trust
Icon Achievement QuestComplete.png
Quest Complete all of the Tailor's quests offered during the Season.
A Friend of the Forge
Icon Achievement QuestComplete.png
Quest Complete all of the Weaponsmith's quests offered during the Season.
Bonding Roots
Icon Achievement QuestComplete.png
Quest Complete all of the Woodsman's quests offered during the Season.
A Younger Brother's Tale
Icon Achievement QuestComplete.png
Quest Complete all of the Surgeon's quests offered during the Season.
An Older Brother's Tale
Icon Achievement QuestComplete.png
Quest Complete all of the Alchemist's quests offered during the Season.
Seeker of Secrets
Icon Achievement QuestComplete.png
Quest Complete all of the Fortune Teller's quests offered during the Season.
Friends in High Places
Icon Achievement FriendlyAffinity.png
Merchant Raise the affinity of any merchant to "Friendly" grade or higher.
Crafting Initiate
Icon Achievement Crafting.png
Merchant Successfully craft your first item.
Crafting Virtuoso
Icon Achievement Crafting.png
Merchant Crafting Initiate Successfully craft 10 times.
Stackin' Up
Icon Achievement GoldCoinPouch.png
Merchant Craft a Gold Coin Pouch.
Bag It Up
Icon Achievement GoldCoinBag.png
Merchant Craft a Gold Coin Bag.
Not Today
Icon Achievement AltarOfSacrifice.png
Community Use the Altar of Sacrifice for the first time.
Devote your hearts!
Icon Achievement AltarOfSacrifice.png
Community Not Today Use the Altar of Sacrifice 10 times.
The Eternal Reviver
Icon Achievement AltarOfSacrifice.png
Community Devote your hearts! Use the Altar of Sacrifice 100 times.
Cane Collector
Icon Achievement CollectCandyCane.png
Event Winter Holiday Collect 10 Candy Canes of Looted state.
King of Canes
Icon Achievement CollectCandyCane.png
Event Winter Holiday Cane Collector Collect 100 Candy Canes of Looted state.
The Forbidden Pear
Icon Achievement HoneyblissPear.png
Feat Collect a Honeybliss Pear of Looted state.
Baked for the Taking
Icon Achievement ChocolateChipMuffin.png
Feat Collect a Chocolate Chip Muffin of Looted state.
Beginning of the End
Icon Achievement MidnightStag.png
Feat Kill the Midnight Stag.




Example of hidden achievements only

<table class="wikitable mw-collapsible mw-collapsed">
<tr>
    <th>Name</th>
    <th>Icon</th>
    <th>Category</th>
    <th>Sub-Category</th>
    <th>Pre-requisite</th>
    <th>Description</th>
</tr>
{{#invoke:Achievements|create_achievements_table_body|hidden}}
</table>

Name Icon Category Sub-Category Pre-requisite Description

local p = {}
local achievements = mw.loadJsonData("Data:Achievements.json")

function p.create_achievements_table_body(frame)
	local hidden_or_nonhidden = frame.args[1]
	if hidden_or_nonhidden == nil then 
		hidden_or_nonhidden = "nonhidden"
	elseif hidden_or_nonhidden ~= "nonhidden" then
		hidden_or_nonhidden = "hidden"
	end
	
	local html = ""
	local record
	
	for index, achievement in ipairs(achievements) do
		-- Ensure only the hidden or nonhidden are shown depending on parameter
		local is_hidden
		if achievement.hidden == 'true' then
			is_hidden = true
		else
			is_hidden = false
		end
		if (is_hidden and hidden_or_nonhidden == "nonhidden") or 
			(not is_hidden and hidden_or_nonhidden == "hidden") then
			break
		end
		
		record = "<tr>\n"
		record = record .. "<td>" .. (achievement.localized_name) .. "<br>[[File:" .. achievement.icon .. ".png|30px]]" .. "</td>\n"
		record = record .. "<td>" .. (achievement.main_category or '') .. "</td>\n"
		record = record .. "<td>" .. (achievement.sub_category or '') .. "</td>\n"
		record = record .. "<td>" .. (achievement.prerequisite or '') .. "</td>\n"
		record = record .. "<td>" .. (achievement.description) .. "</td>\n"
		record = record .. "</tr>\n"
		
		html = html .. record .. "\n"
	end
	
	return mw.getCurrentFrame():preprocess(html)
end

return p