Difference between revisions of "Template:Consumable"
Jump to navigation
Jump to search
old>Realpsojed m |
old>Realpsojed (add special LeechesDesc property to cover specific mid-properties description on Leeches) |
||
Line 4: | Line 4: | ||
|<div style="width:100%;color:white;"><!-- | |<div style="width:100%;color:white;"><!-- | ||
-->{{#if: {{:{{ROOTPAGENAME}}|Properties1}} | <div style="float:left;">{{Translate|{{:{{ROOTPAGENAME}}|Properties1}}|Properties}}:</div> <div style="float: right;">{{:{{ROOTPAGENAME}}|Values1}}</div> {{Clear}}| }}<!-- | -->{{#if: {{:{{ROOTPAGENAME}}|Properties1}} | <div style="float:left;">{{Translate|{{:{{ROOTPAGENAME}}|Properties1}}|Properties}}:</div> <div style="float: right;">{{:{{ROOTPAGENAME}}|Values1}}</div> {{Clear}}| }}<!-- | ||
-->{{#ifeq: {{ROOTPAGENAME}} | Leeches | <div style="float:left;"><br>{{Translate|{{:{{ROOTPAGENAME}}|LeechesDesc}}|Properties}}:<br></div>{{Clear}}| }}<!-- | |||
-->{{#if: {{:{{ROOTPAGENAME}}|Properties2}} | <div style="float:left;">{{Translate|{{:{{ROOTPAGENAME}}|Properties2}}|Properties}}:</div> <div style="float: right;">{{:{{ROOTPAGENAME}}|Values2}}</div> {{Clear}}| }}<!-- | -->{{#if: {{:{{ROOTPAGENAME}}|Properties2}} | <div style="float:left;">{{Translate|{{:{{ROOTPAGENAME}}|Properties2}}|Properties}}:</div> <div style="float: right;">{{:{{ROOTPAGENAME}}|Values2}}</div> {{Clear}}| }}<!-- | ||
-->{{#if: {{:{{ROOTPAGENAME}}|Properties3}} | <div style="float:left;">{{Translate|{{:{{ROOTPAGENAME}}|Properties3}}|Properties}}:</div> <div style="float: right;">{{:{{ROOTPAGENAME}}|Values3}}</div> {{Clear}}| }}<!-- | -->{{#if: {{:{{ROOTPAGENAME}}|Properties3}} | <div style="float:left;">{{Translate|{{:{{ROOTPAGENAME}}|Properties3}}|Properties}}:</div> <div style="float: right;">{{:{{ROOTPAGENAME}}|Values3}}</div> {{Clear}}| }}<!-- |
Revision as of 23:22, 11 August 2021
Documentation
[purge]
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.