Шаблон:Related traits — различия между версиями

Материал из Guild Wars 2 wiki
Перейти к: навигация, поиск
 
(не показаны 3 промежуточные версии этого же участника)
Строка 7: Строка 7:
 
-->{{#switch: {{#show: {{#var:effect}}|?Has context|link=none}}
 
-->{{#switch: {{#show: {{#var:effect}}|?Has context|link=none}}
 
  | Effect = {{#vardefineecho:smw_results|{{#vardefine: effect type|{{lc:{{#show: {{#var:effect}}|?Has effect type|link=none}}}}}}<!--
 
  | Effect = {{#vardefineecho:smw_results|{{#vardefine: effect type|{{lc:{{#show: {{#var:effect}}|?Has effect type|link=none}}}}}}<!--
 +
 +
                          hide filter on arbitrary effect pages, but show on effect type = Boon/Condition/Aura/Control effect pages
 +
-->{{#ifeq: {{{show filter|{{#ifeq: {{#var:effect type}}|effect|false|true}}}}}|true|{{Related traits filter}}}}<!--
  
 
Effect: related traits
 
Effect: related traits
  -->{{Trait list|type={{{type|{{#var:effect type}}}}}|number={{{number|}}}|suffix={{{suffix|description}}}|game mode={{{game mode|}}}|include effects={{{include effects|}}}|default=|warning=false|{{#var:effect}}|intro={{#var_final:effect_trait_heading_{{#var:rt_id}}}} }}
+
  -->{{Trait list|type={{{type|{{#var:effect type}}}}}|number={{{number|}}}|suffix={{{suffix|description}}}|game mode={{{game mode|}}}|include effects={{{include effects|}}}|default=|warning=false|{{#var:effect}}|intro={{#var_final:effect_trait_heading_{{#var:rt_id}}}}|heading level={{{heading level|h3}}}}}
 
}}{{#vardefineecho:smw_results_2|<!--
 
}}{{#vardefineecho:smw_results_2|<!--
  
 
Effect: related trait skills and their traits
 
Effect: related trait skills and their traits
  -->{{Skill list|type={{{type|{{#var:effect type}}}}}|number={{{number|}}}|suffix={{{suffix|trait}}}|game mode={{{game mode|}}}|include effects={{{include effects|}}}|default=|warning=false|Trait|{{#var:effect}}|intro=<nowiki/>
+
  -->{{Skill list|type={{{type|{{#var:effect type}}}}}|number={{{number|}}}|suffix={{{suffix|trait}}}|game mode={{{game mode|}}}|include effects={{{include effects|}}}|default=|warning=false|Trait|{{#var:effect}}|heading=[[List of trait skills|Умения черт]]{{{heading|}}}|heading level={{{heading level|h3}}}|id=traitlist<!-- filter id -->}}<!--
{{#tag:{{{heading level|h3}}}|[[List of trait skills|Trait skills]] {{{heading|}}}}} }}<!--
 
  
 
Effect: impoving traits
 
Effect: impoving traits
  -->{{#switch: {{{type|}}}|Boon Removed|Condition Removed|Condition Effect Ignored=<!-- DISABLE -->|#default={{Trait list by property|suffix={{{suffix|description}}}|default=|warning=false|[[Improves {{#var:effect type}}::{{#var:effect}}]] [[Is for game mode::Default||PvE]]|intro=<nowiki/>
+
  -->{{#switch: {{{type|}}}|Attribute Conversion|Boon Removed|Condition Removed|Condition Effect Ignored|Condition Effect Reduced=<!-- DISABLE -->|#default={{Trait list by property|suffix={{{suffix improves|description}}}|default=|warning=false|[[Improves {{#var:effect type}}::{{#var:effect}}]] [[Is for game mode::Default||PvE]]|heading=Черты, {{{heading improves|которые улучшают {{lc:{{#show:{{#var:effect}}|?Has canonical name}}}}}}}|heading level={{{heading level|h3}}}}}
{{#tag:{{{heading level|h3}}}|Traits {{{heading improves|that improve {{lc:{{#show:{{#var:effect}}|?Has canonical name}}}}}}}}} }}
 
 
}}}}<!--  
 
}}}}<!--  
  
 
Effect: disable related traits heading if there are no related traits/improving traits
 
Effect: disable related traits heading if there are no related traits/improving traits
  -->{{#if: {{{heading|}}}{{{heading level|}}}{{#var:smw_results_2}}{{#switch: {{#var:effect type}}|boon|condition|aura=always show heading}}|{{#vardefine:effect_trait_heading_{{#var:rt_id}}|<nowiki/>
+
  -->{{#if: {{{heading|}}}{{{heading level|}}}{{#var:smw_results_2}}{{#ifeq: {{#var:effect type}}|Effect|show heading}}{{#ifeq: {{{show filter|{{#ifeq: {{#var:effect type}}|effect|false|true}}}}}|true|show heading}}|{{#vardefine:effect_trait_heading_{{#var:rt_id}}|<nowiki/>
{{#tag:{{{heading level|h3}}}|Traits {{{heading|}}}}}}}
+
<div id="{{{id|traitlist}}}"><{{{heading level|h3}}} class="filter-plain {{#var_final: p-{{#var:type}}-{{#var:effect}}-{{#var:unique}}-SpecTrait }} f-SpecTrait">Черты{{{heading|}}}</{{{heading level|h3}}}></div>}}
 
}}
 
}}
  
Строка 29: Строка 30:
  
 
Trait: traits that improve this trait
 
Trait: traits that improve this trait
  -->{{Trait list by property|suffix={{{suffix|description}}}|mode={{{mode|heading}}}|heading level={{#var:heading level+1}}|default=|warning=false|[[Improves trait::{{#var:effect}}]] [[Is for game mode::Default||PvE]]|intro=<nowiki/>
+
  -->{{Trait list by property|suffix={{{suffix|description}}}|mode={{{mode|heading}}}|heading level={{#var:heading level+1}}|default=|warning=false|[[Improves trait::{{#var:effect}}]] [[Is for game mode::Default||PvE]] {{{query|}}}|intro=<nowiki/>
{{#tag:{{{heading level|h3}}}|Traits {{{heading improves|that improve this trait}}}}} }}<!--
+
{{#tag:{{{heading level|h3}}}|Черты, {{{heading improves|которые улучшают эту черту}}}}} }}<!--
  
 
Trait: traits that are improved by this trait
 
Trait: traits that are improved by this trait
  -->{{Trait list by property|suffix={{{suffix|description}}}|mode={{{mode|heading}}}|heading level={{#var:heading level+1}}|default=|warning=false|[[-Improves trait::{{#var:effect}}]] [[Is for game mode::Default||PvE]]|intro=<nowiki/>
+
  -->{{Trait list by property|suffix={{{suffix|description}}}|mode={{{mode|heading}}}|heading level={{#var:heading level+1}}|default=|warning=false|[[-Improves trait::{{#var:effect}}]] [[Is for game mode::Default||PvE]] {{{query|}}}|intro=<nowiki/>
{{#tag:{{{heading level|h3}}}|Traits {{{heading improved|that are improved by this trait}}}}} }}
+
{{#tag:{{{heading level|h3}}}|Черты, {{{heading improved|которые улучшаются этой чертой}}}}} }}
 
}}
 
}}
  
Строка 47: Строка 48:
 
Weapon type: proficiencies (elite specialization traits that allows to wield this weapon)
 
Weapon type: proficiencies (elite specialization traits that allows to wield this weapon)
 
  -->{{Trait list by property|suffix={{{suffix|description}}}|heading level={{#var:heading level+1}}|default=|warning=false|[[Has trait tier::Proficiency]] [[Improves weapon type::{{#var:effect}}]] [[Is for game mode::Default||PvE]]|intro=<nowiki/>
 
  -->{{Trait list by property|suffix={{{suffix|description}}}|heading level={{#var:heading level+1}}|default=|warning=false|[[Has trait tier::Proficiency]] [[Improves weapon type::{{#var:effect}}]] [[Is for game mode::Default||PvE]]|intro=<nowiki/>
{{#tag:{{{heading level|h3}}}|Proficiencies}} }}
+
{{#tag:{{{heading level|h3}}}|Владение}} }}
 
}}{{#vardefineecho: smw_results_2|<!--
 
}}{{#vardefineecho: smw_results_2|<!--
  
 
Weapon type: enhancements (disable heading if there are no proficiencies)
 
Weapon type: enhancements (disable heading if there are no proficiencies)
 
  -->{{Trait list by property|suffix={{{suffix|description}}}|heading level={{#var:heading level+1}}|default=|warning=false|[[Has trait tier::!Proficiency]] [[Improves weapon type::{{#var:effect}}]] [[Is for game mode::Default||PvE]]|intro={{#if: {{#var: smw_results}}|<nowiki/>
 
  -->{{Trait list by property|suffix={{{suffix|description}}}|heading level={{#var:heading level+1}}|default=|warning=false|[[Has trait tier::!Proficiency]] [[Improves weapon type::{{#var:effect}}]] [[Is for game mode::Default||PvE]]|intro={{#if: {{#var: smw_results}}|<nowiki/>
{{#tag:{{{heading level|h3}}}|Enhancements}} }} }}<!--
+
{{#tag:{{{heading level|h3}}}|Улучшения}} }} }}<!--
  
 
Weapon type: trait skills that are related to this weapon
 
Weapon type: trait skills that are related to this weapon
 
  -->{{Skill list by property|suffix={{{suffix|trait}}}|default=|warning=false|Trait|[[Has skill type::{{#var:effect}}]] [[Is for game mode::Default||PvE]]|intro=<nowiki/>
 
  -->{{Skill list by property|suffix={{{suffix|trait}}}|default=|warning=false|Trait|[[Has skill type::{{#var:effect}}]] [[Is for game mode::Default||PvE]]|intro=<nowiki/>
{{#tag:{{{heading level|h3}}}|[[List of trait skills|Trait skills]] that are related to {{lc:{{#var:effect}}}} skills}} }}
+
{{#tag:{{{heading level|h3}}}|[[List of trait skills|Умения черт]], которые связаны с умениями {{lc:{{#var:effect}}}}}} }}
 
}}
 
}}
  
 
  | #default = {{#vardefineecho: smw_results|<!--
 
  | #default = {{#vardefineecho: smw_results|<!--
 +
 +
-->{{#ifeq: {{{show filter|false}}}|true|{{Related traits filter}}}}<!--
  
 
Default (property): related traits
 
Default (property): related traits
  -->{{Trait list|type={{{type|}}}|number={{{number|}}}|suffix={{{suffix|description}}}|game mode={{{game mode|}}}|include effects={{{include effects|}}}|default=|warning=false|{{#var:effect}}|intro=<nowiki/>
+
  -->{{Trait list|type={{{type|}}}|number={{{number|}}}|suffix={{{suffix|description}}}|game mode={{{game mode|}}}|include effects={{{include effects|}}}|default=|warning=false|{{#var:effect}}|secondary={{{secondary|}}}|heading=Черты{{{heading|}}}|heading level={{{heading level|h3}}}|query={{{query|}}}}}<!--  
{{#tag:{{{heading level|h3}}}|Traits {{{heading|}}}}} }}<!--  
 
  
 
Default (property): related trait skills
 
Default (property): related trait skills
  -->{{Skill list|type={{{type|}}}|number={{{number|}}}|suffix={{{suffix|trait}}}|game mode={{{game mode|}}}|include effects={{{include effects|}}}|default=|warning=false|Trait|{{#var:effect}}|intro=<nowiki/>
+
  -->{{Skill list|type={{{type|}}}|number={{{number|}}}|suffix={{{suffix|trait}}}|game mode={{{game mode|}}}|include effects={{{include effects|}}}|default=|warning=false|Trait|{{#var:effect}}|id=traitlist<!-- filter id -->|heading=[[List of trait skills|Умения черт]]{{{heading|}}}|heading level={{{heading level|h3}}}|query={{{query|}}}}}<!--
{{#tag:{{{heading level|h3}}}|[[List of trait skills|Trait skills]] {{{heading|}}}}} }}<!--
 
  
 
Default (property): traits that improve the current property
 
Default (property): traits that improve the current property
  -->{{Trait list by property|suffix={{{suffix|description}}}|mode={{{mode|plain}}}|heading level={{#var:heading level+1}}|default=|warning=false|[[Improves property::{{#var:effect}}]] [[Is for game mode::Default||PvE]]|intro=<nowiki/>
+
  -->{{Trait list by property|suffix={{{suffix improves|description}}}|mode={{{mode|plain}}}|default=|warning=false|[[Improves property::{{#var:effect}}]] [[Is for game mode::Default||PvE]] {{{query improves|}}}|heading=Черты, {{{heading improves|которые улучшают {{#var:effect}}}}}|heading level={{{heading level|h3}}}}}
{{#tag:{{{heading level|h3}}}|Traits {{{heading improves|that improve {{#var:effect}}}}}}} }}
 
 
}}{{#vardefineecho:smw_results_2|<!--
 
}}{{#vardefineecho:smw_results_2|<!--
  
 
Default (skill type): trait skills of the current skill type
 
Default (skill type): trait skills of the current skill type
 
  -->{{Skill list by property|suffix={{{suffix|trait}}}|default=|warning=false|Trait|[[Has skill type::{{#var:effect}}]] [[Is for game mode::Default||PvE]]|intro=<nowiki/>
 
  -->{{Skill list by property|suffix={{{suffix|trait}}}|default=|warning=false|Trait|[[Has skill type::{{#var:effect}}]] [[Is for game mode::Default||PvE]]|intro=<nowiki/>
{{#tag:{{{heading level|h3}}}|[[List of trait skills|Trait skills]] that have the type {{#var:effect}}}} }}
+
{{#tag:{{{heading level|h3}}}|[[List of trait skills|Умения черт]], которые имеют тип {{lc:{{#var:effect}}}}}} }}
 
}}{{#vardefineecho:smw_results_3|<!--
 
}}{{#vardefineecho:smw_results_3|<!--
  
 
Default (skill type): trait that improves the current skill type (disable heading if there are no trait skills of the current skill type)
 
Default (skill type): trait that improves the current skill type (disable heading if there are no trait skills of the current skill type)
  -->{{Trait list by property|suffix={{{suffix|description}}}|mode={{{mode|plain}}}|heading level={{#var:heading level+1}}|default=|warning=false|[[Improves skill type::{{#var:effect}}]] [[Is for game mode::Default||PvE]]|intro={{#if: {{{heading improves|}}}{{{heading level|}}}{{#var:smw_results_2}}|<nowiki/>
+
  -->{{Trait list by property|suffix={{{suffix improves|description}}}|mode={{{mode|plain}}}|default=|warning=false|[[Improves skill type::{{#var:effect}}]] [[Is for game mode::Default||PvE]]|intro={{#if: {{{heading improves|}}}{{{heading level|}}}{{#var:smw_results_2}}|<nowiki/>
{{#tag:{{{heading level|h3}}}|Traits {{{heading improves|that improve {{#var:effect}}}}}}} }} }}
+
{{#tag:{{{heading level|h3}}}|Черты, {{{heading improves|которые улучшают умения {{lc:{{#var:effect}}}}}}}}} }} }}
 
}}
 
}}
  
Строка 87: Строка 87:
  
 
-->{{#if: {{#var:smw_results}}{{#var:smw_results_2}}{{#var:smw_results_3}}||{{#if: {{NAMESPACE}}||[[Category:Pages with empty semantic mediawiki query results]]}}}}</includeonly><noinclude>
 
-->{{#if: {{#var:smw_results}}{{#var:smw_results_2}}{{#var:smw_results_3}}||{{#if: {{NAMESPACE}}||[[Category:Pages with empty semantic mediawiki query results]]}}}}</includeonly><noinclude>
 +
{{TOC|class=toc3}}
 
== Description ==
 
== Description ==
 
This template returns a list of '''all''' traits that grant or improves a certain effect. It displays the following sections:
 
This template returns a list of '''all''' traits that grant or improves a certain effect. It displays the following sections:
Строка 140: Строка 141:
 
| This template displays the profession icon, trait icon, trait, trait line and trait description.
 
| This template displays the profession icon, trait icon, trait, trait line and trait description.
 
|}
 
|}
 +
 +
Format using {{tl|Related traits filter}}.
  
 
== Usage ==
 
== Usage ==
Строка 164: Строка 167:
 
: Optional. On default the game mode is restricted to the PvE version (except for suffix=notes, there all versions are taken into account). Set it to "all" to select all game modes or specify one or more game modes: "PvE", "WvW", "PvP" and "Default" (for skills that aren't split, e.g. "Default, PvE"), separated by ",".
 
: Optional. On default the game mode is restricted to the PvE version (except for suffix=notes, there all versions are taken into account). Set it to "all" to select all game modes or specify one or more game modes: "PvE", "WvW", "PvP" and "Default" (for skills that aren't split, e.g. "Default, PvE"), separated by ",".
 
;suffix
 
;suffix
: Optional. Either "description" or "none".
+
: Optional. Either "none", "description" (default) or "notes" (stacks and duration).
 +
;suffix improves
 +
: Optional. Used on improving traits on effect/skill type/property pages to avoid mixing up with the trait list suffix. Either "description" or "none".
 +
;secondary.
 +
: Optional. Secondary effect, e.g. "converted from" attribute for type "Attribute Conversion". Overrides unnamed parameter 1.
 
;number
 
;number
 
: Optional. Allows to ask for the skill effect number, e.g. "20" for Physical Projectile (20% chance) and "100" for Physical Projectile.
 
: Optional. Allows to ask for the skill effect number, e.g. "20" for Physical Projectile (20% chance) and "100" for Physical Projectile.
 
;include effects
 
;include effects
 
: Optional. Include fact type "Effect" facts to allow keywords set via effect bonus (i.e. to ask for [[Property:Has fact effect]] instead of [[Property:Has fact]]), e.g. "Power" for [[Banner of Strength]]. Either "no" (default), "yes" or "only".
 
: Optional. Include fact type "Effect" facts to allow keywords set via effect bonus (i.e. to ask for [[Property:Has fact effect]] instead of [[Property:Has fact]]), e.g. "Power" for [[Banner of Strength]]. Either "no" (default), "yes" or "only".
 +
;show filter
 +
: Optional. Set to "true" to show and "false" to hide filter options. The filter is available on effect pages, where this parameter defaults to "true" on Boon/Condition/Aura/Control effect pages, and on skill type, weapon or game mechanic pages, where this parameter always defaults to "false" (hidden on default).
 +
;query
 +
: Optional. Expert mode only. Custom query for trait (and trait skills) lists that can be used on overview pages only (no context).
 +
;query improves
 +
: Optional. Expert mode only. Custom query for improves trait lists that can be used on overview pages only (no context).
  
 
=== Example ===
 
=== Example ===
Строка 193: Строка 206:
 
{{Related traits|Glyph}}
 
{{Related traits|Glyph}}
  
<pre>{{Related traits|Unblockable (effect)}} <!-- omitted heading --></pre>
+
<pre>{{Related traits|Rising Momentum (effect)}} <!-- omitted heading --></pre>
 
{{Related traits|Rising Momentum (effect)}}
 
{{Related traits|Rising Momentum (effect)}}
  

Текущая версия на 02:39, 1 июня 2022

Description[править]

This template returns a list of all traits that grant or improves a certain effect. It displays the following sections:

Page context: Effect
  1. Traits granting the effect, using template trait list, based on the parameters from the template skill fact. The heading is omitted if the following two sections (related trait skills/traits that improve) are empty.
  2. Trait skills the effect, using template skill list, with the skill context Trait, based on the parameters from the template skill fact.
  3. Traits that improve the effect, using Trait list by property, based on the parameters improves skill/boon/condition/control effect/aura/effect/weapon/type from the template
Page context: Trait
  1. Traits that improve the trait, using Trait list by property, based on from other page's parameters improves trait/boon/condition/control effect/aura/effect from the template trait infobox.
  2. Traits that are improved by the trait, using Trait list by property, based on the this page's parameter improves trait/boon/condition/control effect/aura/effect from the template trait infobox.
Page context: Skill
  1. Traits that improve the skill, using Trait list by property, based on the parameters improves skill/boon/condition/control effect/aura/effect/weapon/type from the template trait infobox.
Page context: Weapon type
  1. Traits that improve the weapon type, using Trait list by property, based on the parameters improves weapon from the template trait infobox.
  2. Trait skills are related to the weapon type, using template skill list by property, with the skill context Trait, based on the skill type from the template trait infobox.
Page context: none (either skill type, e.g. Meditation or skill fact property, e.g. Barrier)
  1. Traits that grant the property, using template trait list, based on the parameters from the template skill fact.
  2. Trait skills that grant the property, using template skill list, with the skill context Trait, based on the parameters from the template skill fact.
  3. Trait skills that have the skill type, using template skill list by property, with the skill context Trait, based on the skill type from the template skill fact. The heading is omitted if the following section (traits that improve) are empty.
  4. Traits that improve the property, using Trait list by property, based on the parameters improves skill type/improves property from the template trait infobox.

Sorted by profession (alphabetically within heavy, medium, light), by elite specialization and trait line. It relies on the usage of the template {{skill fact}}, which sets the according skill fact properties, and on the usage of the improves parameters of the template {{trait infobox}}. An overview of the skill fact properties and their types can be found here.

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.

Format using {{Related traits filter}}.

Usage[править]

{{Related traits}}
{{Related traits|<effect>}}
{{Related traits|<effect>|heading=<heading>|heading level=<h3, h4, ...>}}

Parameters[править]

1 (unnamed parameter)
Required. Skill fact (boon, condition or control effect, e.g. Might, Burning), trait, skill, weapon type, skill type. Defaults to PAGENAME.
heading
Optional. Additional heading suffix, e.g. "that grant might".
heading improves
Optional. Additional heading suffix for traits that impove, e.g. "that improve might".
heading improved
Optional. Additional heading suffix for traits that are improved by, e.g. "that are improved by Might Makes Right".
heading level
Optional. Heading level, defaults to "h3".
mode
Optional. Either "plain" (default) or "heading" (displays trait line headings and omits the profession, primarily intended for trait pages only).
type
Optional. Skill fact type. For boons, conditions and control effect this is set automatically. See also here.
game mode
Optional. On default the game mode is restricted to the PvE version (except for suffix=notes, there all versions are taken into account). Set it to "all" to select all game modes or specify one or more game modes: "PvE", "WvW", "PvP" and "Default" (for skills that aren't split, e.g. "Default, PvE"), separated by ",".
suffix
Optional. Either "none", "description" (default) or "notes" (stacks and duration).
suffix improves
Optional. Used on improving traits on effect/skill type/property pages to avoid mixing up with the trait list suffix. Either "description" or "none".
secondary.
Optional. Secondary effect, e.g. "converted from" attribute for type "Attribute Conversion". Overrides unnamed parameter 1.
number
Optional. Allows to ask for the skill effect number, e.g. "20" for Physical Projectile (20% chance) and "100" for Physical Projectile.
include effects
Optional. Include fact type "Effect" facts to allow keywords set via effect bonus (i.e. to ask for Property:Has fact effect instead of Property:Has fact), e.g. "Power" for Banner of Strength. Either "no" (default), "yes" or "only".
show filter
Optional. Set to "true" to show and "false" to hide filter options. The filter is available on effect pages, where this parameter defaults to "true" on Boon/Condition/Aura/Control effect pages, and on skill type, weapon or game mechanic pages, where this parameter always defaults to "false" (hidden on default).
query
Optional. Expert mode only. Custom query for trait (and trait skills) lists that can be used on overview pages only (no context).
query improves
Optional. Expert mode only. Custom query for improves trait lists that can be used on overview pages only (no context).

Example[править]

Context: Effect[править]

{{Related traits|Burning|heading=that apply burning|heading level=h5}}

Context: Trait[править]

{{Related traits|Burning Rage|heading level=h5}}

Context: Weapon type[править]

{{Related traits|Warhorn|heading level=h5}}

Context: None[править]

{{Related traits|Barrier|heading level=h5}}

Черты
Черты, которые улучшают Barrier
{{Related traits|Arcane|heading level=h5}}

Умения черт, которые имеют тип arcane
Черты, которые улучшают умения arcane
{{Related traits|Glyph}} <!-- omitted heading -->
{{Related traits|Rising Momentum (effect)}} <!-- omitted heading -->

Trivia[править]