Difference between revisions of "Template:Consumable"

From Stoneshard wiki
Jump to navigation Jump to search
old>Phoe nixx
(trying to fix empty row if no property set)
old>Phoe nixx
Line 16: Line 16:
-->{{#if: {{:{{ROOTPAGENAME}}|Properties12}} | <div style="float:left;">{{:{{ROOTPAGENAME}}|Properties12}}:</div> <div style="float: right;">{{:{{ROOTPAGENAME}}|Values12}}</div> {{Clear}}| }}<!--
-->{{#if: {{:{{ROOTPAGENAME}}|Properties12}} | <div style="float:left;">{{:{{ROOTPAGENAME}}|Properties12}}:</div> <div style="float: right;">{{:{{ROOTPAGENAME}}|Values12}}</div> {{Clear}}| }}<!--
-->{{#if: {{:{{ROOTPAGENAME}}|Properties13}} | <div style="float:left;">{{:{{ROOTPAGENAME}}|Properties13}}:</div> <div style="float: right;">{{:{{ROOTPAGENAME}}|Values13}}</div> {{Clear}}| }}<!--
-->{{#if: {{:{{ROOTPAGENAME}}|Properties13}} | <div style="float:left;">{{:{{ROOTPAGENAME}}|Properties13}}:</div> <div style="float: right;">{{:{{ROOTPAGENAME}}|Values13}}</div> {{Clear}}| }}<!--
-->{{#if: {{:{{ROOTPAGENAME}}|PropertyText}} | <div style="float:left;"><br>{{:{{ROOTPAGENAME}}|PropertyText}}</div> |}}</div>
-->{{#if: {{:{{ROOTPAGENAME}}|PropertyText}} | <div style="float:left;">{{#if:{{:{{ROOTPAGENAME}}|NoSpacing}}||<br>}}{{:{{ROOTPAGENAME}}|PropertyText}}</div> |}}</div>
|-
|-
|style="color:#9d7969;"|<hr style="height:2px;background-color:#33323f;box-shadow: 0 2px 13121d;margin: 10px 0 10px 0;">{{:{{ROOTPAGENAME}}|Description}}<div style="float:right">[[File:Gold_Icon.png|18px|alt=Price|link=|Price]]{{W|{{:{{ROOTPAGENAME}}|Price}}}}</div> <br />
|style="color:#9d7969;"|<hr style="height:2px;background-color:#33323f;box-shadow: 0 2px 13121d;margin: 10px 0 10px 0;">{{:{{ROOTPAGENAME}}|Description}}<div style="float:right">[[File:Gold_Icon.png|18px|alt=Price|link=|Price]]{{W|{{:{{ROOTPAGENAME}}|Price}}}}</div> <br />

Revision as of 18:43, 31 May 2020

Consumable
Consumable

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