Difference between revisions of "ConvertRating/Multiple"
From Sega Retro
(8 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly><span style="display:none;"><!--"it'll be easier to work with without Mediawiki's loop syntax--> | <includeonly><span style="display:none;"><!--"it'll be easier to work with without Mediawiki's loop syntax--> | ||
− | {{# | + | {{#switch:{{{1|}}} |
+ | |ag={{ConvertRating/AcaoGames|{{{2|}}}|br|{{{date|0}}}}} | ||
+ | |actiongames={{ConvertRating/AcaoGames|{{{2|}}}|ar|{{{date|0}}}}} | ||
+ | |gamepro={{ConvertRating/GamePro|{{{2|}}}|issue={{{date|}}}}} | ||
+ | |megaforce={{ConvertRating/MegaForce|{{{2|}}}|fr}} | ||
+ | |megaforcees={{ConvertRating/MegaForce|{{{2|}}}|es}} | ||
+ | |megaforcept={{ConvertRating/MegaForce|{{{2|}}}|pt}} | ||
+ | |#default= | ||
{{#vardefine:cumulativeDisplay|}}{{#vardefine:cumulativeScore|0}}{{#vardefine:numberOfScores|0}} | {{#vardefine:cumulativeDisplay|}}{{#vardefine:cumulativeScore|0}}{{#vardefine:numberOfScores|0}} | ||
Line 24: | Line 31: | ||
{{#if:{{#var:system3}}|{{#if:{{#var:rating3}}| | {{#if:{{#var:system3}}|{{#if:{{#var:rating3}}| | ||
{{ConvertRating/Single|{{#var:system3}}|{{#var:rating3}}}} | {{ConvertRating/Single|{{#var:system3}}|{{#var:rating3}}}} | ||
− | {{#vardefine:cumulativeDisplay|{{#var:cumulativeDisplay}}{{#if:{{#pos:{{#var:system2}|s}}|<br />| }}{{#var:displayRating}}}} | + | {{#vardefine:cumulativeDisplay|{{#var:cumulativeDisplay}}{{#if:{{#pos:{{#var:system2}}|s}}|<br />| }}{{#var:displayRating}}}} |
{{#vardefine:cumulativeScore|{{#expr:{{#var:cumulativeScore}} + {{#var:score}}}}}} | {{#vardefine:cumulativeScore|{{#expr:{{#var:cumulativeScore}} + {{#var:score}}}}}} | ||
{{#vardefine:numberOfScores|{{#expr:{{#var:numberOfScores}} + 1}}}} | {{#vardefine:numberOfScores|{{#expr:{{#var:numberOfScores}} + 1}}}} | ||
Line 49: | Line 56: | ||
{{ConvertRating/Single|{{#var:system6}}|{{#var:rating6}}}} | {{ConvertRating/Single|{{#var:system6}}|{{#var:rating6}}}} | ||
{{#vardefine:cumulativeDisplay|{{#var:cumulativeDisplay}}{{#if:{{#pos:{{#var:system5}}|s}}|<br />| }}{{#var:displayRating}}}} | {{#vardefine:cumulativeDisplay|{{#var:cumulativeDisplay}}{{#if:{{#pos:{{#var:system5}}|s}}|<br />| }}{{#var:displayRating}}}} | ||
+ | {{#vardefine:cumulativeScore|{{#expr:{{#var:cumulativeScore}} + {{#var:score}}}}}} | ||
+ | {{#vardefine:numberOfScores|{{#expr:{{#var:numberOfScores}} + 1}}}} | ||
+ | |}}|}} | ||
+ | |||
+ | {{#vardefine:system7|{{#explode:{{{1|}}}|,|6}}}}{{#vardefine:rating7|{{#explode:{{{2|}}}|,|6}}}} | ||
+ | {{#if:{{#var:system7}}|{{#if:{{#var:rating7}}| | ||
+ | {{ConvertRating/Single|{{#var:system7}}|{{#var:rating7}}}} | ||
+ | {{#vardefine:cumulativeDisplay|{{#var:cumulativeDisplay}}{{#if:{{#pos:{{#var:system6}}|s}}|<br />| }}{{#var:displayRating}}}} | ||
+ | {{#vardefine:cumulativeScore|{{#expr:{{#var:cumulativeScore}} + {{#var:score}}}}}} | ||
+ | {{#vardefine:numberOfScores|{{#expr:{{#var:numberOfScores}} + 1}}}} | ||
+ | |}}|}} | ||
+ | |||
+ | {{#vardefine:system8|{{#explode:{{{1|}}}|,|7}}}}{{#vardefine:rating8|{{#explode:{{{2|}}}|,|7}}}} | ||
+ | {{#if:{{#var:system8}}|{{#if:{{#var:rating8}}| | ||
+ | {{ConvertRating/Single|{{#var:system8}}|{{#var:rating8}}}} | ||
+ | {{#vardefine:cumulativeDisplay|{{#var:cumulativeDisplay}}{{#if:{{#pos:{{#var:system7}}|s}}|<br />| }}{{#var:displayRating}}}} | ||
+ | {{#vardefine:cumulativeScore|{{#expr:{{#var:cumulativeScore}} + {{#var:score}}}}}} | ||
+ | {{#vardefine:numberOfScores|{{#expr:{{#var:numberOfScores}} + 1}}}} | ||
+ | |}}|}} | ||
+ | |||
+ | {{#vardefine:system9|{{#explode:{{{1|}}}|,|8}}}}{{#vardefine:rating9|{{#explode:{{{2|}}}|,|8}}}} | ||
+ | {{#if:{{#var:system9}}|{{#if:{{#var:rating9}}| | ||
+ | {{ConvertRating/Single|{{#var:system9}}|{{#var:rating9}}}} | ||
+ | {{#vardefine:cumulativeDisplay|{{#var:cumulativeDisplay}}{{#if:{{#pos:{{#var:system8}}|s}}|<br />| }}{{#var:displayRating}}}} | ||
{{#vardefine:cumulativeScore|{{#expr:{{#var:cumulativeScore}} + {{#var:score}}}}}} | {{#vardefine:cumulativeScore|{{#expr:{{#var:cumulativeScore}} + {{#var:score}}}}}} | ||
{{#vardefine:numberOfScores|{{#expr:{{#var:numberOfScores}} + 1}}}} | {{#vardefine:numberOfScores|{{#expr:{{#var:numberOfScores}} + 1}}}} | ||
Line 88: | Line 119: | ||
|1-5s,1-5s,1-5s,1-5s,1-5s | |1-5s,1-5s,1-5s,1-5s,1-5s | ||
|1,2,3,4,5 | |1,2,3,4,5 | ||
+ | |{{#var:displayRating}} | ||
+ | |{{#var:score}} | ||
+ | |({{#var:cumulativeScore}}, {{#var:numberOfScores}}) | ||
+ | |- | ||
+ | {{ConvertRating/Multiple|gamepro|1,2,3,4}} | ||
+ | |gamepro | ||
+ | |1,2,3,4 | ||
+ | |{{#var:displayRating}} | ||
+ | |{{#var:score}} | ||
+ | |({{#var:cumulativeScore}}, {{#var:numberOfScores}}) | ||
+ | |- | ||
+ | {{ConvertRating/Multiple|megaforce|1,2,3,4}} | ||
+ | |megaforce | ||
+ | |1,2,3,4 | ||
+ | |{{#var:displayRating}} | ||
+ | |{{#var:score}} | ||
+ | |({{#var:cumulativeScore}}, {{#var:numberOfScores}}) | ||
+ | |- | ||
+ | {{ConvertRating/Multiple|ag|1,2,3|1}} | ||
+ | |ag | ||
+ | |1,2,3 | ||
+ | |{{#var:displayRating}} | ||
+ | |{{#var:score}} | ||
+ | |({{#var:cumulativeScore}}, {{#var:numberOfScores}}) | ||
+ | |- | ||
+ | {{ConvertRating/Multiple|actiongames|1,2,3,4|1}} | ||
+ | |ag | ||
+ | |1,2,3,4 | ||
+ | |{{#var:displayRating}} | ||
+ | |{{#var:score}} | ||
+ | |({{#var:cumulativeScore}}, {{#var:numberOfScores}}) | ||
+ | |- | ||
+ | {{ConvertRating/Multiple|0-5s,0-5s,0-5s,0-5s,0-5s,0-5s,0-5s,0-5s,0-5s|0,0.5,1,1.5,2,2.5,3,3.5,4}} | ||
+ | |0-5s,0-5s,0-5s,0-5s,0-5s,0-5s,0-5s,0-5s,0-5s | ||
+ | |0,0.5,1,1.5,2,2.5,3,3.5,4 | ||
|{{#var:displayRating}} | |{{#var:displayRating}} | ||
|{{#var:score}} | |{{#var:score}} | ||
Line 93: | Line 159: | ||
|- | |- | ||
|} | |} | ||
− | [[Category: | + | [[Category:Templates]]</noinclude> |
Latest revision as of 16:45, 29 August 2022
For when there are multiple ratings expected - convert each one and calculate an average.