From StrategyWiki, the video game walkthrough and strategy guide wiki
Jump to navigation Jump to search
(cleanup)
(remove achievement float, move styles to stylesheet)
 
(30 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<div style="float:right;margin:0px 10px 10px 10px;border:1px solid #690;background-color:#B3D470;padding:3px;width:200px">
<templatestyles src="Template:Achievement/styles.css" /><div class="achievement" id="achievement_{{{name|}}}" {{#if:{{{width|}}}|style="width:{{{width|}}};"}}>
<div style="text-align:center;color:#5E8200">
<div style="margin:4px;">
<big><big><big><big><strong>Achievement</strong></big></big></big></big>
<div class="achievement_image">[[File:{{{image|Unknown achievement.png}}}|45px|{{{name|}}}]]</div>
<div class="achievement_info" style="{{#if:{{{g|{{{trophy|}}}}}}||display:none}}">{{#if:{{{trophy|}}}|[[File:{{{trophy}}} Trophy unlocked.png|20px]]{{#if:{{{g|}}}|<br />}}}}{{#if:{{{g|}}}|{{G|{{{g|}}}}}}}</div>
<div class="achievement_name">{{{name}}}</div>
</div>
</div>
{|style="margin:0px;border:0px;background-color:#B3D470;padding:3px;"
<div class="achievement_description"><span style="{{#if:{{{description|}}}||display:none}}">{{{description}}}</span></div>
|valign=center width=39px height=39px class=achievement align=center|<span style="color:Silver"><big><big><big>'''{{{points}}}'''</big></big></big></span>
{{#if:{{{total|}}}|{{progress bar|outer-color=#e7e7e7|outer-style=margin: 4px;clear: both;|outer-border=none|inner-color=#aaaaaa|inner-font=#2f2f2f|progress={{{progress|1}}}|total={{{total}}}|units={{{units|}}}}}}}</div><noinclude>
||<span style="text-align:center;color:#5E8200;"><big>'''{{{achievement}}}'''</big></span>
{{Documentation}}
|-
 
|colspan=2|<span style="text-align:center;color:#5E8200">{{{description}}}</span>
[[Category:Templates]]</noinclude>
|}
</div><noinclude>
{{-}}
This template is used to insert [[Xbox 360]] Achievements. It is used as follows:
<pre><nowiki>
{{achievement
|achievement=name of the Achievement
|points=points value
|description=description of what the Achievement means.
}}
</nowiki></pre>
==Image Locations==
[[Image:Achievement unlocked.png|left]]
Because of limitations on what CSS elements can be set in standard page text, the background image had to be added to [[MediaWiki:Common.css]] (as <code>.achievement</code>). The image is stored at [[:Image:Achievement unlocked.png]].
[[Category:Templates|A]]
</noinclude>

Latest revision as of 20:55, 13 December 2020

Unknown achievement.png
{{{name}}}
{{{description}}}

This page has been transcluded from Template:Achievement/Documentation.


This template is used to insert achievements and trophies. It is used as follows:

{{achievement
|name=Name of the achievement or trophy
|g=Gamerpoints value (optional)
|trophy=PS3 trophy type (Bronze, Gold, or Silver; optional)
|image=Filename of the achievement's icon ''without'' the "File:" (e.g. "Game achievement.png")
|description=Description of what the achievement means. (Optional.)
|progress=Progress (number, optional)
|total=Total progress numbers available (number, optional)
|units=Units displayed instead of percentage (text, optional)
|width=Width in pixels of achievement (default: 300px)
}}

To explain the progress and total parameters further, they're used for achievements and trophies which can have a measured progress, such as getting a certain number of kills in a game; the progress parameter would be how many kills you'd got, and the total parameter would be the (constant) total number of kills required to get the achievement.

All achievements have an ID of "achievement_Achievement_name" given to them, where Achievement_name is an anchor-encoded (using {{anchorencode}}) version of the value passed to the achievement parameter. This can be used to link to the achievement details from, for example, achievement list pages.