Difference between revisions of "Template:Achievement"

From Team Fortress Wiki
Jump to: navigation, search
(simplify "rewards" link)
(add obtaining achievement functionality, adds colours from Template:Suggestion)
Line 1: Line 1:
<table cellpadding="0" style="width: {{{width|50%}}}; text-align: left;"><tr>
+
{| cellpadding="0" style="width: {{{width|50%}}}; text-align: left; {{#if:{{{obtain-text|}}}{{{obtain-level|}}}
<td width="10%">[[File:{{{3|TF2_crosshair.png}}}|56px]]</td>
+
| border-left: 6px solid #{{#switch:{{lc:{{{status|}}}}}
<td style="padding-left: 4px; padding-right: 4px;">'''''{{{1|Achievement Name}}}'''''<br />{{{2|Lorem ipsum dolor sit amet, lorem ipsum, dolor, sit amet.}}}{{#if:{{{reward|}}}|<br />
+
| easy    = B5F36D; background: #F0F8E7;
 +
| medium  = FEBE25; background: #FFFEDF;
 +
| hard    = F78B6F; background: #FBEDEA;
 +
| #default = lightgray; background: #EEE;
 +
}}
 +
| }}"<!-- END STYLE -->
 +
| width="10%" style="padding:0em 0.5em;" | [[File:{{{3|TF2_crosshair.png}}}|56px|center]]
 +
| style="padding-left: 4px; padding-right: 4px;" | '''''{{{1|Achievement Name}}}'''''<br />{{{2|Lorem ipsum dolor sit amet, lorem ipsum, dolor, sit amet.}}}{{#if:{{{reward|}}}|<br />
 
<small>'''{{lang
 
<small>'''{{lang
 
  | en = Reward
 
  | en = Reward
Line 10: Line 17:
 
  | ro = Recompensă
 
  | ro = Recompensă
 
  | ru = Награда
 
  | ru = Награда
}}''': {{{reward}}}</small></td>|</td>}}</tr></table><noinclude>
+
}}''': {{{reward}}}</small>|}}{{#if:{{{obtain-text|yes}}}{{{obtain-level|}}}
 +
| <hr style="margin: 0.5em 0;" />'''Difficulty''': {{{obtain-level|Normal}}}<br />'''How to obtain''': {{{obtain-text|Lorem ipsum dolor sit amet.}}}
 +
| }}
 +
|-
 +
|}<noinclude>
 
{{Translation switching|de, es, fr, pl, ro, ru}}
 
{{Translation switching|de, es, fr, pl, ro, ru}}
 
{{doc begin}}
 
{{doc begin}}
Line 20: Line 31:
 
== Parameters ==
 
== Parameters ==
 
{| class="wikitable grid" style="width:100%;"
 
{| class="wikitable grid" style="width:100%;"
! Name
+
! width="12%" | Name
! Example
+
! width="30%" | Example
! width="50%" | Description
+
! width="auto" | Description
 
|-
 
|-
 
| {{code|1}}
 
| {{code|1}}
Line 46: Line 57:
 
| The width. Can be set to {{code|50%}} if not used in a table, otherwise it defaults to {{code|100%}}.
 
| The width. Can be set to {{code|50%}} if not used in a table, otherwise it defaults to {{code|100%}}.
 
|-
 
|-
 +
! style="text-align:left;" colspan="3" | ''Obtaining''
 +
|-
 +
| {{code|obtain-level}}
 +
| {{code|easy}}
 +
| The level of difficulty. Accepts "easy", "medium" and "hard". This also gives the box a coloured background and border on the left. Not defining a level of difficulty gives the box a grey background.
 +
|-
 +
| {{code|obtain-text}}
 +
| {{code|Simply build a Sentry Gun and keep it alive to get 10 kills to earn this achievement.}}
 +
| The description text.
 
|}
 
|}
  

Revision as of 09:57, 17 September 2010

TF2 crosshair.png
Achievement Name
Lorem ipsum dolor sit amet, lorem ipsum, dolor, sit amet.
Difficulty: Normal
How to obtain: Lorem ipsum dolor sit amet.

Documentation for Achievement


This template was created in order to standardise how achievements appear in article pages.

You should not use this template directly. To show a particular achievement on a page, use {{Show achievement}} instead. This template holds only the code to display achievements in a table. It does not hold any translated text or titles.

Parameters

Name Example Description
1 Quick Hook Name of the achievement.
2 Kill a player in Well before the round starts. The description (should use exact wording from Steam).
3 Tf quick hook.png The file name of the image (exclude File: or Image: prefix)
reward Ambassador If the achievement is a Milestone, a link to the weapon that is earned.
Style
width 100% The width. Can be set to 50% if not used in a table, otherwise it defaults to 100%.
Obtaining
obtain-level easy The level of difficulty. Accepts "easy", "medium" and "hard". This also gives the box a coloured background and border on the left. Not defining a level of difficulty gives the box a grey background.
obtain-text Simply build a Sentry Gun and keep it alive to get 10 kills to earn this achievement. The description text.

See also