Module:Challenges/doc

From Risk of Rain 2 Wiki
Jump to navigation Jump to search

This is the documentation page for Module:Challenges

Challlenges stores details of Risk of Rain 2's achievements.

Documentation

Package items

challenges.Infobox(frame) (function)
Builds infobox for challenge article.
Parameter: frame Frame object w/ the first argument being challenge name (table)
Returns: Preprocessed wikitext of infobox (string)
challenges.Table(frame) (function)
Builds the wikitable for a challenge type as seen on Challenges.
Parameter: frame Frame object w/ the first argument being the challenge type Possible values (case-sensitive): "Survivors", "Items", "Equipment", "Skills", "Skins", "Artifacts" (table)
Returns: Preprocessed wikitext of wikitable (string)
challenges.Desc(frame) (function)
Returns the challenge description.
Parameter: frame Frame object w/ the first argument being the challenge name (table)
Returns: Formatted challenge description (string)

Other items

(variable)
local unlocks = "" for i, v in ipairs(challenge. Unlock) do if (i ~= 1) then unlocks = unlocks "| unlock" .. i .. " = , [ [" .. v .. "] ]" else unlocks = unlocks " = [ [" .. v .. "] ]" end end --]]
Description(desc) (function)
Formats the challenge description, adding wikilinks based on link_patterns.
Parameter: desc Raw challenge description (string)
Returns: Formatted challenge description (string)
Sort(list) (function)
Sorts challenges by name in ascending order.
Parameter: list A map of challenge names mapped to their challenge database entry (table)
Returns: Sorted challenges map (table)