Difference between revisions of "Template:Card data"

From mtgpq wiki
Jump to: navigation, search
 
(3 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
The card data is stored in templates named "Template:Card data: card name".  For example, [[Template:Card data: Zetalpa, Primal Dawn]].  The card data fields are formatted as follows:
 
The card data is stored in templates named "Template:Card data: card name".  For example, [[Template:Card data: Zetalpa, Primal Dawn]].  The card data fields are formatted as follows:
  
'''Name|Expansion|Rarity|Colors|Cost|Type|Subtypes|P/T|Shields|Keywords'''
+
'''Name|Expansion|Rarity|Colors|Cost|Type|Subtypes|P/T|Shields|Keywords|Image'''
  
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
 +
! #
 
! Field
 
! Field
 
! Description
 
! Description
 
! Examples
 
! Examples
 
|-
 
|-
 +
! 1
 
| Name
 
| Name
 
| The card name.  Use "Side1//Side2" for double-sided cards, such as "Invent//Invert".
 
| The card name.  Use "Side1//Side2" for double-sided cards, such as "Invent//Invert".
 
| "Zetalpa, Primal Dawn"
 
| "Zetalpa, Primal Dawn"
 
|-
 
|-
 +
! 2
 
| Expansion
 
| Expansion
 
| The 3-letter abbreviation for the card's expansion set.
 
| The 3-letter abbreviation for the card's expansion set.
 
| "RIX"
 
| "RIX"
 
|-
 
|-
 +
! 3
 
| Rarity
 
| Rarity
 
| A one or two letter abbreviation of the card's rarity.
 
| A one or two letter abbreviation of the card's rarity.
 
| "C", "U", "R", "M", or "MP"
 
| "C", "U", "R", "M", or "MP"
 
|-
 
|-
 +
! 4
 
| Colors
 
| Colors
 
| An upper-case string representing the color of the card.
 
| An upper-case string representing the color of the card.
 
| "W", "UBR", "C"
 
| "W", "UBR", "C"
 
|-
 
|-
 +
! 5
 
| Cost
 
| Cost
 
| The base mana cost of the card.  Use two costs separated by a comma for split cards.
 
| The base mana cost of the card.  Use two costs separated by a comma for split cards.
 
| "19", "6,9"
 
| "19", "6,9"
 
|-
 
|-
 +
! 6
 
| Type
 
| Type
| The type of the card.
+
| The type of the card.  Use two types separated by a comma for split cards with different types on each side.
| "Creature", "Spell", or "Support"
+
| "Creature", "Spell", "Support", "Creature,Spell"
 
|-
 
|-
 +
! 7
 
| Subtypes
 
| Subtypes
 
| A comma-separated list of sub-types.
 
| A comma-separated list of sub-types.
 
| "Dinosaur,Elder"
 
| "Dinosaur,Elder"
 
|-
 
|-
 +
! 8
 
| P/T
 
| P/T
 
| For creatures, power and toughness separated by a slash; blank otherwise.
 
| For creatures, power and toughness separated by a slash; blank otherwise.
 
| "4/8"
 
| "4/8"
 
|-
 
|-
| Shields
+
! 9
| For supports, the shield cost; blank otherwise.
+
| Shield
 +
| For supports, the shield value; blank otherwise.
 
| "4"
 
| "4"
 
|-
 
|-
 +
! 10
 
| Keywords
 
| Keywords
 
| A comma-separated list of keywords used by the card.  
 
| A comma-separated list of keywords used by the card.  
 
| "Activate,Double Strike,Flying,Trample,Vigilance"
 
| "Activate,Double Strike,Flying,Trample,Vigilance"
 +
|-
 +
! 11
 +
| Image
 +
| An image filename for the card which can be found via external link to mtgpq.info.
 +
| "Zetalpa_Primal_Dawn.png"
 
|}
 
|}
  

Latest revision as of 06:45, 6 June 2021

Usage

Extract card data for a card for use in other templates. The only parameter is the card name.

The card data is stored in templates named "Template:Card data: card name". For example, Template:Card data: Zetalpa, Primal Dawn. The card data fields are formatted as follows:

Name|Expansion|Rarity|Colors|Cost|Type|Subtypes|P/T|Shields|Keywords|Image

# Field Description Examples
1 Name The card name. Use "Side1//Side2" for double-sided cards, such as "Invent//Invert". "Zetalpa, Primal Dawn"
2 Expansion The 3-letter abbreviation for the card's expansion set. "RIX"
3 Rarity A one or two letter abbreviation of the card's rarity. "C", "U", "R", "M", or "MP"
4 Colors An upper-case string representing the color of the card. "W", "UBR", "C"
5 Cost The base mana cost of the card. Use two costs separated by a comma for split cards. "19", "6,9"
6 Type The type of the card. Use two types separated by a comma for split cards with different types on each side. "Creature", "Spell", "Support", "Creature,Spell"
7 Subtypes A comma-separated list of sub-types. "Dinosaur,Elder"
8 P/T For creatures, power and toughness separated by a slash; blank otherwise. "4/8"
9 Shield For supports, the shield value; blank otherwise. "4"
10 Keywords A comma-separated list of keywords used by the card. "Activate,Double Strike,Flying,Trample,Vigilance"
11 Image An image filename for the card which can be found via external link to mtgpq.info. "Zetalpa_Primal_Dawn.png"

Example

The following mark-up:

{{Card data|Zetalpa, Primal Dawn}}

Produces:

{{p{{{1}}}|Zetalpa, Primal Dawn|RIX|M|W|19|Creature|Dinosaur,Elder|4/8||Activate,Double Strike,Flying,Trample,Vigilance|Zetalpa_Primal_Dawn.png}}