Template:Building link/doc: Difference between revisions
(Created documentation) |
(→Output overrides: added list of plural building names that end in -y) |
||
Line 41: | Line 41: | ||
Building links that are written into paragraphs should use either no icon or a small icon, neither of which is the default. The small icon for buildings is not very recognizable (compared to species, resources, or specializations). Avoid it unless necessary, but it is available in case it is needed. | Building links that are written into paragraphs should use either no icon or a small icon, neither of which is the default. The small icon for buildings is not very recognizable (compared to species, resources, or specializations). Avoid it unless necessary, but it is available in case it is needed. | ||
The pages for the names of buildings ending in -y when plural have already been created as redirect pages, so you may use them freely: | |||
* {{Building link|Apothecary|s|size=none}} | |||
* {{Building link|Bakery|s|size=none}} | |||
* {{Building link|Beanery|s|size=none}} | |||
* {{Building link|Brewery|s|size=none}} | |||
* {{Building link|Distillery|s|size=none}} | |||
* {{Building link|Granary|s|size=none}} | |||
* {{Building link|Manufactory|s|size=none}} | |||
* {{Building link|Monastery|s|size=none}} | |||
* {{Building link|Smithy|s|size=none}} | |||
* {{Building link|Tinctury|s|size=none}} | |||
== Examples == | == Examples == |
Revision as of 03:39, 15 October 2024
Overview
Creates a link to a building's page.
A shortcut template exists for this template, Template:bl. You can use {{bl}}
instead of {{Building link}}
with the same parameters.
Parameters
Building
The name of the building is the only required parameter. Use the name as it appears in-game, including apostrophes (for example, the Woodcutters' Camp—not Woodcutter's Camp). A missing or mispelled (or mis-punctuated) building name will result in an error.
If you do not wish to write the code name=
, you may skip that, but you must specify the name of the building before any other parameters.
Parameter | Type | Description |
---|---|---|
name | string | The name of the building, as it appears in the game. |
Output overrides
All of these parameters are optional and change how the link is formatted.
Parameter | Type | Description |
---|---|---|
size | string | The size of the icon to display. Choose one of the following:
The default for buildings is |
display | string | If you include display=notext only the icon will be rendered. There are currently no other options for this parameter.
|
unnamed parameter | string | Including this formats the link with the plural name of the building. You may use either s or es to append it to the end of the link in a highly readable way, like this: {{bl|Cookhouse|s|size=large}} . Adding "s" after the template call no longer includes the "s" in the link.
|
Building links that are written into paragraphs should use either no icon or a small icon, neither of which is the default. The small icon for buildings is not very recognizable (compared to species, resources, or specializations). Avoid it unless necessary, but it is available in case it is needed.
The pages for the names of buildings ending in -y when plural have already been created as redirect pages, so you may use them freely:
- Apothecaries
- Bakeries
- Beaneries
- Breweries
- Distilleries
- Granaries
- Manufactories
- Monasteries
- Smithies
- Tincturies
Examples
Basic usage
{{Building link|Ranch}}
Yields a suitably sized icon for recognition and use in tables:
{{Building link|Trapper's Camp|size=none}}
Skips the icon, like in Trappers' Camp so it's easy to flow into paragraphs about villagers trapping and gathering things. The small version of building icons isn't very recognizable, as you can see in Trappers' Camp so no icon is strongly advised.
{{Building link|name=Ranch|large}}
Yields a larger icon for great recognition:
{{Building link|Ranch|size=huge}}
Yields the largest icon, which is great for headlining tables about this building:
Other examples
{{Building link|Ranch|s}}
Formats the link so the name appears plural, but still links to the correct page (hover to see tooltip, or click):
{{Building link|Trappers' Camp|s|size=gigantic}}
Specifying an icon size that is not recognized does not return an error. Instead, the default medium-sized icon is used:
{{Building link|Apothecary|s|size=none}}
Mentioning how important Apothecaries are to your villagers does format the building name correctly as plural!
Errors
The following are error messages generated by calling the template incorrectly.
{{Building link}}
With no arguments: Lua error in Module:BuildingLink at line 88: You must specify a building. Please see the template documentation for how to use the parameters.
{{Building link|Library}}
Naming a building that doesn't exist in the game: Lua error in Module:BuildingLink at line 59: No building found with name: Library. Please see the template documentation for how to use the parameters.