Difference between revisions of "Template:Show achievement"

From Team Fortress Wiki
Jump to: navigation, search
(LC: needed. Otherwise, perfectly functional!)
m (Remove double dictionary link)
 
(13 intermediate revisions by 4 users not shown)
Line 7: Line 7:
 
| {{#if:{{{obtain-text|}}}{{{4|}}}|obtain-text|void}} = {{{obtain-text|{{{4|}}}}}}
 
| {{#if:{{{obtain-text|}}}{{{4|}}}|obtain-text|void}} = {{{obtain-text|{{{4|}}}}}}
 
| anchor = {{anchorencode:{{{2|}}}}}
 
| anchor = {{anchorencode:{{{2|}}}}}
}}{{#ifexpr: {{#if:{{{1|}}}|0|1}} or {{#if:{{{2|}}}|0|1}} or {{#switch:{{lc:{{{obtain-level|{{{3|¬}}}}}}}}|very easy|easy|medium|hard|very hard|¬=0|#default=1}} or {{#ifeq:{{{4|{{{obtain-text|{{{3|{{{obtain-level|}}}}}}}}}}}}|{{{3|{{{obtain-level}}}}}}|1|0}}|[[Category:ERROR]]}}</includeonly><noinclude>
+
}}{{#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 in the [[Template:Dictionary|'''dictionary''']].
+
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 23: 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 34: 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}}
 
}}
 
}}
Line 56: Line 57:
 
* {{tl|Achievement table}} &ndash; handy template to use to display achievements in a table.
 
* {{tl|Achievement table}} &ndash; handy template to use to display achievements in a table.
  
[[Category:Achievement insertion templates]]
+
[[Category:Achievement insertion templates| ]]
 
</noinclude>
 
</noinclude>

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