Jump to content

Template:Infobox unit: Difference between revisions

From Dawn of Embers Wiki
Infoboxes: an empty row leaves no blank line (blank lines became paragraphs inside the previous cell)
Infobox unit: no blank line when a unit has no image
 
Line 76: Line 76:
[[Category:Infobox templates]]
[[Category:Infobox templates]]
</noinclude><includeonly>{| class="infobox" style="float:right; clear:right; width:22em; margin:0 0 1em 1em; border:1px solid #a2a9b1; background:#f8f9fa; font-size:90%;"
</noinclude><includeonly>{| class="infobox" style="float:right; clear:right; width:22em; margin:0 0 1em 1em; border:1px solid #a2a9b1; background:#f8f9fa; font-size:90%;"
|+ style="font-size:125%; font-weight:bold;" | {{{name|{{PAGENAME}}}}}
|+ style="font-size:125%; font-weight:bold;" | {{{name|{{PAGENAME}}}}}{{#if:{{{image|}}}|<nowiki/>
{{#if:{{{image|}}}|
{{!}} colspan="2" style="text-align:center;" {{!}} [[File:{{{image}}}|160px]]{{#if:{{{caption|}}}|<br/><small>{{{caption}}}</small>}}
{{!}} colspan="2" style="text-align:center;" {{!}} [[File:{{{image}}}|160px]]{{#if:{{{caption|}}}|<br/><small>{{{caption}}}</small>}}
{{!}}-
{{!}}-}}
}}
! colspan="2" style="background:#e3dccf;" | General
! colspan="2" style="background:#e3dccf;" | General
|-
|-

Latest revision as of 21:20, 13 October 2026

This is the Infobox unit template. It shows a unit's balance numbers in a box at the top of its page.

Usage

{{Infobox unit
| name          = Swordsman
| image         = Icon_Unit_Swordsman.png
| caption       =
| role          = Infantry
| damage_type   = Melee
| hp            = 140
| attack        = 14
| defense       = 6
| range         = 150
| siege_attack  = 0
| cooldown      = 1.7
| train_time    = 24
| food          = 60
| gold          = 20
| wood          =
| stone         =
| leather       =
| fibre         =
| population    = 1
| trained_at    = [[Infantry Training Grounds]]
| ranged        = No
| can_siege     = No
| move_speed    =
| status        = In the game
}}

Parameters

Parameter Meaning
name Name shown in the game. Defaults to the page name.
image File name of the unit icon or portrait.
caption Optional text under the image.
role Tactical role: Villager, Infantry, Ranged, Cavalry, Siege, Support or Mage.
damage_type Damage type label: None, Melee, Ranged, Siege, Fire, Water, Earth or Lightning. See Damage types: in the current build this label does not change damage.
hp Maximum hit points.
attack Damage per hit, before the target's armour.
defense Flat armour, subtracted from every hit taken (minimum 1 damage per hit).
range Attack range in Unreal units (uu), as the game data stores it; the box shows it in metres (100 uu = 1 m), measured to the edge of the target.
siege_attack Not shown. The balance sheet has this column, but no game code reads it in the current build, so the box does not print it.
cooldown Seconds between attacks.
train_time Base seconds to train one unit.
food, gold, wood, stone, leather, fibre Training cost. Leave empty for 0.
population Population slots the unit uses.
trained_at The building that trains it.
ranged Yes or No.
can_siege Yes or No.
move_speed Optional. Movement speed in uu per second, only where a source confirms it; the box shows metres per second.
status In the game, Story only, Not in the game, or Planned.