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

From Super Fantasy Kingdom Official Wiki
m 21 revisions imported
converted to pi
 
Line 1: Line 1:
<includeonly>{{#invoke:Infobox|main
<includeonly>
|image = {{#if:{{{image|}}}|[[File:{{{image}}}{{!}}128px]]}}
<infobox>
|sections = resource, storageAtStartSection, productSection
  <title source="title">
 
    <default>{{PAGENAME}}</default>
|resource_label = Resource
  </title>
|resource = source, gatheringTime, craftingTime, naturallyAvailable
  <image source="image" />
|source_label = Source
  <data source="caption"/>
|gatheringTime_label = Gathering Time
  <group>
|craftingTime_label = Crafting Time
    <header>Resource</header>
|naturallyAvailable_label = Naturally Available
    <data source="source">
 
      <label>Source</label>
|storageAtStartSection_label = In Storage at Start
    </data>
|storageAtStartSection = storageAtStart, amountFromTiles, totalAtStart, orbInfo
    <data source="gatheringTime">
|storageAtStart_label = Amount at start
      <label>Gathering Time</label>
|amountFromTiles_label = Unlockable from [[Resource tile|tiles]]
    </data>
|totalAtStart_label = Total
    <data source="craftingTime">
|totalAtStart = {{#iferror:{{#expr: {{{storageAtStart|}}} + {{{amountFromTiles|}}}}}}}
      <label>Crafting Time</label>
|orbInfo_nolabel = yes
    </data>
|orbInfo = {{#if:{{{naturallyAvailable|}}}|The total starting amount can be further increased by investing {{ItemLink|Orb}}s}}
    <data source="naturallyAvailable">
 
      <label>Naturally Available</label>
|productSection_label = Product
    </data>
|productSection = product, totalAvailableProducts
  </group>
|product_label = Products per {{{title|}}}
  <group>
|product = {{#if:{{{product|}}}| {{{amountToHarvest|1}}} × {{ItemLink|{{{product}}}}}}}
    <header>In Storage at Start</header>
|totalAvailableProducts_label = Total naturally available
    <data source="storageAtStart">
|totalAvailableProducts = {{#if:{{{product|}}}|{{#iferror:{{#expr: {{{naturallyAvailable|}}}*{{{amountToHarvest|1}}}}}}}|| × {{ItemLink|{{{product}}}}}}}
      <label>Amount at start</label>
}}
    </data>
    <data source="amountFromTiles">
      <label>Unlockable from [[Resource tile|tiles]]</label>
    </data>
    <data source="totalAtStart">
      <label>Total</label>
      <format>{{#vardefineecho: totalAtStart | {{#iferror:{{#expr: {{{storageAtStart|}}} + {{{amountFromTiles|}}}}}}}}}</format>
    </data>
    <data source="orbInfo">
      <format>{{#if:{{#var:totalAtStart}}| The total starting amount can be further increased by investing {{ItemLink|Orb}}s }}</format>
    </data>
  </group>
  <group>
    <header>Product</header>
    <data source="product">
      <label>Products per {{{title|}}}</label>
      <format>{{#if:{{{product|}}}| {{{amountToHarvest|1}}} × {{ItemLink|{{{product}}}}}}}</format>
    </data>
    <data source="totalAvailableProducts">
      <label>Total naturally available</label>
      <format>{{#if:{{{product|}}}|{{#iferror:{{#expr: {{{naturallyAvailable|}}}*{{{amountToHarvest|1}}}}}}}|| × {{ItemLink|{{{product}}}}}}}</format>
    </data>
  </group>
</infobox>
[[Category:Resources]]</includeonly><noinclude>
[[Category:Resources]]</includeonly><noinclude>
This is an infobox template for resources.
This is an infobox template for resources.

Latest revision as of 23:49, 27 October 2025

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

{{infobox resource
| title = Stone
| image = Stone.png
| source = {{ItemLink|Stone Deposits}}, {{ItemLink|Quarry}}
| gatheringTime = 3 s
| craftingTime = 
| naturallyAvailable = 40
| storageAtStart = 0
| amountFromTiles = 3
}}