-
Notifications
You must be signed in to change notification settings - Fork 4
chuni: getGameRanking API - [opened] #39
Description
In GitLab by @GRIM.657 on Feb 14, 2021, 09:43
Merges master -> master
Here’s a cute little feature for Chunithm. getGameRankingApi is used to send a list of the 10 most popular songs to the game to show in the attract loop.
Currently this API is stubbed and returns an empty array, causing the game to fall back on a hardcoded list in A###/GameRanking/Ranking0000/Ranking.xml.
This MR is a simple getGameRankingApi implementation which uses the cm_user_playlog table to determine the 10 most popular songs and send them along to the game when requested (which it seems is only once, at boot).
Additionally, the src/chunithm/static/charge.ts file has been filled in and commented, without making any changes to which tickets are enabled or their cost. (This should probably still be made configurable at some point but I haven’t really given it much thought yet).
There are no conflicts here with either !29 or !30 .
This was tested with 1.35 and 1.40. Here are some notes:
- If
cm_user_playlogis empty (or contains only World’s End songs) an empty array will be sent and the fallback file is used by the game, same as the current stub behavior. - If there are less than 10 unique non-World’s End songs played on the minime instance, minime will send an array of less than 10 items and the attract loop will show less than 10 songs, the game handles it without issues.
- If two popular songs have the same playcount, they are sent to the game with the same
pointvalue, and the game also handles that without issues. - The
type: 2request doesn’t seem to be used. The game does not have textures for two separate lists, only “Popular Tracks”.