Template:Building
This template removes 20px, scaled by defined size, from the left and bottom of building image files and makes the image link to an anchor within Buildings
Parameters edit
Parameter | Description | Required | Default |
---|---|---|---|
1 | Building image file name, not including "Building_" or ".png" Changes dashes - to underscores _
|
optional | — |
2 | Building name, shown in hover text. Sets image size instead if w is not used. Do not use unless used alongside the w parameter. |
optional | [1] |
3 | Building name, shown in hover text. Overrides parameter 2. | optional | [1] |
w | Image size, with or without px | optional | 78px |
icon | Alternate image file, not including ".png" | optional | [1] |
icon type | Replaces "Building" at the start of the file name. Most useful for holdings. | optional | Building
|
link | Sets custom link | optional | [type]#[3] else [type]#[1]
|
type | Sets link page; one of:
Ignored if
link is used |
optional | Buildings |
margin | Additional margin-left applied after initial icon formatting
|
optional | — |
Examples edit
Basic format: {{building|image name|size|hover text}}
Note that the template automatically capitalizes the first letter for default link, but it may be necessary to manually capitalize other parts in order to properly link to a section or anchor. Check also that the link points to an actual building anchor, especially when the icon name does not match the in-game name.
Wikitext | Produces |
---|---|
[[File:Building research lab 1.png]] |
File:Building research lab 1.png |
{{building|research lab 1}} |
|
{{building|research lab 1|Research Labs|w=60px}} |
When linking to buildings that are not on the page Buildings, use the type
or link
parameters to set the correct page link.
Wikitext | Produces |
---|---|
{{building|embassy|Embassy Complex|w=60px|type=unique}} |
|
{{building|gaiaseeders 4|Gaia Seeder Outpost|w=60px|type=holding}} |
For building icons that do not use "Building" in their file name, the icon
or icon type
can be used, to either set a custom file or to set a different file prefix.
If icon type
is set to holding
, it will also link to the Holdings page by default unless overwritten with type
parameter.
Wikitext | Produces |
---|---|
{{building|Ministry of Energy|w=60px|type=holding|icon=Holding energy requisitorium}} |
|
{{building|energy requisitorium|Ministry of Energy|w=60px|icon type=holding}} |