Template:Character query/doc: Difference between revisions

From Path of Exile Wiki
Jump to navigation Jump to search
>Illviljan
>Vinifera7
mNo edit summary
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{documentation subpage}}
{{Documentation subpage}}


==Overview==
==Overview==
Line 6: Line 6:


Essentially, this is a shortcut for:
Essentially, this is a shortcut for:
<pre>{{#ask:  
<pre>{{#cargo_query:
[[-Has subobject::Character]]
|tables = generic_stats
  [[Has stat id::{{{stat}}}]]
|fields = CONCAT(value)
|?Has stat value#=
|where = name="Character"
|mainlabel=-
  AND id = "{{{stat|{{{1}}}}}}"
|limit=1
|no html
}}</pre>
}}</pre>


Line 30: Line 30:
==Example==
==Example==


<pre>{{SMW character query
<pre>{{Character query
  |stat=maximum_life_leech_rate_%_per_minute
  |stat=maximum_life_leech_rate_%_per_minute
}}</pre>
}}</pre>
Line 36: Line 36:
Yields:
Yields:


{{SMW character query
{{Character query
  |stat=maximum_life_leech_rate_%_per_minute
  |stat=maximum_life_leech_rate_%_per_minute
}}
}}


<includeonly>
{{Documentation categories|
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
<!-- Categories and interwikis go here. -->
[[Category:SMW query templates]]
[[Category:Query templates]]
</includeonly>
}}

Latest revision as of 10:58, 1 December 2020

This subpage provides documentation for Template:Character query.

Overview

This template is intended to query a single value for a stat from the Character page.

Essentially, this is a shortcut for:

{{#cargo_query:
|tables = generic_stats
|fields = CONCAT(value)
|where = name="Character"
 AND id = "{{{stat|{{{1}}}}}}"
|no html
}}

Parameters

Parameter Type Description Optional
stat str The stat_id to query for

Example

{{Character query
 |stat=maximum_life_leech_rate_%_per_minute
}}

Yields:

1200