Шаблон:Skill list by property — различия между версиями

Материал из Guild Wars 2 wiki
Перейти к: навигация, поиск
(Новая страница: «<includeonly>{{#ask: Has context::Skill {{#switch: {{ucfirst:{{{1|}}}}} | <!-- empty --> <!-- by supertype --> | Profes…»)
 
 
(не показаны 2 промежуточные версии этого же участника)
Строка 1: Строка 1:
<includeonly>{{#ask: [[Has context::Skill]]
+
<includeonly>{{#vardefine:last_profession|}}{{#vardefine:slbp cnt|{{#expr:{{#var:slbp cnt|0}}+1}}}}<!-- purge last profession from previous template call, define unique id variable
 +
 
 +
-->{{#vardefine: smw-empty-query-warning|{{#ifeq: {{{warning|true}}}|false|<!-- no warning -->|{{#if: {{NAMESPACE}}||[[Category:Pages with empty semantic mediawiki query results]]}}}}}}<!--
 +
 
 +
-->{{#ask: [[Has context::Skill]]
 
  {{#switch: {{ucfirst:{{{1|}}}}}
 
  {{#switch: {{ucfirst:{{{1|}}}}}
 
   | <!-- empty -->                                  <!-- by supertype -->
 
   | <!-- empty -->                                  <!-- by supertype -->
   | Profession = [[Has skill supertype::Profession]]  
+
   | Profession = [[Has skill supertype::Profession]] [[Is for game mode::Default||PvE]]
 
   | Common    = [[Has skill supertype::Common]]
 
   | Common    = [[Has skill supertype::Common]]
 
   | Racial  
 
   | Racial  
 
   | Race      = [[Has skill supertype::Racial]]
 
   | Race      = [[Has skill supertype::Racial]]
 
   | Monster    = [[Has skill supertype::Monster]]
 
   | Monster    = [[Has skill supertype::Monster]]
   | #default  = [[Has skill supertype::Profession]] [[Has skill context::{{ucfirst:{{{1|}}}}}]] <!-- by context on default -->
+
   | #default  = [[Has skill supertype::Profession]] [[Has skill context::{{ucfirst:{{{1|}}}}}]] [[Is for game mode::Default||PvE]] <!-- by context on default -->
 
  }}
 
  }}
  [[Has availability::Current]]
+
  [[Has availability::Current{{#ifeq:{{#show:{{PAGENAME}}|?Has availability}}|Future|{{!!}}Future}}]]
 
  {{{2|}}}
 
  {{{2|}}}
 
  | ?Has canonical name    <!-- 2 -->
 
  | ?Has canonical name    <!-- 2 -->
Строка 17: Строка 21:
 
  | ?Has game description  <!-- 6 -->
 
  | ?Has game description  <!-- 6 -->
 
  | ?Is for attunement    <!-- 7 -->
 
  | ?Is for attunement    <!-- 7 -->
  | {{#switch: {{ucfirst:{{{1|}}}}} | Weapon = ?Is for weapon | Bundle | Common = ?Is for bundle | Transform = ?Has parent skill | Profession mechanic | Healing | Utility | Elite = ?Has skill type | Pet = ?Is for pet family | Trait = ?Has trait parent | Profession = ?Has skill type | Monster = ?Is for monster }} <!-- 8 -->
+
| ?Is usable underwater  <!-- 8 -->
  | {{#switch: {{ucfirst:{{{1|}}}}} | Profession mechanic = ?Is for weapon | Pet = ?Is for pet | Profession = ?Is for weapon}} <!-- 9 -->
+
  | {{#switch: {{ucfirst:{{{1|}}}}} | Weapon = ?Is for weapon | Bundle | Common = ?Is for bundle | Transform = ?Has parent skill | Profession mechanic | Healing | Utility | Elite = ?Has skill type | Pet = ?Is for pet family | Trait = ?Has trait parent | Profession = ?Has skill type | Monster = ?Is for monster }} <!-- 9 -->
  | format = template  
+
  | {{#switch: {{ucfirst:{{{1|}}}}} | Profession mechanic = ?Is for weapon | Pet = ?Is for pet | Profession = ?Is for weapon }} <!-- 10 -->
  | template = Skill list by property result format{{!}}fact={{ucfirst:{{{2|{{PAGENAME}}}}}}}{{!}}suffix={{{suffix|type}}}
+
  | format = template
 +
  | template = Skill list by property result format{{!}}suffix={{{suffix|type}}}{{!}}context={{ucfirst:{{{1|}}}}}
 +
| intro = {{{intro|}}}{{#if: {{{heading|}}}|<nowiki/>
 +
<div id="{{{id|skilllist}}}"><{{{heading level|h3}}} class="filter-plain {{#var_final: p-{{ucfirst:{{{1|}}}}}-{{#var:slbp cnt}} }} f-{{ucfirst:{{{1|}}}}}">{{{heading|}}}</{{{heading level|h3}}}></div>}}<ul id="{{{id|skilllist}}}" style="margin-top:0em;">
 +
| outro = </ul>
 
  | link = none
 
  | link = none
 
  | sort = {{#switch: {{ucfirst:{{{1|}}}}}
 
  | sort = {{#switch: {{ucfirst:{{{1|}}}}}
   | Weapon   = Has profession sort order, Has specialization sort order, Is usable underwater, Is for weapon,
+
   | Weapon
   | Bundle   = Has profession sort order, Has specialization sort order, Is for bundle,
+
   | Bundle
   | Healing  
+
  | Transform
 +
   | Healing
 
   | Utility  
 
   | Utility  
   | Elite    = Has profession sort order, Has specialization sort order,  
+
   | Elite
 +
   | Profession mechanic
 +
  | Pet
 +
  | Downed
 +
  | Drowning = Has profession sort order, Has specialization sort order, Has skill context sort order, Has weapon type sort order, Has attunement sort order, Has skill slot sort order, Has skill type sort order, Has skill sort order, Has chain sequence position,
 
   | Racial  = Is for race,
 
   | Racial  = Is for race,
 
   | Common  =  
 
   | Common  =  
 
   | Monster  =  
 
   | Monster  =  
 
   | #default = Has profession sort order, Has specialization sort order,}}  
 
   | #default = Has profession sort order, Has specialization sort order,}}  
  | limit = 250
+
  | limit = 500
  | default = * ''No skills found.''{{#if: {{NAMESPACE}}||[[Category:Pages with empty semantic mediawiki query results]]}}
+
  | searchlabel = <li>Further results... {{#if: {{NAMESPACE}}||[[Category:Pages with further semantic mediawiki query results]]}}</li>
 +
| default = {{{default|* ''No skills found.''{{#var:smw-empty-query-warning}}}}}
 
}}</includeonly><noinclude>
 
}}</includeonly><noinclude>
 
== Description ==
 
== Description ==
 
This template returns a list of skills of a certain semantic mediawiki skill property, e.g. ground-targeting: <nowiki>[[Is ground targeted::Y]]</nowiki>. Format using {{tl|Skill list by property result format}}.
 
This template returns a list of skills of a certain semantic mediawiki skill property, e.g. ground-targeting: <nowiki>[[Is ground targeted::Y]]</nowiki>. Format using {{tl|Skill list by property result format}}.
  
;See also
+
;Related templates
:* {{tl|Skill list}} &mdash; Skill list by skill effect based on {{tl|skill fact}}.
+
{| class="wikitable"
:* {{tl|Trait list}} &mdash; Trait list by trait effect based on {{tl|skill fact}}.
+
! Usage
 +
! Skill templates
 +
! Trait templates
 +
! Description
 +
|-
 +
! Section
 +
| {{tl|Related skills}}
 +
| {{tl|Related traits}}
 +
| These templates list all related skills/traits based on {{tl|skill fact}} and on the {{tl|trait infobox}} ''improves'' parameters. They create subsection headings automatically.
 +
|-
 +
! rowspan="2" | Subsection
 +
| {{tl|Skill list}}
 +
| {{tl|Trait list}}
 +
| These templates list all related skills of a certain context (e.g. weapon, utility)/traits based on {{tl|skill fact}}
 +
|-
 +
| {{tl|Skill list by property}}  
 +
| {{tl|Trait list by property}}
 +
| These templates list all related skills/traits based on a smw query, e.g. based on the {{tl|trait infobox}} ''improves'' parameters.
 +
|-
 +
! Inline
 +
| —
 +
| {{tl|Trait list entry}}
 +
| This template displays the profession icon, trait icon, trait, trait line and trait description.
 +
|}
  
 
== Usage ==
 
== Usage ==
Строка 95: Строка 132:
 
: Required. Query to select the skills.
 
: Required. Query to select the skills.
 
;suffix
 
;suffix
: Optional. Either "type" (default, weapon or skill type), "none", "description".
+
: Optional. Either "type" (default, weapon or skill type), "none", "description" or "trait" (matching {{tl|trait list}}, trait parent and description).
 +
;intro
 +
: Optional. Intro text.
 +
;heading
 +
: Optional. Intro heading. This will internally set filter classes for {{tl|related skills filter}}.
 +
;heading level
 +
: Optional. Intro heading level, defaults to h3.
 +
;default
 +
: Optional. Default text.
  
 
=== Example ===
 
=== Example ===

Текущая версия на 15:02, 21 сентября 2022

Description[править]

This template returns a list of skills of a certain semantic mediawiki skill property, e.g. ground-targeting: [[Is ground targeted::Y]]. Format using {{Skill list by property result format}}.

Related templates
Usage Skill templates Trait templates Description
Section {{Related skills}} {{Related traits}} These templates list all related skills/traits based on {{skill fact}} and on the {{trait infobox}} improves parameters. They create subsection headings automatically.
Subsection {{Skill list}} {{Trait list}} These templates list all related skills of a certain context (e.g. weapon, utility)/traits based on {{skill fact}}
{{Skill list by property}} {{Trait list by property}} These templates list all related skills/traits based on a smw query, e.g. based on the {{trait infobox}} improves parameters.
Inline {{Trait list entry}} This template displays the profession icon, trait icon, trait, trait line and trait description.

Usage[править]

{{Skill list by property|Weapon|<query>}}
{{Skill list by property|Bundle|<query>}}
{{Skill list by property|Transform|<query>}}
{{Skill list by property|Healing|<query>}}
{{Skill list by property|Utility|<query>}}
{{Skill list by property|Elite|<query>}}
{{Skill list by property|Profession mechanic|<query>}}
{{Skill list by property|Pet|<query>}}
{{Skill list by property|Downed|<query>}}
{{Skill list by property|Drowning|<query>}}
{{Skill list by property|Trait|<query>}}
{{Skill list by property|Racial|<query>}}
{{Skill list by property|Common|<query>}}
{{Skill list by property|Profession|<query>}}
{{Skill list by property|Monster|<query>}}

Copy-and-paste code[править]

=== [[Weapon]] skills ===
{{Skill list by property|Weapon}}
=== [[Bundle]] skills ===
{{Skill list by property|Bundle}}
=== [[Transform]] skills ===
{{Skill list by property|Transform}}
=== [[Healing skill]]s ===
{{Skill list by property|Healing}}
=== [[Utility skill]]s ===
{{Skill list by property|Utility}}
=== [[Elite skill]]s ===
{{Skill list by property|Elite}}
=== [[Profession mechanic]] skills ===
{{Skill list by property|Profession mechanic}}
=== [[List of pet skills|Pet]] skills ===
{{Skill list by property|Pet}}
=== [[List of downed skills|Downed]] skills ===
{{Skill list by property|Downed}}
=== [[List of drowning skills|Drowning]] skills ===
{{Skill list by property|Drowning}}
=== [[List of trait skills|Trait]] skills ===
{{Skill list by property|Trait}}
=== [[Racial skill]]s ===
{{Skill list by property|Racial}}
=== Common skills ===
{{Skill list by property|Common}}

Parameters[править]

1 (unnamed parameter)
Required. Skill context: "Weapon", "Bundle", "Transform", "Healing", "Utility", "Elite", "Profession mechanic", "Pet", "Downed", "Drowning", "Trait".
Additional option, by skill supertype: "Profession" (displays all profession skills without specifing any skill context), "Racial", "Common" and "Monster".
2 (unnamed parameter)
Required. Query to select the skills.
suffix
Optional. Either "type" (default, weapon or skill type), "none", "description" or "trait" (matching {{trait list}}, trait parent and description).
intro
Optional. Intro text.
heading
Optional. Intro heading. This will internally set filter classes for {{related skills filter}}.
heading level
Optional. Intro heading level, defaults to h3.
default
Optional. Default text.

Example[править]

{{Skill list by property|Weapon|[[Is ground targeted::Y]]}}