Template:Achievement List Item: Difference between revisions

From The Talos Principle Wiki
m Theadamabrams moved page Template:Achievement Row to Template:Achievement List Item without leaving a redirect
m TemplateData
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
|- id="{{{name}}}"
|- id="{{{name}}}"
|[[File:{{{image}}}|frameless|250px|thumb|]]
| style="border-right:none;" | [[File:{{{image}}}|frameless|250px|thumb|]]
|'''{{{name}}}'''<br/>{{{description}}}
| style="border-left:none;" | '''{{{name}}}'''<br/>
|style="text-align:right;"|{{{points}}}
{{{description}}}{{#if: {{{spoiler|}}} |
{{Spoiler|{{{spoiler}}}|details}}
|
}}
| style="text-align:center;" | {{{points}}} {{#if: {{{grade|}}} |
[[File:{{{grade}}} ps trophy.png|20px|alt={{grade}}|]]
|
}}<noinclude>
== Usage ==
 
<pre>{| class="wikitable"
!Icon
!Name / Description
!Points
{{Achievement List Item
|name=A New Beginning
|image=Ttp2_trophy_A_New_Beginning.png
|description=Help Byron get elected mayor.
|points=40
|grade=Silver
}}{{Achievement List Item
|name=A New Morality
|image=Ttp2_trophy_A_New_Morality.png
|description=Help Rand get elected mayor.
|points=30
}}{{Achievement List Item
|name=Ab Aeterno
|image=Ttp2_trophy_Ab_Aeterno.png
|description=Defy death.
|spoiler=Save Miranda after completing all gold puzzles.
|points=30
}}
|}</pre>
produces
 
{| class="wikitable"
!Icon
!Name / Description
!Points
{{Achievement List Item
|name=A New Beginning
|image=Ttp2_trophy_A_New_Beginning.png
|description=Help Byron get elected mayor.
|points=40
|grade=Silver
}}{{Achievement List Item
|name=A New Morality
|image=Ttp2_trophy_A_New_Morality.png
|description=Help Rand get elected mayor.
|points=30
}}{{Achievement List Item
|name=Ab Aeterno
|image=Ttp2_trophy_Ab_Aeterno.png
|description=Defy death.
|spoiler=Save Miranda after completing all gold puzzles.
|points=30
}}
|}
<templatedata>
{
"params": {
"name": {
"label": "Name",
"type": "string",
"required": true
},
"image": {
"label": "Icon",
"type": "wiki-page-name",
"suggested": true
},
"description": {
"label": "Official description",
"type": "string",
"required": true
},
"points": {
"label": "Points (XB)",
"description": "Xbox and Epic both use this number.",
"example": "30",
"type": "number"
},
"spoiler": {
"label": "Detailed description",
"description": "A custom description, displayed with {{Spoiler}} formatting. Include this only if the official description is unclear.",
"type": "string"
},
"grade": {
"label": "Grade (PS)",
"description": "PlayStation instead this instead of points.",
"suggestedvalues": [
"Bronze",
"Silver",
"Gold",
"Platiunum"
]
}
},
"description": "Describes one achievement. NOTE: A functioning list of achievements requires code for the start of the list, then several of these template items, then code for the end of the list.",
"paramOrder": [
"name",
"description",
"spoiler",
"points",
"grade",
"image"
],
"format": "block"
}
</templatedata></noinclude>

Latest revision as of 12:11, 23 November 2023

|- id="{{{name}}}" | style="border-right:none;" | [[File:{{{image}}}|frameless|250px|thumb|]] | style="border-left:none;" | {{{name}}}
{{{description}}} | style="text-align:center;" | {{{points}}}

Usage

{| class="wikitable"
!Icon
!Name / Description
!Points
{{Achievement List Item
|name=A New Beginning
|image=Ttp2_trophy_A_New_Beginning.png
|description=Help Byron get elected mayor.
|points=40
|grade=Silver
}}{{Achievement List Item
|name=A New Morality
|image=Ttp2_trophy_A_New_Morality.png
|description=Help Rand get elected mayor.
|points=30
}}{{Achievement List Item
|name=Ab Aeterno
|image=Ttp2_trophy_Ab_Aeterno.png
|description=Defy death.
|spoiler=Save Miranda after completing all gold puzzles.
|points=30
}}
|}

produces

Icon Name / Description Points
A New Beginning

Help Byron get elected mayor.

40 Template:Grade
A New Morality

Help Rand get elected mayor.

30
Ab Aeterno
Defy death.
[ details ]
Save Miranda after completing all gold puzzles.
30

Describes one achievement. NOTE: A functioning list of achievements requires code for the start of the list, then several of these template items, then code for the end of the list.

Template parameters[Edit template data]

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Namename

no description

Stringrequired
Official descriptiondescription

no description

Stringrequired
Detailed descriptionspoiler

A custom description, displayed with {{Spoiler}} formatting. Include this only if the official description is unclear.

Stringoptional
Points (XB)points

Xbox and Epic both use this number.

Example
30
Numberoptional
Grade (PS)grade

PlayStation instead this instead of points.

Suggested values
Bronze Silver Gold Platiunum
Unknownoptional
Iconimage

no description

Page namesuggested