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

Материал из Guild Wars 2 wiki
Перейти к: навигация, поиск
 
Строка 1: Строка 1:
<includeonly>{{#if:<!-- Hide new lines -->
+
<includeonly><!-- Process achievement tiers -->
{{#vardefine:category_icon|{{#if:{{{icon|}}}|File:{{{icon}}}|{{#show:{{PAGENAME}}|?Has game icon|link=none}}}}}}
+
{{#if: <!-- Hide new lines -->
{{#vardefine:tier_count|0}} <!-- Set to zero -->
+
{{#vardefine:achievement_count|{{#expr:{{#var:achievement_count|0}}+1}}}}
{{#vardefine:tier_total|0}} <!-- Set to zero -->
+
{{#vardefine:tier_count|0}}
{{#arraymap:{{{tiers|}}}|\n|@@@
+
{{#vardefine:tier_ap_total|0}}
| {{#vardefine:tier_count|{{#expr:{{#var:tier_count}} + 1}}}}                     <!-- Array size -->
+
{{#arraymap:{{{tiers|}}}|\n|@@@|
  {{#vardefine:tier_total|{{#if:{{{cap|}}}|{{{cap}}}|{{#expr:{{#var:tier_total}}{{#if:{{#explode:@@@|;|1}}|+{{#replace:{{#explode:@@@|;|1}}|?|0}} }} }}}}}}
+
{{#vardefine:tier_count|{{#expr:{{#var:tier_count}} + 1}}}}
 +
{{#vardefine:tier_ap_total|{{#if: {{{cap|}}} | {{{cap}}} | {{#expr: {{#var:tier_ap_total}} {{#if: {{#explode:@@@|;|1}} | + {{#replace:{{#explode:@@@|;|1}}|?|0}} }} }} }} }}
 
|}}
 
|}}
{{#if: {{{mastery|}}} |
+
{{#vardefine:tier_rewards_count|0}}
{{#if: {{{chapter|}}}
+
{{#arraymap:{{{tier rewards|}}}|\n|@@@|
  | {{#if: {{#var:personal_story_chapter{{{chapter}}}}} | <!-- flag for chapter is SET --> | <!-- if flag is not SET -->
+
{{#vardefine:tier_rewards_count|{{#expr:{{#var:tier_rewards_count}} + 1}}}}
    {{#vardefine:personal_story_chapter{{{chapter}}}|true}}
+
|}}
    {{#vardefine:mastery_total|{{#expr:{{#var:mastery_total|0}}+1}}}}<!-- Adds to count for masteries if contributes -->
+
{{#vardefine:objectives_count|0}}
    }}
+
{{#arraymap:{{{objectives|}}}|\n|@@@|
  | {{#vardefine:mastery_total|{{#expr:{{#var:mastery_total|0}}+1}}}}<!-- Adds to count for masteries if contributes -->
+
{{#vardefine:objectives_count|{{#expr:{{#var:objectives_count}} + 1}}}}
}}
+
|}}
{{#if: {{#var:mastery_type}}
+
{{#vardefine:group_ap_total|{{#expr: {{#var:group_ap_total|0}} + {{#var:tier_ap_total|0}} }}}}
  | {{#ifeq: {{#var:mastery_type}} | {{{mastery}}} | <!-- do nothing if SET and EQUAL --> | <!-- if SET and not EQUAL -->{{#vardefine:mastery_type|Default}} }}
+
}}<!--
  | <!-- if not SET -->{{#vardefine:mastery_type|{{{mastery}}}}}
+
 
}}
+
Semantic subobject
}}
+
 
}}|- class="line" id="achievement{{#vardefineecho:achievement_count|{{#expr:{{#var:achievement_count|0}}+1}}}}"
+
-->{{#if: {{NAMESPACE}}{{{categorize|}}} | <!-- no subobject if outside mainspace --> | {{#subobject:achievement{{#vardefineecho: id|{{#if: {{{id|}}} | {{{id}}} | 999{{#var:achievement_count}} }} }}
! id="{{{name|}}}" style="text-align:left" | {{#switch:{{{type|}}}
 
  | meta = [[File:Tournament Master (map icon).png|20px|link=Achievement|Это мета-достижение для этой категории]]
 
  | repeatable
 
  | parent = {{#if:{{#ask:[[Has achievement category::{{PAGENAME}}]][[Has achievement type::meta]]}}|[[File:Icon No ingame.png|20px|link=Achievement|Это достижение не требуется для мета-достижения в этой категории]]}}
 
}}{{#if:{{{reward|}}}|[[File:Chest icon.png|20px|link=Achievement|Это достижение приносит предмет в награду]]
 
}}{{#if:{{{title|}}}|[[File:Title icon.png|20px|link=Title|Это достижение приносит титул в награду]]
 
}}{{#ifeq:{{{type|}}}|repeatable|[[File:Tango repeatable event.png|20px|link=Achievement|Это достижение повторяемое.]]
 
}} {{#if:{{{page|}}}| [[{{{page}}}{{!}}{{{name}}}]] | {{{name}}}
 
}} {{#if:{{{parent|}}}|({{#if:{{#show:{{PAGENAME}}#{{{parent}}}|?Has canonical name}}|[[{{#show:{{PAGENAME}}#{{{parent}}}|?Has canonical name}}|{{{parent}}}]]|{{{parent}}}}})}}<!-- Parent achievement name, link if available page -->
 
! colspan="2" style="text-align: right; vertical-align: top;" | {{#if:{{{mastery|}}} | {{mastery point|1|region={{{mastery|}}}}} }} {{ap|{{#var:tier_total}}}}
 
|-
 
| rowspan="{{#if:{{{tiers|}}}|{{#ifexpr:{{#var:tier_count|}}<7|{{#var:tier_count|1}}|5}}|1}}" style="background: white; vertical-align: top; min-width: 530px;" | {{{description|}}}<!--
 
-->{{#if: {{{flavor|}}} |<span style="color: #686868; display: block;">''{{{flavor}}}''</span>
 
}}{{#if:{{{cap|}}}|
 
<span style="display: block;"><small>This achievement is capped at {{ap|{{{cap}}}}}.</small></span>
 
}}{{#if: {{{prerequisite|}}}|
 
:'''Условие:''' {{{prerequisite|}}}
 
}}{{#if: {{{unlock|}}}|
 
:'''Разблокирование предмета:''' {{item icon|{{{unlock}}}}}
 
}}{{#if:{{{title|}}}|
 
:'''Титул:''' [[File:Title icon.png|20px|link=Title]] {{{title}}}
 
}}{{#if:{{{reward|}}}|
 
:'''Награда:''' {{#ifexpr: {{{quantity|0}}} > 1 | {{{quantity}}} }}  {{item icon|{{{reward}}}}}
 
}}{{#if:{{{coins|}}}|
 
:'''Монеты:''' {{coin|{{{coins}}}}}
 
}}{{#if:{{{location|}}}|
 
{{{!}} style="margin-left: 1.6em; border-collapse: collapse;"
 
{{!}} style="vertical-align: top;" rowspan="20" {{!}} '''Suggested Locations:'''
 
{{#arraymap:{{{location}}}|\n|@@@|{{!}} [[File:Compass icon.png|middle|18px|link=]] {{#if:{{#pos:{{lc:{{{location}}}}}|waypoint}}|@@@|[[@@@]]}}|\n{{!}}-\n}}
 
{{!}}}
 
}}<!-- Here tiers starts -->
 
{{#ifexpr:{{#var:tier_count}}<7|{{#arraymap:{{{tiers|}}}|\n|@@@|{{!}} style="width: 220px; vertical-align: top;" {{!}} {{#explode:@@@|;|0}}
 
{{!}} style="width: 100px; text-align: right; vertical-align: top;" {{!}} {{ap|{{#explode:@@@|;|1}}}}| \n{{!}}-\n }}|{{#vardefine:tier_counter|1}}{{#arraymap:{{{tiers|}}}|\n|@@@|{{#switch: {{#var:tier_counter}}
 
| 5 = {{!}} colspan="2" {{!}}
 
{{{!}} {{STDT|mech1}} class="expandable" style="width: 100%;"
 
{{!}} colspan="2" {{!}} Show more tiers
 
{{!}}-
 
{{!}} style="min-width: 200px; max-width: 300px; vertical-align: top;" {{!}} {{#explode:@@@|;|0}}
 
{{!}} style="width: 40px; text-align: right; vertical-align: top;" {{!}} {{ap|{{#explode:@@@|;|1}}}}{{#vardefine:tier_counter|{{#expr:{{#var:tier_counter}} + 1}}}}
 
| {{#var:tier_count}} = {{!}} style="min-width: 200px; max-width: 300px; vertical-align: top;" {{!}} {{#explode:@@@|;|0}}
 
{{!}} style="width: 40px; text-align: right; vertical-align: top;" {{!}} {{ap|{{#explode:@@@|;|1}}}}{{#vardefine:tier_counter|{{#expr:{{#var:tier_counter}} + 1}}}}
 
{{!}}}
 
| #default = {{!}} style="min-width: 200px; max-width: 300px; vertical-align: top;" {{!}} {{#explode:@@@|;|0}}
 
{{!}} style="width: 40px; text-align: right; vertical-align: top;" {{!}} {{ap|{{#explode:@@@|;|1}}}}{{#vardefine:tier_counter|{{#expr:{{#var:tier_counter}} + 1}}}} }} | \n{{!}}-\n }}}}
 
{{#if: {{NAMESPACE}} | <!-- no subobject if outside mainspace --> | {{#subobject:achievement{{#var:achievement_count}}
 
 
| Has context =Achievement
 
| Has context =Achievement
 +
| Has game id={{{id|}}}
 
| Has canonical name ={{{name}}}
 
| Has canonical name ={{{name}}}
| Has achievement page ={{{page|{{PAGENAME}}}}}<!-- Default PAGENAME as achievement can be located as section on achievement category.-->
+
| Has game description ={{{description|}}}
 +
| Has game icon ={{#if: {{{icon|}}} | File:{{{icon}}} | {{#var:category_icon}} }}
 +
| Has achievement page ={{#if: {{{page|}}} | {{#if: {{#pos: {{{page}}}|&#}}|<!--html entity number-->{{{page}}}|{{#explode:{{{page}}}|#|0}}}} | {{PAGENAME}} }}<!-- Default PAGENAME as achievement can be located as section on achievement category.-->
 +
| Has achievement page section ={{#if: {{#pos: {{{page|}}}|&#}}|<!--html entity number-->|{{#explode:{{{page|}}}|#|1}}}}
 
| Has achievement category ={{PAGENAME}}
 
| Has achievement category ={{PAGENAME}}
| Has achievement type ={{{type|standard}}}
+
| Has achievement type ={{lc:{{{type|standard}}}}}
| Has game icon ={{#var:category_icon}}
+
| Is hidden achievement ={{#ifeq: {{{hidden|}}}|yes|true|false}}
 +
| Gives achievement points ={{#var:tier_ap_total|0}}
 
| Has AP cap ={{{cap|}}}
 
| Has AP cap ={{{cap|}}}
| Has game description ={{{description|}}}
 
| Has game id={{{id|}}}
 
 
| Has flavor text ={{{flavor|}}}
 
| Has flavor text ={{{flavor|}}}
| Is part of achievement ={{{parent|}}}
 
 
| Has prerequisite ={{{prerequisite|}}}
 
| Has prerequisite ={{{prerequisite|}}}
 
| Has unlock item ={{{unlock|}}}
 
| Has unlock item ={{{unlock|}}}
| Has suggested location ={{#arraymap:{{{location|{{#var:location}}}}}|\n|@@@|@@@|;}}|+sep=;<!--new lines are stored as spaces, replace with another delimiter-->
+
| Has suggested location ={{#arraymap: {{{location|}}}|\n|@@@|@@@|;}}<!--new lines are stored as spaces, replace with another delimiter-->|+sep=;
| Gives item ={{{reward|}}}
+
| Gives item ={{#if: {{{tier rewards|}}} | {{#arraymap:{{{tier rewards}}}|\n|@@@|{{#explode:@@@|;|1}}|;}}|{{{reward|}}}}}|+sep=;
| Gives item quantity ={{{quantity|{{#if:{{{reward|}}}|1}}}}}
+
| Gives item quantity ={{#if: {{{quantity|}}} | {{{quantity|{{#if: {{{reward|}}} | 1 }}}}} }}
 
| Gives title ={{{title|}}}
 
| Gives title ={{{title|}}}
| Gives mastery track region point ={{ucfirst:{{{mastery|}}}}}
+
| Gives mastery track region point ={{#if: {{{mastery|}}} | {{#if: {{{chapter|}}} || {{ucfirst:{{{mastery}}}}} }} }}
| Has achievement tiers ={{#arraymap:{{{tiers|}}}|\n|@@@|@@@|~}}<!--new lines are stored as spaces, replace with another delimiter-->
+
| Gives mastery track region point quantity={{#if: {{{mastery|}}} | {{#if: {{{chapter|}}} || {{#if: {{{mastery quantity|}}} | {{{mastery quantity}}} | 1 }} }} }}
| Is part of activity ={{{activity|}}}
+
| Has mastery id ={{#if: {{{mastery|}}}{{{mastery id|}}} | {{#if: {{{chapter|}}} || {{{mastery id|-999}}} }} }}
}} }}</includeonly><noinclude>
+
| Has achievement tiers ={{#arraymap: {{{tiers|}}}|\n|@@@|@@@|~}}<!--new lines are stored as spaces, replace with another delimiter-->
 +
| Has achievement tier rewards ={{#arraymap: {{{tier rewards|}}}|\n|@@@|@@@|~}}<!--new lines are stored as spaces, replace with another delimiter-->
 +
| Has achievement objectives ={{#arraymap: {{{objectives|}}}|\n|@@@|@@@|~}}
 +
| Has achievement collection ={{#arraymap: {{{collection|{{{hidden collection|}}}}}}|\n|@@@|@@@|~}}
 +
| Is part of activity ={{{activity|}}}|+sep=;
 +
}} }}<!--
 +
 
 +
Generate table row
 +
 
 +
-->|- id="achievement{{#var: id}}" class="widget-account-achievement line" data-id="achievement{{#var: id}}"
 +
! id="{{#replace:{{#replace:{{#replace:{{{name|}}}|"|}}|]|}}|[|}}" style="text-align:left" | {{#switch: {{lc:{{{type|}}}}}
 +
  | meta = [[File:Tournament Master (map icon).png|20px|link=|This is a meta achievement.]]
 +
  | repeatable = [[File:Tango repeatable event.png|20px|link=|This achievement is repeatable infinitely and does not contribute to a meta achievement.]]
 +
  | daily =
 +
  | daily meta = [[File:Tournament Master (map icon).png|20px|link=|This is a meta achievement.]]
 +
  | weekly = [[File:Talk back option tango.png|20px|link=|This achievement resets every week on Monday.]]
 +
  | weekly meta = [[File:Tournament Master (map icon).png|20px|link=|This is a meta achievement.]][[File:Talk back option tango.png|20px|link=|This achievement resets every week on Monday.]]
 +
}}{{#if: {{{reward|}}}{{{tier rewards|}}} | [[File:Chest icon.png|20px|link=|This achievement rewards items.]]
 +
}}{{#if: {{{title|}}} | [[File:Title icon.png|20px|link=Title|This achievement rewards a title.]]
 +
}}{{#ifeq: {{{no meta contribution|}}}|yes|[[File:Icon No ingame.png|20px|link=|This achievement does not count towards the category's meta achievement.]]
 +
}}{{#ifeq: {{{hidden|}}}|yes|[[File:Awakened suspicious (Forearmed Is Forewarned map icon).png|20px|link=List of hidden achievements|This achievement requires at least one completed objective to become visible.]]
 +
}} {{#if: {{{page|}}} | [[{{{page}}}|{{{name}}}]] | {{{name}}}
 +
}}
 +
! colspan="2" style="text-align: right; vertical-align: top;" | {{#if: {{{chapter|}}}
 +
| {{mastery point|{{{mastery quantity|1}}}|region=Central Tyria}}<!-- cheat -->
 +
| {{#if: {{{mastery|}}} | {{mastery point|{{{mastery quantity|1}}}|region={{{mastery|}}}}} }}
 +
}} {{ap|{{#var:tier_ap_total}}}}
 +
|- class="widget-account-achievement" data-id="achievement{{#var: id}}"
 +
| rowspan="{{#if: {{{tiers|}}} | {{#ifexpr: {{#var:tier_count|1}} < {{#if: {{{show tiers|}}} | 100 | 7 }} | {{#var:tier_count|1}} | 5 }} | 1 }}" style="background:white; vertical-align:top; min-width:530px;" | {{{description|}}}<!--
 +
-->{{#if: {{{flavor|}}} |<span style="color:#686868; display: block;">''{{{flavor}}}''</span>
 +
}}{{#if: {{{cap|}}} |
 +
<span style="display:block;"><small>This achievement is capped at {{ap|{{{cap}}}}}.</small></span>
 +
}}{{#if: {{{prerequisite|}}}{{{unlock|}}}{{{title|}}}{{{tier rewards|}}}{{{reward|}}}{{{coins|}}}{{{location|}}}{{{collection|}}}{{{objectives|}}}|<dl>{{#vardefine:close_dl|</dl>}}}}{{#if: {{{prerequisite|}}} |
 +
<dd>'''Prerequisite:''' {{{prerequisite|}}}</dd>
 +
}}{{#if: {{{unlock|}}} |
 +
<dd>'''Unlock Item:''' &thinsp;<span class="item-icon thumb-icon">[[{{#show: {{{unlock}}}|?Has game icon|link=none|default=File:Skill.png}}|20px|bottom|link={{{unlock}}}]]</span>&nbsp;[[{{{unlock}}}|{{#show:{{{unlock}}}|?Has canonical name|default={{{unlock}}}}}]]</dd>
 +
}}{{#if: {{{title|}}} |
 +
<dd>'''Title:''' [[File:Title icon.png|20px|link=Title]] {{{title}}}</dd>
 +
}}{{#if: {{{tier rewards|}}} | {{#ifexpr: {{#var:tier_rewards_count}} < {{#if: {{{show tier rewards|}}} | 100 | 7 }}
 +
|
 +
 
 +
 
 +
<!-- Branch for less than seven tier rewards: show everything -->
 +
<dd><table style="width: 95%; border-spacing: 0px; border-style: hidden;"><!-- with wiki table syntax it would NOT be parsed correctly -->
 +
{{!}}-
 +
{{!}} colspan="3" style="padding:0;" {{!}} '''Rewards:'''
 +
{{#arraymap: {{{tier rewards}}}|\n|@@@|
 +
{{!}}-
 +
{{!}} style="padding:0;border-style:hidden;" {{!}} <ul style="margin-top:0;margin-bottom:0;"><li>Tier</li></ul>
 +
{{!}} style="text-align:right;padding:0 0.32em;border-style:hidden;" {{!}} {{#explode: @@@|;|0}}:
 +
{{!}} style="width:99%;padding:0;border-style:hidden;" {{!}} &thinsp;<span class="item-icon thumb-icon">[[{{#show:{{#vardefineecho:tier_rewards_item|{{#explode: @@@|;|1}}}}|?Has game icon|link=none|default=File:Skill.png}}|20px|bottom|link={{#var:tier_rewards_item}}]]</span>&nbsp;[[{{#var:tier_rewards_item}}|{{#show:{{#var:tier_rewards_item}}|?Has canonical name|default={{#var:tier_rewards_item}}}}]] {{plural: {{#explode: @@@|;|2}} ||({{#explode: @@@|;|2}})}}
 +
|\n}}</table></dd>
 +
 
 +
 
 +
|
 +
<!-- Branch for more than seven tier rewards: expandable table -->{{#vardefine:tier_rewards_counter|1}}
 +
<dd><table style="width: 95%; border-spacing: 0px; border-style: hidden;" class="collapsible">
 +
{{!}}- class="expandable"
 +
{{!}} colspan="3" style="padding:0;" {{!}} '''Rewards:''' <small style="float:right">Show all rewards</small>
 +
{{#arraymap: {{{tier rewards}}}|\n|@@@|{{#switch: {{#var:tier_rewards_counter}}
 +
| 1 | 2 | 3 =
 +
{{!}}- style="display:table-row" <!-- expandable table: always show the first three rows -->
 +
| {{#var:tier_rewards_count}} =
 +
{{!}}- class="collapse-reverse nomobile" <!-- expandable table: symbolize the collapsed part with "..."  and show final tier reward -->
 +
{{!}} colspan="2" style="text-align:right;padding:0 0.32em;" {{!}} '''...'''
 +
{{!}}- style="display:table-row"       
 +
| #default =
 +
{{!}}- }}
 +
{{!}} style="padding:0;border-style:hidden;" {{!}} <ul style="margin-top:0;margin-bottom:0;"><li>Tier</li></ul>
 +
{{!}} style="text-align:right;padding:0 0.32em;border-style:hidden;" {{!}} {{#explode: @@@|;|0}}:
 +
{{!}} style="width:99%;padding:0;border-style:hidden;" {{!}}&thinsp;<span class="item-icon thumb-icon">[[{{#show:{{#vardefineecho:tier_rewards_item|{{#explode: @@@|;|1}}}}|?Has game icon|link=none|default=File:Skill.png}}|20px|bottom|link={{#var:tier_rewards_item}}]]</span>&nbsp;[[{{#var:tier_rewards_item}}|{{#show:{{#var:tier_rewards_item}}|?Has canonical name|default={{#var:tier_rewards_item}}}}]] {{plural: {{#explode: @@@|;|2}} ||({{#explode: @@@|;|2}})}} {{#vardefine:tier_rewards_counter|{{#expr:{{#var:tier_rewards_counter}} + 1}}}}
 +
|\n}}</table></dd>
 +
 
 +
 
 +
}}
 +
| {{#if: {{{reward|}}} |
 +
<dd>'''Reward:''' &thinsp;<span class="item-icon thumb-icon">[[{{#show: {{{reward}}}|?Has game icon|link=none|default=File:Skill.png}}|20px|bottom|link={{{reward}}}]]</span>&nbsp;[[{{{reward}}}|{{#show:{{{reward}}}|?Has canonical name|default={{{reward}}}}}]] {{#ifexpr: {{{quantity|0}}} > 1 | ({{{quantity}}}) }}</dd>
 +
}} }}{{#if: {{{coins|}}} |
 +
<dd>'''Coins:''' {{coin|{{{coins}}}}}</dd>
 +
}}{{#if: {{{location|}}} |
 +
<dd>'''Suggested Locations:'''</dd>
 +
<dd>{{#arraymap: {{{location}}} |;|@@@| [[File:Compass icon.png|middle|18px|link=]] [[@@@]] |<br>}}</dd>
 +
}}{{#if: {{{prerequisite|}}}{{{unlock|}}}{{{title|}}}{{{tier rewards|}}}{{{reward|}}}{{{coins|}}}{{{location|}}}|{{#if: {{{collection|}}}{{{objectives|}}}|
 +
<!-- visually separating collection or objectives from rewards with a horizontal line -->
 +
<dd><hr style="margin: .5em 2.5em .5em 0; clear: both;"/></dd>
 +
}}}}{{#if: {{{collection|}}}|
 +
<dd>'''Collection:'''</dd>
 +
<dd><div style="max-width: 360px;"><!-- (32px icon size + 4px margin) * 10 icons per row -->{{#vardefine:bit|0}}{{#arraymap: {{{collection|}}}|\n|@@@|{{#ask: [[@@@]]
 +
| ? Has canonical name
 +
| ? Has game icon
 +
| ? Has game id
 +
| ? Has collection hint
 +
| ? Has game description
 +
| format = template
 +
| template = Achievement collection result format{{!}}id={{{id|}}}
 +
| valuesep = ;
 +
| link = none
 +
| limit = 250
 +
}}|}}
 +
</div></dd>
 +
}}{{#if: {{{objectives|}}} | {{#ifexpr: {{#var:objectives_count|1}} < {{#if: {{{show objectives|}}} | 100 | 7 }}
 +
|
 +
 
 +
 
 +
<!-- Branch for less than seven objectives: show everything -->
 +
<dd><table style="width: 95%; margin-bottom: 0.75em; border-spacing: 0px; border-style: hidden;">
 +
{{!}}-
 +
{{!}} style="padding:0;border-style: hidden;" {{!}} '''Objectives:'''
 +
{{#arraymap: {{{objectives|}}}|\n|@@@|
 +
{{!}}-
 +
{{!}} style="padding:0;border-style: hidden;" {{!}} <ul style="margin-top:0;margin-bottom:0;"><li>@@@</li></ul>
 +
|\n}}</table></dd>
 +
 
  
 +
|
 +
<!-- Branch for seven or more objectives: expandable table -->{{#vardefine: objectives_counter|1}}
 +
<dd><table style="width: 95%; margin-bottom: 0.75em; border-spacing: 0px; border-style: hidden;" class="collapsible">
 +
{{!}}- class="expandable"
 +
{{!}} style="padding:0;border-style: hidden;" {{!}} '''Objectives:''' <small style="float:right">Show all objectives</small>
 +
{{#arraymap: {{{objectives|}}}|\n|@@@|{{#switch: {{#var:objectives_counter}}
 +
| #default =
 +
{{!}} style="padding:0;border-style: hidden;" {{!}} <ul style="margin-top:0;margin-bottom:0;"><li>@@@</li></ul>
 +
| 1 | 2 | 3 =
 +
{{!}}- style="display:table-row" <!-- expandable table: always show the first three rows -->
 +
{{!}} style="padding:0;border-style: hidden;" {{!}} <ul style="margin-top:0;margin-bottom:0;"><li>@@@</li></ul>
 +
| {{#var:objectives_count}} =
 +
{{!}}- class="collapse-reverse nomobile" <!-- expandable table: symbolize the collapsed part with "..."  and show final objective -->
 +
{{!}} style="padding-left:1.6em;" {{!}} '''...'''
 +
{{!}}- style="display:table-row"
 +
{{!}} style="padding:0;border-style: hidden;" {{!}} <ul style="margin-top:0;margin-bottom:0;"><li>@@@</li></ul>
 +
| #default =
 +
{{!}}-
 +
{{!}} style="padding:0;border-style: hidden;" {{!}} <ul style="margin-top:0;margin-bottom:0;"><li>@@@</li></ul>
 +
}}{{#vardefine:objectives_counter|{{#expr:{{#var:objectives_counter}} + 1}}}}
 +
|\n}}</table></dd>
 +
 +
 +
}}
 +
}}{{#var:close_dl}}{{#vardefine:close_dl|<!--clear-->}}
 +
{{#if: {{{effect|}}}{{{notes|}}}
 +
| ''<small>Additional notes on this achievement available below.</small>''{{#if: {{{effect|}}}
 +
    | {{#tag:ref|'''{{{name|(blank achievement name)}}}''': {{#switch: {{lc:{{{effect}}}}}
 +
      | eligibility    = Achievement qualification may be tracked via the {{effect|Eligibility: {{{name|}}}}} effect.
 +
      | qualify        = Achievement qualification may be tracked via the {{effect|Qualify for {{{name|}}}}} effect.
 +
      | #default      = Achievement qualification may be tracked via the {{effect|{{{effect}}}}} effect.
 +
      }} }}
 +
  }}{{#if: {{{notes|}}}
 +
    | {{#tag:ref|'''{{{name|(blank achievement name)}}}''': {{{notes}}}}}
 +
  }}
 +
}}<!-- Tier logic starts here -->
 +
{{#ifexpr: {{#var:tier_count|1}} < {{#if: {{{show tiers|}}} | 100 | 7 }} |
 +
 +
 +
<!-- Branch for less than seven tiers: show everything (or if {{{show tiers|}}} is set) -->
 +
{{#vardefine:tier_counter|1}}
 +
<!-- Fixed row color, starting with mech1 blue -->
 +
{{#vardefine:bgc|E8F0F8}}
 +
{{#arraymap: {{{tiers|}}} |\n|@@@|{{#switch: {{#var:tier_counter}}
 +
| {{#var:tier_count}} =
 +
{{!}} style="width:220px; vertical-align:top; background-color: #{{#var:bgc}};" {{!}} {{#explode:@@@|;|0}}
 +
{{!}} style="width:100px; text-align:right; vertical-align:top; background-color: #{{#var:bgc}};" {{!}} {{ap|{{#explode:@@@|;|1}}}} {{#ifeq: {{#var:bgc}}|FFF|{{#vardefine:bgc|E8F0F8}}|{{#vardefine:bgc|FFF}}}}
 +
| #default =
 +
{{!}} style="width:220px; vertical-align:top; height:1em; background-color: #{{#var:bgc}};" {{!}} {{#explode:@@@|;|0}}
 +
{{!}} style="width:100px; text-align:right; vertical-align:top; background-color: #{{#var:bgc}};" {{!}} {{ap|{{#explode:@@@|;|1}}}} {{#ifeq: {{#var:bgc}}|FFF|{{#vardefine:bgc|E8F0F8}}|{{#vardefine:bgc|FFF}}}}
 +
}}{{#vardefine:tier_counter|{{#expr:{{#var:tier_counter}} + 1}}}}| \n{{!}}- class="widget-account-achievement" data-id="achievement{{#var: id}}" \n }}
 +
|
 +
 +
 +
<!-- Branch for seven or more tiers: start a collapsible table at row 5, and close the extra table at the final row -->
 +
{{#vardefine:tier_counter|1}}
 +
<!-- Fixed row color, starting with mech1 blue -->
 +
{{#vardefine:bgc|E8F0F8}}
 +
{{#arraymap: {{{tiers|}}} |\n|@@@|
 +
{{#switch: {{#var:tier_counter}}
 +
| 1
 +
| 2
 +
| 3
 +
| 4 = {{!}} style="min-width:200px; max-width:300px; vertical-align:top; height: 1em; background-color: #{{#var:bgc}};" {{!}} {{#explode:@@@|;|0}}
 +
{{!}} style="width:40px; text-align:right; vertical-align:top; background-color: #{{#var:bgc}};" {{!}} {{ap|{{#explode:@@@|;|1}}}} {{#ifeq: {{#var:bgc}}|FFF|{{#vardefine:bgc|E8F0F8}}|{{#vardefine:bgc|FFF}}}}
 +
 +
| 5 = {{!}} colspan="2" style="vertical-align:top; background-color: #E8F0F8" {{!}}
 +
<table {{STDT|mech1}} class="expandable" style="width: 100%; border-spacing: 0;">
 +
{{!}} colspan="2" {{!}} Show more tiers
 +
{{!}}-
 +
{{!}} style="min-width:200px; max-width:300px; vertical-align:top;" {{!}} {{#explode:@@@|;|0}}
 +
{{!}} style="width:40px; text-align:right; vertical-align:top;" {{!}} {{ap|{{#explode:@@@|;|1}}}}
 +
 +
| {{#var:tier_count}} = {{!}} style="min-width: 200px; max-width: 300px; vertical-align: top;" {{!}} {{#explode:@@@|;|0}}
 +
{{!}} style="width:40px; text-align:right; vertical-align:top;" {{!}} {{ap|{{#explode:@@@|;|1}}}}
 +
</table>
 +
 +
| #default = {{!}} style="min-width:200px; max-width:300px; vertical-align:top; height: 1em;" {{!}} {{#explode:@@@|;|0}}
 +
{{!}} style="width:40px; text-align:right; vertical-align:top;" {{!}} {{ap|{{#explode:@@@|;|1}}}}
 +
}}
 +
{{#vardefine:tier_counter|{{#expr:{{#var:tier_counter}} + 1}}}}
 +
|\n{{!}}- class="widget-account-achievement" data-id="achievement{{#var: id}}" \n}}
 +
 +
 +
}}</includeonly><noinclude>
 
== Description ==
 
== Description ==
 
<pre>{{Achievement table row
 
<pre>{{Achievement table row
 +
| id =
 
| name =  
 
| name =  
 
| icon =  
 
| icon =  
| page =
+
| page =  
 
| description =  
 
| description =  
 
| flavor =  
 
| flavor =  
 
| type =  
 
| type =  
 +
| hidden =
 +
| no meta contribution =
 +
| tiers =
 +
| show tiers =
 
| cap =  
 
| cap =  
| parent =
 
| tiers =
 
 
| reward =  
 
| reward =  
| quantity =
+
| quantity =
 +
| tier rewards =  
 
| coins =  
 
| coins =  
 
| title =  
 
| title =  
 
| location =  
 
| location =  
| prerequisite =
+
| prerequisite =  
| unlock =
+
| unlock =
 +
| objectives =
 +
| collection =
 +
| effect =  
 
| activity =  
 
| activity =  
 +
| chapter =
 
| mastery =  
 
| mastery =  
| chapter =  
+
| mastery id =  
| id =  
+
| notes =  
 
}}</pre>
 
}}</pre>
  
Строка 118: Строка 281:
 
: Optional. Icon for achievement, defaults to the icon associated with the parent page.
 
: Optional. Icon for achievement, defaults to the icon associated with the parent page.
 
; page
 
; page
: The article for the achievement.
+
: The article for the achievement, use <code><page name>#<section></code> if needed. Please note that html number entities should be avoided as they contain the separator "#" (e.g. <code><span>#</span>&32;</code> = space). Hence it would be a potential source of smw errors when used together with an actual section separator.
 
; description
 
; description
 
: Short descriptions of an achievement.
 
: Short descriptions of an achievement.
Строка 126: Строка 289:
 
: ''standard'' is the achievement. The default type.
 
: ''standard'' is the achievement. The default type.
 
: ''meta'' if this achievement is the meta achievement
 
: ''meta'' if this achievement is the meta achievement
: ''parent'' if the achievement is an umbrella achievement for a set of achievements in the category
+
: ''repeatable'' if the achievement can be repeated infinitely. These do not contribute to meta achievements.
: ''repeatable'' if the achievement can be repeated infinitely. These do not contribute to meta or umbrella achievements.
+
: ''daily'' if the achievement is a daily achievement.
 +
: ''daily meta'' if the achievement is a daily meta achievement.
 +
: ''weekly'' if the achievement is a weekly achievement.
 +
: ''weekly meta'' if the achievement is a weekly meta achievement.
 +
; hidden
 +
: Optional. Set to <code>yes</code> if the achievement is hidden. Defaults to <code>no</code>.
 +
; no meta contribution
 +
: Optional. Set to <code>yes</code> if the achievement isn't contributing to the meta achievement. Defaults to <code>no</code>.
 
; cap
 
; cap
 
: If the achievement is repeatable, specifies the maximum number of AP from it.
 
: If the achievement is repeatable, specifies the maximum number of AP from it.
; parent
 
: The parent achievement this achievement contributes to. This is separate from the meta achievement.
 
 
; tiers
 
; tiers
 
: Pre-text and the achievement points rewarded for completion of the tier, separate tiers with a line-break.
 
: Pre-text and the achievement points rewarded for completion of the tier, separate tiers with a line-break.
 +
; show tiers
 +
: On default for seven or more tiers the lower rows are collapsed. Can be set to "y" to immediately show all tier rows, e.g. if the left part takes enough space.
 
; reward
 
; reward
: The item rewarded for completion
+
: The item rewarded for completion.
 
; quantity
 
; quantity
 
: The quantity of the reward received if greater than 1.
 
: The quantity of the reward received if greater than 1.
 +
; tier rewards
 +
: The items rewarded for each tier, format: <tier>;<item>;<quantity>, separate tier rewards with a line-break. Note that the parameter "reward" will be suppressed in this case.
 +
; show tier rewards
 +
: On default for seven or more tier rewards the lower ones are collapsed. Can be set to "y" to immediately show all tier rewards.
 
; coins
 
; coins
 
: The coin rewarded for completion
 
: The coin rewarded for completion
Строка 143: Строка 317:
 
: The title rewarded for completion
 
: The title rewarded for completion
 
; location
 
; location
: The suggested location for completion, waypoint or point of interest. If multiple points with the same name exist, use ID instead.
+
: The suggested location for completion, waypoint or point of interest. Separate multiple locations with semi-colons.
 
; prerequisite
 
; prerequisite
 
: When the achievement has any prerequisites that have to be completed before.
 
: When the achievement has any prerequisites that have to be completed before.
 
; unlock
 
; unlock
 
: When the achievement requires a certain item to be obtained to make the achievement available.  
 
: When the achievement requires a certain item to be obtained to make the achievement available.  
 +
; objectives
 +
: Achievement objectives as plain text, separate objectives with a line-break.
 +
; show objectives
 +
: On default for seven or more objectives the lower ones are collapsed. Can be set to "y" to immediately show all objectives.
 +
; collection
 +
: Collection items. List of items/skins, separated with a line-break, requiring an own page for the icon, canonical name and hint. Please note that in most cases the achievement task is unlocked by the skin and not by the equipment item.
 +
; hidden collection
 +
: Collection items which are not displayed but only stored and hence can are displayed on the individual achievement pages. This will avoid template timeouts due to too much icons.
 +
; notes
 +
: If specified, any notes given here will appear in a references section of the page. If one doesn't already exist, create a Notes section at the bottom of the page and add <code><nowiki><references/></nowiki></code> to it to make these notes appear.
 +
; effect
 +
: What effect is used for tracking the achievement. Follows the same appearance as notes (only one <code><nowiki><references/></nowiki></code> is enough). Can be set to "eligibility" for Eligibility: <code>name</code> effect, and "qualify" for Qualify for <code>name</code> effect, otherwise effect name is the given value.
 
; activity
 
; activity
: What activity does this achievement refer to.
+
: What activity does this achievement refer to. Multiple values allowed, separate them with ";".
 
; mastery
 
; mastery
: ''maguuma'' if this achievement grants a Heart of Maguuma mastery point.
+
: ''Central Tyria'' if this achievement grants a Central Tyria mastery point.
: ''central'' if this achievement grants a Central Tyria mastery point.
+
: ''Heart of Thorns'' if this achievement grants a Heart of Thorns mastery point.
 +
: ''Path of Fire'' if this achievement grants a Path of Fire mastery point.
 +
: ''Icebrood Saga'' if this achievement grants a Icebrood Saga mastery point.
 +
; mastery quantity
 +
: Mastery point quantity, defaults to 1.
 
; chapter
 
; chapter
: The personal story chapter this achievement is for.
+
: The personal story chapter this achievement is for. Used to prevent repeated mastery points from being set.
 
; id
 
; id
 
: The achievement ID.
 
: The achievement ID.
 +
; mastery id
 +
: The mastery ID.
 +
; categorize
 +
: If set to anything at all, no subobjects are set.
  
==Example==
+
== Example ==
 
<pre>
 
<pre>
 
{{Achievement table header|icon=Slayer.png}}
 
{{Achievement table header|icon=Slayer.png}}
Строка 165: Строка 359:
 
| description = Kill 500 devourers.
 
| description = Kill 500 devourers.
 
| flavor = Devourers may be ugly, tough, and dangerous, but they're still prey for a skilled adventurer.
 
| flavor = Devourers may be ugly, tough, and dangerous, but they're still prey for a skilled adventurer.
| tier count = 4
 
 
| tiers = 10 kills;1
 
| tiers = 10 kills;1
 
100 kills;5
 
100 kills;5
Строка 177: Строка 370:
 
| description = Kill 500 devourers.
 
| description = Kill 500 devourers.
 
| flavor = Devourers may be ugly, tough, and dangerous, but they're still prey for a skilled adventurer.
 
| flavor = Devourers may be ugly, tough, and dangerous, but they're still prey for a skilled adventurer.
| tier count = 4
 
 
| tiers = 10 kills;1
 
| tiers = 10 kills;1
 
100 kills;5
 
100 kills;5
Строка 186: Строка 378:
  
 
[[Category:Achievement formatting templates]]
 
[[Category:Achievement formatting templates]]
[[Category:Subobject templates]]</noinclude>
+
[[Category:Subobject templates]]
 +
[[es:Plantilla:Logro tabla fila]]
 +
</noinclude>

Версия 13:05, 21 февраля 2021

Description

{{Achievement table row
| id = 
| name = 
| icon = 
| page = 
| description = 
| flavor = 
| type = 
| hidden = 
| no meta contribution = 
| tiers = 
| show tiers = 
| cap = 
| reward = 
| quantity = 
| tier rewards = 
| coins = 
| title = 
| location = 
| prerequisite = 
| unlock = 
| objectives = 
| collection = 
| effect = 
| activity = 
| chapter = 
| mastery = 
| mastery id = 
| notes = 
}}

Parameters

name
Canonical name of an achievement
icon
Optional. Icon for achievement, defaults to the icon associated with the parent page.
page
The article for the achievement, use <page name>#<section> if needed. Please note that html number entities should be avoided as they contain the separator "#" (e.g. #&32; = space). Hence it would be a potential source of smw errors when used together with an actual section separator.
description
Short descriptions of an achievement.
flavor
Flavor text listed below the description.
type
standard is the achievement. The default type.
meta if this achievement is the meta achievement
repeatable if the achievement can be repeated infinitely. These do not contribute to meta achievements.
daily if the achievement is a daily achievement.
daily meta if the achievement is a daily meta achievement.
weekly if the achievement is a weekly achievement.
weekly meta if the achievement is a weekly meta achievement.
hidden
Optional. Set to yes if the achievement is hidden. Defaults to no.
no meta contribution
Optional. Set to yes if the achievement isn't contributing to the meta achievement. Defaults to no.
cap
If the achievement is repeatable, specifies the maximum number of AP from it.
tiers
Pre-text and the achievement points rewarded for completion of the tier, separate tiers with a line-break.
show tiers
On default for seven or more tiers the lower rows are collapsed. Can be set to "y" to immediately show all tier rows, e.g. if the left part takes enough space.
reward
The item rewarded for completion.
quantity
The quantity of the reward received if greater than 1.
tier rewards
The items rewarded for each tier, format: <tier>;<item>;<quantity>, separate tier rewards with a line-break. Note that the parameter "reward" will be suppressed in this case.
show tier rewards
On default for seven or more tier rewards the lower ones are collapsed. Can be set to "y" to immediately show all tier rewards.
coins
The coin rewarded for completion
title
The title rewarded for completion
location
The suggested location for completion, waypoint or point of interest. Separate multiple locations with semi-colons.
prerequisite
When the achievement has any prerequisites that have to be completed before.
unlock
When the achievement requires a certain item to be obtained to make the achievement available.
objectives
Achievement objectives as plain text, separate objectives with a line-break.
show objectives
On default for seven or more objectives the lower ones are collapsed. Can be set to "y" to immediately show all objectives.
collection
Collection items. List of items/skins, separated with a line-break, requiring an own page for the icon, canonical name and hint. Please note that in most cases the achievement task is unlocked by the skin and not by the equipment item.
hidden collection
Collection items which are not displayed but only stored and hence can are displayed on the individual achievement pages. This will avoid template timeouts due to too much icons.
notes
If specified, any notes given here will appear in a references section of the page. If one doesn't already exist, create a Notes section at the bottom of the page and add <references/> to it to make these notes appear.
effect
What effect is used for tracking the achievement. Follows the same appearance as notes (only one <references/> is enough). Can be set to "eligibility" for Eligibility: name effect, and "qualify" for Qualify for name effect, otherwise effect name is the given value.
activity
What activity does this achievement refer to. Multiple values allowed, separate them with ";".
mastery
Central Tyria if this achievement grants a Central Tyria mastery point.
Heart of Thorns if this achievement grants a Heart of Thorns mastery point.
Path of Fire if this achievement grants a Path of Fire mastery point.
Icebrood Saga if this achievement grants a Icebrood Saga mastery point.
mastery quantity
Mastery point quantity, defaults to 1.
chapter
The personal story chapter this achievement is for. Used to prevent repeated mastery points from being set.
id
The achievement ID.
mastery id
The mastery ID.
categorize
If set to anything at all, no subobjects are set.

Example

{{Achievement table header|icon=Slayer.png}}
{{Achievement table row
| name = Devourer Slayer
| description = Kill 500 devourers.
| flavor = Devourers may be ugly, tough, and dangerous, but they're still prey for a skilled adventurer.
| tiers = 10 kills;1
100 kills;5
500 kills;5
1000 kills;5
}}
|}
Slayer.png
Achievement table row
Total achievements: 1 16 Очко достижений
es:Plantilla:Logro tabla fila