Template:Modifier table/doc: Difference between revisions

From Path of Exile Wiki
Jump to navigation Jump to search
>OmegaK2
m (OmegaK2 moved page Template:Mod table/doc to Template:Modifier table/doc without leaving a redirect: better use full name rather then shorthand)
 
(18 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{documentation subpage}}
{{Documentation subpage}}
{{lua|Module:Mod}}
 
{{Lua|Module:Modifier table}}


==Overview==
==Overview==
Line 18: Line 19:
| default
| default
| str
| str
| If specified, the value of this will be returned of there are no results for the specified query.
| If specified, the value of this will be returned if there are no results for the specified query.
| {{no}}
| {{no}}
|-
|-
Line 24: Line 25:
| str
| str
| Values:
| Values:
maps - if set to this value, IIQ/IIR/Pack size will be removed and shown in separate columns
map - if set to this value, IIQ/IIR/Pack size will be removed and shown in separate columns
| {{no}}
| {{no}}
|-
|-
| q_<param>
| q_<param>
| {{n/a}}
| {{n/a}}
| It is possible to add any parameters of the [[mediawikiwiki:Extension:Cargo/Querying_data|cargo query]] (besides table/field names) by prefixing them with <code>q_</code>.  
| 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>.  
Specifying at least q_where and q_limit is highly recommended.
Specifying at least q_where and q_limit is highly recommended.
| {{no}}
| {{no}}
Line 41: Line 42:
! Parameter  
! Parameter  
! Description
! Description
|-
| name
| Name of the modifier, links to the modifier page. Always shown by default, specify <code>name=0</code> to remove it.
|-
|-
| domain
| domain
|  
| Mod domain (shown as text)
|-
|-
| generation_type
| generation_type
|  
| Mod generation type (shown as text)
|-
|-
| group
| group
|  
| Mod group
|-
|-
| type
| type
|  
| Mod type
|-
|-
| level
| level
|  
| Mod level (i.e. the level requirement)
|-
| labyrinth
| Shows labyrinth type
|-
|-
| stat_text
| stat_text
|  
| Visible stat text of the modifier
|-
|-
| buff
| buff
|  
| Buff(s) granted by the modifier
|-
|-
| skill
| skill
|
| Skill(s) granted by the modifier
|-
|-
| tags
| tags
|  
| Tags applied by the modifier
|-
|-
| spawn_weight
| spawn_weights
|  
| Spawn weights defined for the modifier
|-
|-
| generation_weight
| generation_weights
|  
| Generation weights defined for the modifier
|}
|}


Line 84: Line 91:
! Description
! Description
! Parameters activated
! Parameters activated
|-
| enchantment
|
| labyrinth
|}
|}


==Examples==
==Examples==


<includeonly>
===Using other tables using join===
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
Modifiers often requires a spawn weight over zero to be able to spawn on an item. This will therefore require to join two separate cargo tables together and query that.
[[Category:Cargo result formatting templates]]
 
</includeonly>
Let's try and find the first 5 modifier pages in the "Map" domain with a weight above 0 and named Fecund.
 
<pre>{{Modifier table
|type=map
|q_tables=spawn_weights
|q_join=mods._pageID=spawn_weights._pageID
|q_where=mods.domain=5 AND mods.name="Fecund" AND spawn_weights.weight > 0
|q_limit=5
|stat_text=1
|spawn_weights=1
}}</pre>
 
{{Modifier table
|type=map
|q_tables=spawn_weights
|q_join=mods._pageID=spawn_weights._pageID
|q_where=mods.domain=5 AND mods.name="Fecund" AND spawn_weights.weight > 0
|q_limit=5
|stat_text=1
|spawn_weights=1
}}
 
{{Documentation categories|
<!-- Categories and interwikis go here. -->
[[Category:Query templates]]
[[Category:Table templates]]
}}

Latest revision as of 20:54, 17 April 2024

This subpage provides documentation for Template:Modifier table.

Lua logo

This template uses the following modules:

Overview

This template creates an advanced list for modifiers based on performing an cargo query.

Parameters

Main Parameters

Parameter Value Description Required
default str If specified, the value of this will be returned if there are no results for the specified query.
type str Values:

map - if set to this value, IIQ/IIR/Pack size will be removed and shown in separate columns

q_<param> N/A It is possible to add any parameters of the cargo query (field names) by prefixing them with q_.

Specifying at least q_where and q_limit is highly recommended.

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
name Name of the modifier, links to the modifier page. Always shown by default, specify name=0 to remove it.
domain Mod domain (shown as text)
generation_type Mod generation type (shown as text)
group Mod group
type Mod type
level Mod level (i.e. the level requirement)
labyrinth Shows labyrinth type
stat_text Visible stat text of the modifier
buff Buff(s) granted by the modifier
skill Skill(s) granted by the modifier
tags Tags applied by the modifier
spawn_weights Spawn weights defined for the modifier
generation_weights Generation weights defined for the modifier

Multi-option parameters

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

Parameter Description Parameters activated
enchantment labyrinth

Examples

Using other tables using join

Modifiers often requires a spawn weight over zero to be able to spawn on an item. This will therefore require to join two separate cargo tables together and query that.

Let's try and find the first 5 modifier pages in the "Map" domain with a weight above 0 and named Fecund.

{{Modifier table
|type=map
|q_tables=spawn_weights
|q_join=mods._pageID=spawn_weights._pageID
|q_where=mods.domain=5 AND mods.name="Fecund" AND spawn_weights.weight > 0
|q_limit=5
|stat_text=1
|spawn_weights=1
}}

No results found