Template:Item table/doc: Difference between revisions

From Path of Exile 2 Wiki
Jump to navigation Jump to search
>OmegaK2
(Use Template:Tooltip unless it's actually an abbreviation.)
 
(35 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{documentation subpage}}
{{Documentation subpage}}
{{lua|Module:Item table}}


==Overview==
{{Lua|Module:Item table}}
This template creates an advanced list for [[modifier]]s based on performing an [[mediawikiwiki:Extension:Cargo/Querying_data|cargo query]].


===Specialized Templates===
This template performs a [[mw:Extension:Cargo/Querying data|Cargo query]] for [[item]]s and returns the results as a formatted table.
There are also specialized sub templates for the following item types available:
* [[skill gems]] - [[Template:Item table/skill gems]]
 
===Query Templates===
There are also several query templates based on this template in order to reduce query duplication:
 
* [[Template:Query base items]]
* [[Template:Query base armours]]
* [[Template:Query unique items]]
* [[Template:Query unique armours]]
* [[Template:Item unique versions]]


==Parameters==
==Parameters==


===Main Parameters===
===Query parameters===
These parameters are used to construct the Cargo query. For more information about how these parameters should be used, see [[mw:Extension:Cargo/Querying data|Extension:Cargo/Querying data]].


<section begin="main parameters" />
{| class="wikitable sortable"
{| class="wikitable sortable"
! Parameter  
! Parameter  
Line 29: Line 16:
! Required
! Required
|-
|-
| conditions
| where
| str
| str
| The ask query string to use. Only the query string is required here, the properties that will be selected and well as any other parameters normally found on an ask query are added by the item module.
| The conditions that must be met for items to appear in the table. This is the main portion of the WHERE clause in the query.
For info on how to write queries, consult [[smw:Semantic MediaWiki|Semantic MediaWiki]], in particular [[smw:Help:Selecting pages|Help:Selecting pages]].
| {{yes}}
| {{yes}}
|-
| tables
| list[str]
| A comma-separated list of any additional Cargo tables to select from, apart from those that are required based on the {{section link||Column display parameters}}. This corresponds to the FROM clause in the query.
| {{no}}
|-
| join
| list[str]
| Specifies how the rows are combined from any additional Cargo tables given by <code><nowiki>|tables=</nowiki></code>. This corresponds to JOIN clauses in the query.
| {{no}}
|-
| orderBy
| list[str]
| Fields to sort the results by, and in which order. This corresponds to the ORDER BY clause in the query.
| {{no}}
|-
| limit
| int
| The maximum number of rows to return. This corresponds to the LIMIT clause in the query.
| {{no}}
|-
| groupBy
| list[str]
| Additional fields to group rows by, secondary to <code>items._pageID</code>. This corresponds to the GROUP BY clause in the query.
| {{no}}
|-
| having
| list[str]
| The conditions that must be met when grouping rows. This corresponds to the HAVING clause in the query.
| {{no}}
|}
===Table display parameters===
{| class="wikitable sortable"
! Parameter
! Value
! Description
! Required
|-
|-
| default
| default
Line 46: Line 70:
| {{no}}
| {{no}}
|-
|-
| q_<param>
| responsive
| {{n/a}}
| bool
| It is possible to add any parameters of the [[mediawikiwiki:Extension:Cargo/Querying_data|cargo query]] (field names) by prefixing them with <code>q_</code>.  
| Whether to collapse the table so that it takes up less space. Individual users have the option to turn this behavior off in their user preferences.
Specifying at least q_where and q_limit is highly recommended. q_limit is restricted to a maximum of 300.
Default: No
 
| {{no}}
Additional tables can be specified using q_tables.
|-
| no_html
| bool
| Don't show HTML infoboxes on hover.
Advisable to enable this on very large lists, as it makes the resulting table much smaller. In particular if the page hits the wiki limits for size.
| {{no}}
| {{no}}
|}<section end="main parameters" />
|}
 
===Display control parameters===


===Column display parameters===
All these parameters are binary, so as long you specify something like <code>icon=1</code> it will show up. If something is not available on the item you're fetching it will show up as "N/A"
All these parameters are binary, so as long you specify something like <code>icon=1</code> it will show up. If something is not available on the item you're fetching it will show up as "N/A"


{| class="wikitable sortable"
{| class="wikitable sortable"
! Parameter  
! Parameter
! Description
! Description
! {{abbr|Local|This means this option will only consider 'local' increases}}
! {{tooltip|Local|This means this option will only consider 'local' increases}}
|-
| base_item
| Shows the base item (i.e. of an unique item).
| {{no}}
|-
|-
| no_html
| class
| Don't show HTML infoboxes on hover.
| Show the [[item class]].
Advisable to enable this on very large lists, as it makes the resulting table much smaller. In particular if the page hits the wiki limits for size.
| {{no}}
| {{no}}
|-
|-
| base_item
| rarity
| Shows the base item (i.e. of an unique item)
| Show the [[rarity]] of the item.
| {{no}}
| {{no}}
|-
|-
| class
| rarity_id
| Show the [[item class]]
| Show the [[rarity]] id of the item which is not dependent on the game language.
| {{no}}
| {{no}}
|-
|-
| essence
| essence
| Shows the essence tier
| Shows the essence tier.
| {{no}}
| {{no}}
|-
|-
| drop_level
| drop_level
| Shows the drop level of the item
| Shows the drop level of the item.
| {{no}}
| {{no}}
|-
|-
| stack_size
| stack_size
| Show the maximum stack size (not in currency tab)
| Show the maximum stack size (not in currency tab).
| {{no}}
| {{no}}
|-
|-
| stack_size_currency_tab
| stack_size_currency_tab
| Show the maximum stack size in the currency tab
| Show the maximum stack size in the currency tab.
| {{no}}
| {{no}}
|-  
|-
| level
| level
| the level requirement of the item
| the level requirement of the item.
| {{yes}}
| {{yes}}
|-
|-
| str
| str
| the [[strength]] requirement of the item
| the [[strength]] requirement of the item.
| {{yes}}
| {{yes}}
|-  
|-
| int
| int
| the [[intelligence]] requirement of the item
| the [[intelligence]] requirement of the item.
| {{yes}}
| {{yes}}
|-  
|-
| dex
| dex
| the [[dexterity]] requirement of the item
| the [[dexterity]] requirement of the item.
| {{yes}}
| {{yes}}
|-
|-
| ar
| ar
| Shows how much [[armour]] the item provides
| Shows how much [[armour]] the item provides.
| {{yes}}
| {{yes}}
|-
|-
| ev
| ev
| Shows how much [[evasion]] the item provides
| Shows how much [[evasion]] the item provides.
| {{yes}}
| {{yes}}
|-
|-
| es
| es
| Shows how much [[energy shield]] the item provides
| Shows how much [[energy shield]] the item provides.
| {{yes}}
|-
| wd
| Shows how much [[ward]] the item provides.
| {{yes}}
| {{yes}}
|-
|-
| block
| block
| Shows how much [[block]] the item provides
| Shows how much [[block]] the item provides.
| {{yes}}
| {{yes}}
|-
|-
Line 136: Line 170:
| Shows the local critical strike chance of a weapon.
| Shows the local critical strike chance of a weapon.
| {{yes}}
| {{yes}}
|-  
|-
| flask_life
| flask_life
| Shows how much [[life]] the flask recovers per use
| Shows how much [[life]] the flask recovers per use.
| {{yes}}
|-
| flask_life_per_second
| Shows how much [[life]] the flask recovers per second when in use.
| {{yes}}
|-
| flask_life_per_charge
| Shows how much [[life]] the flask recovers per charge when used.
| {{yes}}
| {{yes}}
|-  
|-
| flask_mana
| flask_mana
| Shows how much [[mana]] the flask recovers per use
| Shows how much [[mana]] the flask recovers per use.
| {{yes}}
| {{yes}}
|-  
|-
| flask_mana_per_second
| Shows how much [[mana]] the flask recovers per second when in use.
| {{yes}}
|-
| flask_mana_per_charge
| Shows how much [[mana]] the flask recovers per charge when used.
| {{yes}}
|-
| flask
| flask
| Shows various generic flask properties:
| Shows various generic flask properties:
Line 153: Line 203:
|-
|-
| buff
| buff
| Shows the effect of the buffs granted by the item (generally applicable to [[Utility Flasks]])
| Shows the effect of the buffs granted by the item (generally applicable to [[Utility Flasks]]).
| {{no}}
| {{no}}
|-
|-
| physical_dps
| physical_dps
| Shows [[physical damage]] per second
| Shows [[physical damage]] per second.
| {{yes}}
| {{yes}}
|-
|-
| fire_dps
| fire_dps
| Shows [[fire damage]] per second
| Shows [[fire damage]] per second.
| {{yes}}
| {{yes}}
|-
|-
| cold_dps
| cold_dps
| Shows [[cold damage]] per second
| Shows [[cold damage]] per second.
| {{yes}}
| {{yes}}
|-
|-
| lightning_dps
| lightning_dps
| Shows [[lightning damage]] per second
| Shows [[lightning damage]] per second.
| {{yes}}
| {{yes}}
|-
|-
| chaos_dps
| chaos_dps
| Shows [[chaos damage]] per second
| Shows [[chaos damage]] per second.
| {{yes}}
| {{yes}}
|-
|-
| elemental_dps
| elemental_dps
| Shows the combined elemental damage per second (i.e. [[fire damage]], [[cold damage]] and [[lightning damage]])  
| Shows the combined elemental damage per second (i.e. [[fire damage]], [[cold damage]] and [[lightning damage]]).
| {{yes}}
| {{yes}}
|-
|-
| poison_dps
| poison_dps
| Shows the combined damage that can apply to [[poison]] (i.e. [[physical damage]] and [[chaos damage]])
| Shows the combined damage that can apply to [[poison]] (i.e. [[physical damage]] and [[chaos damage]]).
| {{yes}}
| {{yes}}
|-
|-
| dps
| dps
| Shows the total combined damage per second (i.e. [[physical damage]], [[fire damage]], [[cold damage]], [[lightning damage]] and [[chaos damage]])  
| Shows the total combined damage per second (i.e. [[physical damage]], [[fire damage]], [[cold damage]], [[lightning damage]] and [[chaos damage]]).
| {{yes}}
| {{yes}}
|-
|-
| stat
| stat
| the complete stat text of the item (both implicit and explicit [[stat]]s derived from [[mod]]s) in a single column
| the complete stat text of the item (both implicit and explicit [[stat]]s derived from [[mod]]s) in a single column.
| {{no}}
| {{no}}
|-
|-
| item_limit
| item_limit
| Shows the item limit of an item
| Shows the item limit of an item.
| {{no}}
| {{no}}
|-
|-
| jewel_radius
| jewel_radius
| Show the radius of a jewel
| Show the radius of a jewel.
| {{yes}}
| {{yes}}
|-
|-
| map_tier
| map_tier
| Show the map tier
| Show the map tier.
| {{yes}}
| {{yes}}
|-
|-
| map_level
| map_level
| Show the map level
| Show the map level.
| {{yes}}
| {{yes}}
|-
|-
| map_guild_character
| map_guild_character
| Show the character a map produces for a guild tag
| Show the character a map produces for a guild tag.
| {{no}}
| {{no}}
|-
|-
| master_level_requirement
| map_series
| Shows the required level of the forsaken master in order to purchase the doodad
| Show the name of the map series.
| {{no}}
| {{no}}
|-
|-
| master
| atlas_tier
| Shows the forsaken master name where the doodad can be purchased at
| Show the atlas tier based on the region upgrade level.
| {{no}}
| {{no}}
|-
|-
| master_favour_cost
| atlas_level
| Shows the how much favour the doodad costs when purchased at a forsaken master
| Show the atlas level based on the region upgrade level.
| {{no}}
| {{no}}
|-
|-
| variations
| variations
| Shows the number of possible variations of the doodad  
| Shows the number of possible variations of the doodad.
| {{no}}
| {{no}}
|-
|-
| description
| description
| Shows the {{c|mod|description text}} of the item
| Shows the {{c|mod|description text}} of the item.
| {{no}}
| {{no}}
|-
|-
| flavour_text
| flavour_text
| Shows the {{c|flavour|flavour text}} of the item  
| Shows the {{c|flavour|flavour text}} of the item.
| {{no}}
| {{no}}
|-
|-
| help_text
| help_text
| Shows the {{c|help|help_text}} of the item  
| Shows the {{c|help|help_text}} of the item.
| {{no}}
| {{no}}
|-
|-
| objective
| objective
| Shows the objective section from a [[prophecy]] page crated with {{tlx|Prophecy description}}  
| Shows the objective section from a [[prophecy]] page crated with {{tlx|Prophecy description}}.
| {{no}}
| {{no}}
|-
|-
| reward
| reward
| Shows the reward section from a [[prophecy]] page crated with {{tlx|Prophecy description}}  
| Shows the reward section from a [[prophecy]] page crated with {{tlx|Prophecy description}}.
| {{no}}
| {{no}}
|-
|-
| seal_cost
| seal_cost
| Shows the {{c|currency|seal cost}} of a [[prophecy]]  
| Shows the {{c|currency|seal cost}} of a [[prophecy]].
| {{no}}
| {{no}}
|-
|-
| prediction_text
| prediction_text
| Shows the {{c|value|prediction text}} of a [[prophecy]]  
| Shows the {{c|value|prediction text}} of a [[prophecy]].
| {{no}}
| {{no}}
|-
|-
| buff_icon
| buff_icon
| Shows the buff icon associated with the item's buff
| Shows the buff icon associated with the item's buff.
| {{no}}
|-
| release_version
| Shows which version the item was released.
| {{no}}
|-
| removal_version
| Shows which version the item was removed.
| {{no}}
| {{no}}
|-
|-
| drop_enabled
| drop_enabled
| Shows whether the item is considered drop_enabled and can be normally obtained
| Shows whether the item is considered drop_enabled and can be normally obtained.
| {{no}}
| {{no}}
|-
|-
| drop_leagues
| drop_leagues
| Shows which leagues the item can be obtained in
| Shows which leagues the item can be obtained in.
| {{no}}
| {{no}}
|-
|-
| drop_areas
| drop_areas
| Shows which areas the item can be obtained in
| Shows which areas the item can be obtained in.
| {{no}}
|-
| drop_monsters
| Shows which monsters the item can be obtained from.
| {{no}}
| {{no}}
|-
|-
| drop_text
| drop_text
| Shows drop restriction information that doesn't fit into other categories
| Shows drop restriction information that doesn't fit into other categories.
| {{no}}
|-
| quest_name
| Shows quest names that the item can be obtained from.
| {{no}}
|-
| quest_act
| Shows which act the quest can be found in.
| {{no}}
|-
| purchase_cost
| Shows the cost of buying from an NPC vendor.
| {{no}}
|-
| sell_price
| Shows the currencies received when selling the item to an NPC vendor.
| {{no}}
|-
| boss_name
| Shows the bosses of the map.
| {{no}}
|-
| boss_number
| Shows the number of bosses in the map.
| {{no}}
|-
| legacy
| Shows legacy stats where the data is queried from {{tlx|Legacy variant table row}}.
| {{no}}
|-
| granted_skills
| Shows [[skill]]s granted by the item.
| {{no}}
|-
| alternate_art
| Shows the alternate arts the item may have.
| {{no}}
|-
| seed_type
| Shows the type of a [[Harvest Seed]].
| {{no}}
|-
| seed_tier
| Shows the [[Harvest Seed]]'s Tier.
| {{no}}
|-
| seed_growth_cycles
| Shows how many cycles a [[Harvest Seed]] needs to grow.
| {{no}}
|-
| seed_consumed_primal_lifeforce_percentage
| Show the percentage of {{c|primal|Primal}} lifeforce consumed when a [[Harvest Seed]] is used.
| {{no}}
|-
| seed_consumed_vivid_lifeforce_percentage
| Show the percentage of {{c|vivid|Vivid}} lifeforce consumed when a [[Harvest Seed]] is used.
| {{no}}
|-
| seed_consumed_wild_lifeforce_percentage
| Show the percentage of {{c|wild|Wild}} lifeforce consumed when a [[Harvest Seed]] is used.
| {{no}}
|-
| seed_required_nearby_seed_amount
| Shows how many nearby seeds are required to grow this seed, if any.
| {{no}}
|-
| seed_required_nearby_seed_tier
| Shows what tier any nearby seeds needed to growth this seed have to be
| {{no}}
|-
| seed_effect
| Shows the {{c|crafted|effect}} of the [[Harvest Seed]]
| {{no}}
| {{no}}
|}
|}


==== Multi-option parameters ====
====Multi-column display parameters====
 
These parameters will active multiple options at once. They should be used for "default" lists, as additional variables may be added over time:
These parameters will active multiple options at once. They should be used for "default" lists, as additional variables may be added over time:


{| class="wikitable sortable"
{| class="wikitable sortable"
! Parameter  
! Parameter
! Description
! Description
! Parameters activated
! Parameters activated
|-
|-
| weapon
| weapon
| Show weapon information
| Show weapon information.
|damage
|
aps
* damage
 
* aps
crit
* crit
|-
|-
| prophecy
| prophecy
| Show prophecy information
| Show prophecy information.
|prediction_text
|
seal_cost
* prediction_text
* seal_cost
|-
| version
| Enables all options relevant to versions.
|
* release_version
* removal_version
|-
|-
| drop
| drop
| Show information related on how an item is obtained.
| Show information related on how an item is obtained.
| drop_level
|
drop_enabled
* drop_level
 
* drop_enabled
drop_leagues
* drop_leagues
 
* drop_areas
drop_areas
* drop_text
 
drop_text
 
|-
|-
| doodad
| doodad
| Enables all options relevant to hideout doodads
| Enables all options relevant to hideout doodads.
|master_level_requirement
|
master
* master_level_requirement
 
* master
master_favour_cost
* master_favour_cost
 
* variation_count
variation_count
|-
| quest
| Enables all options relevant to quests.
|
* quest_name
* quest_act
|-
| price
| Enables all options relevant to prices.
|
* purchase_cost
* sell_price
|-
| boss
| Enables all options relevant to bosses.
|
* boss_name
* boss_number
|-
| seed
| Enables all options relevant to [[Harvest Seed]]s.
|
* seed_type
* seed_tier
* seed_growth_cycles
* seed_consumed_primal_lifeforce_percentage
* seed_consumed_vivid_lifeforce_percentage
* seed_consumed_wild_lifeforce_percentage
* seed_required_nearby_seed_amount
* seed_required_nearby_seed_tier
* seed_effect
|-
| seed_consumed_lifeforce
| Shows the percentage values of life force consumed for all three [[Harvest Seed]] types.
|
* seed_consumed_primal_lifeforce_percentage
* seed_consumed_vivid_lifeforce_percentage
* seed_consumed_wild_lifeforce_percentage
|-
| seed_required_nearby_seeds
| Shows the seed amount and tier required of nearby seeds
|
* seed_required_nearby_seed_amount
* seed_required_nearby_seed_tier
|}
|}


===Stat parameters===
===Stat parameters===
It is possible to directly query any [[stat]]s on the item. The stats are an aggregate from all modifiers on the item (this means it will include implicit values).  
It is possible to directly query any [[stat]]s on the item. The stats are an aggregate from all modifiers on the item (this means it will include implicit values).  


Line 375: Line 554:
===Show item limit===
===Show item limit===
<pre>{{Item table
<pre>{{Item table
|q_where=items._pageName="Self-Flagellation"
|where=items._pageName="Self-Flagellation"
|large=1
|large=1
|stat=1
|stat=1
Line 382: Line 561:
Yields:
Yields:
{{Item table
{{Item table
|q_where=items._pageName="Self-Flagellation"
|where=items._pageName="Self-Flagellation"
|large=1
|large=1
|stat=1
|stat=1
Line 390: Line 569:
===Show possible "Maximum Life" rolls on unique items with at least +100 life===
===Show possible "Maximum Life" rolls on unique items with at least +100 life===
<pre>{{Item table
<pre>{{Item table
|q_tables=item_stats
|tables=item_stats
|q_join=items._pageID=item_stats._pageID
|join=items._pageID=item_stats._pageID
|q_where=items.rarity="Unique" AND item_stats.id="base_maximum_life" AND item_stats.min > 100
|where=items.rarity_id="unique" AND item_stats.id="base_maximum_life" AND item_stats.min > 100
|large=1
|large=1
|level=1
|level=1
Line 402: Line 581:
Yields:
Yields:
{{Item table
{{Item table
|q_tables=item_stats
|tables=item_stats
|q_join=items._pageID=item_stats._pageID
|join=items._pageID=item_stats._pageID
|q_where=items.rarity="Unique" AND item_stats.id="base_maximum_life" AND item_stats.min > 100
|where=items.rarity_id="unique" AND item_stats.id="base_maximum_life" AND item_stats.min > 100
|large=1
|large=1
|level=1
|level=1
Line 413: Line 592:
}}
}}


<includeonly>
==See also==
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
{{Item table templates}}
 
* {{tl|Item count}}
 
{{Documentation categories|
<!-- Categories and interwikis go here. -->
[[Category:Item table templates]]
[[Category:Query templates]]
[[Category:Query templates]]
</includeonly>
{{Sister|poewiki}}
}}

Latest revision as of 18:20, 20 March 2025

This subpage provides documentation for Template:Item table.

Lua logo

This template uses the following modules:

This template performs a Cargo query for items and returns the results as a formatted table.

Parameters

Query parameters

These parameters are used to construct the Cargo query. For more information about how these parameters should be used, see Extension:Cargo/Querying data.

Parameter Value Description Required
where str The conditions that must be met for items to appear in the table. This is the main portion of the WHERE clause in the query. Yes
tables list[str] A comma-separated list of any additional Cargo tables to select from, apart from those that are required based on the § Column display parameters. This corresponds to the FROM clause in the query. No
join list[str] Specifies how the rows are combined from any additional Cargo tables given by |tables=. This corresponds to JOIN clauses in the query. No
orderBy list[str] Fields to sort the results by, and in which order. This corresponds to the ORDER BY clause in the query. No
limit int The maximum number of rows to return. This corresponds to the LIMIT clause in the query. No
groupBy list[str] Additional fields to group rows by, secondary to items._pageID. This corresponds to the GROUP BY clause in the query. No
having list[str] The conditions that must be met when grouping rows. This corresponds to the HAVING clause in the query. No

Table display parameters

Parameter Value Description Required
default str If specified, the value of this will be returned of there are no results for the specified query. No
large bool Whether to show large inventory icons

Default: No

No
responsive bool Whether to collapse the table so that it takes up less space. Individual users have the option to turn this behavior off in their user preferences.

Default: No

No
no_html bool Don't show HTML infoboxes on hover.

Advisable to enable this on very large lists, as it makes the resulting table much smaller. In particular if the page hits the wiki limits for size.

No

Column display parameters

All these parameters are binary, so as long you specify something like icon=1 it will show up. If something is not available on the item you're fetching it will show up as "N/A"

Parameter Description Local
base_item Shows the base item (i.e. of an unique item). No
class Show the item class. No
rarity Show the rarity of the item. No
rarity_id Show the rarity id of the item which is not dependent on the game language. No
essence Shows the essence tier. No
drop_level Shows the drop level of the item. No
stack_size Show the