Difference between revisions of "Template:Show achievement"

From Team Fortress Wiki
Jump to: navigation, search
(Uses dictionary now.)
m (Remove double dictionary link)
 
(37 intermediate revisions by 12 users not shown)
Line 3: Line 3:
 
| 2 = {{Dictionary/achievements/{{lc:{{{1|}}}}}/{{lc:{{{2|}}}}}-desc}}
 
| 2 = {{Dictionary/achievements/{{lc:{{{1|}}}}}/{{lc:{{{2|}}}}}-desc}}
 
| 3 = {{Dictionary/achievements/{{lc:{{{1|}}}}}/{{lc:{{{2|}}}}}-icon}}
 
| 3 = {{Dictionary/achievements/{{lc:{{{1|}}}}}/{{lc:{{{2|}}}}}-icon}}
| reward = {{ {{#switch:{{lc:{{{2|}}}}}
+
| reward = {{#ifexist:Template:Dictionary/achievements/{{lc:{{{1|}}}}}/{{lc:{{{2|}}}}}-reward|{{Dictionary/achievements/{{lc:{{{1|}}}}}/{{lc:{{{2|}}}}}-reward}}}}
| milestone 1 | milestone 2 | milestone 3 | riftwalker | local cinema star = Dictionary/achievements/{{lc:{{{1|}}}}}/{{lc:{{{2|}}}}}-reward
 
| #default = ns:0
 
}} }}
 
 
| {{#if:{{{obtain-level|}}}{{{3|}}}|obtain-level|void}} = {{{obtain-level|{{{3|}}}}}}
 
| {{#if:{{{obtain-level|}}}{{{3|}}}|obtain-level|void}} = {{{obtain-level|{{{3|}}}}}}
 
| {{#if:{{{obtain-text|}}}{{{4|}}}|obtain-text|void}} = {{{obtain-text|{{{4|}}}}}}
 
| {{#if:{{{obtain-text|}}}{{{4|}}}|obtain-text|void}} = {{{obtain-text|{{{4|}}}}}}
}}{{#if:{{{1|}}}{{{2|}}}||<span class="error mid">ERROR {{tl|Show achievement}}: missing achievement type and name parameter. [[Category:ERROR|Achievement]]</span>}}</includeonly><noinclude>
+
| anchor = {{anchorencode:{{{2|}}}}}
 +
}}{{#ifexpr: {{#if:{{{1|}}}|0|1}} or {{#if:{{{2|}}}|0|1}} or {{#switch:{{lc:{{{obtain-level|{{{3|¬}}}}}}}}|very easy|easy|easy-medium|easy/medium|medium|medium-hard|medium/hard|hard|very hard|unachievable|¬=0|#default=1}} or {{#ifeq:{{{4|{{{obtain-text|{{{3|{{{obtain-level|}}}}}}}}}}}}|{{{3|{{{obtain-level}}}}}}|1|0}}|[[Category:ERROR]]}}</includeonly><noinclude>
 
{{doc begin}}
 
{{doc begin}}
This template allows you to display achievements on multiple pages and in different languages. This template itself does not use [[Help:Translation switching|translation switching]] as it does not contain any text. All achievement text and titles are stored elsewhere &ndash; see [[:Category:Achievement insertion templates/core]].
+
This template allows you to display achievements on multiple pages and in different languages. This template itself does not use [[Help:Translation switching|translation switching]] as it does not contain any text. All achievement text and titles are stored in the [[Template:Dictionary|dictionary]].
  
 
== Syntax ==
 
== Syntax ==
* {{tlx|Show achievement|<Pack>|<Name>|<Difficulty>|<Description>|6=width = <value>}}
+
<code><nowiki>{{Show achievement|pack|name|difficulty|description}}</nowiki></code>
 +
* Use the '''English''' names for achievements and packs. A <code>pack</code> is anything that comes after <code>achievements/</code> in the dictionary (e.g. <code>Template:Dictionary/achievements/halloween</code>) or the name of a class. Colons in achievement names '''must''' be replaced with a hyphen.
  
 
== Examples ==
 
== Examples ==
 
=== One by itself ===
 
=== One by itself ===
:Code: {{tlx|show achievement|General|Dynasty|4=width = 50%}}
+
:Code: <code><nowiki>{{Show achievement|General|Dynasty}}</nowiki></code>
{{show achievement|General|Dynasty|width = 50%}}
+
{{Show achievement|General|Dynasty}}
  
 
=== In a table ===
 
=== In a table ===
Line 25: Line 24:
 
{{Achievement table
 
{{Achievement table
 
| 1 = {{Show achievement|General|Dynasty}}
 
| 1 = {{Show achievement|General|Dynasty}}
       {{Show achievement|General|Dynasty}}
+
       {{Show achievement|Scout|Artful Dodger}}
       {{Show achievement|General|Dynasty}}
+
       {{Show achievement|Halloween|Carnival of Carnage- Step Right Up}}
       {{Show achievement|General|Dynasty}}
+
       {{Show achievement|General|May I Cut In, Too?}}
| 2 = {{Show achievement|General|Flamethrower}}
+
| 2 = {{Show achievement|Medic|FYI I am a Medic}}
       {{Show achievement|General|Flamethrower}}
+
       {{Show achievement|Spy|FYI I am a Spy}}
 
       {{Show achievement|General|Flamethrower}}
 
       {{Show achievement|General|Flamethrower}}
 
}}
 
}}
Line 36: Line 35:
 
{{Achievement table
 
{{Achievement table
 
| 1 = {{Show achievement|General|Dynasty}}
 
| 1 = {{Show achievement|General|Dynasty}}
       {{Show achievement|General|Dynasty}}
+
       {{Show achievement|Scout|Artful Dodger}}
       {{Show achievement|General|Dynasty}}
+
       {{Show achievement|Halloween|Carnival of Carnage- Step Right Up}}
       {{Show achievement|General|Dynasty}}
+
       {{Show achievement|General|May I Cut In, Too?}}
| 2 = {{Show achievement|General|Flamethrower}}
+
| 2 = {{Show achievement|Medic|FYI I am a Medic}}
       {{Show achievement|General|Flamethrower}}
+
       {{Show achievement|Spy|FYI I am a Spy}}
 
       {{Show achievement|General|Flamethrower}}
 
       {{Show achievement|General|Flamethrower}}
 
}}
 
}}

Latest revision as of 15:07, 6 February 2023

Documentation for Show achievement

This template allows you to display achievements on multiple pages and in different languages. This template itself does not use translation switching as it does not contain any text. All achievement text and titles are stored in the dictionary.

Syntax

{{Show achievement|pack|name|difficulty|description}}

  • Use the English names for achievements and packs. A pack is anything that comes after achievements/ in the dictionary (e.g. Template:Dictionary/achievements/halloween) or the name of a class. Colons in achievement names must be replaced with a hyphen.

Examples

One by itself

Code: {{Show achievement|General|Dynasty}}
Dynasty
Dynasty
Win 20 games.


In a table

{{Achievement table
| 1 = {{Show achievement|General|Dynasty}}
      {{Show achievement|Scout|Artful Dodger}}
      {{Show achievement|Halloween|Carnival of Carnage- Step Right Up}}
      {{Show achievement|General|May I Cut In, Too?}}
| 2 = {{Show achievement|Medic|FYI I am a Medic}}
      {{Show achievement|Spy|FYI I am a Spy}}
      {{Show achievement|General|Flamethrower}}
}}
Dynasty
Dynasty
Win 20 games.


Artful Dodger
Artful Dodger
Dodge 1000 damage in a single life using your Bonk! Atomic Punch.


Carnival of Carnage: Step Right Up
Carnival of Carnage: Step Right Up
Earn 4 of the Carnival of Carnage achievements.

Reward: Necro Smasher


May I Cut In, Too?
May I Cut In, Too?
Melee kill 10 players while they are doing the Square Dance taunt.
FYI I am A Medic
FYI I am A Medic
Use your bonesaw to kill a spy who has been calling for 'Medic!'.


FYI I am a Spy
FYI I am a Spy
Backstab a Medic who has healed you in the last 5 seconds.


Flamethrower
Flamethrower
Set five enemies on fire in 30 seconds.

Obtaining achievements

{{Show achievement|General|Dynasty|Medium
| Simply play until you have won 20 games. If you find a good team and stick with them, this should happen in no time.
}}
  • The above code will generate:
Dynasty
Dynasty
Win 20 games.
Difficulty: Medium
How to obtain: Simply play until you have won 20 games. If you find a good team and stick with them, this should happen in no time.


See also