Difference between revisions of "Template:Consumable"

From Stoneshard wiki
Jump to navigation Jump to search
old>Realpsojed
old>Realpsojed
m
Line 17: Line 17:
-->{{#if: {{:{{ROOTPAGENAME}}|Properties13}} | <div style="float:left;">{{Translate|{{:{{ROOTPAGENAME}}|Properties13}}|Properties}}:</div> <div style="float: right;">{{:{{ROOTPAGENAME}}|Values13}}</div> {{Clear}}| }}<!--
-->{{#if: {{:{{ROOTPAGENAME}}|Properties13}} | <div style="float:left;">{{Translate|{{:{{ROOTPAGENAME}}|Properties13}}|Properties}}:</div> <div style="float: right;">{{:{{ROOTPAGENAME}}|Values13}}</div> {{Clear}}| }}<!--
-->{{#if: {{:{{ROOTPAGENAME}}|PropertyText}} | <div style="float:left;">{{#if:{{:{{ROOTPAGENAME}}|Properties1}}|<br>|}}{{#if: {{#titleparts: {{PAGENAME}} | 1 | 2}} | {{#ifeq: {{PAGENAME}} | {{ROOTPAGENAME}}/Tooltip | {{:{{ROOTPAGENAME}}|PropertyText}} | {{Translate|{{ROOTPAGENAME}}|ConsumableDescriptions}}}} | {{:{{ROOTPAGENAME}}|PropertyText}}}}</div> {{Clear}}|}}</div><!--
-->{{#if: {{:{{ROOTPAGENAME}}|PropertyText}} | <div style="float:left;">{{#if:{{:{{ROOTPAGENAME}}|Properties1}}|<br>|}}{{#if: {{#titleparts: {{PAGENAME}} | 1 | 2}} | {{#ifeq: {{PAGENAME}} | {{ROOTPAGENAME}}/Tooltip | {{:{{ROOTPAGENAME}}|PropertyText}} | {{Translate|{{ROOTPAGENAME}}|ConsumableDescriptions}}}} | {{:{{ROOTPAGENAME}}|PropertyText}}}}</div> {{Clear}}|}}</div><!--
-->{{#if: {{:{{ROOTPAGENAME}}|Uses}} | <br><div style="color:#9d9a9a;">{{Translate|Uses|Properties}}: <span style="color:white;display=inline-block;">{{:{{ROOTPAGENAME}}|Uses}}/{{:{{ROOTPAGENAME}}|Uses}}</span></div> | }}<!--
-->{{#if: {{:{{ROOTPAGENAME}}|Uses}} | <br><div style="color:#9d9a9a;">{{Translate|Uses|Properties}}: <span style="color:white;display:inline-block;">{{:{{ROOTPAGENAME}}|Uses}}/{{:{{ROOTPAGENAME}}|Uses}}</span></div> | }}<!--
-->{{#if: {{:{{ROOTPAGENAME}}|Durability}} | <br><div style="color:#9d9a9a;">{{Translate|Durability|Properties}}: <span style="color:white;">{{:{{ROOTPAGENAME}}|Durability}}/{{:{{ROOTPAGENAME}}|Durability}}</span></div> | }}
-->{{#if: {{:{{ROOTPAGENAME}}|Durability}} | <br><div style="color:#9d9a9a;">{{Translate|Durability|Properties}}: <span style="color:white;">{{:{{ROOTPAGENAME}}|Durability}}/{{:{{ROOTPAGENAME}}|Durability}}</span></div> | }}
|-
|-

Revision as of 10:34, 10 October 2020

Template-info.png Documentation

This is consumable template created for use together with the Template:Tooltip hover box template on a specific consumable's page or consumable's tooltip page.

Usage: The page itself must contain the consumable's data before this Template works. For example, if I wanted to create the Agrimony page, I'll add this code to the start of the page and modify the values:

<includeonly>{{#switch: {{{1}}}
|ItemType = Ingredient
|Properties1 = Energy Replenishment
|Values1 = {{c|+|+5}}
|Properties2 = Health Restoration
|Values2 = {{c|+|+0.50% (45x)}}
|Properties3 = Immunity
|Values3 = {{c|+|+1%}}
|PropertyText = 
|Description = Agrimony has been valued for its healing qualities since olden times.
|Price = 10
|#default = 
}}</includeonly>

This data is invisible on the page itself, thanks to the includeonly tags.


Next, copy this code to Agrimony or Agrimony/Tooltip or Agrimony/anything page:

{{ {{{1|Tooltip hover box}}}
|title= {{Consumable}}
}}

It will automatically load the consumable's data and fill them into this format. Go to Agrimony to see the result.