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 |
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|{{{ | -->{{#if:{{{damageType|}}}|{{#switch: {{{damageType}}} | ||
{{infobox data row | Element|{{{ | | Physical = [[Category:Physical damage]]{{#vardefine:damageType|{{ItemLink|Physical Damage|Physical}}}} | ||
{{infobox data row | Movement |{{{ | | Magic = [[Category:Magical damage]]{{#vardefine:damageType|{{ItemLink|Magic Damage|Magic}}}} | ||
{{infobox data row | Attack Style |{{{ | | #default = {{#vardefine:damageType|{{{damageType}}}}} | ||
{{ | }}<!-- | ||
{{ | -->{{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 = | | damageType = Physical | ||
| element = None | | element = None | ||
| movement = | | movement = Cavalry | ||
| attackStyle = | | attackStyle = Melee | ||
| role = | | role = Tank | ||
}} | }} | ||
</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}} | ||
| damageType = Physical | |||
| damageType = | |||
| element = None | | element = None | ||
| attackStyle = | | movement = Cavalry | ||
| role = | | attackStyle = Melee | ||
| 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


