From e9070d9a131eea73610c16ea90453982bb6ca51c Mon Sep 17 00:00:00 2001 From: Jennifer Taylor Date: Fri, 24 Oct 2025 01:51:54 +0000 Subject: [PATCH] Update traffic test for DanEvo to account for new understanding. --- bemani/backend/danevo/danevo.py | 2 ++ bemani/client/danevo/danevo.py | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/bemani/backend/danevo/danevo.py b/bemani/backend/danevo/danevo.py index cd18537..a451580 100644 --- a/bemani/backend/danevo/danevo.py +++ b/bemani/backend/danevo/danevo.py @@ -464,6 +464,8 @@ class DanceEvolution( continue # Attempt to find the play in our extracted attempts. + if stage >= len(history): + continue if history[stage]["id"] != played: continue if history[stage]["score"] != scored: diff --git a/bemani/client/danevo/danevo.py b/bemani/client/danevo/danevo.py index 92c983a..518f5fd 100644 --- a/bemani/client/danevo/danevo.py +++ b/bemani/client/danevo/danevo.py @@ -457,6 +457,7 @@ class DanceEvolutionClient(BaseClient): profiledata["DATA01"][25] = name.encode("shift-jis") profiledata["DATA02"][25] = b"" + attempts: bytes = b"" spots: Dict[int, Dict[int, bytes]] = {} highest_id: int = 0 @@ -492,6 +493,18 @@ class DanceEvolutionClient(BaseClient): else: raise Exception("Logic error, can't save more than three scores!") + # Game won't save unless we have an attempt in RDAT01 as well. + params = ( + ((sid & 0xFF) << 0) + | ((chart & 0xF) << 8) + | ((score["combo"] & 0x3FF) << 12) + | ((score["grade"] & 0x7) << 27) + | (0x40000000 if score["full_combo"] else 0x00000000) + ) + + chunk = struct.pack("