beatsaber-http-status
beatsaber-http-status copied to clipboard
[Feature Request] Get player's current HP
Like explained in the title, provide HP as part of the performance
object
Any news on this? I am planning to create a light animation, similar to the Hue animation, but in such a way that people outside can better understand in what state the player is at the moment. For this the current player HP is super important since it is the main indicator of how good the player is doing.
Not really. I tried implementing this once with Harmony, but due to what I believed to be code inlining my hooks just wouldn't work, so the state could not be reliably updated on time. I could check if I still have that branch, but at this point I think it's going to be several versions behind.
Admittedly I haven't put much energy into this project recently, mainly because I don't have easy access to the game. If you want to try your hand at getting that data you can check the notes I left on #5.
TL;DR version is that there were a lot of weird edge cases and potential race conditions (even though in theory delegates should call listeners in order, it's not guaranteed) that needed to be considered for the sake of keeping the data consistent and since my hooks weren't working I couldn't achieve that.
This could be solved with MonoMod patching, but unfortunately the Beat Saber community has settled on using runtime patching with Harmony and I didn't want this mod to be difficult to install.
Is there a possibility of merging #5 or adding that feature? @opl-
I'm working on beat saber overlay generator - repo
Currently, I want to create HP bar element but I miss energy data 😕
I, too, have made a pull request for this feature before, but gave up because I could not solve the problem of inconsistent energy values. https://github.com/opl-/beatsaber-http-status/pull/57
Please refer to the event information obtained from http-status as it is possible to estimate the current energy value on the overlay side. The following code is working fine. https://github.com/rynan4818/beat-saber-overlay/blob/ddfc3c20f7123e8dd2e434d7fb77c2d25d2b52c7/js/ui.js#L13-L107
However, since chain notes will be added in BeatSaber 1.20, the decrease in energy value when a mistake is made in chain notes will be different from normal and will need to be modified. Also, to do so, http-status, which is compatible with 1.20, needs to send information that ChainNotes can determine.
thank u a lot for sharing a link to working code 🤩
I'm aware of upcoming 1.20 version but since http-status seems to be maintained I dont have to care that much - I'll be adding support for other data mod providers. I'll also add a version checker per element to not break anything :P