craftycodie / Sunrise-Halo3-WebServices

A NestJS, Domain-Driven Design reimplementation of Halo 3's web services.
3 stars 2 forks source link

Properly handle webstats. #4

Open craftycodie opened 1 year ago

craftycodie commented 1 year ago

We should decode the entire webstats file for campaign and multiplayer and chuck this data in the DB.

craftycodie commented 1 year ago

see blf tool issue https://github.com/craftycodie/Sunrise-BlfTool/issues/7

craftycodie commented 1 year ago

Currently all that's parsed from webstats, crudely, is service-record data.

FWRB commented 5 months ago

After researching the EXP and stats mechanisms further I believe Sunrise could potentially also be used to correct the issues with EXP not being awarded for matches exceeding 5 minutes. If you ever do make your way back around to H3 stuff let me know as I've found good notes on the process itself and how it could potentially be addressed (tl;dr - if Sunrise could, in some fashion, help maintain the UDP time_extend messages used by the XBL Arbitration service for session tracking match results would no longer be "dumped" due the session timing out after 300 seconds/5 minutes). I've included the XBL patent below which describes and illustrates the communication I think is also in-play for the 360 and Halo 3 based on reference found by scraping Bungie blog posts and issues they too had over time with EXP awards not being honored.

Arbitration XBL patent with images: https://patents.google.com/patent/US7584154B1/en

craftycodie commented 5 months ago

@FWRB This is an interesting idea, I reckon you're onto something, this might be something we could handle with the Sunrise Plugin.

Unfortunately I'm no longer working on the plugin, at least as long as Xbox 360 LIVE is still being supported / running. In short, were my involvement in this project to return, it'd be working with the Xenia 360 emulator, or with a hypothetical Insignia equivalent for x360.

So it's up to anyone else who might stumble upon this thread & be willing to implement I suppose.

FWRB commented 5 months ago

No worries - that was precisely my hope in notating it here in case anyone else feels up to the challenge. Here are some additional notes should they be of use to whoever that ends up being:

Validating this on my own XDK as we speak, but I suspect the following is returned in the event sessions expire:

// Errors returned by Arbitration Service = 0x8015B1XX --snip--

define XONLINE_E_ARBITRATION_SESSION_NOT_FOUND _HRESULTTYPEDEF(0x8015B103L) // The session is not found or has expired

Max Hoberman's note/imagery outlining Halo 2's use of XBL Stats arbitration:

https://twitter.com/MaxHoberman/status/1249711333299433478/photo/1

Bungie blog post citing the same issues including the arbitration service specifically being a factor in EXP not being rewarded properly when session disconnect in an unexpected fashion:

"Q: I should have the Spartan Officer Achievement but it did not unlock for me. What gives?

A: The Spartan Officer Achievement used to require a GLOBAL ranking of Lieutenant (not to be confused with the new “Lightswitch” achievement which is earned by obtaining a rating of Lieutenant in a single playlist). We are aware of some problems with people disconnecting/powering down too soon after they finished the game that earns them the achievement. The problem is that the actual results of the game and awarding of the EXP happens on the back-end and is arbitrated by the LIVE service. If you disconnect before that completes, you won’t actually get credit."

https://web.archive.org/web/20081004143722/http://www.bungie.net:80/News/Blog.aspx?mode=news

Hopefully it can be addressed successfully at some point, but until then, see you on the other side of 360's LIVE

FWRB commented 5 months ago

An added note for whoever takes this on: the Xenia team has successfully implemented XBL Session Arbitration handling as of release 2.1.0: https://github.com/AdrianCassar/xenia-canary/releases/tag/v2.1.0

"General Improvements

Cleanup of XGI->XSession Support for saving/loading session context XLiveAPI Initialization XSessionArbitration is now working XUID Online/Offline Generation If XUID is set to an empty string generate a new XUID Netplay toolbar tab Add support for routers with permanent leases (UPnP)"