Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add beatmap characteristic #84

Closed
peddermaster2 opened this issue Dec 15, 2021 · 4 comments
Closed

Add beatmap characteristic #84

peddermaster2 opened this issue Dec 15, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@peddermaster2
Copy link

Feature request

It would be helpful to get selected beatmap characteristic where we have the difficulty.

Motivation

This is helpful for displaying if it is not "Standard", e.g. "Lawless".

I also use it to log the result of the played beatmap to a local database for analysis. And for levels with multiple characteristics it is currently impossible to know which one was selected.

@opl- opl- added the enhancement New feature or request label Dec 15, 2021
@peddermaster2
Copy link
Author

I have made a try in https://github.com/peddermaster2/beatsaber-http-status/tree/add-characteristic .
Should I create a PR?

@peddermaster2
Copy link
Author

peddermaster2 commented Dec 15, 2021

@opl- I have also noticed while coding this, that the map characteristic are encoded in the "mode" field. The documentation lists the possible values but all combinations with Lightshow and Lawless (or any other modded characteristic) are missing.

@opl-
Copy link
Owner

opl- commented Dec 18, 2021

Indeed, this is already part of game.mode. As a comment in the code states, // This was an awful idea. It exists for historical purposes, as back in Beat Saber 0.11.1 that's the string the game had in the setup data (link to line in 1.0.0).

Lightshow and Lawless can both already appear in there, as can 90/360. The documentation just hasn't been updated to include them.

I think the best solution here is to add beatmap.characteristic as per your suggestion (linking to BSMG wiki in protocol.md for current list of characteristics), and update the documentation to explain that game.mode starts with the current mode followed by the characteristic, and that if the characteristic is wanted beatmap.characteristic should be used instead.

This keeps backwards compatibility, allows people to easily find out what the mode is by checking the beginning of the string (or getting a substring using length of beatmap.characteristic if exact value is really needed), and of course makes the characteristic trivial to retrieve. I don't think anyone has much of a use for the mode (solo/party/multiplayer) anyway, other than knowing if it's multiplayer or not.

If no one has any objections I'll implement these changes over the weekend.

@opl- opl- closed this as completed in 544eca3 Jan 4, 2022
@opl-
Copy link
Owner

opl- commented Jan 4, 2022

So, that was a very long weekend... Won't get published until #82 either gets fixed or tires me out.

opl- added a commit that referenced this issue Jan 5, 2022
Adds:
- `beatmap.characteristic` (#84)

Fixes:
- Entire texture atlas sent as cover for vanilla beatmaps (#82)

Changes:
- Updated protocol documentation to mention new beatmap characteristics
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants