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 building: Difference between revisions

From Super Fantasy Kingdom Official Wiki
wgg>Cadaei
use data row template
added the remaining parameters, example has all parameters used, added empty copy paste list
 
(39 intermediate revisions by 7 users not shown)
Line 1: Line 1:
<includeonly>{| class="wikitable" style="float:right; width:20em"  
<includeonly><infobox>
! colspan=2 | <span style="font-size: larger;">{{{name|{{PAGENAME}}}}}</span>
  <title source="title">
|-
    <default>{{PAGENAME}}</default>
| colspan=2 style="text-align:center" | [[File:{{{image|{{PAGENAME}}.png}}}|128px]]
  </title>
{{infobox data row|Building slot|{{{size|}}}}}
  <image source="image" />
{{infobox data row|Building costs|{{{buildCosts|}}}}}
  <data source="caption"/>
{{infobox data row|Upgrade Costs|{{{upgradeCosts|}}}}}
  <data source="kingdom">
{{infobox data row|Max workers|{{{maxWorkers|}}}}}
    <label>Kingdom</label>
|}
    <format>{{kingdomDisplay|{{{kingdom|}}}|1}}</format>
[[Category:Buildings]]</includeonly><noinclude>
  </data>
  <data source="size">
    <label>Building size</label>
  </data>
  <data source="buildCosts">
    <label>Building costs</label>
  </data>
  <data source="storage">
    <label>Storage</label>
  </data>
  <data source="productionTime">
    <label>Production Time</label>
  </data>
  <data source="gatheringTime">
    <label>Gathering Time</label>
  </data>
  <data source="maxWorkers">
    <label>Max [[worker]]s</label>
  </data>
  <data source="maxCarriers">
    <label>Max [[carrier]]s</label>
  </data>
  <data source="amountToHarvest">
    <label>Amount to harvest</label>
  </data>
  {{#if: {{{output|}}} |
  <data source="output">
    <label>Output</label>
    <format>{{ItemList|{{{output|}}}}}</format>
  </data>
}}>
  <group>
    <header>Upgrade</header>
    <image source="upgradeImage" />
    <data source="upgrade">
      <label>Upgrade</label>
    </data>
    <data source="upgradeCosts">
      <label>Upgrade costs</label>
    </data>
  </group>
