Difference between revisions of "Template:Show achievement"
m (no spaces) |
m (Remove double dictionary link) |
||
(35 intermediate revisions by 12 users not shown) | |||
Line 1: | Line 1: | ||
− | <includeonly> | + | <includeonly>{{Achievement | width = {{{width|{{#if:{{{3|}}}{{{4|}}}{{{obtain-level|}}}{{{obtain-text|}}}|100%|auto}}}}} |
| 1 = {{Dictionary/achievements/{{lc:{{{1|}}}}}/{{lc:{{{2|}}}}}-title}} | | 1 = {{Dictionary/achievements/{{lc:{{{1|}}}}}/{{lc:{{{2|}}}}}-title}} | ||
| 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 = {{ {{ | + | | reward = {{#ifexist:Template:Dictionary/achievements/{{lc:{{{1|}}}}}/{{lc:{{{2|}}}}}-reward|{{Dictionary/achievements/{{lc:{{{1|}}}}}/{{lc:{{{2|}}}}}-reward}}}} |
− | |||
− | |||
− | |||
| {{#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|}}}|| | + | | 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 | + | 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 == | ||
− | + | <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: {{ | + | :Code: <code><nowiki>{{Show achievement|General|Dynasty}}</nowiki></code> |
− | {{ | + | {{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| | + | {{Show achievement|Scout|Artful Dodger}} |
− | {{Show achievement| | + | {{Show achievement|Halloween|Carnival of Carnage- Step Right Up}} |
− | {{Show achievement|General| | + | {{Show achievement|General|May I Cut In, Too?}} |
− | | 2 = {{Show achievement| | + | | 2 = {{Show achievement|Medic|FYI I am a Medic}} |
− | {{Show achievement| | + | {{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| | + | {{Show achievement|Scout|Artful Dodger}} |
− | {{Show achievement| | + | {{Show achievement|Halloween|Carnival of Carnage- Step Right Up}} |
− | {{Show achievement|General| | + | {{Show achievement|General|May I Cut In, Too?}} |
− | | 2 = {{Show achievement| | + | | 2 = {{Show achievement|Medic|FYI I am a Medic}} |
− | {{Show achievement| | + | {{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
Contents
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 afterachievements/
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 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}} }}
|
|
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 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
{{Achievement table}}
– handy template to use to display achievements in a table.