Difference between revisions of "AchievementTable"

From Sega Retro

(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>{{clearvar|totalgamerscore|totalbronze|totalsilver|totalgold|totalplatinum|totalhidden}}{| class="prettytable"
+
<includeonly>{{clearvar|totalgamerscore|totalbronze|totalsilver|totalgold|totalplatinum|totalhidden|totalxp}}{| class="prettytable"
 
!width="100px;"|Icon
 
!width="100px;"|Icon
!Description
+
!Description{{#switch:{{uc:{{{format|}}}}}
{{#switch:{{uc:{{{format|}}}}}
 
 
|360
 
|360
 
|XBONE
 
|XBONE
|XSX=!Gamerscore{{#vardefine:totalrow|true}}
+
|XSX
 +
|WP7=!!Gamerscore{{#vardefine:totalrow|true}}
 
|PS3
 
|PS3
 
|PSP
 
|PSP
 
|PSV
 
|PSV
 
|PS4
 
|PS4
|PS5=!Trophy{{#vardefine:totalrow|true}}
+
|PS5=!!Trophy{{#vardefine:totalrow|true}}
|#default=
+
|ANDROID
 +
|Epic=!!Experience points{{#vardefine:totalrow|true}}
 +
|#default={{#vardefine:totalrow|false}}
 
}}
 
}}
 
{{{1|}}}
 
{{{1|}}}
 
|-
 
|-
{{#if:{{#var:totalrow}}|{{!}}colspan="2" style="text-align:right;"{{!}}'''Total:'''
+
{{#ifeq:{{#var:totalrow}}|true|{{!}}colspan="2" style="text-align:right;"{{!}}'''Total:'''
{{!}}{{#if:{{#var:totalgamerscore}}|<div style="width:1.5em; height:1.5em; background-color:#000000; color:#FFFFFF; display:inline-block; border-radius:1.5em; padding-left:0.35em; margin:0px; line-height:1.5em; font-size:0.8em;">G</div> {{#var:totalgamerscore}}}}{{#if:{{#var:totalbronze}}|[[File:PlayStation Trophy Bronze.png|16px]]×{{#var:totalbronze}}&nbsp;}}{{
+
{{!}}{{#if:{{#var:totalgamerscore}}|<div style="width:1.5em; height:1.5em; background-color:#000000; color:#FFFFFF; display:inline-block; border-radius:1.5em; padding-left:0.35em; margin:0px; line-height:1.5em; font-size:0.8em;">G</div> {{#var:totalgamerscore}}}}{{#if:{{#var:totalbronze}}|[[File:PlayStation Trophy Bronze.png|16px|Bronze]]×{{#var:totalbronze}}&nbsp;}}{{
#if:{{#var:totalsilver}}|[[File:PlayStation Trophy Silver.png|16px]]×{{#var:totalsilver}}&nbsp;}}{{
+
#if:{{#var:totalsilver}}|[[File:PlayStation Trophy Silver.png|16px|Silver]]×{{#var:totalsilver}}&nbsp;}}{{
#if:{{#var:totalgold}}|[[File:PlayStation Trophy Gold.png|16px]]×{{#var:totalgold}}&nbsp;}}{{
+
#if:{{#var:totalgold}}|[[File:PlayStation Trophy Gold.png|16px|Gold]]×{{#var:totalgold}}&nbsp;}}{{
#if:{{#var:totalplatinum}}|[[File:PlayStation Trophy Platinum.png|16px]]×{{#var:totalplatinum}}&nbsp;}}{{
+
#if:{{#var:totalplatinum}}|[[File:PlayStation Trophy Platinum.png|16px|Platinum]]×{{#var:totalplatinum}}&nbsp;}}{{
#if:{{#var:totalhidden}}|[[File:PlayStation Trophy Hidden.png|16px]]×{{#var:totalhidden}}&nbsp;}}|}}
+
#if:{{#var:totalhidden}}|[[File:PlayStation Trophy Hidden.png|16px|Hidden]]×{{#var:totalhidden}}&nbsp;}}|}}{{
|}[[Category:Achievements]]</includeonly><noinclude>
+
#if:{{#var:totalxp}}|{{#var:totalxp}} XP|}}
 +
|}{{#if:{{NAMESPACE}}||[[Category:Achievements]]{{#if:{{{format|}}}|[[Category:{{Code2Format|{{{format|}}}}} achievements]]|[[Category:Achievements without format]]}}}}{{#if:{{{1|}}}||[[Category:Missing achievements table]]}}</includeonly><noinclude>
  
 +
Template for listing trophies/achievements (the sort first introduced with the [[Xbox 360]]). To be used in conjunction with [[Template:AchievementRow]].
 +
 +
Supply a format and it will automatically decide whether to display the trophy, gamerscore or experience points heading. You can technically mix and match in the rows... but you probably shouldn't. Calculations are also automatic.
 +
 +
==Usage==
 +
<pre>{{AchievementTable|format=xxx|
 +
{{AchievementRow
 +
| icon=
 +
| title=
 +
| description=
 +
| trophy=
 +
| gamerscore=
 +
| xp=
 +
}}
 +
}}
 +
</pre>
 +
 +
 +
Use "<tt>| secret=yes</tt>" if an achievement is a secret achievement. This will hide the achievement's description by default.
 +
===Accepted formats===
 +
Any format can be specified, however the following are the generally accepted ones, with most of them providing the appropriate heading:
 +
*'''<tt>360</tt>''' - [[Xbox 360]] (uses gamerscore)
 +
*'''<tt>XBONE</tt>''' - [[Xbox One]] (uses gamerscore)
 +
*'''<tt>PS3</tt>''' - [[PlayStation 3]] (uses trophies)
 +
*'''<tt>PS4</tt>''' - [[PlayStation 4]] (uses trophies)
 +
*'''<tt>PS5</tt>''' - [[PlayStation 5]] (uses trophies)
 +
*'''<tt>PSV</tt>''' - [[PlayStation Vita]] (uses trophies)
 +
*'''<tt>STEAM</tt>''' - [[Steam]] (no additional heading)
 +
*'''<tt>Epic</tt>''' - [[Epic Games Store]] (uses experience points)
 +
*'''<tt>ANDROID</tt>''' - [[Android]] (uses experience points)
 +
*'''<tt>WP7</tt>''' - [[Windows Phone]] (uses gamerscore)
 +
 +
==Examples==
 +
<pre>{{AchievementTable|format=PS3|
 +
{{AchievementRow
 +
| icon=SegaRallyOnlineArcade PS3 Achievement 321Go.png
 +
| title=3, 2, 1, GO<nowiki>!!</nowiki>
 +
| desc=Complete your first Quick Race.
 +
| trophy=bronze
 +
}}
 +
}}
 +
</pre>
 +
{{AchievementTable|format=PS3|
 +
{{AchievementRow
 +
| icon=SegaRallyOnlineArcade PS3 Achievement 321Go.png
 +
| title=3, 2, 1, GO<nowiki>!!</nowiki>
 +
| desc=Complete your first Quick Race.
 +
| trophy=bronze
 +
}}
 +
}}
 +
 +
<pre>{{AchievementTable|format=360|
 +
{{AchievementRow
 +
| icon=SegaRallyOnlineArcade PS3 Achievement 321Go.png
 +
| title=3, 2, 1, GO<nowiki>!!</nowiki>
 +
| desc=Complete your first Quick Race.
 +
| gamerscore=100
 +
}}
 +
{{AchievementRow
 +
| icon=SegaRallyOnlineArcade PS3 Achievement 321Go.png
 +
| title=Seeecret
 +
| desc=You smell
 +
| gamerscore=50
 +
| secret=yes
 +
}}
 +
}}
 +
</pre>
 +
{{AchievementTable|format=360|
 +
{{AchievementRow
 +
| icon=SegaRallyOnlineArcade PS3 Achievement 321Go.png
 +
| title=3, 2, 1, GO<nowiki>!!</nowiki>
 +
| desc=Complete your first Quick Race.
 +
| gamerscore=100
 +
}}
 +
{{AchievementRow
 +
| icon=SegaRallyOnlineArcade PS3 Achievement 321Go.png
 +
| title=Seeecret
 +
| desc=You smell
 +
| gamerscore=50
 +
| secret=yes
 +
}}
 +
}}
 +
 +
 +
 +
==Tests==
 
{{AchievementTable|format=PS3|
 
{{AchievementTable|format=PS3|
 
{{AchievementRow
 
{{AchievementRow
Line 35: Line 124:
 
| description=Get C class license in Arcade mode.
 
| description=Get C class license in Arcade mode.
 
| gamerscore=5
 
| gamerscore=5
 +
}}
 +
{{AchievementRow
 +
| icon=SegaHeroes Android Achievement.png
 +
| title=Beginner Collector
 +
| description=Unlock 5 heroes with Hero Shards.
 +
| xp=500
 +
}}
 +
}}
 +
{{AchievementTable|format=STEAM|
 +
{{AchievementRow
 +
| icon=SegaHeroes Android Achievement.png
 +
| title=Beginner Collector
 +
| description=Unlock 5 heroes with Hero Shards.
 
}}
 
}}
 
}}
 
}}
  
 
[[Category:Table templates]]</noinclude>
 
[[Category:Table templates]]</noinclude>

Revision as of 13:26, 7 August 2024


Template for listing trophies/achievements (the sort first introduced with the Xbox 360). To be used in conjunction with Template:AchievementRow.

Supply a format and it will automatically decide whether to display the trophy, gamerscore or experience points heading. You can technically mix and match in the rows... but you probably shouldn't. Calculations are also automatic.

Usage

{{AchievementTable|format=xxx|
{{AchievementRow
| icon=
| title=
| description=
| trophy=
| gamerscore=
| xp=
}}
}}


Use "| secret=yes" if an achievement is a secret achievement. This will hide the achievement's description by default.

Accepted formats

Any format can be specified, however the following are the generally accepted ones, with most of them providing the appropriate heading:

Examples

{{AchievementTable|format=PS3|
{{AchievementRow
| icon=SegaRallyOnlineArcade PS3 Achievement 321Go.png
| title=3, 2, 1, GO!!
| desc=Complete your first Quick Race.
| trophy=bronze
}}
}}
Icon Description Trophy
SegaRallyOnlineArcade PS3 Achievement 321Go.png 3, 2, 1, GO!! Bronze
Complete your first Quick Race.


Total: Bronze×1 
{{AchievementTable|format=360|
{{AchievementRow
| icon=SegaRallyOnlineArcade PS3 Achievement 321Go.png
| title=3, 2, 1, GO!!
| desc=Complete your first Quick Race.
| gamerscore=100
}}
{{AchievementRow
| icon=SegaRallyOnlineArcade PS3 Achievement 321Go.png
| title=Seeecret
| desc=You smell
| gamerscore=50
| secret=yes
}}
}}
Icon Description Gamerscore
SegaRallyOnlineArcade PS3 Achievement 321Go.png 3, 2, 1, GO!!
G
100
Complete your first Quick Race.
SegaRallyOnlineArcade PS3 Achievement 321Go.png Seeecret (secret)
G
50
You smell


Total:
G
150


Tests

Icon Description Trophy
ChainChronicleVAchievement2.png 最強の仲間 Silver
1つのアルカナを4回限界突破させ、更にレベルMAXにした
CrazyTaxi Achievement ArcadeC-License.png Arcade C-license
G
5
Get C class license in Arcade mode.
SegaHeroes Android Achievement.png Beginner Collector 500 XP
Unlock 5 heroes with Hero Shards.


Total:
G
5Silver×1 500 XP
Icon Description
SegaHeroes Android Achievement.png Beginner Collector
Unlock 5 heroes with Hero Shards.