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
Undo revision 3059 by Cadaei (talk)
wgg>Cadaei
auto categorize and itemLinkize
Line 1: Line 1:
<includeonly>{{infobox header|name={{{name|{{PAGENAME}}}}}|image={{{image|{{PAGENAME}}.png}}}|info={{{info|}}}}}
<includeonly>{{infobox header|name={{{name|{{PAGENAME}}}}}|image={{{image|{{PAGENAME}}.png}}}|info={{{info|}}}}}<!--
{{infobox data row | Race | {{{race|}}}}}
-->{{infobox data row | Race | {{{race|}}}}}<!--
{{infobox data row | Recruiting|{{{recruiting|}}}}}
-->{{infobox data row | Recruiting|{{{recruiting|}}}}}<!--
{{infobox data row | Costs|{{{costs|}}}}}
-->{{infobox data row | Costs|{{{costs|}}}}}<!--
{{infobox data row | Upgrade Costs|{{{upgradeCosts|}}}}}
-->{{infobox data row | Upgrade Costs|{{{upgradeCosts|}}}}}<!--
{{infobox data row | Damage Type|{{{damageType|}}}}}
-->{{#if:{{{damageType|}}}|{{#switch: {{{damageType}}}
{{infobox data row | Element|{{{element|}}}}}
      | Physical = [[Category:Physical damage]]{{#vardefine:damageType|{{ItemLink|Physical Damage|Physical}}}}
{{infobox data row | Movement |{{{movement|}}}}}
      | Magic = [[Category:Magical damage]]{{#vardefine:damageType|{{ItemLink|Magic Damage|Magic}}}}
{{infobox data row | Attack Style |{{{attackStyle|}}}}}
      | #default = {{#vardefine:damageType|{{{damageType}}}}}
{{infobox data row | Role |{{{role|}}}}}
      }}<!--
{{infobox data row | {{Tooltip|Preferred Food|gives 5 xp when eaten}} |{{{preferredFood|}}}}}
    -->{{infobox data row | Damage Type | {{#var:damageType}}}}}}<!--
{{infobox footer}}
-->{{#if:{{{element|}}}|{{#switch: {{{element}}}
      | Holy
      | Fire
      | Plant
      | Poison
      | Dark
      | Electric = [[Category:{{{element}}}]]{{#vardefine:element|{{ItemLink|{{{element}}}}}}}
      | #default = {{#vardefine:element|{{{element}}}}}
      }}<!--
    -->{{infobox data row | Element | {{#var:element}}}}}}<!--
-->{{#if:{{{movement|}}}|{{#switch: {{{movement}}}
      | Airborne
      | Infantry
      | Cavalry = [[Category:{{{movement}}}]]{{#vardefine:movement|{{ItemLink|{{{movement}}}}}}}
      | #default = {{#vardefine:movement|{{{movement}}}}}
      }}<!--
    -->{{infobox data row | Movement | {{#var:movement}}}}}}<!--
-->{{#if:{{{attackStyle|}}}|{{#switch: {{{attackStyle}}}
      | Melee
      | Ranged
      | Summoner = [[Category:{{{attackStyle}}}]]{{#vardefine:attackStyle|{{ItemLink|{{{attackStyle}}}}}}}
      | Magic = [[Category:Magic damage]]{{#vardefine:attackStyle|{{ItemLink|Magic damage}}}}
      | #default = {{#vardefine:attackStyle|{{{attackStyle}}}}}
      }}<!--
    -->{{infobox data row | Attack Style | {{#var:attackStyle}}}}}}<!--
-->{{#if:{{{role|}}}|{{#switch: {{{role}}}
      | Tank
      | Support = [[Category:{{{role}}}]]{{#vardefine:role|{{ItemLink|{{{role}}}}}}}
      | Damage = [[Category:Damage dealers]]{{#vardefine:role|{{ItemLink|Damage (combat)|Damage}}}}
      | #default = {{#vardefine:role|{{{role}}}}}
      }}<!--
    -->{{infobox data row | Role | {{#var:role}}}}}}<!--
-->{{infobox footer}}
[[Category:Units]]</includeonly><noinclude>
[[Category:Units]]</includeonly><noinclude>
This is an infobox template for [[units]].
This is an infobox template for [[units]].
Line 22: Line 54:
| costs = {{ItemLink|Stone|quantity=4}}
| costs = {{ItemLink|Stone|quantity=4}}
| upgradeCosts = {{IconLinkSequence|Stone|8|16|32}}
| upgradeCosts = {{IconLinkSequence|Stone|8|16|32}}
| damageType = {{ItemLink|Physical Damage}}
| damageType = Physical
| element = None
| element = None
| movement = {{ItemLink|Calvary}}
| movement = Cavalry
| attackStyle = {{ItemLink|Melee}}
| attackStyle = Melee
| role = {{ItemLink|Tank}}
| role = Tank
| preferredFood = {{ItemLink|Rabbit}}
}}
}}
</pre>
</pre>
Line 37: Line 68:
| costs = {{ItemLink|Stone|quantity=4}}
| costs = {{ItemLink|Stone|quantity=4}}
| upgradeCosts = {{IconLinkSequence|Stone|8|16|32}}
| upgradeCosts = {{IconLinkSequence|Stone|8|16|32}}
| movement = {{ItemLink|Infantry}}
| damageType = Physical
| damageType = {{ItemLink|Physical Damage}}
| element = None
| element = None
| attackStyle = {{ItemLink|Melee}}
| movement = Cavalry
| role = {{ItemLink|Tank}}
| attackStyle = Melee
| preferredFood = {{ItemLink|Rabbit}}
| role = Tank
}}
}}
[[Category:infobox templates]]</noinclude>
[[Category:infobox templates]]</noinclude>

Revision as of 20:00, 12 October 2023

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

{{infobox unit
| name = Fighter
| image = Fighter.png
| race = {{ItemLink|Human}}
| recruiting = Castle on the right
| costs = {{ItemLink|Stone|quantity=4}}
| upgradeCosts = {{IconLinkSequence|Stone|8|16|32}}
| damageType = Physical
| element = None
| movement = Cavalry
| attackStyle = Melee
| role = Tank
}}

Template:Infobox headerTemplate:Infobox data rowTemplate:Infobox data rowTemplate:Infobox data rowTemplate:Infobox data rowTemplate:Infobox data rowTemplate:Infobox data rowTemplate:Infobox data rowTemplate:Infobox data rowTemplate:Infobox data rowTemplate:Infobox footer