Template:Set list
This template uses Lua: |
This template is used to generate set lists.
UsageEdit
{{Set list|region=|rarities=|options=|print=|qty=|description=|$description=|columns=|$columns=| <card number>; <card name>; <card rarities>; <print>; <quantity> // <entry options> }}
Each template call builds one list only. For multiple lists on the same page, multiple calls to the template must be made.
Ideally, for this case, each separate list should have its own MediaWiki header.
For the page header, {{Set page header}} must be used.
ParametersEdit
All parameters are optional except where noted.
region
- Required parameter. Used to pass a region (e.g.,
EN
,French
,AE
).
rarities
- Used to pass the rarities of the card. Each rarity should be separated by a
,
. The rarities entered here will be used as default, in case no rarities are passed into each individual entry.
options
- Receives a list of options. Each option is separated by
;
. Currently, the available options are:noabbr
: Omits the card number column. Indicates the cards don't have a card number.
print
- Used to indicate if a card was introduced in a set or reprinted from an earlier set. The column's default value is the value passed. This parameter can be used empty, to just display the column with empty cells.
qty
- Used to pass a quantity value. The value must be convertible to a number. The column's default value is the value passed. This parameter can be used empty, to just display the column with empty cells.
description
- Appends a description to the English card name. The value passed will be used as a default value.
$description
- Sets a template description.
columns
- Receives a list of pairs. Each pair is separated by
;
and consist of a column name and the column default value, separated by `::`. To omit the default value, just enter the column name (e.g.,columns=Notes::Default notes; More notes
). Each pair will append a new column to the list generated.
$columns
- Receives a list of pairs, just like the above, but the value is a template for the column content.
Building an entryEdit
Each entry goes in one line.
Entries are in the form of <card number>; <card name>; <card rarities>; <print>; <quantity> // <entry options>
.
card number
- The card number. For cards that don't have a card number, it should be left blank (but still separated from the card name). If the global option
noabbr
is used, the card number is omitted and the first value will be considered as the card name, the second the card rarities and so on.
card name
- The card English name or the pagename. Supports
#
in the card name. If the card English name uses less common characters, it's advised to input the pagename here and use the entry optionforce-SMW
.
card rarities
- All of the card's rarities, separated by
,
. If left empty, the default rarities defined in parameterrarities
will be used.
print
- Only takes effect if the parameter
print
is in use. Indicates the card print. If left empty, the default print value, if any, defined in parameterprint
will be used. If parameterprint
was not used, this field is skipped and will be considered as the quantity, in case the parameterqty
is in use.
quantity
- Only takes effect if the parameter
qty
is in use. Indicates the fixed amount of copies of this card present in this set. If left empty, the default quantity value, if any, defined in parameterqty
will be used.
Entry optionsEdit
The options part is optional and is separated by inserting //
and then the options pairs. Each option is a pair separated by ;
and consists of an option name and the respective value, separated by `::`. Available options are:
printed-name::<old name>
- Used for when the card was released in that set with a name different the current name. This appends the old name to the localized name this list represents, so this should be used only if the name of the card in that language was different at the time of release than it is now.
description::<value>
- Adds a description next to the English name. If this is not used but the
description
parameter is used, it will display the defaultdescription
. If a value is present, it will display that value (regardless of the defaultdescription
). The only exception is if$description
was used; the value passed here will be interpolated to the template value defined by$description
.
force-SMW
- This option enables extra fetching from SMW properties. This option is to be used when there is a need to get the card English name from the pagename (provided as input).
Besides these default options, other special options are supported to fill the cells for the columns added through columns
and $columns
. Each column content option is called like any other option, except the name is the column name and it must be prepended with @
. So if columns=My column
is used, then to populate the cell for that column in this entry, @My column::<column content>
must be used. If the column option is used but left blank, it will clear the default value, if any, ignore the template, if any, and display blank.
ExamplesEdit
- Set Card Lists:Duelist Pack: Jaden Yuki 2 (TCG-FR) (Use of the
printed-name
entry option.) - Set Card Lists:Booster 3 (OCG-JP) (Use of the
noabbr
option.) - Set Card Lists:Yu-Gi-Oh! ZEXAL manga promotional cards (OCG-JP) (Use of custom columns.)
- Set Card Lists:Yu-Gi-Oh! ZEXAL manga promotional cards (TCG-EN) (Use of custom columns with interpolation.)
- Set Card Lists:777 Treasure Campaign (OCG-JP) (Use of
force-SMW
entry option.)
Tracking categoriesEdit
- Category:((Set list)) transclusions to be checked: General category that contains all pages using {{Set list}} with errors. Each page present in the following categories is also present on this one.
- Category:((Set list)) transclusions with invalid parameters: There are parameters in use that are not part of this template.
- Category:((Set list)) transclusions with missing required parameters: There are template parameters that are required but were not entered.
- Category:((Set list)) transclusions with empty parameters: There are template parameters in use that are not receiving any value, but should always receive a non-empty value when used.
- Category:((Set list)) transclusions with empty options: There is a place that receives input in the options format but received empty options.
- Category:((Set list)) transclusions with invalid region: The region provided was invalid.
- Category:((Set list)) transclusions with duplicate rarities: The list of rarities provided for the default rarities or for an entry contains the same rarity multiple times.
- Category:((Set list)) transclusions with invalid rarities: The list of rarities provided for the default rarities or for an entry contains rarities that are not valid.
- Category:((Set list)) transclusions with empty rarities: The list of rarities provided for the default rarities or for an entry contains multiple straight
,
(empty rarities). - Category:((Set list)) transclusions with invalid quantity values: The quantity value provided for the default quantity or for an entry cannot be parsed as a number.
- Category:((Set list)) transclusions with empty printed-name: The entry option
printed-name
is used but it's empty. - Category:((Set list)) transclusions with printed-name but no card name: The entry option
printed-name
is used but there is no card name inputted.
Each page tagged with each of these tracking categories presents details about the errors.