Module:Shinies/doc

Revision as of 11:54, 20 June 2026 by Willow (talk | contribs) (the mass documenting)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This is the documentation page for Module:Shinies

Module:Shinies pulls the {{ItemInfobox}} blocks from a category template and re-renders only the items that have a "Shiny" sprite, swapping in the Shiny image so a page can show a gallery of shiny variants.

Overview

Some untiered items have a rarer "Shiny" version. The shiny version isn't stored as a separate infobox; instead its image is the normal item image with a Shiny prefix (e.g. File:Ut-Onyxblade.pngFile:ShinyUt-Onyxblade.png).

This module scans a category template (like Template:Swords/Weapons), finds every {{ItemInfobox}} whose image is an untiered Ut-...png file and for which a matching File:ShinyUt-...png exists, and re-renders just those items with the shiny image substituted. The result is a gallery of all shiny variants for that category, used on the Shinies overview page. Items without a shiny file are skipped.

It is the same "read the source template live" pattern as {{Equipment}}m, so the Shinies page stays in sync with the item templates automatically.

Functions / entry points

Function (#invoke) What it does Called by
p.fromTemplate Loads Template:<arg1> (optionally narrowed to section arg2), finds each {{ItemInfobox}} with a Ut-...png image that has a corresponding File:ShinyUt-...png, rewrites the image to the Shiny file, wraps the results in
and renders them. Returns No shinies yet. if none qualify.
The {{Shinies}} listing page

How it's used

No shinies yet.

Real examples (from the Shinies listing template/page):

Swords={{#invoke:Shinies|fromTemplate|Swords/Weapons}}
Katanas={{#invoke:Shinies|fromTemplate|Katanas/Weapons}}
Emblems={{#invoke:Shinies|fromTemplate|Emblems/Abilities}}
  • Argument 1 — category template title without Template: (e.g. Swords/Weapons).
  • Argument 2 (optional) — section name to narrow to, same delimiting rules as {{Equipment}}m (line starting <Section> =, cut at the next |-|).

Editors add the items themselves to the category templates; the Shinies page just invokes this module per category. You do not maintain a separate shiny list — uploading a correctly named ShinyUt-...png file is what makes an item appear here.

Notes

  • File-naming scheme is load-bearing. Detection relies on the untiered-item naming convention: the base image must be Ut-<Name>.png, and the shiny must be the same name prefixed with Shiny, i.e. ShinyUt-<Name>.png. The image regex specifically matches Images = Ut-...png and rewrites only the first occurrence in the block.
  • Only items with an existing shiny file are emitted; everything else in the template is silently ignored.
  • Output carries the extra shiny-frame CSS class (on top of display-items) for the shiny gallery styling.
  • {{Infobox}}m itself also auto-adds a Shiny tab to a single-image untiered infobox (same ShinyUt- rule). This module is the bulk/gallery counterpart: it lists shinies across a whole category rather than per item.
  • Related: {{Equipment}}m (renders all items in a section), {{Infobox}}m (the rendering engine and the per-infobox Shiny tab), {{ItemInfobox}}.