Template:Species link/doc

From Against the Storm Official Wiki
< Template:Species link
Revision as of 01:32, 12 October 2024 by Aeredor (talk | contribs) (→‎Examples: edits)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Overview

Creates a link to a species' page.

Parameters

Species

The name of the species is the only required parameter. Use the name of the species as it appears in game. A missing or misspelled species name will result in an error.

If you do not wish to write the code species=, you may skip that, but you must specify the name of the species before any other parameters.

Parameter Type Description
species string The name of the species, as it appears in the game, either singular or plural.

Output overrides

All of these parameters are optional and change how the link is formatted.

Parameter Type Description
iconsize string one of the following: small, medium, large, huge. You may also write none to skip the icon. The default is small, which is text-height for use in paragraphs. If you do not name this parameter, it must come second.
display string if you include display=notext, only the icon will be rendered. There are currently no other options for this parameter.

Examples

Basic usage

{{Species link|species=Humans}}

Yields Humans Humans, a text-height icon that flows well in paragraphs without impacting line height.


{{Species link|human|iconsize=medium}}

Yields a slightly larger icon, suitable for easy recognition in tables:

Humans Humans


{{Species link|human|large}}

Yields a larger icon, suitable for tables featuring the species as an important factor:

Humans Humans

Other examples

{{Species link|species=Harpy|iconsize=small|display=notext}}

Yields just a linked icon Harpies for the Harpies. Use this sparingly, because it is not as accessible, and in paragraphs the icons can be hard to distinguish. This is good in tables where the icon functions as a reminder than an important factor. An example where this is useful is in the infoboxes of buildings which feature specialization as an important factor, and the species icon is shown next to the specialization as just a quick reminder.


{{Species link|human|none}}

Yields just the text link, Humans, suitable for when mentioning more than one time in the same paragraph to avoid cluttering the paragraph with icons. (This is preferable to using a regular wiki link, so the styling matches, even if it appears to have the same styling right now.)


{{Species link|Foxes|iconsize=gigantic}}

Providing an icon size that is not recognized does not return an error. Instead, the template shows the default, small icon size: Foxes Foxes

Errors

The following are error messages generated by calling the template incorrectly.

{{Species link}}

With no arguments: Lua error in Module:SpeciesLink at line 66: You must specify the name of the species. Please see the template documentation for how to use the parameters..

{{Species link|Centaurs}}

Naming a species that doesn't exist in the game: Lua error in Module:SpeciesLink at line 49: You specified an invalid species name. Please see the template documentation for how to use the parameters..