Template:Ranked war/doc: Difference between revisions
No edit summary |
No edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 6: | Line 6: | ||
Note that the template automatically includes an image of the score graph for each war, which must be titled exactly as linked. Click the red link to directly upload a file with the correct title. | Note that the template automatically includes an image of the score graph for each war, which must be titled exactly as linked. Click the red link to directly upload a file with the correct title. | ||
Please note that when two factions by the same name fight more than once, this template will automatically add a disambiguation by month and year in headings and file names for wars with them, meaning war pages and files may need to be renamed. Any direct section links to faction war history pages should go through this template or risk breaking. | |||
==Parameters== | ==Parameters== | ||
| Line 14: | Line 16: | ||
**'''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. 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. | ***'''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. You can quickly find the war ID by looking at the war report link generated by the template. | ***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. You can quickly find the war ID by looking at the war report link generated by the template. | ||
**'''json''' - displays the contents of [[Module:RankedWars/data]] converted to JSON. This is used to run the updating script easily. See below for additional parameters. | |||
***'''ugly''' - if this parameter is defined with any content, the JSON will be printed minified (no spacing). Otherwise, it will be prettified. | |||
<includeonly>[[Category:Data templates]]</includeonly> | <includeonly>[[Category:Data templates]]</includeonly> | ||
Latest revision as of 19:30, 17 October 2025
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 as linked. Click the red link to directly upload a file with the correct title.
Please note that when two factions by the same name fight more than once, this template will automatically add a disambiguation by month and year in headings and file names for wars with them, meaning war pages and files may need to be renamed. Any direct section links to faction war history pages should go through this template or risk breaking.
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. You can quickly find the war ID by looking at the war report link generated by the template.
- json - displays the contents of Module:RankedWars/data converted to JSON. This is used to run the updating script easily. See below for additional parameters.
- ugly - if this parameter is defined with any content, the JSON will be printed minified (no spacing). Otherwise, it will be prettified.