Difference between revisions of "Template:Consumable"

From Stoneshard wiki
Jump to navigation Jump to search
old>Realpsojed
(Consumables don't need sorting, so they don't need the properties template either.)
old>Realpsojed
(adapted syntax to use without properties template)
Line 2: Line 2:
|style="text-align:center;"|<span style="font-size: 20px;">{{ROOTPAGENAME}}</span> <br /> <span style="color:#9d9a9a;">{{:{{ROOTPAGENAME}}|ItemType}}</span><hr style="height:2px;background-color:#33323f;box-shadow: 0 2px 13121d;margin: 10px 0 10px 0;">
|style="text-align:center;"|<span style="font-size: 20px;">{{ROOTPAGENAME}}</span> <br /> <span style="color:#9d9a9a;">{{:{{ROOTPAGENAME}}|ItemType}}</span><hr style="height:2px;background-color:#33323f;box-shadow: 0 2px 13121d;margin: 10px 0 10px 0;">
|-
|-
|<div style="width:100%;float: left;color:white;">
|<div style="width:100%;color:white;">
{{#ifeq: {{ROOTPAGENAME}} | {{{1}}} | {{:{{{1}}}|Properties1}}: <div style="float: right;color:white;">{{:{{{1}}}|Values1}}</div> | {{:{{{1}}}|Properties1}}: {{:{{{1}}}|Values1}}}}<!--
{{#if: {{:{{ROOTPAGENAME}}|Properties1}} | {{:{{ROOTPAGENAME}}|Properties1}}: <div style="float: right;color:white;">{{:{{ROOTPAGENAME}}|Values1}}</div> | }}<!--
-->{{#ifeq: {{ROOTPAGENAME}} | {{{1}}} | {{:{{{1}}}|Properties2}}: <div style="float: right;color:white;">{{:{{{1}}}|Values2}}</div> | {{:{{{1}}}|Properties2}}: {{:{{{1}}}|Values2}}}}<!--
-->{{#if: {{:{{ROOTPAGENAME}}|Properties2}} | {{:{{ROOTPAGENAME}}|Properties2}}: <div style="float: right;color:white;">{{:{{ROOTPAGENAME}}|Values2}}</div> | }}<!--
-->{{#ifeq: {{ROOTPAGENAME}} | {{{1}}} | {{:{{{1}}}|Properties3}}: <div style="float: right;color:white;">{{:{{{1}}}|Values3}}</div> | {{:{{{1}}}|Properties3}}: {{:{{{1}}}|Values3}}}}<!--
-->{{#if: {{:{{ROOTPAGENAME}}|Properties3}} | {{:{{ROOTPAGENAME}}|Properties3}}: <div style="float: right;color:white;">{{:{{ROOTPAGENAME}}|Values3}}</div> | }}<!--
-->{{#ifeq: {{ROOTPAGENAME}} | {{{1}}} | {{:{{{1}}}|Properties4}}: <div style="float: right;color:white;">{{:{{{1}}}|Values4}}</div> | {{:{{{1}}}|Properties4}}: {{:{{{1}}}|Values4}}}}<!--
-->{{#if: {{:{{ROOTPAGENAME}}|Properties4}} | {{:{{ROOTPAGENAME}}|Properties4}}: <div style="float: right;color:white;">{{:{{ROOTPAGENAME}}|Values4}}</div> | }}<!--
-->{{#ifeq: {{ROOTPAGENAME}} | {{{1}}} | {{:{{{1}}}|Properties5}}: <div style="float: right;color:white;">{{:{{{1}}}|Values5}}</div> | {{:{{{1}}}|Properties5}}: {{:{{{1}}}|Values5}}}}<!--
-->{{#if: {{:{{ROOTPAGENAME}}|Properties5}} | {{:{{ROOTPAGENAME}}|Properties5}}: <div style="float: right;color:white;">{{:{{ROOTPAGENAME}}|Values5}}</div> | }}<!--
-->{{#ifeq: {{ROOTPAGENAME}} | {{{1}}} | {{:{{{1}}}|Properties6}}: <div style="float: right;color:white;">{{:{{{1}}}|Values6}}</div> | {{:{{{1}}}|Properties6}}: {{:{{{1}}}|Values6}}}}<!--
-->{{#if: {{:{{ROOTPAGENAME}}|Properties6}} | {{:{{ROOTPAGENAME}}|Properties6}}: <div style="float: right;color:white;">{{:{{ROOTPAGENAME}}|Values6}}</div> | }}<!--
-->{{#ifeq: {{ROOTPAGENAME}} | {{{1}}} | {{:{{{1}}}|Properties7}}: <div style="float: right;color:white;">{{:{{{1}}}|Values7}}</div> | {{:{{{1}}}|Properties7}}: {{:{{{1}}}|Values7}}}}<!--
-->{{#if: {{:{{ROOTPAGENAME}}|Properties7}} | {{:{{ROOTPAGENAME}}|Properties7}}: <div style="float: right;color:white;">{{:{{ROOTPAGENAME}}|Values7}}</div> | }}<!--
-->{{#ifeq: {{ROOTPAGENAME}} | {{{1}}} | {{:{{{1}}}|Properties8}}: <div style="float: right;color:white;">{{:{{{1}}}|Values8}}</div> | {{:{{{1}}}|Properties8}}: {{:{{{1}}}|Values8}}}}<!--
-->{{#if: {{:{{ROOTPAGENAME}}|Properties8}} | {{:{{ROOTPAGENAME}}|Properties8}}: <div style="float: right;color:white;">{{:{{ROOTPAGENAME}}|Values8}}</div> | }}<!--
-->{{#ifeq: {{ROOTPAGENAME}} | {{{1}}} | {{:{{{1}}}|Properties9}}: <div style="float: right;color:white;">{{:{{{1}}}|Values9}}</div> | {{:{{{1}}}|Properties9}}: {{:{{{1}}}|Values9}}}}<!--
-->{{#if: {{:{{ROOTPAGENAME}}|Properties9}} | {{:{{ROOTPAGENAME}}|Properties9}}: <div style="float: right;color:white;">{{:{{ROOTPAGENAME}}|Values9}}</div> | }}<!--
-->{{#ifeq: {{ROOTPAGENAME}} | {{{1}}} | {{:{{{1}}}|Properties10}}: <div style="float: right;color:white;">{{:{{{1}}}|Values10}}</div> | {{:{{{1}}}|Properties10}}: {{:{{{1}}}|Values10}}}}<!--
-->{{#if: {{:{{ROOTPAGENAME}}|Properties10}} | {{:{{ROOTPAGENAME}}|Properties10}}: <div style="float: right;color:white;">{{:{{ROOTPAGENAME}}|Values10}}</div> | }}<!--
-->{{#ifeq: {{ROOTPAGENAME}} | {{{1}}} | {{:{{{1}}}|Properties11}}: <div style="float: right;color:white;">{{:{{{1}}}|Values11}}</div> | {{:{{{1}}}|Properties11}}: {{:{{{1}}}|Values11}}}}<!--
-->{{#if: {{:{{ROOTPAGENAME}}|Properties11}} | {{:{{ROOTPAGENAME}}|Properties11}}: <div style="float: right;color:white;">{{:{{ROOTPAGENAME}}|Values11}}</div> | }}<!--
-->{{#ifeq: {{ROOTPAGENAME}} | {{{1}}} | {{:{{{1}}}|Properties12}}: <div style="float: right;color:white;">{{:{{{1}}}|Values12}}</div> | {{:{{{1}}}|Properties12}}: {{:{{{1}}}|Values12}}}}<!--
-->{{#if: {{:{{ROOTPAGENAME}}|Properties12}} | {{:{{ROOTPAGENAME}}|Properties12}}: <div style="float: right;color:white;">{{:{{ROOTPAGENAME}}|Values12}}</div> | }}<!--
-->{{#ifeq: {{ROOTPAGENAME}} | {{{1}}} | {{:{{{1}}}|Properties13}}: <div style="float: right;color:white;">{{:{{{1}}}|Values13}}</div> | {{:{{{1}}}|Properties13}}: {{:{{{1}}}|Values13}}}}<!--
-->{{#if: {{:{{ROOTPAGENAME}}|Properties13}} | {{:{{ROOTPAGENAME}}|Properties13}}: <div style="float: right;color:white;">{{:{{ROOTPAGENAME}}|Values13}}</div> | }}<!--
--><br>{{#if: {{:{{ROOTPAGENAME}}|PropertyText}} |{{:{{ROOTPAGENAME}}|PropertyText}} |}}</div>
--><br>{{#if: {{:{{ROOTPAGENAME}}|PropertyText}} |{{:{{ROOTPAGENAME}}|PropertyText}} |}}</div>
|-
|-

Revision as of 14:43, 13 May 2020

Consumable
Consumable

Consumable
PriceConsumable
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.