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

From Super Fantasy Kingdom Official Wiki
wgg>Cadaei
using resource sub template
wgg>Cadaei
converted to DRUID
Line 1: Line 1:
<includeonly>{{infobox header|name={{{name|{{PAGENAME}}}}}|image={{{image|{{PAGENAME}}.png}}}}}
<includeonly>{{#invoke:Infobox|main
{{infobox resource section
|image = {{#if:{{{image|}}}|[[File:{{{image}}}{{!}}128px]]}}
| source = {{{source|}}}
|sections = resource, storageAtStartSection, productSection, consumableSection
| gatheringTime = {{{gatheringTime|}}}
|resource_label = Resource
| craftingTime = {{{craftingTime|}}}
|resource = source, gatheringTime, craftingTime, naturallyAvailable
| naturallyAvailable = {{{naturallyAvailable|}}}
|source_label = Source
| storageAtStart = {{{storageAtStart|}}}
|gatheringTime_label = Gathering Time
| amountFromTiles = {{{amountFromTiles|}}}
|craftingTime_label = Crafting Time
| product= {{{product|}}}
|naturallyAvailable_label = Naturally Available
| amountToHarvest= {{{amountToHarvest|}}}
 
|storageAtStartSection_label = In Storage at Start
|storageAtStartSection = storageAtStart, amountFromTiles, totalAtStart, orbInfo
|storageAtStart_label = Amount at start
|amountFromTiles_label = Unlockable from [[Resource tile|tiles]]
|totalAtStart_label = Total
|totalAtStart = {{#iferror:{{#expr: {{{storageAtStart|}}} + {{{amountFromTiles|}}}}}}}
|orbInfo_nolabel = yes
|orbInfo = The total starting amount can be further increased by investing {{ItemLink|Orb}}s
 
|productSection_label = Product
|productSection = product, totalAvailableProducts
|product_label = Products per {{{title|}}}
|product = {{#if:{{{product|}}}| {{{amountToHarvest|1}}} × {{ItemLink|{{{product}}}}}}}
|totalAvailableProducts_label = Total naturally available
|totalAvailableProducts = {{#if:{{{product|}}}|{{#iferror:{{#expr: {{{naturallyAvailable|}}}*{{{amountToHarvest|1}}}}}}}|| × {{ItemLink|{{{product}}}}}}}
 
|consumableSection_label = Consumable
|consumableSection = xp
|xp_label = [[XP]] when consumed
}}
}}
{{infobox section|header=Consumable
|{{infobox data row|[[XP]] when consumed|{{{xp|}}}}}
}}
{{infobox footer}}
[[Category:Resources]][[Category:Consumables]]</includeonly><noinclude>
[[Category:Resources]][[Category:Consumables]]</includeonly><noinclude>
This is an infobox template for consumables.
This is an infobox template for consumables.
Line 19: Line 34:
<pre>
<pre>
{{infobox consumable
{{infobox consumable
| name = Berry
| title = Berry
| image = Berry.png
| image = Berry.png
| source = {{ItemLink|Berry Bush}}
| source = {{ItemLink|Berry Bush}}
Line 31: Line 46:
</pre>
</pre>
{{infobox consumable
{{infobox consumable
| name = Berry
| title = Berry
| image = Berry.png
| image = Berry.png
| source = {{ItemLink|Berry Bush}}
| source = {{ItemLink|Berry Bush}}

Revision as of 21:21, 12 December 2024

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

{{infobox consumable
| title = Berry
| image = Berry.png
| source = {{ItemLink|Berry Bush}}
| xp = 1
| gatheringTime = 3 s
| craftingTime = 
| naturallyAvailable = 25
| storageAtStart = 0
| amountFromTiles = 1
}}
Berry
Resource
Source
Gathering Time
3 s
Naturally Available
25
In Storage at Start
Amount at start
0
Unlockable from tiles
1
Total
1
The total starting amount can be further increased by investing Orbs
Consumable
XP when consumed
1