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
fix for empty values in table?
temporary redisabled unlocking until all info is changed
 
(5 intermediate revisions by the same user not shown)
Line 13: Line 13:
   <data source="unlocking">
   <data source="unlocking">
     <label>Unlocking</label>
     <label>Unlocking</label>
    <!--<default>{{UnitUnlockSmall}}</default>-->
    <format></format>
   </data>
   </data>
   <data source="recruiting">
   <data source="recruiting">
Line 19: Line 21:
   <data source="upgradeCosts">
   <data source="upgradeCosts">
     <label>Upgrade Costs</label>
     <label>Upgrade Costs</label>
<format></format>
   </data>
   </data>
   <group>
   <group>
     <header>Combat</header>
     <header>Combat</header>
    <data source="onTower">
      <label>Placeable on tower</label>
      <format>{{#ifeq:{{{onTower|}}}|yes|[[File:Tower.png|20px]] yes{{#if:{{#var:noAutoCategories}}||[[Category:Units placeable in towers]]}}|{{{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]] yes{{#if:{{#var:noAutoCategories}}||[[Category:Units placeable on walls]]}}|{{{onWall|no}}}[[Category:Units not placeable on walls]]}}</format>
    </data>
    <data source="onBench">
      <label>Active Ability from bench</label>
      <format>{{#ifeq:{{{onBench|}}}|yes|yes{{#if:{{#var:noAutoCategories}}||[[Category:Units Active Ability from bench]]}}|{{{onBench|no}}}[[Category:Units not Active Ability from bench]]}}</format>
    </data>
     <data source="damageType">
     <data source="damageType">
       <label>Damage Type</label>
       <label>Damage Type</label>
Line 41: Line 32:
       <label>Element</label>
       <label>Element</label>
       <format>{{elementDisplay|{{{element|}}}|1}}</format>
       <format>{{elementDisplay|{{{element|}}}|1}}</format>
    </data>
    <data source="attackStyle">
      <label>Class</label>
      <format>{{attackStyleDisplay|{{{attackStyle|}}}|1}}</format>
     </data>
     </data>
     <data source="movement">
     <data source="movement">
       <label>Movement</label>
       <label>Movement</label>
       <format>{{movementDisplay|{{{movement|}}}|1}}</format>
       <format>{{movementDisplay|{{{movement|}}}|1}}</format>
    </data>
    <data source="attackStyle">
      <label>Attack Style</label>
      <format>{{attackStyleDisplay|{{{attackStyle|}}}|1}}</format>
     </data>
     </data>
     <data source="role">
     <data source="role">
       <label>Role</label>
       <label>Role</label>
       <format>{{roleDisplay|{{{role|}}}|1}}</format>
       <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>
     <data>
     <data>
Line 71: Line 74:
|onBench = {{#ifeq:{{{onBench|}}}|yes|1|0}}
|onBench = {{#ifeq:{{{onBench|}}}|yes|1|0}}
|unreleased = {{#if:{{#var:unreleased}}|{{#var:unreleased}}|0}}
|unreleased = {{#if:{{#var:unreleased}}|{{#var:unreleased}}|0}}
|unlocking = {{#if:{{{unlocking|}}}|{{{unlocking|}}}|-}}
|unlocking = {{#if:{{{unlocking|}}}|{{{unlocking|}}}|{{UnitUnlockSmall}}}}
|kingdom = {{{kingdom|}}}
|kingdom = {{{kingdom|}}}
|isHero = {{#if:{{{isHero|}}}|1|0}}
|isHero = {{#if:{{{isHero|}}}|1|0}}
Line 103: Line 106:
}}
}}
</pre>
</pre>
{{infobox unit
{{noCargo}}{{infobox unit
| title = Swordsman
| title = Swordsman
| image = Swordsman.png
| image = Swordsman.png
| caption = Point and stab
| caption = Point and stab
| kingdom = Human
| kingdom = Human
| unlocking =
| 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
| onTower = yes
| onWall = yes
| onBench = yes
| damageType = Physical
| damageType = Physical
| element = None
| element = None

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.