Please note that some information on this wiki is still based on the demo version.
If you notice any errors, feel free to correct them.

Template:Infobox unit: Difference between revisions

From Super Fantasy Kingdom Official Wiki
wgg>Cadaei
bracket fix
temporary redisabled unlocking until all info is changed
 
(40 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<includeonly>{{infobox header|name={{{name|{{PAGENAME}}}}}|image={{{image|{{PAGENAME}}.png}}}|info={{{info|}}}}}<!--
<includeonly><infobox>
-->{{infobox data row | Kingdom | {{kingdomDisplay|{{{kingdom|}}}|1}}}}<!--
  <title source="title">
-->{{infobox data row | Unlocking |{{{unlocking|}}}}}<!--
    <default>{{PAGENAME}}</default>
-->{{infobox data row | Recruiting|{{{recruiting|}}}}}<!--
  </title>
-->{{infobox data row | Costs|{{{costs|}}}}}<!--
  <image source="image" />
-->{{infobox data row | Upgrade Costs|{{{upgradeCosts|}}}}}<!--
  <data source="caption">
-->{{#if:{{{damageType|}}}{{{element|}}}{{{movement|}}}{{{attackStyle|}}}{{{role|}}}|<!--
    <format>{{#if:{{{caption|}}}|''{{{caption}}}''}}</format>
-->{{infobox section header|Combat}}<!--
  </data>
-->{{infobox data row | Damage Type | {{damageTypeDisplay|{{{damageType|}}}|1}}}}<!--
  <data source="kingdom">
-->{{infobox data row | Element | {{elementDisplay|{{{element|}}}|1}}}}<!--
    <label>Kingdom</label>
-->{{infobox data row | Movement | {{movementDisplay|{{{movement|}}}|1}}}}<!--
    <format>{{kingdomDisplay|{{{kingdom|}}}|1}}</format>
-->{{infobox data row | Attack Style | {{attackStyleDisplay|{{{attackStyle|}}}|1}}}}<!--
  </data>
-->{{infobox data row | Role | {{roleDisplay|{{{role|}}}|1}}}}<!--
  <data source="unlocking">
-->}}<!--
    <label>Unlocking</label>
-->{{infobox footer}}
    <!--<default>{{UnitUnlockSmall}}</default>-->
    <format></format>
  </data>
  <data source="recruiting">
    <label>Recruiting</label>
  </data>
  <data source="upgradeCosts">
    <label>Upgrade Costs</label>
<format></format>
  </data>
  <group>
    <header>Combat</header>
    <data source="damageType">
      <label>Damage Type</label>
      <format>{{damageTypeDisplay|{{{damageType|}}}|1}}</format>
    </data>
    <data source="element">
      <label>Element</label>
      <format>{{elementDisplay|{{{element|}}}|1}}</format>
    </data>
    <data source="attackStyle">
      <label>Class</label>
      <format>{{attackStyleDisplay|{{{attackStyle|}}}|1}}</format>
    </data>
    <data source="movement">
      <label>Movement</label>
      <format>{{movementDisplay|{{{movement|}}}|1}}</format>
    </data>
    <data source="role">
      <label>Role</label>
      <format>{{roleDisplay|{{{role|}}}|1}}</format>
    </data>
    <data source="onTower">
      <label>Placeable on tower</label>
      <format>{{#ifeq:{{{onTower|}}}|yes|[[File:Tower.png|20px]] [[File:Yes.png|20px]] yes{{#if:{{#var:noAutoCategories}}||[[Category:Units placeable in towers]]}}|[[File:TowerNo.png|20px]] {{{onTower|no}}}[[Category:Units not placeable in towers]]}}</format>
    </data>
    <data source="onWall">
      <label>Placeable on wall</label>
      <format>{{#ifeq:{{{onWall|}}}|yes|[[File:Wall.png|20px]] [[File:Yes.png|20px]] yes{{#if:{{#var:noAutoCategories}}||[[Category:Units placeable on walls]]}}|[[File:WallNo.png|20px]] {{{onWall|no}}}}}</format>
    </data>
    <data source="onBench">
      <label>Active on bench</label>
      <format>{{#ifeq:{{{onBench|}}}|yes|[[File:Yes.png|20px]] yes{{#if:{{#var:noAutoCategories}}||[[Category:Units Active on bench]]}}|[[File:No.png|20px]] {{{onBench|no}}}}}</format>
    </data>
    <data>
      <label>Resistance</label>
      <default>{{kingdom bonus|{{{kingdom|}}}|resistance|ItemLink}}</default>
    </data>
    <data>
      <label>Weakness</label>
      <default>{{kingdom bonus|{{{kingdom|}}}|weakness|ItemLink}}</default>
    </data>
  </group>
</infobox>
[[Category:Units]]
[[Category:Units]]
{{#if:{{#var:noCargo}}||{{#cargo_store:_table=Units
{{#if:{{#var:noCargo}}||{{#cargo_store:_table=Units
|name={{{name|{{PAGENAME}}}}}
|name = {{{title|{{PAGENAME}}}}}
|unreleased={{#if:{{#var:unreleased}}|{{#var:unreleased}}|0}}
|onTower = {{#ifeq:{{{onTower|}}}|yes|1|0}}
|onWall = {{#ifeq:{{{onWall|}}}|yes|1|0}}
|onBench = {{#ifeq:{{{onBench|}}}|yes|1|0}}
|unreleased = {{#if:{{#var:unreleased}}|{{#var:unreleased}}|0}}
|unlocking = {{#if:{{{unlocking|}}}|{{{unlocking|}}}|{{UnitUnlockSmall}}}}
|kingdom = {{{kingdom|}}}
|isHero = {{#if:{{{isHero|}}}|1|0}}
|isSiege = {{#if:{{{isSiege|}}}|1|0}}
|description={{{caption|}}}
|damageType = {{{damageType|}}}
|element = {{{element|}}}
|movement = {{{movement|}}}
|attackStyle = {{{attackStyle|}}}
|role = {{{role|}}}
|requiredForRelics = {{{requiredForRelics|}}}
|benefitsFromRelics = {{{benefitsFromRelics|}}}
}}}}</includeonly><noinclude>
}}}}</includeonly><noinclude>
This is an infobox template for [[units]].
This is an infobox template for [[units]].
Line 23: Line 91:
<pre>
<pre>
{{infobox unit
{{infobox unit
| name = Fighter
| title = Swordsman
| image = Fighter.png
| image = Swordsman.png
| caption = Point and stab
| kingdom = Human
| kingdom = Human
| recruiting = Castle on the right
| recruiting = Castle on the right
| costs = {{ItemLink|Stone|quantity=4}}
| costs = {{ItemLink|Stone|quantity=4}}
| upgradeCosts = {{IconLinkSequence|Stone|8|16|32}}
| upgradeCosts = {{IconLinkSequence|Stone|8|16|32}}
| onTower = yes
| damageType = Physical
| damageType = Physical
| element = None
| element = None
Line 36: Line 106:
}}
}}
</pre>
</pre>
{{noCargo}}{{infobox unit
| title = Swordsman
| image = Swordsman.png
| caption = Point and stab
| kingdom = Human
| unlocking =
| recruiting = Castle on the right
| costs = {{ItemLink|Stone|quantity=4}}
| upgradeCosts = {{IconLinkSequence|Stone|8|16|32}}
| onTower = yes
| onWall = yes
| onBench = yes
| damageType = Physical
| element = None
| movement = Infantry
| attackStyle = Melee
| role = Tank
}}
{{#cargo_declare:_table=Units
{{#cargo_declare:_table=Units
|name=String
|name=String
|unlocking=String
|unlocking=String
|kingdom=String
|kingdom=String
|isHero=Boolean
|isSiege=Boolean
|description=String
|damageType=String
|damageType=String
|element=String
|element=String
Line 45: Line 136:
|attackStyle=String
|attackStyle=String
|role=String
|role=String
|onTower=Boolean
|onWall=Boolean
|onBench=Boolean
|unreleased=Boolean
|unreleased=Boolean
|requiredForRelics=String
|benefitsFromRelics=String
}}
}}
[[Category:infobox templates]]
[[Category:infobox templates]]
[[Category:Cargo storing templates]]</noinclude>
[[Category:Cargo storing templates]]</noinclude>

Latest revision as of 02:52, 23 April 2026

This is an infobox template for units. Use it on unit pages, e.g. like this

{{infobox unit
| title = Swordsman
| image = Swordsman.png
| caption = Point and stab
| kingdom = Human
| recruiting = Castle on the right
| costs = {{ItemLink|Stone|quantity=4}}
| upgradeCosts = {{IconLinkSequence|Stone|8|16|32}}
| onTower = yes
| damageType = Physical
| element = None
| movement = Infantry
| attackStyle = Melee
| role = Tank
}}

This template defines the table "Units". View table.