Difference between revisions of "Template:Quest list result format"
Jump to navigation
Jump to search
PollyEdaline (talk | contribs) (Reverting because it's beyond my ability to add these properly right now) Tag: Manual revert |
(Added a parameter to split Rewards column into two, one with optional rewards. Should move the arraymap internals into its own template, since it's essentially copypasted twice here.) |
||
Line 38: | Line 38: | ||
-->{{#if:{{#var:quest-list-item-rewards}}| | -->{{#if:{{#var:quest-list-item-rewards}}| | ||
{{!!}} {{#if:{{{7|}}} | {{#arraymap:{{{7|}}}‡|)‡|@@@| | {{!!}} {{#if:{{{7|}}} | {{#arraymap:{{{7|}}}‡|)‡|@@@| | ||
{{#vardefine:tmp-name| | {{#vardefine:tmp-name|{{#explode:@@@|,|-3}}}} | ||
{{#vardefine:tmp-minqty|{{#sub:{{#explode:@@@| |1}}|1|-1}}}} | |||
{{#vardefine:tmp-maxqty|{{#sub:{{#explode:@@@| |2}}|0|-1}}}} | {{#vardefine:tmp-maxqty|{{#sub:{{#explode:@@@| |2}}|0|-1}}}} | ||
{{Item reward|{{#sub:{{#explode:@@@| |1}}|1|-1}}{{#ifeq:{{#var:tmp-maxqty}}|0||-{{#var:tmp-maxqty}}}}|{{#var:tmp-name}}|no-smw=y}} | {{#vardefine:tmp-qty|{{#var:tmp-minqty}}{{#ifeq:{{#var:tmp-maxqty}}|0||-{{#var:tmp-maxqty}}}}}} | ||
{{#vardefine:tmp-optional|{{#explode:@@@|,|-1}}}} | |||
{{#vardefine:tmp-reward-line|{{Item reward|{{#var:tmp-qty}}|{{#var:tmp-name}}|no-smw=y}}<br>}} | |||
{{#if:{{#var:quest-list-split-optional-rewards}}|{{#ifeq:{{#var:tmp-optional}}|false|{{#var:tmp-reward-line}}}}|{{#var:tmp-reward-line}}}}|}} | |||
}} | |||
}} | |||
{{#if:{{#var:quest-list-split-optional-rewards}}|{{!!}} {{#if:{{{7|}}} | | |||
{{#arraymap:{{{7|}}}‡|)‡|@@@| | |||
{{#vardefine:tmp-name|{{#explode:@@@|,|-3}}}} | |||
{{#vardefine:tmp-minqty|{{#sub:{{#explode:@@@| |1}}|1|-1}}}} | |||
{{#vardefine:tmp-maxqty|{{#sub:{{#explode:@@@| |2}}|0|-1}}}} | |||
{{#vardefine:tmp-qty|{{#var:tmp-minqty}}{{#ifeq:{{#var:tmp-maxqty}}|0||-{{#var:tmp-maxqty}}}}}} | |||
{{#vardefine:tmp-optional|{{#explode:@@@|,|-1}}}} | |||
{{#vardefine:tmp-reward-line|{{Item reward|{{#var:tmp-qty}}|{{#var:tmp-name}}|no-smw=y}}<br>}} | |||
{{#if:{{#var:quest-list-split-optional-rewards}}|{{#ifeq:{{#var:tmp-optional}}|true|{{#var:tmp-reward-line}}}}|{{#var:tmp-reward-line}}}}|}} | |||
}} | }} | ||
}} | }} |
Revision as of 13:42, 22 January 2022
This is a semantic result template for use in {{quest list row}}. The input parameters generated by the semantic query are:
- PAGENAME
- Has canonical name
- Has quest type
- Has quest level
- Has quest giver
- Has system unlock (optional)
- Has item reward (optional)