</infobox><!--
-->{{#if:{{#var:noAutoCategories}}||[[Category:Buildings]]}}<!--
-->{{#if:{{#var:noCargo}}||{{#cargo_store:_table=Buildings
|name={{{title|{{#titleparts:{{PAGENAME}}<!-- -->}}}}}
|kingdom={{{kingdom|}}}
|sizeLarge={{{size|}}}
|buildCost={{{buildCost|}}}
|utility={{{utility|}}}
|upgradeInfo={{{upgradeInfo|}}}
|upgradeCost={{{upgradeCosts|}}}
|output={{{output|}}}
|unreleased={{#if:{{{unreleased|}}}|1|0}}
|removed={{#if:{{{removed|}}}|1|0}}
}}}}</includeonly><noinclude>{{noCargo}}
{{#cargo_declare:_table=Buildings
|name=String
|kingdom=String
|size=String
|buildCost=Wikitext string
|utility=Wikitext string
|upgradeInfo=Wikitext string
|upgradeCost=Wikitext string
|output=List (,) of String
|unreleased=Boolean
|removed=Boolean
}}
This is an infobox template for buildings.
This is an infobox template for buildings.
==Parameters==
* <code>title</code>: string, e.g. Bakery
* <code>image</code>: string, e.g. Bakery.png
* <code>caption</code>: string, e.g. bakes bread
* <code>kingdom</code>: string, e.g. Human
* <code>size</code>: string, e.g. large or small
* <code>buildCosts</code>:
* <code>storage</code>: string, e.g. list of items
* <code>productionTime</code>: string, e.g. 5 s
* <code>gatheringTime</code>: string, e.g. 5 s
* <code>maxWorkers</code>: integer
* <code>maxCarriers</code>: integer
* <code>amountToHarvest</code>:
* <code>output</code>: comma separated string, e.g. water, bread
* <code>upgradeImage</code>: string, e.g. Super bakery.png
* <code>upgrade</code>: string, name of the upgrade for the building
* <code>upgradeCosts</code>:
* <code>utility</code>: short text about the building
* <code>upgradeInfo</code>: short text about the upgraded building
* <code>unreleased</code>: boolean, 1 if unreleased
* <code>removed</code>: boolean, 1 if removed
Use it on building pages, e.g. like this
Use it on building pages, e.g. like this
<pre>
{{infobox building
{{infobox building
| name = Quarry
| title = Fake example building Bakery
| image = Quarry.png
| image = Bakery.png
| caption = bakes bread
| kingdom = Human
| size = large
| size = large
| buildCosts = {{ItemLink|Wood|quantity=3}}
| buildCosts = {{ItemLink|Board|quantity=5}}<br/>{{ItemLink|Wheat|quantity=2}}
| upgrade = Mason
| storage = {{ItemLink|Flour|quantity=5}}<br/>{{ItemLink|Water|quantity=5}}<br/>{{ItemLink|Bread|quantity=5}}
| upgradeCosts = Ingots
| productionTime = 5 s
| maxWorkers = 5
| gatheringTime = 7 s
| maxWorkers = 3
| maxCarriers = 2
| amountToHarvest = 4
| output = Bread
| upgradeImage = Decoration2.png
| upgrade = upgrade example
| upgradeCosts = {{IconLinkSequence|Gold|4|8|12|16}}
| utility = this example building is for show and does nothing
| upgradeInfo = upgraded example of the building, upgrade adds nothing extra
| unreleased =
| removed =  
}}
}}
</pre>
<pre>
{{infobox building
{{infobox building
| name = Quarry
| title = Fake example building Bakery
| image = Quarry.png
| image = Bakery.png
| caption = bakes bread
| kingdom = Human
| size = large
| size = large
| buildCosts = {{ItemLink|Wood|quantity=3}}
| buildCosts = {{ItemLink|Board|quantity=5}}<br/>{{ItemLink|Wheat|quantity=2}}
| upgrade = Mason
| storage = {{ItemLink|Flour|quantity=5}}<br/>{{ItemLink|Water|quantity=5}}<br/>{{ItemLink|Bread|quantity=5}}
| upgradeCosts = Ingots
| productionTime = 5 s
| maxWorkers = 5
| gatheringTime = 7 s
}}
| maxWorkers = 3
| maxCarriers = 2
| amountToHarvest = 4
| output = Bread
| upgradeImage = Decoration2.png
| upgrade = upgrade example
| upgradeCosts = {{IconLinkSequence|Gold|4|8|12|16}}
| utility = this example building is for show and does nothing
| upgradeInfo = upgraded example of the building, upgrade adds nothing extra
| unreleased =
| removed =  
}}</pre>
 
empty copy paste list
<pre>
{{infobox building
{{infobox building
| name = Quarry
| title =  
| image = Quarry.png
| image =  
| size = large
| caption =
| buildCosts = {{ItemLink|Wood|quantity=3}}
| kingdom =
| maxWorkers = 5
| size =  
}}
| buildCosts =  
| storage =
| productionTime =
| gatheringTime =  
| maxWorkers =  
| maxCarriers =
| amountToHarvest =
| output =
| upgradeImage =
| upgrade =
| upgradeCosts =
| utility =
| upgradeInfo =
| unreleased =
| removed =
}}</pre>
 
[[Category:Cargo storing templates]]
[[Category:Infobox templates]]</noinclude>
[[Category:Infobox templates]]</noinclude>

Latest revision as of 02:17, 6 December 2025

This template defines the table "Buildings". View table. This is an infobox template for buildings.

Parameters

  • title: string, e.g. Bakery
  • image: string, e.g. Bakery.png
  • caption: string, e.g. bakes bread
  • kingdom: string, e.g. Human
  • size: string, e.g. large or small
  • buildCosts:
  • storage: string, e.g. list of items
  • productionTime: string, e.g. 5 s
  • gatheringTime: string, e.g. 5 s
  • maxWorkers: integer
  • maxCarriers: integer
  • amountToHarvest:
  • output: comma separated string, e.g. water, bread
  • upgradeImage: string, e.g. Super bakery.png
  • upgrade: string, name of the upgrade for the building
  • upgradeCosts:
  • utility: short text about the building
  • upgradeInfo: short text about the upgraded building
  • unreleased: boolean, 1 if unreleased
  • removed: boolean, 1 if removed

Use it on building pages, e.g. like this

{{infobox building
| title = Fake example building Bakery
| image = Bakery.png
| caption = bakes bread
| kingdom = Human
| size = large
| buildCosts = {{ItemLink|Board|quantity=5}}<br/>{{ItemLink|Wheat|quantity=2}}
| storage = {{ItemLink|Flour|quantity=5}}<br/>{{ItemLink|Water|quantity=5}}<br/>{{ItemLink|Bread|quantity=5}}
| productionTime = 5 s
| gatheringTime = 7 s
| maxWorkers = 3
| maxCarriers = 2
| amountToHarvest = 4
| output = Bread
| upgradeImage = Decoration2.png
| upgrade = upgrade example
| upgradeCosts = {{IconLinkSequence|Gold|4|8|12|16}}
| utility = this example building is for show and does nothing
| upgradeInfo = upgraded example of the building, upgrade adds nothing extra
| unreleased = 
| removed = 
}}

empty copy paste list

{{infobox building
| title = 
| image = 
| caption = 
| kingdom = 
| size = 
| buildCosts = 
| storage = 
| productionTime = 
| gatheringTime = 
| maxWorkers = 
| maxCarriers = 
| amountToHarvest = 
| output = 
| upgradeImage = 
| upgrade = 
| upgradeCosts = 
| utility = 
| upgradeInfo = 
| unreleased = 
| removed = 
}}