Template:Item table/doc
This subpage provides documentation for Template:Item table.
Overview
This template creates an advanced list for items based on performing an smw:Semantic MediaWiki query.
Specialized Templates
There are also specialized sub templates for the following item types available:
Query Templates
There are also several query templates based on this template in order to use query duplication:
- Template:Query base items
- Template:Query base armours
- Template:Query unique items
- Template:Query unique armours
- Template:Item unique versions
Parameters
Main Parameters
Parameter | Value | Description | Required |
---|---|---|---|
conditions | 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.
For info on how to write queries, consult Semantic MediaWiki, in particular Help:Selecting pages. |
|
default | str | If specified, the value of this will be returned of there are no results for the specified query. | |
large | bool | Whether to show large inventory icons
Default: No |
|
q_<param> | — | It is possible to add any parameters of the ask query by prefixing them with q_ .
Please note that those may be overridden internally, since this is required for the template to function. For example, if you want the results to be sorted by Property:Has name and Property:Has level requirement you could append q_sort=Has name, Has level requirement |
Display control 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) | |
essence | Shows the essence tier | |
drop_level | Shows the drop level of the item | |
stack_size | Show the maximum stack size (not in currency tab) | |
stack_size_currency_tab | Show the maximum stack size in the currency tab | |
level | the level requirement of the item | |
str | the strength requirement of the item | |
int | the intelligence requirement of the item | |
dex | the dexterity requirement of the item | |
ar | Shows how much armour the item provides | |
ev | Shows how much evasion the item provides | |
es | Shows how much energy shield the item provides | |
block | Shows how much block the item provides | |
weapon | Shows various weapon base stats:
|
|
flask_life | Shows how much life the flask recovers per use | |
flask_mana | Shows how much mana the flask recovers per use | |
flask | Shows various generic flask properties:
|
|
buff | Shows the effect of the buffs granted by the item (generally applicable to Utility Flasks) | |
physical_dps | Shows physical damage per second | |
fire_dps | Shows fire damage per second | |
cold_dps | Shows cold damage per second | |
lightning_dps | Shows lightning damage per second | |
chaos_dps | Shows chaos damage per second | |
elemental_dps | Shows the combined elemental damage per second (i.e. fire damage, cold damage and lightning damage) | |
poison_dps | Shows the combined damage that can apply to poison (i.e. physical damage and chaos damage) | |
dps | Shows the total combined damage per second (i.e. physical damage, fire damage, cold damage, lightning damage and chaos damage) | |
stat | the complete stat text of the item (both implicit and explicit stats derived from mods) in a single column | |
description | Shows the description text of the item | |
flavour_text | Shows the flavour text of the item | |
help_text | Shows the help_text of the item | |
buff_icon | Shows the buff icon associated with the item's buff | |
jewel_radius | Show the radius of a jewel | |
map_tier | Show the map tier | |
map_level | Show the map level | |
map_guild_character | Show the character a map produces for a guild tag |
Stat parameters
It is possible to directly query any stats on the item. The stats are an aggregate from all modifiers on the item (this means it will include implicit values).
Queried stats are sorted into columns, and a column can hold any arbitrary number of stats (but at least one) and there can be any number of columns.
The columns will be sorted by the average value of the stat. If multiple stats are specified for a single column, this is the average of all individual stat averages.
The following prefixes are used:
- Columns:
stat_column<i>_
- Stat:
stat<j>_
<i>
and <j>
need to be replaced with the number starting at 1.
Parameter | Value | Description | Required |
---|---|---|---|
stat_column<i>_header | str | Header to use in table for the stat.
If left empty, the id of stat will be used |
|
stat_column<i>_format | str | Lua string.format specifier. Note that the number of formatter must match the number of stats for the specific column or an error will be raised.
If left empty, all result will simply be shown in a comma-separated list. |
|
stat_column<i>_stat_format | str | Acceptable values:
|
|
stat_column<i>_order | int | Ordering priority for showing this column.
Defaults to a very high value. |
|
stat_column<i>_stat<j>_id | str | Identifier of the stat.
If you are not sure what this is, consider checking the sub objects created on items - it will be stored in Property:Has stat id |
Examples
Show item limit
{{SMW item table |conditions=[[Self-Flagellation]] |large=1 |stat=1 |stat_column1_header=Limit |stat_column1_stat1_id=local_unique_item_limit }}
Yields: Template:SMW item table
Show possible "Maximum Life" rolls on unique items with at least +100 life
{{SMW item table |conditions=[[Has rarity::Unique]] [[Has subobject::<q>[[Has stat id::~base_maximum_life]] [[Has minimum stat value::>100]]</q>]] |large=1 |level=1 |stat=1 |stat_column1_header=Life |stat_column1_format=+%s to maximum Life |stat_column1_stat1_id=base_maximum_life }}
Yields: Template:SMW item table