Difference between revisions of "Template:Show achievement"

From Team Fortress Wiki
Jump to: navigation, search
(100% width for obtaining achievement pages)
(Uses dictionary now.)
Line 1: Line 1:
<includeonly>{{Achievement | width = {{{width|{{#if:{{{3|{{{4|}}}}}}|100%|auto}}}}}
+
<includeonly>{{Achievement | width = {{{width|{{#if:{{{3|}}}{{{4|}}}{{{obtain-level|}}}{{{obtain-text|}}}|100%|auto}}}}}
| 1 = {{{{#switch:{{ucfirst:{{{1|}}}}}
+
| 1 = {{Dictionary/achievements/{{lc:{{{1|}}}}}/{{lc:{{{2|}}}}}-title}}
| Scarechievements
+
| 2 = {{Dictionary/achievements/{{lc:{{{1|}}}}}/{{lc:{{{2|}}}}}-desc}}
| Scareacheivements
+
| 3 = {{Dictionary/achievements/{{lc:{{{1|}}}}}/{{lc:{{{2|}}}}}-icon}}
| Scream Fortress
+
| reward = {{ {{#switch:{{lc:{{{2|}}}}}
| Hallowe'en
+
  | milestone 1 | milestone 2 | milestone 3 | riftwalker | local cinema star = Dictionary/achievements/{{lc:{{{1|}}}}}/{{lc:{{{2|}}}}}-reward
| Halloween = Halloween
+
  | #default = ns:0
| The Great Steam Treasure Hunt
+
  }} }}
| Great Steam Treasure Hunt
 
| Treasure hunt
 
| Treasure Hunt = Treasure Hunt
 
| Replay Update
 
| Replay = Replay
 
| General
 
| Normal = General
 
| #default = {{{1|}}}
 
}} achievement/core | name  | {{{2|}}} }}
 
| 2 = {{{{#switch:{{ucfirst:{{{1|}}}}}
 
| Scarechievements
 
| Scareacheivements
 
| Scream Fortress
 
| Hallowe'en
 
| Halloween = Halloween
 
| The Great Steam Treasure Hunt
 
| Great Steam Treasure Hunt
 
| Treasure hunt
 
| Treasure Hunt = Treasure Hunt
 
| Replay Update
 
| Replay = Replay
 
| General
 
| Normal = General
 
| #default = {{{1|}}}
 
}} achievement/core | text  | {{{2|}}} }}
 
| 3 = {{{{#switch:{{ucfirst:{{{1|}}}}}
 
| Scarechievements
 
| Scareacheivements
 
| Scream Fortress
 
| Hallowe'en
 
| Halloween = Halloween
 
| The Great Steam Treasure Hunt
 
| Great Steam Treasure Hunt
 
| Treasure hunt
 
| Treasure Hunt = Treasure Hunt
 
| Replay Update
 
| Replay = Replay
 
| General
 
| Normal = General
 
| #default = {{{1|}}}
 
}} achievement/core | image | {{{2|}}} }}
 
| {{#switch:{{ucfirst:{{{1|}}}}}
 
  | Scout
 
| Soldier
 
| Pyro
 
| Demo
 
| Demoman
 
| Heavy
 
| Engineer
 
| Medic
 
| Sniper
 
| Spy      = reward
 
| #default = void
 
}} = {{{{#switch:{{ucfirst:{{{1|}}}}}
 
| Scarechievements
 
| Scareacheivements
 
| Hallowe'en
 
| Halloween = Halloween
 
| The Great Steam Treasure Hunt
 
| Great Steam Treasure Hunt
 
| Treasure hunt
 
| Treasure Hunt = Treasure Hunt
 
| Replay Update
 
| Replay = Replay
 
| General
 
| Normal = General
 
  | #default = {{{1|}}}
 
  }} achievement/core | reward | {{{2|}}} }}
 
 
 
 
| {{#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>
 
}}{{#if:{{{1|}}}{{{2|}}}||<span class="error mid">ERROR {{tl|Show achievement}}: missing achievement type and name parameter. [[Category:ERROR|Achievement]]</span>}}</includeonly><noinclude>
 
{{doc begin}}
 
{{doc begin}}

Revision as of 23:44, 28 May 2011

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 elsewhere – see Category:Achievement insertion templates/core.

Syntax

Examples

One by itself

Code: {{show achievement|General|Dynasty|width = 50%}}
Dynasty
Dynasty
Win 20 games.


In a table

{{Achievement table
| 1 = {{Show achievement|General|Dynasty}}
      {{Show achievement|General|Dynasty}}
      {{Show achievement|General|Dynasty}}
      {{Show achievement|General|Dynasty}}
| 2 = {{Show achievement|General|Flamethrower}}
      {{Show achievement|General|Flamethrower}}
      {{Show achievement|General|Flamethrower}}
}}
Dynasty
Dynasty
Win 20 games.


Dynasty
Dynasty
Win 20 games.


Dynasty
Dynasty
Win 20 games.


Dynasty
Dynasty
Win 20 games.
Flamethrower
Flamethrower
Set five enemies on fire in 30 seconds.


Flamethrower
Flamethrower
Set five enemies on fire in 30 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