Wiki:Item templates
Every template behind an item, gear, tool or stat page, and where to change what. If you are writing an item page rather than changing how one renders, you want Wiki:Item page guide instead.
The family
| Template | What it does | Lua-backed |
|---|---|---|
{{Infobox Gear}}
|
The right-rail box on every weapon, armor and accessory page. Also files the page into its slot, weapon-type, tier, set, rarity, drop and craft categories. | No |
{{Infobox Gear/stat}}
|
Internal. One stat row inside that box — hides itself when empty, keeps a minus sign, adds a plus otherwise. | No |
{{Infobox Tool}}
|
The same job for gathering tools. Tools are craft-only, so it has no roll or rarity-drop logic. | No |
{{Infobox Stat}}
|
The box on a stat's own page (name, internal key, unit, scope, calculation, cap). | No |
{{Stat}}
|
A stat key → the stat's player-facing name, linked to its page. | Yes |
{{Stat/unit}}
|
A stat key → its unit: % or nothing. |
Yes |
{{Range}}
|
A rolled range, PoE-style: +(2–10)%. One value gives a flat +10. |
Yes |
{{RollStat}}
|
One bonus-stat chip for a rolls table — name, range and unit resolved from the key in one call. | Yes |
{{Rarity}}
|
A rarity number 0–5 → its colour-coded name. | Yes |
{{ItemLink}}
|
An item's icon plus its rarity-coloured link. Use it every time an item is named in a table, box or list. | No |
{{RollTableHead}}
|
Opens a Possible rolls table. Close it with |}. |
No |
{{RollRow}}
|
One rarity band inside that table. | No |
{{LegendaryEffect}}
|
One row of the Legendary Effects catalogue, with an anchor so item pages can link straight to it. | No |
{{Old game data}}
|
The banner for pages describing the pre-release game. | No |
| Template:ItemStyles/styles.css | All the CSS: rarity colours sb-q0–sb-q5, range and chip styling, pixel-art icon scaling, the old-data banner. Colours change here and nowhere else. |
— |
Crafting stations use {{Infobox Station}}
, which is documented on its own page.
Do not edit the wrapper — edit the module
{{Stat}}
, {{Stat/unit}}
, {{Range}}
, {{RollStat}}
and{{Rarity}}are each a single#invokeline. There is nothing inside them to fix. The logic is in Module:Stat and the vocabulary — every stat's display name, its unit, whether it is a primary stat, the rarity map, the slot names, the set list — is in Module:Gear/data.
Adding a stat means adding one line to Module:Gear/data. Copy an existing line, keep the alphabetical order, and use the game's own snake_case key:
["burn_chance"] = { label = "Burn Chance", unit = "%", primary = false },
Full instructions and the field meanings are on Module:Gear/data/doc. Nothing else needs touching: every {{Stat}}
and {{RollStat}}
call across the wiki picks the new stat up at once.
One exception worth knowing. Adding a stat to the module makes it render wherever a stat is named — roll tables, set pages, list pages. It does not add a base-stat row to {{Infobox Gear}}
, which carries its own hand-written list of rows. If a new stat needs to appear as a base stat in the infobox, say so on Template talk:Infobox Gear rather than editing the template: 167 pages render through it.
If you do edit one of these
- Test first. Use the template's
/sandboxsubpage or Wiki:Sandbox, never the live template. Nothing in this family is protected, and{{ItemLink}}
alone is on 194 pages.
- Never put
#expron a rolled range. Ranges are display text, not numbers. Doing arithmetic on them is how other game wikis ended up covered in "Expression error". - Keep the TemplateStyles link off the
{|line. A<templatestyles />tag on the same line as a table's opening{|stops the table parsing at all. - The chip separator uses
~, not+. TemplateStyles inserts elements between sibling chips, so the general sibling selector is the only one that works. Do not "tidy" it. - Do not give a table
width:100%if it sits beside a floated infobox. It will slide underneath. - Watch out for
#ifeating a leading space. Use before a dash or bullet inside one. - A script error is a stop-everything. Anything broken shows up in Category:Pages with script errors
- revert rather than leave it.
See also
- Wiki:Item page guide — writing the pages these templates render
- Module:Gear/data/doc · Module:Stat/doc
- Wiki:Categorisation — why infoboxes apply categories and editors do not