Difference between revisions of "Template:Item infobox"

From Albion Online Wiki
Jump to navigation Jump to search
m (Added unique name case for stamping item subcategory)
(32 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<onlyinclude><includeonly>{{#vardefine:tier_combined | {{{tier}}}.{{{enchantment|0}}} }}
+
<onlyinclude><includeonly><!--
{{#vardefine:enchantment|{{{enchantment|0}}}}}
+
 
<!-- Start of display template -->
+
# Define Variables
<div class="infobox item">
+
-->{{#vardefine:tier_combined | {{{tier}}}.{{{enchantment|0}}} }}<!--
 +
-->{{#vardefine:enchantment|{{{enchantment|0}}}}}<!--
 +
-->{{#vardefine:ii subCategoryDisplay|{{#switch:{{Tier prefix strip|{{PAGENAME}} }}
 +
| Rosalia's Diary = Tome of Spells
 +
| The Hand of Khor = Greataxe
 +
| Vendetta's Wrath = Great Fire Staff
 +
| {{Tier prefix strip|{{PAGENAME}} }}
 +
}} }}<!--
 +
 
 +
# Start of display template  
 +
--><div class="infobox item">
 
<div class="icon infobox-icon">
 
<div class="icon infobox-icon">
{{aoitem | {{#if:{{{unique_name|}}}|{{{unique_name}}}|{{#if:{{{item_name|}}}|{{{item_name}}}|{{#titleparts:{{PAGENAME}}}}}}}} | size = small | text=none}}
+
{{aoitem | {{#if:{{{unique_name|}}}|{{{unique_name}}}|{{#if:{{{item_name|}}}|{{{item_name}}}|{{#titleparts:{{PAGENAME}}}}}}}} | size = small | text=none | page link={{PAGENAME}}}}
 
</div>
 
</div>
 
<p class="heading">{{{item_name|{{#titleparts:{{PAGENAME}}}}}}}</p>
 
<p class="heading">{{{item_name|{{#titleparts:{{PAGENAME}}}}}}}</p>
Line 14: Line 24:
 
-->{{#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|}}}}}<!--
 
-->{{#set:Item_type={{{type|}}}}}<!--
 
-->{{#set:Item_type={{{type|}}}}}<!--
-->{{#set:Item_classification={{{classification|}}}}}<!--
 
 
-->{{#set:Description={{{description|}}}}}<!--
 
-->{{#set:Description={{{description|}}}}}<!--
 
-->{{#set:Weight={{{weight|0}}} kg}}<!--
 
-->{{#set:Weight={{{weight|0}}} kg}}<!--
Line 24: Line 35:
 
-->{{#set:Quality={{{quality|Normal}}}}}<!--
 
-->{{#set:Quality={{{quality|Normal}}}}}<!--
 
-->{{#set:Enchantment={{{enchantment|0}}}}}<!--
 
-->{{#set:Enchantment={{{enchantment|0}}}}}<!--
-->{{#if:{{{type|}}}|[[Category:{{{type}}}]]}}
+
-->{{#if:{{#var:shop_category}}|{{#set:Shop category={{#var:shop_category}}}}}}<!--
<!-- Stamp categories -->
+
-->{{#if:{{#var:shop_sub_category}}|
[[Category:Item]]
+
{{#set:Shop subcategory={{#var:shop_sub_category}}}}}}<!--  
<!--Stamp item classification-->{{#if:{{{classification|}}}|[[Category:{{{classification}}}]]}}
+
 
<!--Stamp item type-->{{#if:{{{type|}}}|[[Category:{{{type}}}]]}}</includeonly></onlyinclude>
+
# Stamp categories
 +
-->{{#if:{{#var:shop_category}}|[[Category:{{Ao standard name|{{#var:shop_category}} }}]]}}<!--
 +
-->{{#if:{{#var:shop_sub_category}}|[[Category:{{Ao standard name|{{#var:shop_sub_category}} }}]]}}<!--
 +
-->[[Category:{{#var:ii subCategoryDisplay}}]]<!--
 +
 
 +
# Debug
 +
--><!--
  
 +
# Apply some wiki standards
 +
-->__NOTOC__</includeonly></onlyinclude>
 
<noinclude>
 
<noinclude>
 
{{doc}}
 
{{doc}}

Revision as of 15:56, 4 November 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
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