Unit can be used to create info tooltips or table rows for units.
Parameters
| Parameter | Description | Required | Default |
|---|---|---|---|
| 1 | English localized unit name | Required | none |
| index | Tooltip index, for tooltip-in-a-tooltip use
|
Optional | none |
| w | Width of icon, no effect if used with table |
Optional | 24px |
| table | Formats output as a table row instead of tooltip, if set to anything | Optional | none |
Parameter 1 must be the proper English localized name of the unit; names that are localized in plural can also be singular (indicated with "(s)"):
| Irregular Infantry | Cannon Artillery | Hussar(s) |
| Line Infantry | Mobile Artillery | Dragoon(s) |
| Skirmish Infantry | Shrapnel Artillery | Cuirassier(s) |
| Trench Infantry | Siege Artillery | Lancer(s) |
| Squad Infantry | Heavy Tank(s) | Light Tank(s) |
| Mechanized Infantry |
| Frigate(s) | Man-o-War(s) | Submarine(s) |
| Monitor(s) | Ironclad(s) | Carrier(s) |
| Destroyer(s) | Dreadnought(s) | |
| Torpedo Boat(s) | Battleship(s) | |
| Scout Cruiser(s) |
Tooltip usage
This template can be used in paragraphs by wrapping the paragraph in a <div></div> or <span></span> tag, otherwise it breaks the paragraph layout. It can be used in wiki lists or table cells without issue otherwise. If index is not set, this is not necessary.
Table usage
This template outputs into the following table format. The template should be put in the first column and it generates the remaining columns for its row.
| Type | Stats | Upkeep |
|---|---|---|
Template goes here
|
Each unit in the table requires its own use of the template in a new row.
Examples
{{Unit|Irregular Infantry|index=1}} results in
Always unlocked
Note the line break; wrapping the paragraph in <span></span> results in:
{{Unit|Irregular Infantry|index=1}} results in Always unlocked
Setting the index to a non-number or a number above 3 prevents a tooltip and sets just a basic icon display:
{{Unit|Battleships}} results in Battleships Battleships
Table usage appears as follows
| Type | Stats | Upkeep |
|---|---|---|
{{Unit|Frigates|table=1}} results in
| ||
Frigates Frigates
|
|
|