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

Материал из Guild Wars 2 wiki
Перейти к: навигация, поиск
Строка 1: Строка 1:
<includeonly>{| {{STDT|mech1}} style="{{{style|}}}"
+
<includeonly>{{#ask:
{{#ask:[[Has achievement category::{{{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|{{PAGENAME}}}}}}}]]
      [[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}}} -->
+
| mainlabel = -
|link = none  
+
| link = none  
|format = template
+
| format = template
|template = Achievement result format
+
| template = Achievement result format
}}
+
}}</includeonly><noinclude>
|}</includeonly><noinclude>
 
  
 
== Usage ==
 
== Usage ==
Generate an individual achievement box. For generating a list of achievements, use {{tl|achievement list}}. Formatted using {{tl|Achievement result format}}.
+
Generates a simple line summarising the achievement. Ideal for "Related achievements" sections. Formatted using {{tl|Achievement result format}}.
  
 
<pre>
 
<pre>
{{achievement}}
 
 
{{achievement|<achievement>}}
 
{{achievement|<achievement>}}
{{achievement|name=<achievement name>}}
+
{{achievement|<achievement>|category=<achievement category>}}
{{achievement|<achievement>|<achievement category>}}
 
 
</pre>
 
</pre>
  
 
== Parameters ==
 
== Parameters ==
;Unnamed parameter 1
+
;1 ''(unnamed parameter)''
: achievement.  Defaults to <code><nowiki>{{PAGENAME}}</nowiki></code>.
+
: Name of the achievement.
;Unnamed parameter 2
 
: achievement category. Defaults to <code>+</code>, i.e., any category.
 
;name
 
:Achievement name. This parameter is used to specify an achievement on the achievement 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.
 
 
;category
 
;category
:Alias for unnamed parameter 2. See above.
+
: Optional. The achievement category. Defaults to any category. Only worth specifying if multiple achievements exist with the same name.
;style
+
;id
:Optional. If specified, adds additional styling to the table.
+
: Optional. For use to discriminate between two identically named achievements in the same category.
  
 
== 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)}}
  
[[Category:Achievement formatting templates|Achievement]]
+
== See also ==
</noinclude>
+
* {{tl|Achievement box}} — For displaying a full achievement box.
 +
 
 +
[[Category:Achievement formatting templates]]</noinclude>

Версия 06:21, 17 марта 2019


Usage

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

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

Parameters

1 (unnamed parameter)
Name of the achievement.
category
Optional. The achievement category. Defaults to any category. Only worth specifying if multiple achievements exist with 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