RatingsTest

From Sega Retro

Seems like trying to use expr with var_final causes an error. Any thoughts? - Hivebrain (talk) 16:22, 1 July 2015 (CDT)

From the two minutes I've taken to look into this, I think var_final is created at the very last minute, i.e. after all the standard wiki parsing has been done.
So it's not really a variable at all I guess. I can't... vary. -Black Squirrel (talk) 11:52, 2 July 2015 (CDT)


I'm thinking the best plan might be to introduce loops: https://www.mediawiki.org/wiki/Extension:Loops
{{#vardefine: totalReviews|0}}
{{#vardefine: cumulativeScore|0}}


{{#vardefine: finished|false}}
{{#vardefine: oneLoop|false}}

<!-- while not done  -->
{{#while:| {{#ifeq: {{#var: finished}}|false}} |

    {{#ifeq: {{#var: oneLoop}}|true|
        <!-- if looped once -->
        {{#vardefine: average|{{#expr: {{#var: cumulativeScore}} / ({{#var: totalReviews}} * 100) }} }}
        {{#vardefine: finished|true}} <!-- exit after this loop -->
    | }}   

    <!-- add up scores (this gets done twice) -->
    ...
    {{#vardefine: totalReviews|{{#var: totalReviews}} + 1}}
    {{#vardefine: cumulativeScore|{{#var: cumulativeScore}} + score}}
    ...
    
    {{#vardefine:oneLoop|true}}
}}

no idea if the syntax works but yeah.

-Black Squirrel (talk) 13:29, 2 July 2015 (CDT)

Loops looks like a useful extension, but I don't see how it would help here. The problem is, I wanted to combine the score averaging stuff with the collapsible content, but since the average is shown first I needed to use var_final. This didn't work, so it looks like the only option is to put the averaging back where it was originally. - Hivebrain (talk) 13:53, 2 July 2015 (CDT)
The idea is that on the first loop, the cumulativeScore and totalReviews variables are added to, and on the second, the averaging occurs. Above what would be the collapsible content.
it's the only way I can think of getting data that's at the "bottom" to the "top". -Black Squirrel (talk) 14:19, 2 July 2015 (CDT)
I'm not entirely sure what you mean, but I think the way I've set it up now is clean enough, and it works. There's a lot of unused "magname_1" and "magname_2" things that need removing. And how do we feel about more recent reviews of old games, like from websites or Retro Gamer and such. I'm not sure they should count towards the average. - Hivebrain (talk) 17:31, 2 July 2015 (CDT)
For older games, I'd say if it's in print and has a reasonably wide circulation, it should qualify. So that would cover Retro Gamer. It's debatable about whether you'd want to include big sites like IGN or GameSpot should they feel the need to review some old Mega Drive games for whatever reason - I'd say the cut-off point size wise should be anything accepted by Metacritic. Or maybe paid journalists only. I don't really know but I can't see it turning up too often - maybe handle it case by case.
If we get overloaded with "new" reviews, maybe do a "TEN YEARS LATER" table, or something. Some way of separating opinions from when the games were new, and how the games are "today".
For newer games (e.g. Sonic Generations) it could just end up being a copy of Metacritic. Valid stuff, but perhaps not a priority because people could just go there for a better summary of what's going on.
If it's a case where the publication is reviewing a downloadable version, e.g. from the Wii's Virtual Console, it should be in its own Virtual Console ratings table. Because that gives us an interesting look as to how opinions have changed over time. -Black Squirrel (talk) 11:38, 3 July 2015 (CDT)

New layout

Sega Retro Average 
Publication Score Source
20 something
40 something
60 something
80 something
90 something
50 test
Sega Mega Drive
57
Based on
6 reviews

I've changed this a bit so that the Row and Sum templates are combined (making the whole thing easier to modify), and the review count is visible when collapsed. Comments/suggestions? - Hivebrain (talk) 22:30, 22 September 2015 (CDT)