Difference between revisions of "Template:ItemRarity/doc"

From Project: Gorgon Wiki
Jump to: navigation, search
m
(Examples)
 
(2 intermediate revisions by the same user not shown)
Line 11: Line 11:
  
 
== Syntax ==
 
== Syntax ==
<pre>{{ItemRarity|rarity}}</pre>
+
*Single parameter for use on standard "parchment color" background: <pre>{{ItemRarity|rarity}}</pre>
 +
*Two parameters for use in wikitables, [[:Template:ITEM_infobox|ITEM infoboxes]], or other light/dark backgrounds: <pre>{{ItemRarity|rarity|backgroundShade}}</pre>
  
 
===Parameters===
 
===Parameters===
*First and only parameter (required): The rarity you wish to express. This can be any of:
+
*First parameter (required): The rarity you wish to express. This can be any of:
 
** The full word description of the rarity: Uncommon, Rare, Exceptional, Epic, Legendary (capitalized or not)
 
** The full word description of the rarity: Uncommon, Rare, Exceptional, Epic, Legendary (capitalized or not)
 
** The number of mods on an item of that rarity: 1, 2, 3, 4, 5
 
** The number of mods on an item of that rarity: 1, 2, 3, 4, 5
 
** A one letter abbreviation for that rarity: u, r, x, p, l (capitalized or not)
 
** A one letter abbreviation for that rarity: u, r, x, p, l (capitalized or not)
 
** Any other values default to "Common" in the color white.
 
** Any other values default to "Common" in the color white.
 +
*Second parameter (optional): Used to select a palette with better contrast against the background color. Possible parameters "Light" (or "L") or "Dark" (or "D"), captialized or not. Leave this parameter out for a palette designed for the default "parchment color" wiki background.
  
 
== Examples ==
 
== Examples ==
 +
=== Example 1: Directly on the page ===
 +
====Example Code 1====
 +
<pre>{{ItemRarity|Legendary}}</pre>
 +
====Example Output 1====
 +
{{ItemRarity|Legendary}}
 +
===Example 2: Wikitable===
 +
====Example Code 2====
 +
<pre>{| class="wikitable"
 +
!Header
 +
|-
 +
| {{ItemRarity|2|Light}}
 +
|}</pre>
 +
====Example Output 2====
 
{| class="wikitable"
 
{| class="wikitable"
! Code
+
!Header
! Result
 
|-
 
| <pre>{{ItemRarity|epic}}</pre>
 
| {{ItemRarity|epic}}
 
|-
 
| <pre>{{ItemRarity|2}}</pre>
 
| {{ItemRarity|2}}
 
 
|-
 
|-
| <pre>{{ItemRarity|x}}</pre>
+
| {{ItemRarity|2|Light}}
| {{ItemRarity|x}}
 
 
|}
 
|}
 +
===Example 3: Dark background===
 +
====Example Code 3====
 +
<pre><span style="background-color:#000000>{{ItemRarity|x}}</span></pre>
 +
====Example Output 3====
 +
<span style="background-color:#000000>{{ItemRarity|x}}</span>

Latest revision as of 10:01, 5 December 2020


Description

Outputs a link, formatted into the color of the given rarity, to the page section that describes the rarity tiers of items (Items#Item Tiers).

Syntax

  • Single parameter for use on standard "parchment color" background:
    {{ItemRarity|rarity}}
  • Two parameters for use in wikitables, ITEM infoboxes, or other light/dark backgrounds:
    {{ItemRarity|rarity|backgroundShade}}

Parameters

  • First parameter (required): The rarity you wish to express. This can be any of:
    • The full word description of the rarity: Uncommon, Rare, Exceptional, Epic, Legendary (capitalized or not)
    • The number of mods on an item of that rarity: 1, 2, 3, 4, 5
    • A one letter abbreviation for that rarity: u, r, x, p, l (capitalized or not)
    • Any other values default to "Common" in the color white.
  • Second parameter (optional): Used to select a palette with better contrast against the background color. Possible parameters "Light" (or "L") or "Dark" (or "D"), captialized or not. Leave this parameter out for a palette designed for the default "parchment color" wiki background.

Examples

Example 1: Directly on the page

Example Code 1

{{ItemRarity|Legendary}}

Example Output 1

Legendary

Example 2: Wikitable

Example Code 2

{| class="wikitable"
!Header
|-
| {{ItemRarity|2|Light}}
|}

Example Output 2

Header
Rare

Example 3: Dark background

Example Code 3

<span style="background-color:#000000>{{ItemRarity|x}}</span>

Example Output 3

Exceptional