Difference between revisions of "Template:Item infobox"

From Albion Online Wiki
Jump to navigation Jump to search
m (test)
m (fix nesting)
 
(14 intermediate revisions by the same user not shown)
Line 2: Line 2:
  
 
# Define Variables
 
# Define Variables
-->{{#vardefine:tier_combined | {{{tier}}}.{{{enchantment|0}}} }}<!--
+
-->{{#vardefine:ii_tier|{{{tier|{{Tier detect|{{PAGENAME}} }} }}} }}<!--
 +
-->{{#vardefine:tier_combined | {{#var:ii_tier}}.{{{enchantment|0}}} }}<!--
 
-->{{#vardefine:enchantment|{{{enchantment|0}}}}}<!--
 
-->{{#vardefine:enchantment|{{{enchantment|0}}}}}<!--
-->{{#vardefine:ii subCategoryDisplay|{{#var:shop_sub_category}} }}<!--
+
-->{{#vardefine:ii subCategoryDisplay|{{#switch:{{Tier prefix strip|{{PAGENAME}} }}
-->{{#vardefine:ii prefix|{{#explode:{{PAGENAME}}| |1}} }}<!--
+
| Rosalia's Diary = Tome of Spells
-->{{#vardefine:ii suffix|{{#explode:{{PAGENAME}}| |2|2}} }}<!--
+
| The Hand of Khor = Greataxe
 +
| Vendetta's Wrath = Great Fire Staff
 +
| {{Tier prefix strip|{{PAGENAME}} }}
 +
}} }}<!--
 +
 
 
# Start of display template  
 
# Start of display template  
 
--><div class="infobox item">
 
--><div class="infobox item">
Line 16: Line 21:
 
{{#if:{{{description|}}}| ;Description:{{{description}}}}}<!--
 
{{#if:{{{description|}}}| ;Description:{{{description}}}}}<!--
 
-->{{#if:{{{type|}}}|;Type: [[:Category:{{{type}}}|{{{type}}}]]}}<!--
 
-->{{#if:{{{type|}}}|;Type: [[:Category:{{{type}}}|{{{type}}}]]}}<!--
-->{{#if:{{{tier|}}}|;Tier: {{{tier}}}}}<!--
+
-->{{#if:{{#var:ii_tier|}}|;Tier: {{#var:ii_tier}}}}<!--
 
-->{{#if:{{{weight|}}}|;Weight: {{{weight}}} kg}}<!--
 
-->{{#if:{{{weight|}}}|;Weight: {{{weight}}} kg}}<!--
 
-->{{#if:{{{item_value|}}}|;Item value: {{{item_value}}}}}
 
-->{{#if:{{{item_value|}}}|;Item value: {{{item_value}}}}}
 
</div><!--
 
</div><!--
 +
 +
#Set Properties
 
-->{{#set:Name={{{item_name|{{#titleparts:{{PAGENAME}}}}}}}}}<!--
 
-->{{#set:Name={{{item_name|{{#titleparts:{{PAGENAME}}}}}}}}}<!--
 
-->{{#set:Unique_name={{{unique_name|}}}}}<!--
 
-->{{#set:Unique_name={{{unique_name|}}}}}<!--
Line 34: Line 41:
  
 
# Stamp categories  
 
# Stamp categories  
--><!--Placeholder: {{#if:{{#var:shop_category}}|[[Category:{{#var:shop_category}}]]}}
+
-->{{#if:{{#var:shop_category}}|[[Category:{{Ao standard name|{{#var:shop_category}} }}]]}}<!--
-->{{#if:{{#var:shop_sub_category}}|[[Category:{{#var:shop_sub_category}}]]}}<!--
+
-->{{#if:{{#var:shop_sub_category}}|[[Category:{{Ao standard name|{{#var:shop_sub_category}} }}]]}}<!--
-->{{#switch:{{#var:ii prefix}}
+
-->[[Category:{{#var:ii subCategoryDisplay}}]]<!--
| Beginner's
 
| Novice's
 
| Journeyman's
 
| Adept's
 
| Expert's
 
| Master's
 
| Grandmaster's
 
| Elder's = [[Category:{{#var:ii suffix}}]]
 
}}<!--
 
  
 
# Debug
 
# Debug
-->Prefix: {{#var:ii prefix}}
+
--><!--
Suffix: {{#var:ii suffix}}<!--
 
  
 
# Apply some wiki standards
 
# Apply some wiki standards

Latest revision as of 12:57, 2 December 2021


Documentation

Rough Logs

Description
Common, low-quality Wood, used for crafting. It is too weak to be refined.
Type
Wood
Tier
1
Weight
0.2 kg

A template that adds a side element with the item's picture, name, description, type, tier, weight, value, and fame.

Template parameters

ParameterDescriptionTypeStatus
Nameitem_name

The name of the item.

Default
{{PAGENAME}}
Stringrequired
Item Descriptiondescription

The item description as it appears within the game.

Example
Common low-quality stone used for crafting. It is too weak to be refined.
Stringsuggested
Typetype

The type of this item. Check 'Item type' property for a list of valid values

Stringoptional
Tiertier

The tier of the item.

Example
4
Numbersuggested
Weightweight

The weight of a single unit of this item. The kg suffix is added automatically.

Example
1.0
Numbersuggested
Valueitem_value

The value of a single unit of this item.

Example
0
Numberoptional
Enchantmentenchantment

Enchantment level of the item. May be any number from 0 to 3.

Default
0
Numberoptional
Unique Nameunique_name

Unique name of an item as the game is using it internally. This is only required if multiple items have the same translated name

Stringoptional
Qualityquality

Quality of an item; may be Normal, Good, Outstanding, Excellent, Masterpiece

Default
Normal
Stringoptional
Item Classificationclassification class

categorization of the item. Deprecated by Shop Category

Example
Resource
Stringsuggested
Shop Categoryshop_category category

categorization of the item in shop

Example
Resource
Stringsuggested
Shop Subcategoryshop_sub_category subcategory

categorization of the item by sub category

Example
Stone Block
Stringsuggested