Jump to content

Module:Infobox/doc

From The Perfect Tower II

This is the documentation page for Module:Infobox

Draws the infoboxes of {{Building}} (the 12 town buildings) and {{Infobox region}}, in the brand kit's .tpt-infobox style. Template:Infobox/styles.css (TemplateStyles) places the box beside the article.

  • building(frame): reads Tier, ConversionRate, Color and Image from the template; ColorCode is ignored. The title is the page name. On the 12 building pages the page name also sets the building's color (tpt-fac-*), and the hexagon shows the max tier as a Roman numeral (tiers 1 to 39). Rows, each only when given: Max. tier, Conversion (rate:1) and Resource. Adds Category:Buildings in the main namespace.
  • region(frame): reads image (default Image missing.png), lanes, enemies and the difficulty modifiers easy, medium, hard, insane, nightmare and impossible, which show as percentages through {{Number}}. Empty values show {{Unknown}}. Adds Category:Regions in the main namespace.
  • build(spec): the box itself, for other modules; returns an mw.html object. spec has title, label (the small line under the title), facility (a brand kit facility id such as trading-post), mark (text in the hexagon), image (wikitext), rows ({ { label, value }, … }) and sections ({ { heading, rows }, … }). All fields except title are optional.