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

[2.1.0] LiveData.Combo is doubled #26

Open
ChrisJAllan opened this issue Oct 13, 2022 · 6 comments · May be fixed by #27
Open

[2.1.0] LiveData.Combo is doubled #26

ChrisJAllan opened this issue Oct 13, 2022 · 6 comments · May be fixed by #27

Comments

@ChrisJAllan
Copy link

ChrisJAllan commented Oct 13, 2022

Game version 1.24.1

Example data (ingame combo is 50):

{
  "Score": 37083,
  "ScoreWithMultipliers": 37083,
  "MaxScore": 38755,
  "MaxScoreWithMultipliers": 38755,
  "Rank": "SS",
  "FullCombo": true,
  "NotesSpawned": 50,
  "Combo": 100,
  "Misses": 0,
  "Accuracy": 95.58081030845642,
  "BlockHitScore": {
    "PreSwing": 70,
    "PostSwing": 30,
    "CenterSwing": 15
  },
  "PlayerHealth": 99.99995422363281,
  "ColorType": 1,
  "TimeElapsed": 18,
  "EventTrigger": 4,
  "UnixTimestamp": 1665697934181
}

Note that Combo is 100 while NotesSpawned is 50

@ReadieFur
Copy link
Owner

Interesting, in your game was your combo 100 or 50?
If the NotesSpawned is wrong, it was a rushed feature, but the combo could also be off. Just aasking if you know which is the incorrect value so it know where to look when I next work on it.
Thanks

@ChrisJAllan
Copy link
Author

ChrisJAllan commented Oct 13, 2022

Combo is doubled, NotesSpawned is correct. Noticed this because I use the Combo value for sound alerts and they were firing very early.

Edit: Screenshot
mpv-shot0035

@ChrisJAllan
Copy link
Author

ChrisJAllan commented Oct 14, 2022

Just tried a minimal environment and this problem didn't happen, so another mod is at fault. Time to find out which!

@ChrisJAllan
Copy link
Author

I'm stupid and forgot that I already put in a workaround, the issue is still present with minimal mods.

live_ws.addEventListener("message", function(event) {
		let data = JSON.parse(event.data);
		let combo = data.Combo / 2;
		
		while (last_combo < combo) {
			++last_combo;
			if (SOUNDS[last_combo] !== undefined) {
				q('#sound').src = SOUNDS[last_combo];
				q('#sound').play();
			}
		}
		last_combo = combo ?? 0;
	});

@ChrisJAllan
Copy link
Author

Found it:

LiveData.Instance.Combo++;

@ReadieFur
Copy link
Owner

Found it:

LiveData.Instance.Combo++;

Thank you for doing that for me, I’ll possibly update it later today, that makes sense that this issue exists now as the harmony patch prior to the recent release wasn’t working, and now that it is, it makes sense the score is off. I change it and run some tests later. Thanks.

@ChrisJAllan ChrisJAllan linked a pull request Oct 16, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants