Template:Card infobox

From Hearthstone Wiki
Jump to: navigation, search

This template can be used in two ways:

  1. Most commonly, it will be used to pull imported data from a data page onto a card's regular content page.
  2. It can also be used to directly enter data for a card.
    • Since this has the side effects of adding the card information to lists, it should only be done for actual cards in the game.
    • Note that automated imports of card data will usually add data pages for new cards; they typically will not need to be added manually.

This template can also be used to add additional information to cards beyond that supplied by the automated imports. Note that the actual visual function of the infobox is handled by {{Card infobox/layout}}, which has no side effects beyond simply displaying the infobox.

Adding additional information[edit source]

There is some information of interest about various cards that the importer cannot automatically acquire. These parameters allow you to add this useful information whether or not data is being pulled from a data page.

Not currently in play[edit source]

If the card is not currently in play, use the |current= parameter as follows:

{{Card infobox
  |current=false
}}

The default is true.

NB: This parameter is currently used for removed cards. For upcoming cards, use |category (see below).

Not a collectible card[edit source]

If the card is uncollectible, such as resulting from the effect of another card, use the |collectible= parameter as follows:

{{Card infobox
  |collectible=false
}}

The default is true, unless the |chosenfrom= parameter is also used, in which case this is automatically set to false even if true is specified here.

Developer card[edit source]

If the card is only available to the game's developers, such as cards intended for testing and system purposes, use the |devonly= parameter as follows:

{{Card infobox
  |devonly=true
}}

The default is false.

Choice card[edit source]

If the card is a choice card produced by a multiple choice effect such as Choose One, a link to the parent card can be displayed in the infobox by using |chosenfrom= parameter and supplying the page name for the parent card as follows:

{{Card infobox
  |chosenfrom=page name
}}

Use the regular page name for the card, not its data page name. For example, Wrath (234) uses |chosenfrom=Wrath

Using alternate categories[edit source]

Card categories are used to keep certain special types of cards separate from regular cards. To place the card in one or more special categories instead of the regular categories, use the |category= parameter as follows:

{{Card infobox
  |category=name prefix,...
}}

For example, if category=Boss,Special is given, it will be added to Category:Boss cards, Category:Boss card data, Category:Special cards and Category:Special card data. Note that even if this parameter is used, the card will still be added to Category:All cards and Category:All card data. However, cards that use this parameter will not be added to the main card categories Category:Cards and Category:Card data.

While this parameter accepts multiple arguments, special card divisions should almost always be combined to form a single category name, for example Removed boss, rather than Removed, Boss. This is because using multiple categories will include the card in each category, while combining categories will include the card only in the combined category. For sorting purposes, the latter is almost always correct, since card categories are generally used to keep sets of cards separate. If uncertain of the correct category name, check the pages of similar cards.

This parameter should not generally be used on cards that are used in normal gameplay, as putting them in alternate categories will prevent them from appearing in standard lists. Tags or hidden tags below should be used instead for normal cards.

Additional abilities[edit source]

If the card has additional abilities that the automated importer did not include, the |addabilities= parameter can be used to add these abilities to the card data.

{{Card infobox
  |addabilities=ability1,ability2,etc.
}}

Tags[edit source]

Tags can also be added that can determine whether a card appears in certain lists. These appear in the infobox and link to a given page. See {{Card tag page}} for more details.

{{Card infobox
  |tags=tag1,tag2,etc.
}}

Hidden tags[edit source]

Like the tags above, these can be used to determine whether a card appears in certain lists, but these do not actually appear in the infobox and are not associated with any given wiki page.

{{Card infobox
  |hiddentags=tag1,tag2,etc.
}}

Pulling card data from a data page[edit source]

Data pages are set up by an automated importer which is run on the wiki from time to time. This information uses card information extracted from the game client. There are four ways to identify what data page the infobox should pull card data for.

Automatic, default method[edit source]

The infobox automatically looks for a data page for a card with the same name as the page name the infobox is used on. This can acquire the wrong data if there are more than one card with that name. In these cases, a different method will need to be used.

By card name[edit source]

Another name can also be specified using the |name= parameter.

{{Card infobox
  |name=name
}}

This can be useful if the page name and card name need to be different for some reason, but this has the same drawback as the automatic method; if there is more than one card with that name, it may not acquire the correct data.

By data subpage name[edit source]

The third option is to explicitly specify which data page the card data should be acquired from by the subpage name of the data page. This works as follows:

{{Card infobox|datapage=data subpage name}}

Note that you should only include the subpage name. For example, do use Barrel(376), not Data:Cards/Barrel(376).

This guarantees no more than one infobox showing up, but if the data page doesn't exist, if it isn't using {{Card data}}, or there are certain problems with the data, nothing will show up.

By full data page name[edit source]

All proper data pages should have names starting with Data:Cards/, but this isn't desirable for data pages used for testing. In this case, you can use the |testdatapage= parameter with a full page name to exactly specify which page to use.

{{Card infobox|testdatapage=data page name}}

Manual data entry[edit source]

This can be used like a normal infobox as well, but be aware that it automatically adds card data to properties as well as performing automatic categorization. It is not intended for user-created cards or any cards not actually in the game. For anything like this, use {{Card infobox/layout}} directly, as it does not perform any of these functions.

Usage:

{{Card infobox
  |link=Hearthpwn URL without the http://www.hearthpwn.com part
  |image=image filename for the regular card without the File: prefix
  |has_gold=true if there is a gold version, false otherwise
  |gold_image=image filename for the gold card without the File: prefix
  |set=names of any sets this card is a part of, separated by commas
  |type=the type of the card, such as Minion, Spell, or Weapon
  |subtype=the subtype of the card, typically for minions
  |class=the class of the card
  |rarity=the rarity of the card
  |cost=the mana cost of the card, defaults to 0 if not provided
  |attack=the attack value of the card
  |hp=the health of the card
  |heroichp=the health of the card at heroic difficulty
  |armor=the armor of the card
  |heroicarmor=the armor of the card at heroic difficulty
  |abilities=the abilities of the card, separated by commas
  |desc=the card's text description
  |flavor=the card's flavor text
}}

Important note: If this template finds a matching data page, any values supplied by the data page take priority over these manually entered values. In most cases when this happens, the manual values here should be removed to reduce potential confusion.

But if the data page values are incorrect:

  • The first step is simply to edit the data page itself and correct the inaccurate information there. It is probably just outdated and would be fixed by the next import anyway.
  • If imports are consistently setting up an incorrect value for a card, you can use the force parameters to override the data page value. For example, |force_cost=3 would make the mana cost 3 in all of the card data's regardless of the what the data page says. This is only appropriate as a last resort, however.


Display options[edit source]

Hiding the infobox[edit source]

The infobox itself can be 'hidden' by using the |hidebox= parameter as follows:

{{Card infobox
 |hidebox=yes
}}

Technically the infobox is not hidden, rather the {{Card infobox/layout}} template is simply not called. This is useful for pages such as playable hero articles which do not wish to feature an infobox, but still need to be included in the wiki's card data system.

This template defines the table "Cards". View table.