Difference between revisions of "ConvertRating"
From Sega Retro
Line 3: | Line 3: | ||
|0-4s={{#vardefine:displayRating|{{StarRating|{{#var:value}}|4}}}}{{#vardefine:score|{{#expr:{{#var:value}}*25}}}} | |0-4s={{#vardefine:displayRating|{{StarRating|{{#var:value}}|4}}}}{{#vardefine:score|{{#expr:{{#var:value}}*25}}}} | ||
− | |1-4s={{# | + | |1-4s={{#vardefine:displayRating|{{StarRating|{{#var:value}}|4}}}}{{#vardefine:score|{{#expr:({{#var:value}}-1)*(100/3)}}}} |
− | | | ||
− | }} | ||
|0-5s={{#vardefine:displayRating|{{StarRating|{{#var:value}}|5}}}}{{#vardefine:score|{{#expr:{{#var:value}}*20}}}} | |0-5s={{#vardefine:displayRating|{{StarRating|{{#var:value}}|5}}}}{{#vardefine:score|{{#expr:{{#var:value}}*20}}}} | ||
− | |1-5s={{# | + | |1-5s={{#vardefine:displayRating|{{StarRating|{{#var:value}}|5}}}}{{#vardefine:score|{{#expr:({{#var:value}}-1)*25}}}} |
− | | | ||
− | }} | ||
|0-10s={{#vardefine:displayRating|{{StarRating|{{#var:value}}|10}}}}{{#vardefine:score|{{#expr:{{#var:value}}*10}}}} | |0-10s={{#vardefine:displayRating|{{StarRating|{{#var:value}}|10}}}}{{#vardefine:score|{{#expr:{{#var:value}}*10}}}} | ||
− | |1-10s={{# | + | |1-10s={{#vardefine:displayRating|{{StarRating|{{#var:value}}|10}}}}{{#vardefine:score|{{#expr:({{#var:value}}-1)*(100/9)}}}} |
− | | | ||
− | }} | ||
|0-4={{#vardefine:displayRating|{{#var:value}}/4}}{{#vardefine:score|{{#expr:{{#var:value}}*25}}}} | |0-4={{#vardefine:displayRating|{{#var:value}}/4}}{{#vardefine:score|{{#expr:{{#var:value}}*25}}}} | ||
− | |1-4={{# | + | |1-4={{#vardefine:displayRating|{{#var:value}}/4}}{{#vardefine:score|{{#expr:({{#var:value}}-1)*(100/3)}}}} |
− | |||
− | }} | ||
|0-5={{#vardefine:displayRating|{{#var:value}}/5}}{{#vardefine:score|{{#expr:{{#var:value}}*20}}}} | |0-5={{#vardefine:displayRating|{{#var:value}}/5}}{{#vardefine:score|{{#expr:{{#var:value}}*20}}}} | ||
− | |1-5={{# | + | |1-5={{#vardefine:displayRating|{{#var:value}}/5}}{{#vardefine:score|{{#expr:({{#var:value}}-1)*25}}}} |
− | |||
− | }} | ||
|0-10={{#vardefine:displayRating|{{#var:value}}/10}}{{#vardefine:score|{{#expr:{{#var:value}}*10}}}} | |0-10={{#vardefine:displayRating|{{#var:value}}/10}}{{#vardefine:score|{{#expr:{{#var:value}}*10}}}} | ||
− | |1-10={{# | + | |1-10={{#vardefine:displayRating|{{#var:value}}/10}}{{#vardefine:score|{{#expr:({{#var:value}}-1)*(100/9)}}}} |
− | |||
− | }} | ||
|0-20={{#vardefine:displayRating|{{#var:value}}/20}}{{#vardefine:score|{{#expr:{{#var:value}}*5}}}} | |0-20={{#vardefine:displayRating|{{#var:value}}/20}}{{#vardefine:score|{{#expr:{{#var:value}}*5}}}} | ||
− | |1-20={{# | + | |1-20={{#vardefine:displayRating|{{#var:value}}/20}}{{#vardefine:score|{{#expr:({{#var:value}}-1)*(100/19)}}}} |
− | |||
− | }} | ||
|0-100={{#vardefine:displayRating|{{#var:value}}%}}{{#vardefine:score|{{#var:value}}}} | |0-100={{#vardefine:displayRating|{{#var:value}}%}}{{#vardefine:score|{{#var:value}}}} | ||
Line 48: | Line 34: | ||
|A-F={{#switch:{{#var:value}} | |A-F={{#switch:{{#var:value}} | ||
+ | |a+ | ||
+ | |A+={{#vardefine:displayRating|A+}}{{#vardefine:score|100}} | ||
+ | |a | ||
+ | |A={{#vardefine:displayRating|A}}{{#vardefine:score|100}} | ||
+ | |a- | ||
+ | |A-={{#vardefine:displayRating|A-}}{{#vardefine:score|91}} | ||
+ | |b+ | ||
+ | |B+={{#vardefine:displayRating|B+}}{{#vardefine:score|83}} | ||
+ | |b | ||
+ | |B={{#vardefine:displayRating|B}}{{#vardefine:score|75}} | ||
+ | |b- | ||
+ | |B-={{#vardefine:displayRating|B-}}{{#vardefine:score|67}} | ||
+ | |c+ | ||
+ | |C+={{#vardefine:displayRating|C+}}{{#vardefine:score|58}} | ||
+ | |c | ||
+ | |C={{#vardefine:displayRating|C}}{{#vardefine:score|50}} | ||
+ | |c- | ||
+ | |C-={{#vardefine:displayRating|C-}}{{#vardefine:score|42}} | ||
+ | |d+ | ||
+ | |D+={{#vardefine:displayRating|D+}}{{#vardefine:score|33}} | ||
+ | |d | ||
+ | |D={{#vardefine:displayRating|D}}{{#vardefine:score|25}} | ||
+ | |d- | ||
+ | |D-={{#vardefine:displayRating|D-}}{{#vardefine:score|16}} | ||
+ | |f+ | ||
+ | |F+={{#vardefine:displayRating|F+}}{{#vardefine:score|8}} | ||
+ | |f | ||
+ | |F={{#vardefine:displayRating|F}}{{#vardefine:score|0}} | ||
+ | |f- | ||
+ | |F-={{#vardefine:displayRating|F-}}{{#vardefine:score|0}} | ||
|#default={{#vardefine:displayRating|Unknown value!}}{{#vardefine:score|}} | |#default={{#vardefine:displayRating|Unknown value!}}{{#vardefine:score|}} | ||
}} | }} | ||
Line 91: | Line 107: | ||
|4||{{#var:displayRating}}||{{#var:score}} | |4||{{#var:displayRating}}||{{#var:score}} | ||
|- | |- | ||
+ | |} | ||
+ | |||
+ | ===1-5s=== | ||
+ | {| class="prettytable" style="width:auto;" | ||
+ | !Input | ||
+ | !Display | ||
+ | !Score | ||
+ | |- | ||
+ | {{ConvertRating|1-5s|1}} | ||
+ | |1||{{#var:displayRating}}||{{#var:score}} | ||
+ | |- | ||
+ | {{ConvertRating|1-5s|2.5}} | ||
+ | |2.5||{{#var:displayRating}}||{{#var:score}} | ||
+ | |- | ||
+ | {{ConvertRating|1-5s|3}} | ||
+ | |3||{{#var:displayRating}}||{{#var:score}} | ||
+ | |- | ||
+ | {{ConvertRating|1-5s|4.5}} | ||
+ | |4.5||{{#var:displayRating}}||{{#var:score}} | ||
+ | |- | ||
+ | {{ConvertRating|1-5s|5}} | ||
+ | |5||{{#var:displayRating}}||{{#var:score}} | ||
+ | |} | ||
+ | |||
+ | ===1-10=== | ||
+ | {| class="prettytable" style="width:auto;" | ||
+ | !Input | ||
+ | !Display | ||
+ | !Score | ||
+ | |- | ||
+ | {{ConvertRating|1-10|1}} | ||
+ | |1||{{#var:displayRating}}||{{#var:score}} | ||
+ | |- | ||
+ | {{ConvertRating|1-10|2.5}} | ||
+ | |2.5||{{#var:displayRating}}||{{#var:score}} | ||
+ | |- | ||
+ | {{ConvertRating|1-10|4}} | ||
+ | |4||{{#var:displayRating}}||{{#var:score}} | ||
+ | |- | ||
+ | {{ConvertRating|1-10|7.5}} | ||
+ | |7.5||{{#var:displayRating}}||{{#var:score}} | ||
+ | |- | ||
+ | {{ConvertRating|1-10|10}} | ||
+ | |10||{{#var:displayRating}}||{{#var:score}} | ||
+ | |} | ||
+ | |||
+ | ===A-F=== | ||
+ | {| class="prettytable" style="width:auto;" | ||
+ | !Input | ||
+ | !Display | ||
+ | !Score | ||
+ | |- | ||
+ | {{ConvertRating|A-F|A}} | ||
+ | |A||{{#var:displayRating}}||{{#var:score}} | ||
+ | |- | ||
+ | {{ConvertRating|A-F|B}} | ||
+ | |B||{{#var:displayRating}}||{{#var:score}} | ||
+ | |- | ||
+ | {{ConvertRating|A-F|C}} | ||
+ | |C||{{#var:displayRating}}||{{#var:score}} | ||
+ | |- | ||
+ | {{ConvertRating|A-F|D}} | ||
+ | |D||{{#var:displayRating}}||{{#var:score}} | ||
+ | |- | ||
+ | {{ConvertRating|A-F|F}} | ||
+ | |F||{{#var:displayRating}}||{{#var:score}} | ||
|} | |} | ||
Revision as of 06:07, 20 April 2020
This task is unfinished This is a wiki task that requires more thought or peer review. An important issue that needs to be solved, which will appear at the top of Sega Retro:Todo until this message is removed. |
A template for converting a rating, as printed in a magazine into:
- something nice to display ({{#var:displayRating}})
- a value out of 100 for use in Sega Retro averages ({{#var:score}})
multiple instances of the above (e.g. support "1,2,3,4" for EGM)
added text. e.g. later issues of the UK Official Dreamcast magazine, 7 = "good".
it should be able to detect if a given value is invalid. Some magazines could be using multiple systems depending on context.
The user should not be expected to calculate anything.
Contents
Working values
0-4s
Input | Display | Score |
---|---|---|
0 | 0 | |
1 | 25 | |
2 | 50 | |
3 | 75 | |
4 | 100 |
1-5s
Input | Display | Score |
---|---|---|
1 | 0 | |
2.5 | 37.5 | |
3 | 50 | |
4.5 | 87.5 | |
5 | 100 |
1-10
Input | Display | Score |
---|---|---|
1 | 1/10 | 0 |
2.5 | 2.5/10 | 16.666666666667 |
4 | 4/10 | 33.333333333333 |
7.5 | 7.5/10 | 72.222222222222 |
10 | 10/10 | 100 |
A-F
Input | Display | Score |
---|---|---|
A | A | 100 |
B | B | 75 |
C | C | 50 |
D | D | 25 |
F | F | 0 |