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
add output for buildings
added the remaining parameters, example has all parameters used, added empty copy paste list
 
(16 intermediate revisions by 3 users not shown)
Line 33: Line 33:
     <label>Amount to harvest</label>
     <label>Amount to harvest</label>
   </data>
   </data>
  {{#if: {{{output|}}} |
  <data source="output">
    <label>Output</label>
    <format>{{ItemList|{{{output|}}}}}</format>
  </data>
}}>
   <group>
   <group>
     <header>Upgrade</header>
     <header>Upgrade</header>
Line 48: Line 54:
|name={{{title|{{#titleparts:{{PAGENAME}}<!-- -->}}}}}
|name={{{title|{{#titleparts:{{PAGENAME}}<!-- -->}}}}}
|kingdom={{{kingdom|}}}
|kingdom={{{kingdom|}}}
|sizeLarge={{#ifeq:{{#lc:{{{size|}}}}}|large|1|0}}
|sizeLarge={{{size|}}}
}}}}</includeonly><noinclude>
|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
| title = Bakery
| title = Fake example building Bakery
| image = Bakery.png
| image = Bakery.png
| caption = bakes bread
| kingdom = Human
| size = large
| size = large
| buildCosts = {{ItemLink|Board|quantity=5}}<br/>{{ItemLink|Wheat|quantity=2}}
| 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
| maxWorkers = 3
| productionTime = 5 s
| maxCarriers = 2
| storage = {{ItemLink|Flour|quantity=5}}<br/>{{ItemLink|Water|quantity=5}}<br/>{{ItemLink|Bread|quantity=5}}
| amountToHarvest = 4
}}</pre>
| 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>
{{infobox building
{{infobox building
| title = Bakery
| title = Fake example building Bakery
| image = Bakery.png
| image = Bakery.png
| caption = bakes bread
| kingdom = Human
| size = large
| size = large
| buildCosts = {{ItemLink|Board|quantity=5}}<br/>{{ItemLink|Wheat|quantity=2}}
| 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
| maxWorkers = 3
| productionTime = 5 s
| maxCarriers = 2
| storage = {{ItemLink|Flour|quantity=5}}<br/>{{ItemLink|Water|quantity=5}}<br/>{{ItemLink|Bread|quantity=5}}
| amountToHarvest = 4
}}
| output = Bread
{{#cargo_declare:_table=Buildings
| upgradeImage = Decoration2.png
|name=String
| upgrade = upgrade example
|kingdom=String
| upgradeCosts = {{IconLinkSequence|Gold|4|8|12|16}}
|sizeLarge=Boolean
| utility = this example building is for show and does nothing
|output=String
| upgradeInfo = upgraded example of the building, upgrade adds nothing extra
}}
| unreleased =
| removed =  
}}</pre>
 
empty copy paste list
<pre>
{{infobox building
| title =
| image =
| caption =
| kingdom =
| size =
| buildCosts =
| storage =  
| productionTime =
| gatheringTime =  
| maxWorkers =  
| maxCarriers =  
| amountToHarvest =  
| output =  
| upgradeImage =
| upgrade =
| upgradeCosts =
| utility =
| upgradeInfo =
| unreleased =
| removed =
}}</pre>
 
[[Category:Cargo storing templates]]
[[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 = 
}}