Template:Item/doc

From Path of Exile Wiki
Revision as of 07:51, 3 April 2017 by >OmegaK2 (→‎Base parameters)
Jump to navigation Jump to search

This subpage provides documentation for Template:Item.

Lua logo

This template uses the following modules:

This template is used on a large number of pages.

To avoid major disruption and server load, do not make unnecessary edits to this template. Test changes to this template first using its /sandbox and /testcases subpages . All of the changes can then be applied to this template in a single edit.

Consider discussing changes on the talk page or on Discord before implementing them.

Support for divination cards hasn't been added yet. Please refer to Module:Item for the time being

Semantic Mediawiki version of the item template.

Overview

This template should be used for all items on the wiki and it will take of setting semantic properties, creating an infobox as well as setting categories.

It is meant for usage on permanent pages, do not use it on user pages.

Currently the template is safe to use for all item classes with the exception of divination cards.

Maintenance categories

Maintenance categories will be set when the template is incorrectly used or some parameters should be filled out.

Category Variable Description
Category:Items without a release version release_version Items that do not have a release version set.

Base parameters

Parameter Value Required PyPoE
Export
Property Description
class str
Has item class A valid item class
rarity str
Has rarity rarity of the item, one of:
  • Normal
  • Magic
  • Rare
  • Unique
name str
Has name Name of the item
name_list str
Has names

Has lowercase names

List of aliases for this item; this should be used carefully and only for legacy versions of the item (i.e. Caustic Arrow vs Poison Arrow).

The current item name is always added to this list automatically

size_x int
Has inventory width x-size in inventory units, i.e. the width
size_y int
Has inventory height y-size in inventory units, i.e. the height
drop_enabled bool
*
Is drop enabled Whether the item is drop enabled; this defaults to true.

Specify false for legacy items that do not drop anymore.

drop_level int
Has drop level At which level the item starts dropping at (may differ from required_level)
drop_level_maximum int
Has maximum drop level Up to which level the item drops
drop_leagues list[str]
Has league drop restrictions‎ A comma-separated list of leagues the item can drop it.

Generally this should specified for items that are only obtainable as long the league flag is active (i.e. through the league itself, though zana mods, or other conditions).

required_level int
Has level requirement Which level is required to use the item (may differ from drop_level)
required_dexterity int
Has base dexterity requirement The dexterity requirement of the item if any
required_intelligence int
Has base intelligence requirement The intelligence requirement of the item if any
required_strength int
Has base strength requirement The strength requirement of the item if any
flavour_text str
Has flavour text Flavour text if any (i.e. for unique items, vaal fragments, divination cards, etc)
help_text str
Has help text Help text if any

For some item classes such as gems a default string is inserted if this value is missing.

tags list[str]
Has tags List of internal tags
metadata_id str
Has metadata id Internal metadata id of the item
is_corrupted bool
Property:Is corrupted Set to true if the item is always corrupted (i.e. drops in a corrupted state).
is_relic bool
Property:Is relic Set to true if the item is a relic. Rarity of the item must be "Unique" for this to work.
release_version str
Has release version

Has release date

The version number of when this item was released. The version must a be a valid version number and there must be a version page or the template will return an error.

The release date property is automatically added when the version is specified - it holds the date of when the version was released.

Items that have no release version set will also be added to the category Items without a release version.

removal_version str
Has removal version

Has removal date

The version number of when this item was removed. The version must a be a valid version number and there must be a version page or the template will return an error.

The removal date property is automatically added when the version is specified - it holds the date of when the version was removed.

inventory_icon str
Property:Has inventory icon This parameter only needs to be specified if the item name does not match the wiki page name.

When specified, the specified text will be used instead of the item name in front of the "inventory icon.png" suffix.

For example:

 name = Baller
 inventory_icon = Test item (cold and fire)
 -> File:Test item (cold and fire) inventory icon.png
alternate_art_inventory_icons list[str]
Property:Has alternate inventory icons This parameter takes a comma-separated list of alternate art icon names, which each be inserted into the name of the item (or the provided override) and the "inventory icon.png" suffix.

The order of the item matters; if using the item link template, the items will can accessed in that order.

The list items should be named after where they were retrieved from (for example, which race season) and ordered by the date they were added.

Example:

 name = Test item
 alternate_art_inventory_icons = race season 1, emberwake
 -> File:Test item race season 1 inventory icon.png, File:Test item 1 emberwake inventory icon.png
