Template:Rarity/doc
Appearance
This is the documentation subpage for Template:Rarity. It holds usage notes, parameters and examples, and is transcluded onto the template page itself. Edit the documentation here; edit the template's code on the template page.
A rarity number as its colour-coded name. The game stores only the number.
None · Common · Uncommon · Rare · Epic · Legendary
0means the item has no rarity colour and renders None in plain text.- Blank, non-numeric, or outside 0–5 renders Unknown in plain text rather than throwing an error — useful, because the infoboxes pass their
rarityparameter straight through whether it is filled in or not. - On an item page this is the item's base rarity: what a crafted copy is. A dungeon-dropped copy can be higher, which belongs in the page's Possible rolls section.
Two places, not one, define what a reader sees. The names are in Module:Gear/data (p.rarity). The colours are the sb-q0–sb-q5 classes in Template:ItemStyles/styles.css. Keep them in step, and change each in its own place.
This template is a one-line wrapper around {{#invoke:Stat|rarity}}. There is nothing on this page to edit.
Colour-coded rarity name from the game's 0–5 rarity number.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Rarity number | 1 | 0 = no rarity (plain), 1 = Common, 2 = Uncommon, 3 = Rare, 4 = Epic, 5 = Legendary | Number | required |