Template:Ranked war/doc: Difference between revisions

From NPOWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 14: Line 14:
**'''overall''' - displays information about the faction's overall war record. There are no other parameters for this case.
**'''overall''' - displays information about the faction's overall war record. There are no other parameters for this case.
**'''history''' - formats the faction's entire war history into sections with some parts added automatically. See below for additional parameters.
**'''history''' - formats the faction's entire war history into sections with some parts added automatically. See below for additional parameters.
*'''has page''' - with history mode, use this to specify any wars that have their own page on the wiki. This must be a comma-separated list of war IDs, optionally with spaces, but no other characters.
*'''has page''' - with history mode, use this to specify any wars that have their own page on the wiki. This must be a comma-separated list of war IDs, optionally with spaces, but no other characters. The pages must be titled "(Opponent faction name) Ranked War"; if multiple wars were fought between the two factions (by name, not ID), it must be disambiguated like "39th Street Killers XR Ranked War (Jun 2022)", which is also how the page sections will be titled.
*named parameters for war IDs - with history mode, each war can have additional text displayed (e.g. a brief description of the war's events) by passing it in a parameter named by the war's ID. This field can contain anything.
*named parameters for war IDs - with history mode, each war can have additional text displayed (e.g. a brief description of the war's events) by passing it in a parameter named by the war's ID. This field can contain anything.


<includeonly>[[Category:Data templates]]</includeonly>
<includeonly>[[Category:Data templates]]</includeonly>

Revision as of 16:04, 16 October 2025

This page contains the documentation for Template:Ranked war. It includes information about the template, such as usage and categories, and is not displayed when using the template itself.

This template is used to display data about ranked wars in Torn.

This template makes use of Lua code at Module:RankedWars. Please use the template rather than invoking the module directly. See the module documentation for how to update the locally stored data, especially if you notice any errors.

Note that the template automatically includes an image of the score graph for each war, which must be titled exactly "(NPO faction name) vs (Opponent faction name) ranked war graph.png".

Parameters

  • first unnamed parameter: the name of the faction to look up. Not case sensitive.
  • second unnamed parameter: used to specify a war ID, see below.
  • mode - one of the following:
    • war - displays data for a particular war. In this case, the second unnamed parameter is required to be the war ID.
    • overall - displays information about the faction's overall war record. There are no other parameters for this case.
    • history - formats the faction's entire war history into sections with some parts added automatically. See below for additional parameters.
  • has page - with history mode, use this to specify any wars that have their own page on the wiki. This must be a comma-separated list of war IDs, optionally with spaces, but no other characters. The pages must be titled "(Opponent faction name) Ranked War"; if multiple wars were fought between the two factions (by name, not ID), it must be disambiguated like "39th Street Killers XR Ranked War (Jun 2022)", which is also how the page sections will be titled.
  • named parameters for war IDs - with history mode, each war can have additional text displayed (e.g. a brief description of the war's events) by passing it in a parameter named by the war's ID. This field can contain anything.