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
wgg>Cadaei
layout, more parameters
converted to pi
 
(19 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<includeonly>{| class="wikitable" style="float:right; width:20em"  
<includeonly>
! colspan=2 | <span style="font-size: larger;">{{{name|{{PAGENAME}}}}}</span>
<infobox>
|-
  <title source="title">
| colspan=2 style="text-align:center" | [[File:{{{image|{{PAGENAME}}.png}}}|128px]]
    <default>{{PAGENAME}}</default>
|-
  </title>
! Source
  <image source="image" />
| {{{source|}}}
  <data source="caption"/>
|-
  <group>
! Time to harvest
    <header>Resource</header>
| {{{timeToHarvest|}}}
    <data source="source">
|-
      <label>Source</label>
! Naturally available
    </data>
| {{{naturallyAvailable|}}}
    <data source="gatheringTime">
|}
      <label>Gathering Time</label>
 
    </data>
[[Category:Resources]]
    <data source="craftingTime">
</includeonly><noinclude>
      <label>Crafting Time</label>
    </data>
    <data source="naturallyAvailable">
      <label>Naturally Available</label>
    </data>
  </group>
  <group>
    <header>In Storage at Start</header>
    <data source="storageAtStart">
      <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>
This is an infobox template for resources.
This is an infobox template for resources.
Use it on resource pages, e.g. like this
Use it on resource pages, e.g. like this
<pre>
<pre>
{{infobox resource
{{infobox resource
| name = Stone
| title = Stone
| image = Stone.png
| image = Stone.png
| source = Rocks, {{ItemLink|Quarry}}
| source = {{ItemLink|Stone Deposits}}, {{ItemLink|Quarry}}
| timeToHarvest = 3 s(?)
| gatheringTime = 3 s
| naturallyAvailable = 25(?)
| craftingTime =
| naturallyAvailable = 40
| storageAtStart = 0
| amountFromTiles = 3
}}
}}
</pre>
</pre>
{{infobox resource
{{infobox resource
| name = Stone
| title = Stone
| image = Stone.png
| image = Stone.png
| source = Rocks, {{ItemLink|Quarry}}
| source = Rocks, {{ItemLink|Quarry}}
| timeToHarvest = 3 s
| gatheringTime = 3 s
| naturallyAvailable = 25
| craftingTime =
| naturallyAvailable = 40
| storageAtStart = 0
| amountFromTiles = 3
}}
}}
[[Category:Infobox templates]]
</noinclude>
</noinclude>

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
}}