The wiki is currently a work in progress. If you'd like to help out, please check the Community Portal and our getting started guide. Also, check out our sister project on poewiki.net.
Template:Item/doc: Difference between revisions
>OmegaK2 |
>Uliverbaha |
||
Line 383: | Line 383: | ||
Replace the <code><nowiki><i></nowiki></code> with the order of the mod starting at 1. | Replace the <code><nowiki><i></nowiki></code> with the order of the mod starting at 1. | ||
===== ''Heading text'' ===== | |||
===Mod parameters=== | ===Mod parameters=== | ||
Revision as of 08:47, 30 October 2017

This subpage provides documentation for Template:Item.

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 or your user space. 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.
Item is a template that creates an infobox on the page, then sets categories and semantic properties to the page. This allows the items to be searched for and displayed in advanced item tables that stays up-to-date, which can be difficult in a game that is constantly evolving.
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.
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:
|
name | str | ![]() |
![]() |
Has name | Name of the item |
name_list | str | ![]() |
![]() |
Has 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). |
drop_areas | list[str] | ![]() |
![]() |
Has no area drop restriction | A comma-separated list of area ids the item can drop in.
The field should be specified for items that can only drop in specific areas, but not for instances where specific monsters drop this item (even if the monster only appears in the specific area - this is because the drop restriction is related to the monster, not the area in those cases). See Finding areas section on this page for more details. |
drop_areas_html | list[str] | ![]() |
![]() |
Has area drop restriction HTML | Overrides the automatically generated text form the drop_areas parameter. This should only be specified in cases where a lot of areas are specified and it would reduce visibility. |
drop_text | str | ![]() |
![]() |
Property:Has drop restriction text | Parameter to handle any restrictions to obtaining an item that are not covered by more specific parameters.
Always use a specific parameter if possible |
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 | 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 | 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 | ![]() |
![]() |
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] | ![]() |
![]() |
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 | ![]() |
![]() |
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. |
cannot_be_traded_or_modified | boolean | ![]() |
![]() |
Cannot be traded or modified | Whether the item can be traded or modified.
Defaults to true. |
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 | — | Base item wiki page. |
Purchase costs
Items of Normal rarity support setting purchase costs at NPC vendors for each of the rarities.
In the following table replace these parameters accordingly:
<rarity>
- replace with the current rarity, i.e.normal
,magic
,rare
orunique
<i>
- replace with the order of the mod starting at 1.
Please note that multiple entries will all be assumed to be necessary for the purchase.
Parameter | Value | Required | PyPoE Export |
Property | Description |
---|---|---|---|---|---|
purchase_cost_<rarity><i>_name | str | ![]() |
![]() |
Property:Has purchase cost item name | The item name which is used for purchasing this item of the specified rarity |
purchase_cost_<rarity><i>_amount | int | ![]() |
![]() |
Property:Has purchase cost amount | How many of the specified item name are required for purchasing this item of the specified rarity |
For example, to set the purchase cost of an item to 5x Scroll of Wisdom and 1x Module Error: No results found for item using search term "item_name = Orb of Alteration" you'll need to specify the following in the parameters:
purchase_cost_normal1_name = Scroll of Wisdom purchase_cost_normal1_amount = 5 purchase_cost_normal2_name = Orb of Alteration purchase_cost_normal2_amount = 1
Setting mods
Mods can be set on any item type.
Generally there are two ways of doing this:
- setting the mod id
- 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.
Heading text
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 | ![]() |
![]() |
— | Text of the implicit mod at index i
If used without setting implicit, this will simply set a line in the item box. If implicit at the same index is also specified, this can be used as override to the text. If set to any false value, the text from the mod will not be shown. |
explicit | str | ![]() |
![]() |
Has explicit mod ids | Id of the explicit mod at index i |
explicit_text | str | ![]() |
![]() |
— | Text of the explicit mod at index i
If used without setting explicit, this will simply set a line in the item box. If explicit at the same index is also specified, this can be used as override to the text. If set to any false value, the text from the mod will not be shown. |
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, Module Error: No results found for item using search term "item_name = Brightbeak" 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.
- If that's the case try to assign the highest numbered mod id to the newest released item. The
- 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 |
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 | — | 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 |
How long the flask lasts |
charges_max | int | ![]() |
![]() |
Has base maximum flask charges
Has maximum flask charges range minimum |
Maximum number of charges the flask holds |
charges_per_use | int | ![]() |
![]() |
Has base flask charges per use
Has flask charges per use range minimum |
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 | 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 |
Base critical strike chance of the weapon |
attack_speed | int | ![]() |
![]() |
Has base attack speed
Has attack speed range minimum |
Base attack speed of the weapon |
damage_min | int | ![]() |
![]() |
Has base minimum physical damage
Has minimum physical damage range minimum |
Minimum base physical damage of the weapon |
damage_max | int | ![]() |
![]() |
Has base maximum physical damage
Has maximum physical damage range minimum |
Maximum base physical damage of the weapon |
range | int | ![]() |
![]() |
Has base weapon range
Has weapon range range minimum |
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 | Armour of the armour |
energy_shield | int | ![]() |
![]() |
Has base energy shield
Has energy shield range minimum |
Energy Shield of the armour |
evasion | int | ![]() |
![]() |
Has base evasion | 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 | 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 |
How much Life the flask recovers |
Mana Flasks
Hybrid Flasks |
flask_mana | int | ![]() |
![]() |
Has base flask mana recovery
Has flask mana recovery range minimum |
How much Mana the flask recovers |
Shields | block | int | ![]() |
![]() |
Has base block | 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. |
Other specific parameters
Prophecies
Prophecies are a special case which require the base_item
to be set to "Prophecy" with rarity
"Normal" and class
"Stackable Currency":
{{Item |rarity = Normal |class = Stackable Currency |base_item = Prophecy ... }}
In addition, the following parameters are exclusive to prophecies:
Parameter | Value | Required | PyPoE Export |
Property | Description |
---|---|---|---|---|---|
prophecy_id | str | ![]() |
![]() |
Property:Has prophecy id | Internal (unique) identifier of the prophecy. |
prediction_text | str | ![]() |
![]() |
Property:Has prophecy prediction text | The prediction text of the prophecy (i.e. the white text that tells you what will happen). |
seal_cost | int | ![]() |
![]() |
Property:Has prophecy seal cost | How many Module Error: No results found for item using search term "item_name = Silver Coin" are required to seal the prophecy. |
Examples
Finding areas
For the drop_areas
parameter you'll need to specify the area ids; the id is required instead of the name of the area, because multiple areas can share the same name. If you go to the page of the inappropriate area it will show it's id in the infobox.
You can also use SMW to find ids using a simple query, for example:
{{#ask: [[Has name::The Twilight Strand]] |?Is area id |?Has name |?Has main page }}
Yields:
- {{#ask:
Has name::The Twilight Strand |?Is area id |?Has name |?Has act |?Has main page
}}
So if you meant the act 1 area you'd use drop_areas = 1_1_1
, if you meant the act 6 area, you'd use drop_areas = 2_6_1
or if you actually want both you can just use them both drop_areas = 1_1_1, 2_6_1
.
See also