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
Hide output if its not set
added the remaining parameters, example has all parameters used, added empty copy paste list
 
(6 intermediate revisions by 2 users not shown)
Line 54: Line 54:
|name={{{title|{{#titleparts:{{PAGENAME}}<!-- -->}}}}}
|name={{{title|{{#titleparts:{{PAGENAME}}<!-- -->}}}}}
|kingdom={{{kingdom|}}}
|kingdom={{{kingdom|}}}
|sizeLarge={{#ifeq:{{lc:{{{size|}}}}}|large|1|0}}
|sizeLarge={{{size|}}}
|buildCost={{{buildCost|}}}
|utility={{{utility|}}}
|upgradeInfo={{{upgradeInfo|}}}
|upgradeCost={{{upgradeCosts|}}}
|output={{{output|}}}
|output={{{output|}}}
|unreleased={{#if:{{{unreleased|}}}|1|0}}
|removed={{#if:{{{removed|}}}|1|0}}
}}}}</includeonly><noinclude>{{noCargo}}
}}}}</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
{{infobox building
{{infobox building
| title = Bakery
| title = Fake example building Bakery
| image = Bakery.png
| image = Bakery.png
| caption = bakes bread
| caption = bakes bread
Line 66: Line 106:
| 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
| 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
| title = Bakery
| title = Fake example building Bakery
| image = Bakery.png
| image = Bakery.png
| caption = bakes bread
| caption = bakes bread
Line 79: Line 129:
| size = large
| size = large
| buildCosts = {{ItemLink|Board|quantity=5}}<br/>{{ItemLink|Wheat|quantity=2}}
| buildCosts = {{ItemLink|Board|quantity=5}}<br/>{{ItemLink|Wheat|quantity=2}}
| maxWorkers = 3
| storage = {{ItemLink|Flour|quantity=5}}<br/>{{ItemLink|Water|quantity=5}}<br/>{{ItemLink|Bread|quantity=5}}
| productionTime = 5 s
| productionTime = 5 s
| storage = {{ItemLink|Flour|quantity=5}}<br/>{{ItemLink|Water|quantity=5}}<br/>{{ItemLink|Bread|quantity=5}}
| output = Bread
}}</pre>
{{#cargo_declare:_table=Buildings
|name=String
|kingdom=String
|sizeLarge=Boolean
|output=List (,) of String
}}
{{clear}}
{{infobox building
| title = Fake example building decoration
| image = Decoration.png
| gatheringTime = 7 s
| gatheringTime = 7 s
| maxWorkers = 3
| maxCarriers = 2
| maxCarriers = 2
| amountToHarvest = 4
| amountToHarvest = 4
| output = Bread
| upgradeImage = Decoration2.png
| upgradeImage = Decoration2.png
| upgradeCosts = {{IconLinkSequence|Ore|4|8|12|16}}
| 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>


Other options not mentioned in the template above that you could include in the template are:
empty copy paste list
<pre>
| gatheringTime = 7 s
| maxCarriers = 2
| amountToHarvest = 4
| upgradeImage = image.png
| upgradeCosts = {{IconLinkSequence|Resource|4|8|12|16}}
</pre>
Which would look like:
<pre>
<pre>
{{infobox building
{{infobox building
| title = Fake example building decoration
| title =  
| image = Decoration.png
| image =  
| gatheringTime = 7 s
| caption =
| maxCarriers = 2
| kingdom =
| amountToHarvest = 4
| size =
| upgradeImage = Decoration2.png>{{ItemLink|Bread|quantity=5}}
| buildCosts =
| upgradeCosts = {{IconLinkSequence|Ore|4|8|12|16}}
| storage =
| productionTime =
| gatheringTime =  
| maxWorkers =
| maxCarriers =  
| amountToHarvest =  
| output =
| upgradeImage =  
| upgrade =  
| upgradeCosts =  
| utility =
| upgradeInfo =
| unreleased =
| removed =
}}</pre>
}}</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 = 
}}