quality int
Property:Has quality Quality of the item. This arguments only works for item classes that can have quality (i.e. Maps, all Flasks, all Weapons and all armour pieces)

For unique weapons and armours this defaults to Q20.

Base item

Items with a rarity above normal (i.e. magic/rare/unique) can have a base item set.

When a base item is set, most of the attributes will be copied over to the item and only attributes that differ from the base item need to be set, due to that the base item **must** exist.

There should only be one of the following base item parameters be set; if possible consider using a base item that is guaranteed to be unique.

Note that regardless of which setting was used, all properties will be populated.

Parameter Value PyPoE
Export
Unique Property Property on the base item Description
base_item str
Has base item Has name Base item name
base_item_id str
Has base item metadata id Has metadata id Base item metadata id.
base_item_page str
Has base item wiki page N/A Base item wiki page.

Setting mods

Mods can be set on any item type.

Generally there are two ways of doing this:

  1. setting the mod id
  2. setting the mod text

The order of the mods does matter - it's how the mod's stats will appear on the item.

Mod id and mod text can mixed up.

All mods will be added to Property:Has mod ids, regardless of where they come from.

Replace the <i> with the order of the mod starting at 1.

Mod parameters

Parameter Value Required PyPoE
Export
Property Description
implicit str
Has implicit mod ids Id of the implicit mod at index i
implicit_text str
N/A Text of the implicit mod at index i
explicit str
Has explicit mod ids Id of the explicit mod at index i
explicit_text str
N/A Text of the explicit mod at index i

When to use mod id and mod text

The mod id must correspond to an existing mod id. please note the mod id may be different from the page itself, look on the particular mod page for the id itself (also see Template:Mod)

The template will calculate adjustments to the base values of the item based on the mods. Make sure that any values on the item itself are set to the **base value** (before applying the stats) and not the final values.

If a base item is supplied for the item, any implicit mods will be copied over. Explicit mods will not be copied.

Finding the appropriate mods for unique items

Mods are exposed with several properties by Template:Mod, as a result mods can be searched through ask queries.

If you have an unique item where the minimum and maximum rolls are known, or even just the stat texts, you can search those properties through queries.

For example, BrightbeakBrightbeak
War Hammer
One Handed Mace
Physical Damage: (19.5-22.75) to (46.5-54.25)
Critical Strike Chance: 6.25%
Attacks per Second: 2.10
Weapon Range: 1.1 metres
Requires Level 20, 71 Str10% reduced Enemy Stun Threshold(50-75)% increased Physical Damage
45% increased Attack Speed
25% increased Critical Strike Chance
+(20-30)% to Fire Resistance
+(20-30)% to Lightning Resistance
"I know how to say 'faster' and 'attack' in Karui, Marak and Ezo."
- Voll of Thebrus
has 5 different stat lines which rolls are known, finding the mod for

 (50 to 75)% increased Physical Damage 

can be done through a query like this:

{{#ask: 
 [[Has stat text::~*Physical Damage*]]
 [[Has subobject::<q>
  [[Has minimum stat value::50]]
  [[Has maximum stat value::75]]
 </q>]]
 [[Has mod generation type::3]]
 [[Is mod::+]]
 |limit=1000
 |sort=Has stat text
 |format=template
  |template=SMW mod table with items
  |introtemplate=SMW mod table with items/intro
  |outrotemplate=SMW mod table with items/outro
  |?Is mod
  |?Has stat text
  |?Is used in item
}}
<-- Query function
<-- Condition 1: The stat text must match these keywords. (Edit this condition)
<-- Condition 2: Check the subobjects for:
              2.1: The minimum value this stat has.       (Edit this condition)
              2.2: The maximum value this stat has.       (Edit this condition)

<-- Condition 3: Restrict to only unique mods.
<-- Condition 4: Mod id must be defined.
<-- Limit the results to 1000.
<-- Sort the results by a property.
<-- Use a custom template to display the results. The 
indented parameters are required for the template. 
The template checks if the mod is already used in an 
item. It's not necessary but it helps when ruling 
out mods with similar stats.



This may yield multiple possible mods: {{#ask:

Has stat text::~*Physical Damage*
Has mod generation type::3
Is mod::+
[[Has subobject::
 Has minimum stat value::50
 Has maximum stat value::75
]]
|limit=1000
|sort=Has stat text
|format=template
 |template=SMW mod table with items
 |introtemplate=SMW mod table with items/intro
 |outrotemplate=SMW mod table with items/outro
 |?Is mod
 |?Has stat text
 |?Is used in item

}}

