Difference between revisions of "Template:Consumable test"
Jump to navigation
Jump to search
(switch to datastring) |
|||
| Line 1: | Line 1: | ||
<includeonly><!-- | <includeonly><!-- | ||
--- | --- If item name is provided as parameter, use the parameter instead of root page. --- | ||
-->{{#vardefine:Page|{{#if:{{{1|}}}|{{{1|}}}|{{ROOTPAGENAME}}}}}}<!-- | -->{{#vardefine:Page|{{#if:{{{1|}}}|{{{1|}}}|{{ROOTPAGENAME}}}}}}<!-- | ||
--- Load complete datastring into a variable - to only load from the Armor data page once. --- | |||
-->{{#vardefine:Datastring|{{:Consumable_data|{{#var:Page}}}}}}<!-- | |||
--- Separate values from datastring into individual variables. --- | |||
-->{{#vardefine:SubPage|{{#if:{{SUBPAGENAME}}|{{SUBPAGENAME}}|{{#var:Page}}}}}}<!-- | -->{{#vardefine:SubPage|{{#if:{{SUBPAGENAME}}|{{SUBPAGENAME}}|{{#var:Page}}}}}}<!-- | ||
-->{{#vardefine:BasePage|{{#if:{{BASEPAGENAME}}|{{BASEPAGENAME}}|{{#var:Page}}}}}}<!-- | -->{{#vardefine:BasePage|{{#if:{{BASEPAGENAME}}|{{BASEPAGENAME}}|{{#var:Page}}}}}}<!-- | ||
-->{{#vardefine:OtherPage|{{#if:{{PAGENAME}}|{{PAGENAME}}|{{#var:Page}}}}}}<!-- | -->{{#vardefine:OtherPage|{{#if:{{PAGENAME}}|{{PAGENAME}}|{{#var:Page}}}}}}<!-- | ||
-->{{#vardefine: | -->{{#vardefine:Price|{{#explode: {{#var:Datastring}}|§|0}}}}<!-- | ||
-->{{#vardefine: | -->{{#vardefine:Tier|{{#explode: {{#var:Datastring}}|§|2}}}}<!-- | ||
-->{{#vardefine: | -->{{#vardefine:Category|{{#explode: {{#var:Datastring}}|§|3}}}}<!-- | ||
-->{{#vardefine: | -->{{#vardefine:Subcategory|{{#explode: {{#var:Datastring}}|§|4}}}}<!-- | ||
-->{{#vardefine: | -->{{#vardefine:MiddleText|{{#explode: {{#var:Datastring}}|§|-1}}}}<!-- | ||
-->{{#vardefine: | -->{{#vardefine:Freshness|{{#explode: {{#var:Datastring}}|§|7}}}}<!-- | ||
-->{{#vardefine: | -->{{#vardefine:Durability|{{#explode: {{#var:Datastring}}|§|8}}}}<!-- | ||
-->{{#vardefine: | -->{{#vardefine:Uses|{{#explode: {{#var:Datastring}}|§|9}}}}<!-- | ||
-->{{#vardefine: | -->{{#vardefine:Description|{{#explode: {{#var:Datastring}}|§|-2}}}}<!-- | ||
--- Consumable Tooltip start. --- | --- Consumable Tooltip start. --- | ||
-->{| width=300px; | -->{| width=300px; | ||
|style="text-align:center;"|<!-- | |style="text-align:center;"|<!-- | ||
--><span style="font-size: 20px;">{{Translate|{{#var:Page}}|ConsumableNames}}</span><br /><!-- | |||
--><span style="color:#9d9a9a;">{{Translate|{{#var:Category}}|Properties}}</span><!-- | |||
--><span style="font-size: 20px;">{{Translate | |||
--><span style="color:#9d9a9a;">{{Translate | |||
--- Check if item has no Properties at all, if yes, then don't add a horizontal rule, otherwise add it. --- | --- Check if item has no Properties at all, if yes, then don't add a horizontal rule, otherwise add it. --- | ||
-- | ---{{#if: {{#var:NoProperties}}||{{Tooltip rule}}}} --- | ||
--> | |||
|- | |- | ||
|<div style="width:100%;color:white;">{{Test|{{#var:Page}}}}<!-- | |<div style="width:100%;color:white;">{{Test|{{#var:Page}}}}<!-- | ||
Revision as of 22:49, 28 January 2025
This is item template created for use together with the Template:Tooltip hover box template to display tooltip with item attributes for Consumables.
Usage: Copy this code to any page where you want to display the item tooltip:
{{{{{1|Tooltip hover box}}}|title={{Consumable_test}}}}
You can provide the item name as first parameter, otherwise the pagename is used.
By default, the page is also labelled with a category corresponding to the item type (ie. Bread will receive the Category: Food).
If you don't want to add this category to a page, add the category parameter:
{{{{{1|Tooltip hover box}}}|title={{Consumable_test|Bread|category=no}}}}
Examples with properties
| Vivifying Essence medicine |
Healing Efficiency: -25% (60 t) Sanity: -3% Health Replenishment: +40% Durability: 60/60
|
When asked about its recipe, alchemists prefer to maintain mysterious silence. |
Examples without properties
| Herbalist Satchel backpack |
The plentiful pouches make it possible to store an entire collection of flasks and herbs in an orderly, easy-to-find manner. |
| Herbalist Satchel |
| Pails of Cider commodity |
Proper cider is brewed exclusively in the southern reaches of Aldor - this customary Sentian beverage is a cornerstone of any local festivity. |
|
| Convict's Hand quest |
The convict's brand is clearly visible on the back of this hand - such markings are burned into the skin before sending a criminal to the quarries. |
| Osbrook Bread Bowl Stew (Recipe) recipe |
A scrap of paper containing a detailed recipe. Might be worthwhile to give it a try. |
| Fodder resource |
A filling mix of multiple grains and herbs. |
| Fodder |
| Map of Osbrook Outskirts scroll |
A lot has transpired over the last few years, but this old pre-war map might still contain some useful information. |
| Map of Osbrook Outskirts |
| Foldable Flagpole upgrade |
When the future lacks certainty, symbols become more important than ever. |
| Hunting Net (Recipe) schematic |
A list of materials complete with concise but informative instructions for achieving the intended result. |
Some special cases
| Surgeon Toolkit medicine |
Health Restoration: +10% (360 t) Healing Efficiency: +30% (360 t) Injury Treatment: +100% Durability: 360/360
|
The very case when expertise and courage are equally important. |
| Surgeon Toolkit |
| Nonexistant Item |
| Nonexistant Item |




