Difference between revisions of "RatingsTest"
From Sega Retro
Line 2: | Line 2: | ||
{{#vardefine:totalReviews|0}} | {{#vardefine:totalReviews|0}} | ||
{{#vardefine:cumulativeScore|0}} | {{#vardefine:cumulativeScore|0}} | ||
+ | {{#vardefine:totalReviewsFinal|{{#var_final:totalReviews}}}} | ||
+ | {{#vardefine:cumulativeScoreFinal|{{#var_final:cumulativeScore}}}} | ||
<!-- in case it can't cope with divide by zero --> | <!-- in case it can't cope with divide by zero --> | ||
− | {{#ifeq: {{# | + | {{#ifeq: {{#var: totalReviewsFinal}} | 0 | {{#vardefine: average|0}} | |
<!-- Calculate average --> | <!-- Calculate average --> | ||
{{#vardefine: average| | {{#vardefine: average| | ||
− | {{#expr: {{# | + | {{#expr: {{#var: cumulativeScoreFinal}} / {{#var: totalReviewsFinal}} round 0 |
}} | }} | ||
}} | }} | ||
Line 18: | Line 20: | ||
!|Sega Retro Average | !|Sega Retro Average | ||
|- | |- | ||
− | | style="padding-left:5px;" | Based on '''{{# | + | | style="padding-left:5px;" | Based on '''{{#var: totalReviewsFinal}}''' review{{#ifexpr: {{#var: totalReviewsFinal}} > 1|s| }} |
|- | |- | ||
| colspan="3" style="padding: 0px;"| | | colspan="3" style="padding: 0px;"| |
Revision as of 16:16, 1 July 2015
Usage
This template is to be used on articles about video games and will display scores awarded to said games by video game magazines/websites.
Usage:
{{Ratings | icon= | ace= | allgame= | asm= | arcade= | badinfluence= | ccc= | cdconsoles= | cgtc= | cgtm= | cgts= | computergamer= | consolesmax= | consolesnews= | consolesplus= | crash= | cuamiga= | cuser= | cvg= | cvgit= | dcm= | dcuk= | dcmonthly= | dlmo= | dmuk= | dragon= | dreamzone= | edge= | egm= | esg= | famitsu= | flux= | fungeneration= | gamefan= | gamenow= | gamesmachine= | gamesmachineuk= | gamesmaster= | gameplayers= | gamepower= | gamepro= | gamesx= | gamesworld= | generation= | gi= | gz= | happycomputer= | highscore= | hobbyconsolas= | ign= | insomnia= | joypad= | joystick= | madgamers= | maniac= | mdag= | mega= | megaaction= | megaforce= | megafun= | megamachines= | megaplay= | megapower= | megatech= | micromania= | milwaukee= | mm= | mms= | mrdc= | mt= | nextgeneration= | nextlevel= | odmfr= | odmuk= | odmus= | pcgamer= | pcjeux= | playerone= | playtime= | pp= | pu= | raze= | rod= | s= | saturnplus= | saturnpower= | techsaturn= | sega16= | segafan= | segamagjp= | segamaguk= | segapower= | segapro= | sfuk= | sfsw= | smf= | smz= | ssm= | stc= | superjuegos= | supersonic= | suser= | sv= | svenska= | techtv= | tilt= | topconsoles= | totalcontrol= | ts= | ufg= | ug= | ugameplayers= | viciojuegos= | videogamecritic= | videogamer= | videogames= | vgce= | xboxworld= | xgen= | yc= | ysinclair= | zero= | zzap64= }}
for sources, add "_source", e.g.
| smf_source=[http://www.google.com] | vgce_source={{num|32|page=10/11}}
All fields are optional.