As you can see there is only 1 acceptable mod id in this case that has a matching stat text.


If several mods have the same stat text:

  • Avoid having multiple items with the same mod.
    • If that's the case try to assign the highest numbered mod id to the newest released item. The {{SMW mod table with items}} result template helps with this.
  • Consider the internal id of the mod (Property:Is mod).
    • UniqueOneHandMace1 does fit what we're searching for: a modifier for an unique one hand mace
    • In addition once you have found multiple mods for the different stat texts, they may be named in a similar fashion (they should refer to a UniqueOneHandMace1 in this case).


Let's say only 66% increased Physical Damage is known, then the maximum and minimum values are not known but the properties can still be used by replacing that subobject with:

 [[Has subobject::<q>
  [[Has minimum stat value::<66]]
  [[Has maximum stat value::>66]]
 </q>]]


Notes:

  • SMW can only search the first 72 characters of a string.
  • Stat text can include linked words. The [[linked page|linked word]] will be included and since the linked word sometimes differ to the linked page it's not to easy figure out the correct stat text.
  • Stat text may change between updates of the game, so searching for the values and not the text might be a good idea.
  • Using wildcards can make your life easier.
  • The page name and mod id aren't always the same. Use Property:Is mod when adding to the item.

Notes about specific stats:

Type Description Values
"per second" values These are generally handled by minute. So 2% Life regenerated per second equals a stat value of 120 x*60
duration values These are generally handled in milliseconds. So Gain Onslaught for 3 seconds equals a stat value of 3000 x*1000
reduced/less These are generally negated values. So 30% reduced life equals a stat value of -30 x*-1
x-y These are generally two separate stats, you want to search for min/max for x or min/max for y.
So for Adds (1-2) to (3-4) Physical Damage values Has minimum stat value::1 Has maximum stat value::2 or Has minimum stat value::3 Has maximum stat value::4 are appropriate. Mixing these will yield no results.
x or y

not both

If you fail to find any mods

Generally using mod text should be avoided, since it doesn't handle any automated updating of the values.

However if there is no appropriate mod on the wiki yet (for example, for upcoming unique items!), you may want to use the mod_text parameter.

To address the system not updating the values on the item properly, you can also manually set stats on an item:

Parameter Value Range Description
extra_stat<i>_id str N/A Identifier of the stat. Consider checking Module:Item2 source code to see which ones are handled.
extra_stat<i>_value str
the value of a stat if it isn't a range.
extra_stat<i>_min str
minimum range value of a stat
extra_stat<i>_max str
maximum range value of a stat

Parameters available to groups of item classes

Parameters that apply to various groups of item classes.

Flasks

Eligible item classes:

Life Flasks, Mana Flasks, Hybrid Flasks, Utility Flasks, Critical Utility Flasks

Parameter Value Required PyPoE
Export
Properties Description
flask_duration int
Has base flask duration

Has flask duration range minimum

Has flask duration range average

Has flask duration range maximum

How long the flask lasts
charges_max int
Has base maximum flask charges

Has maximum flask charges range minimum

Has maximum flask charges range average

Has maximum flask charges range maximum

Maximum number of charges the flask holds
charges_per_use int
Has base flask charges per use

Has flask charges per use range minimum

Has flask charges per use range average

Has flask charges per use range maximum

Charges consumed when the flask is used

Utility Flasks

Eligible item classes:

Utility Flasks, Critical Utility Flasks

Parameter Value Required PyPoE
Export
Properties Description
buff_id str
Has buff id Internal ID of the associated buff (compare to Template:Buff and Buff namespace)
buff_stat_text str
Has buff stat text Buff stat text as it would appear on the flask
buff_value int
Subobjects with

Is number

Has buff value

Values to use for the buff. Order matters; replace <i> with the ordinal number starting at 1.

Weapons

Eligible item classes:

'Claws', 'Daggers', 'Wands', 'One Hand Swords', 'Thrusting One Hand Swords', 'One Hand Axes', 'One Hand Maces', 'Bows', 'Staves', 'Two Hand Swords', 'Two Hand Axes', 'Two Hand Maces', 'Sceptres'

Parameter Value Required PyPoE
Export
Properties Description
critical_strike_chance int
Has base critical strike chance

Has critical strike chance range minimum

Has critical strike chance range average

Has critical strike chance range maximum

Base critical strike chance of the weapon
attack_speed int
Has base attack speed

Has attack speed range minimum

Has attack speed range average

