Template:Scroll data/talents/doc

Purpose
This template displays talents of a scroll, or related information, according to its data subpage.

This allows all references to scroll data in any page to be updated by a single edit to the data subpage.

Note that this template doesn't include regular abilities. See Template:Scroll data/abilities if you need to address both talents and abilities.

Usage
In order to work, this template requires that a data subpage is properly defined for the scroll it is referring to (see Template:Scroll data documentation).

This template is mainly to be used in the said scroll's page, where one would write talents in the text. However, it can also be included in other pages provided the  parameter is defined (see below example).

Various information can be displayed by this template: The default behavior is to display the talent whose position is given by the  parameter. Other pieces of information may be displayed using flags (see Anonymous parameters).
 * all talents of a scroll in sequence (as a comma-separated list),
 * all talents of a scroll as a list,
 * the total number of talents of a scroll,
 * the text of one particular talent.

Single talent blank template
To use this template, you can copy and paste the following code to the scroll page you want to use it on, and fill in parameters.

Other uses blank templates
To use this template, you can copy and paste one of the following codes to the scroll page you want to use it on, and fill in parameters.

Anonymous parameters
Anonymous parameters of this template are used as flags which alter the default behavior of the template (see Usage). This means that each anonymous parameter (without name and equals sign before the value) can be one of the fixed values detailed in the below table.

All flags are optional and they can be written in any order. They can also be mixed with named parameters (unless stated otherwise).

Note that only the first anonymous parameter is checked for flags.

Single talent example
Below example shows what the template would output if used on Gravehawk page. No flag is set, and the first ability is selected.

's first talent is.

Result:

's first talent is.

Flag examples
Below table shows the effects of each flag. As for previous example, results show what would be displayed if used on Gravehawk page.

Number-dependent example
Below example illustrates how the  flag can be used to write sentences depending on the number of talents. Here, it is achieved using MediaWiki's  magic word.

Results show what would be displayed if used on Gravehawk or Ash Runner page.

's NaN talent iss:

Result: (on Gravehawk page, which has 1 talent)

's NaN talent iss:

Result: (on Ash Runner page, which has 2 talents)

's NaN talent iss:

Default message example
This example demonstrates the effects of the  parameter.

Results show what would be displayed if used on Gravehawk or Ancestral Totem page.

Result: (on Gravehawk page, which has 1 talent)

Result: (on Ancestral Totem page, which has no talents)

Example with a specific data page
Below example refers to Gravehawk data but works in any page (contrary to previous examples).

Result:

Related templates

 * Scroll data
 * Scroll data/abilities
 * Scroll data/attack
 * Scroll data/cost
 * Scroll data/countdown
 * Scroll data/flavor
 * Scroll data/health
 * Scroll data/name
 * Scroll data/rarity
 * Scroll data/resource
 * Scroll data/subtypes
 * Scroll data/type