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

Материал из Guild Wars 2 wiki
Перейти к: навигация, поиск
 
 
(не показаны 3 промежуточные версии этого же участника)
Строка 1: Строка 1:
<includeonly>{| {{STDT|mech1}} style="{{{style|}}}"
+
<includeonly>{{#ask:
{{#ask:[[Has achievement category::{{{2|+}}}]]<!--Unique to achievement subobjects-->
+
[[Has achievement category::{{{category|+}}}]]<!-- Unique to achievement subobjects -->
      {{#if:{{{name|}}}||[[Has achievement page::~*{{#replace:{{#titleparts:{{{1|{{PAGENAME}}}}}}}| |?}}*]]<!-- Exists if achievement has article, allows anchoring if multiple achievements on one page -->}}
+
[[Has canonical name::{{#titleparts:{{{1|{{#replace:{{PAGENAME}}|(achievement)}}}}}}}]]
      [[Has canonical name::{{{name|+}}}]]<!-- For displaying achievements on achievement category page -->
+
{{#if: {{{id|}}} | [[Has game id::{{{id}}}]] }}
|?Has canonical name      <!-- {{{2}}} -->
+
| ?Has achievement category        <!-- 1 -->
|?Has achievement type    <!-- {{{3}}} -->
+
| ?Has game icon                    <!-- 2 -->
|?Has game description    <!-- {{{4}}} -->
+
| ?                                 <!-- 3 -->
|?Has prerequisite        <!-- {{{5}}} -->
+
| ?Has achievement page            <!-- 4 -->
|?Gives item              <!-- {{{6}}} -->
+
| ?Has canonical name              <!-- 5 -->
|?Gives item quantity      <!-- {{{7}}} -->
+
| ?Has game description            <!-- 6 -->
|?Gives title              <!-- {{{8}}} -->
+
| ?Has flavor text                  <!-- 7 -->
|?Has achievement tiers    <!-- {{{9}}} -->
+
| ?Has achievement tiers            <!-- 8 -->
|?Has achievement category <!-- {{{10}}} -->
+
| ?Gives mastery track region point <!-- 9 -->
|?Has flavor text          <!-- {{{11}}} -->
+
| ?Has achievement type            <!-- 10 -->
|?Has achievement page    <!-- {{{12}}} -->
+
| ?Has AP cap                      <!-- 11 -->
|?Has unlock item         <!-- {{{13}}} -->
+
| ?Gives item                      <!-- 12 -->
|?Has game icon            <!-- {{{14}}} -->
+
| ?Gives item quantity              <!-- 13 -->
|?Gives mastery track region point <!-- {{{15}}} -->
+
| ?Gives title                      <!-- 14 -->
|?Has game id#            <!-- {{{16}}} -->
+
| ?Is hidden achievement            <!-- 15 -->
|link = none  
+
| ?Has achievement page section    <!-- 16 -->
|format = template
+
| mainlabel = -
|template = Achievement result format
+
| link = none  
}}
+
| format = template
|}</includeonly><noinclude>
+
| template = Achievement result format
 +
| default = ''No result for achievement "{{{1}}}". It may not have been added to the wiki yet.''{{#if: {{NAMESPACE}}||[[Category:Pages with empty semantic mediawiki query results]]}}
 +
}}</includeonly><noinclude>
 +
== Description ==
 +
Generates a simple line summarizing the achievement. Ideal for "Related achievements" sections. Formatted using {{tl|Achievement result format}}.
  
 
== Usage ==
 
== Usage ==
Generate an individual achievement box. For generating a list of achievements, use {{tl|achievement list}}. Formatted using {{tl|Achievement result format}}.
 
 
 
<pre>
 
<pre>
{{achievement}}
+
{{achievement|<achievement name>}}
{{achievement|<achievement>}}
+
{{achievement|<achievement name>|category=<achievement category>}}
{{achievement|name=<achievement name>}}
+
{{achievement|<achievement name>|id=<achievement id>}}
{{achievement|<achievement>|<achievement category>}}
 
 
</pre>
 
</pre>
  
== Parameters ==
+
=== Parameters ===
;Unnamed parameter 1
+
;1 ''(unnamed parameter)''
: achievement.  Defaults to <code><nowiki>{{PAGENAME}}</nowiki></code>.
+
: Achievement name. This parameter is used to specify the precise name of an achievement as it appears ingame.
;Unnamed parameter 2
+
;category
: achievement category. Defaults to <code>+</code>, i.e., any category.
+
: Optional. Achievement category. This parameter should only be used if multiple achievements have the same name.
;name
+
;id
:Achievement name. This parameter is used to specify an achievement on the achievement category.
+
: Optional. For use to discriminate between two identically named achievements in the same category.
:* This is required as the query uses [[Property:Has achievement page]] for finding achievements. Since the achievement is located on a section of the achievement category, this parameter is required to specify which achievement on the achievement category.
 
:* This can also be used to specify an achievement on an individual achievement page.
 
:* This is typically exclusive with the unnamed parameters. Using both may lead to unintended results.
 
;style
 
:Optional. If specified, adds additional styling to the table.
 
  
== Examples ==
+
=== Examples ===
 
<pre>
 
<pre>
{{achievement|Speedy Reader}}
+
* {{achievement|Bounty Hunter}}
 +
* {{achievement|New Afterlife for Quaggan|category=Shadow of the Mad King (2015 achievements)}}
 
</pre>
 
</pre>
{{achievement|Speedy Reader}}
+
* {{achievement|Bounty Hunter}}
 +
* {{achievement|New Afterlife for Quaggan|category=Shadow of the Mad King (2015 achievements)}}
 +
 
 +
== See also ==
 +
* {{tl|Achievement box}} — For displaying a full achievement box.
  
[[Category:Achievement formatting templates|Achievement]]
+
[[Category:Achievement formatting templates]]
 
</noinclude>
 
</noinclude>

Текущая версия на 12:37, 6 июня 2021

Description[править]

Generates a simple line summarizing the achievement. Ideal for "Related achievements" sections. Formatted using {{Achievement result format}}.

Usage[править]

{{achievement|<achievement name>}}
{{achievement|<achievement name>|category=<achievement category>}}
{{achievement|<achievement name>|id=<achievement id>}}

Parameters[править]

1 (unnamed parameter)
Achievement name. This parameter is used to specify the precise name of an achievement as it appears ingame.
category
Optional. Achievement category. This parameter should only be used if multiple achievements have the same name.
id
Optional. For use to discriminate between two identically named achievements in the same category.

Examples[править]

* {{achievement|Bounty Hunter}}
* {{achievement|New Afterlife for Quaggan|category=Shadow of the Mad King (2015 achievements)}}
  • No result for achievement "Bounty Hunter". It may not have been added to the wiki yet.
  • No result for achievement "New Afterlife for Quaggan". It may not have been added to the wiki yet.

See also[править]