Has attack speed range maximum

Base attack speed of the weapon
damage_min int
Has base minimum physical damage

Has minimum physical damage range minimum

Has minimum physical damage range average

Has minimum physical damage range maximum

Minimum base physical damage of the weapon
damage_max int
Has base maximum physical damage

Has maximum physical damage range minimum

Has maximum physical damage range average

Has maximum physical damage range maximum

Maximum base physical damage of the weapon
range int
Has base weapon range

Has weapon range range minimum

Has weapon range range average

Has weapon range range maximum

Range in game units of the weapon

Armour

Eligible item classes:

'Gloves', 'Boots', 'Body Armours', 'Helmets', 'Shields'

Parameter Value Required PyPoE
Export
Properties Description
armour int
Has base armour

Has armour range minimum

Has armour range average

Has armour range maximum

Armour of the armour
energy_shield int
Has base energy shield

Has energy shield range minimum

Has energy shield range average

Has energy shield range maximum

Energy Shield of the armour
evasion int
Has base evasion

Has evasion range minimum

Has evasion range average

Has evasion range maximum

Evasion Rating of the armour

Gems

Eligible item classes:

'Active Skill Gems', 'Support Skill Gems'

They also inherit all parameters from the Skill template.

Parameter Value Required PyPoE
Export
Property Description
gem_tags list[str]
Has gem tags

Has gem tags difference

List of gem tags.

The gem tags will be matched against a list of verified tags. Any tags that are not present on the gem will be added to Property:Has gem tags difference.

dexterity_percent int
Has dexterity percentage Dexterity portion of the gem stat distribution.

For pure gems, this is usually 100 for the primary attribute and 0 for the other attribute. For hybrid gems, this is usually 60 for the primary attribute, 40 for the secondary attribute, and 0 for the remaining attribute.

strength_percent int
Has strength percentage Strength portion of the gem stat distribution.
intelligence_percent int
Has intelligence percentage Intelligence portion of the gem stat distribution.

With all arguments supplied, these properties will also be set:

Property Description
Has primary attribute Will be set to the primary attribute (highest percentage)

Stackables

Eligible item classes:

'Currency', 'Stackable Currency', 'Hideout Doodads', 'Microtransactions', 'Divination Card'

Parameter Value Required PyPoE
Export
Property Description
stack_size int
Has stack size Maximum stack size of the item

Parameters specific to a single item class

Parameters specific to item classes

Class Parameter Value Required PyPoE
Export
Property Description
Life Flasks

Hybrid Flasks

flask_life int
Has base flask life recovery

Has flask life recovery range minimum

Has flask life recovery range average

Has flask life recovery range maximum

How much Life the flask recovers
Mana Flasks

Hybrid Flasks

flask_mana int
Has base flask mana recovery

Has flask mana recovery range minimum

Has flask mana recovery range average

Has flask mana recovery range maximum

How much Mana the flask recovers
Shields block int
Has base block

Has block range minimum

Has block range average

Has block range maximum

The base chance to block on shields
Amulets is_talisman bool
Is talisman Whether the amulet is a talisman (defaults to no)

Hideout Doodads

Parameter Value Required PyPoE
Export
Property Description
is_master_doodad bool
Is master doodad Whether this doodad is a doodad that can be bought from a master
master str
Is sold by master Name of the forsaken master who sells this doodad, if any
master_level_requirement int
Has master level requirement Which master level the forsaken master sell the doodad at, if any
master_favour_cost int
Has master favour cost How master favour the doodad costs, if any
variation_count int
Has variation count Number of available variations for this doodad

Maps

Parameter Value Required PyPoE
Export
Property Description
map_tier int
Has map tier Tier of the map
map_guild_character str
Has map guild character Character used when using the map for creating a guild
map_area_id int
Has map area id Area id of the map
map_area_level int
Has map area level Area level of the map
unique_map_guild_character str
Has unique map guild character Character used when using the unique version of the map for creating a guild
unique_map_area_id int
Has unique map area id Area id of the unique version of the map
unique_map_area_level int
Has unique map area level Area level of the map

Stackable Currency

Parameter Value Required PyPoE
Export
Property Description
is_essence bool
Is essence Whether the currency item is an essence
essence_level_restriction int
Has essence level restriction Up to which item level the essence can be used
essence_tier int
Has essence tier Tier of the essence

Jewel

Parameter Value Required PyPoE
Export
Property Description
item_limit int
Property:Has item limit Maximum amount of jewels that can be equipped at once.

See also