Difference between revisions of "ConvertRating/Single"
From Sega Retro
m (Text replacement - "Category:Sega Retro templates" to "Category:Templates") |
|||
(4 intermediate revisions by the same user not shown) | |||
Line 7: | Line 7: | ||
|1-5s={{#vardefine:displayRating|{{StarRating|{{#var:value}}|5}}}}{{#vardefine:score|{{#expr:({{#var:value}}-1)*25}}}} | |1-5s={{#vardefine:displayRating|{{StarRating|{{#var:value}}|5}}}}{{#vardefine:score|{{#expr:({{#var:value}}-1)*25}}}} | ||
+ | |||
+ | |0-6s={{#vardefine:displayRating|{{StarRating|{{#var:value}}|6}}}}{{#vardefine:score|{{#expr:{{#var:value}}*(100/6)}}}} | ||
|1-6s={{#vardefine:displayRating|{{StarRating|{{#var:value}}|6}}}}{{#vardefine:score|{{#expr:({{#var:value}}-1)*20}}}} | |1-6s={{#vardefine:displayRating|{{StarRating|{{#var:value}}|6}}}}{{#vardefine:score|{{#expr:({{#var:value}}-1)*20}}}} | ||
Line 25: | Line 27: | ||
|1-6={{#vardefine:displayRating|{{#var:value}}/6}}{{#vardefine:score|{{#expr:({{#var:value}}-1)*20}}}} | |1-6={{#vardefine:displayRating|{{#var:value}}/6}}{{#vardefine:score|{{#expr:({{#var:value}}-1)*20}}}} | ||
+ | |||
+ | |-1-6={{#vardefine:displayRating|{{#var:value}}}}{{#vardefine:score|{{#expr:100-(({{#var:value}}-1)*20)}}}} | ||
|0-7={{#vardefine:displayRating|{{#var:value}}/7}}{{#vardefine:score|{{#expr:{{#var:value}}*(100/7)}}}} | |0-7={{#vardefine:displayRating|{{#var:value}}/7}}{{#vardefine:score|{{#expr:{{#var:value}}*(100/7)}}}} | ||
Line 102: | Line 106: | ||
|0-10+={{#switch:{{#var:value}} | |0-10+={{#switch:{{#var:value}} | ||
|0={{#vardefine:displayRating|0}}{{#vardefine:score|0}} | |0={{#vardefine:displayRating|0}}{{#vardefine:score|0}} | ||
− | |0+={{#vardefine:displayRating|0}}{{#vardefine:score|{{#expr:10/3}}}} | + | |0+={{#vardefine:displayRating|0+}}{{#vardefine:score|{{#expr:10/3}}}} |
− | |1-={{#vardefine:displayRating| | + | |1-={{#vardefine:displayRating|1-}}{{#vardefine:score|{{#expr:2*(10/3)}}}} |
− | |1={{#vardefine:displayRating| | + | |1={{#vardefine:displayRating|1}}{{#vardefine:score|10}} |
− | |1+={{#vardefine:displayRating| | + | |1+={{#vardefine:displayRating|1+}}{{#vardefine:score|{{#expr:10+(10/3)}}}} |
− | |2-={{#vardefine:displayRating| | + | |2-={{#vardefine:displayRating|2-}}{{#vardefine:score|{{#expr:10+(2*(10/3))}}}} |
− | |2={{#vardefine:displayRating| | + | |2={{#vardefine:displayRating|2}}{{#vardefine:score|20}} |
− | |2+={{#vardefine:displayRating| | + | |2+={{#vardefine:displayRating|2+}}{{#vardefine:score|{{#expr:20+(10/3)}}}} |
− | |3-={{#vardefine:displayRating| | + | |3-={{#vardefine:displayRating|3-}}{{#vardefine:score|{{#expr:20+(2*(10/3))}}}} |
− | |3={{#vardefine:displayRating| | + | |3={{#vardefine:displayRating|3}}{{#vardefine:score|30}} |
− | |3+={{#vardefine:displayRating| | + | |3+={{#vardefine:displayRating|3+}}{{#vardefine:score|{{#expr:30+(10/3)}}}} |
− | |4-={{#vardefine:displayRating| | + | |4-={{#vardefine:displayRating|4-}}{{#vardefine:score|{{#expr:30+(2*(10/3))}}}} |
− | |4={{#vardefine:displayRating| | + | |4={{#vardefine:displayRating|4}}{{#vardefine:score|40}} |
− | |4+={{#vardefine:displayRating| | + | |4+={{#vardefine:displayRating|4+}}{{#vardefine:score|{{#expr:40+(10/3)}}}} |
− | |5-={{#vardefine:displayRating| | + | |5-={{#vardefine:displayRating|5-}}{{#vardefine:score|{{#expr:40+(2*(10/3))}}}} |
− | |5={{#vardefine:displayRating| | + | |5={{#vardefine:displayRating|5}}{{#vardefine:score|50}} |
− | |5+={{#vardefine:displayRating| | + | |5+={{#vardefine:displayRating|5+}}{{#vardefine:score|{{#expr:50+(10/3)}}}} |
− | |6-={{#vardefine:displayRating| | + | |6-={{#vardefine:displayRating|6-}}{{#vardefine:score|{{#expr:50+(2*(10/3))}}}} |
− | |6={{#vardefine:displayRating| | + | |6={{#vardefine:displayRating|6}}{{#vardefine:score|60}} |
− | |6+={{#vardefine:displayRating| | + | |6+={{#vardefine:displayRating|6+}}{{#vardefine:score|{{#expr:60+(10/3)}}}} |
− | |7-={{#vardefine:displayRating| | + | |7-={{#vardefine:displayRating|7-}}{{#vardefine:score|{{#expr:60+(2*(10/3))}}}} |
− | |7={{#vardefine:displayRating| | + | |7={{#vardefine:displayRating|7}}{{#vardefine:score|70}} |
− | |7+={{#vardefine:displayRating| | + | |7+={{#vardefine:displayRating|7+}}{{#vardefine:score|{{#expr:70+(10/3)}}}} |
− | |8-={{#vardefine:displayRating| | + | |8-={{#vardefine:displayRating|8-}}{{#vardefine:score|{{#expr:70+(2*(10/3))}}}} |
− | |8={{#vardefine:displayRating| | + | |8={{#vardefine:displayRating|8}}{{#vardefine:score|80}} |
− | |8+={{#vardefine:displayRating| | + | |8+={{#vardefine:displayRating|8+}}{{#vardefine:score|{{#expr:80+(10/3)}}}} |
− | |9-={{#vardefine:displayRating| | + | |9-={{#vardefine:displayRating|9-}}{{#vardefine:score|{{#expr:80+(2*(10/3))}}}} |
− | |9={{#vardefine:displayRating| | + | |9={{#vardefine:displayRating|9}}{{#vardefine:score|90}} |
− | |9+={{#vardefine:displayRating| | + | |9+={{#vardefine:displayRating|9+}}{{#vardefine:score|{{#expr:90+(10/3)}}}} |
− | |10-={{#vardefine:displayRating| | + | |10-={{#vardefine:displayRating|10-}}{{#vardefine:score|{{#expr:90+(2*(10/3))}}}} |
− | |10={{#vardefine:displayRating| | + | |10={{#vardefine:displayRating|10}}{{#vardefine:score|100}} |
|#default={{#vardefine:displayRating|Unknown value!}}{{#vardefine:score|}} | |#default={{#vardefine:displayRating|Unknown value!}}{{#vardefine:score|}} | ||
}} | }} | ||
Line 157: | Line 161: | ||
|#default={{#vardefine:displayRating|Unknown system! ("{{#var:system}}")}}{{#vardefine:score|}} | |#default={{#vardefine:displayRating|Unknown system! ("{{#var:system}}")}}{{#vardefine:score|}} | ||
}}</includeonly><noinclude>Rating conversion code for when there's only one value - stops Mediawiki from complaining about recursion. | }}</includeonly><noinclude>Rating conversion code for when there's only one value - stops Mediawiki from complaining about recursion. | ||
− | [[Category: | + | [[Category:Templates]]</noinclude> |
Latest revision as of 13:13, 1 January 2022
Rating conversion code for when there's only one value - stops Mediawiki from complaining about recursion.