chuni: getGameRanking API - [opened] #39

Open
opened 2021-02-14 11:43:31 +03:00 by icex2 · 6 comments
icex2 commented 2021-02-14 11:43:31 +03:00 (Migrated from github.com)

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_playlog is 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 point value, and the game also handles that without issues.
  • The type: 2 request doesn’t seem to be used. The game does not have textures for two separate lists, only “Popular Tracks”.
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_playlog` is 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 `point` value, and the game also handles that without issues. - The `type: 2` request doesn’t seem to be used. The game does not have textures for two separate lists, only “Popular Tracks”.
icex2 commented 2021-05-27 09:18:13 +03:00 (Migrated from github.com)

In GitLab by @Felix on May 27, 2021, 08:18

Commented on src/chunithm/static/charge.ts line 7

Unrelated change?

In GitLab by @Felix on May 27, 2021, 08:18 Commented on [src/chunithm/static/charge.ts line 7](https://github.com/djhackersdev/minime/compare/86c7ae272d2c6ca50474175677bf1f693e000ca7..6a41dc6e63f980acebd177200fdfb4f77e179e68#diff-5e0ffbd899705405126d66c625aa696dR7) Unrelated change?
icex2 commented 2021-05-27 20:29:18 +03:00 (Migrated from github.com)

In GitLab by @GRIM.657 on May 27, 2021, 19:29

Commented on src/chunithm/static/charge.ts line 7

Sorry, should I put the two cleanup commits in a separate MR?

In GitLab by @GRIM.657 on May 27, 2021, 19:29 Commented on [src/chunithm/static/charge.ts line 7](https://github.com/djhackersdev/minime/compare/86c7ae272d2c6ca50474175677bf1f693e000ca7..6a41dc6e63f980acebd177200fdfb4f77e179e68#diff-5e0ffbd899705405126d66c625aa696dR7) Sorry, should I put the two cleanup commits in a separate MR?
icex2 commented 2021-06-01 21:39:06 +03:00 (Migrated from github.com)

In GitLab by @GRIM.657 on Jun 1, 2021, 20:39

Commented on src/chunithm/static/charge.ts line 7

changed this line in version 2 of the diff

In GitLab by @GRIM.657 on Jun 1, 2021, 20:39 Commented on [src/chunithm/static/charge.ts line 7](https://github.com/djhackersdev/minime/compare/86c7ae272d2c6ca50474175677bf1f693e000ca7..6a41dc6e63f980acebd177200fdfb4f77e179e68#diff-5e0ffbd899705405126d66c625aa696dR7) changed this line in [version 2 of the diff](/djhackers/minime/-/merge_requests/31/diffs?diff_id=1671&start_sha=6a41dc6e63f980acebd177200fdfb4f77e179e68#acbbabb6796a77768041bdc126ace0f29bc9baa2_7_7)
icex2 commented 2021-06-01 21:39:06 +03:00 (Migrated from github.com)

In GitLab by @GRIM.657 on Jun 1, 2021, 20:39

added 1 commit

  • ad2b2d09 - chuni: implement getGameRankingApi

Compare with previous version

In GitLab by @GRIM.657 on Jun 1, 2021, 20:39 added 1 commit <ul><li>ad2b2d09 - chuni: implement getGameRankingApi</li></ul> [Compare with previous version](/djhackers/minime/-/merge_requests/31/diffs?diff_id=1671&start_sha=6a41dc6e63f980acebd177200fdfb4f77e179e68)
icex2 commented 2021-06-01 21:40:44 +03:00 (Migrated from github.com)

In GitLab by @GRIM.657 on Jun 1, 2021, 20:40

Commented on src/chunithm/static/charge.ts line 7

This MR has been updated to remove any unrelated housekeeping, I'll submit those fixes later.

In GitLab by @GRIM.657 on Jun 1, 2021, 20:40 Commented on [src/chunithm/static/charge.ts line 7](https://github.com/djhackersdev/minime/compare/86c7ae272d2c6ca50474175677bf1f693e000ca7..6a41dc6e63f980acebd177200fdfb4f77e179e68#diff-5e0ffbd899705405126d66c625aa696dR7) This MR has been updated to remove any unrelated housekeeping, I'll submit those fixes later.
icex2 commented 2021-06-01 21:40:44 +03:00 (Migrated from github.com)

In GitLab by @GRIM.657 on Jun 1, 2021, 20:40

resolved all threads

In GitLab by @GRIM.657 on Jun 1, 2021, 20:40 resolved all threads
Sign in to join this conversation.