Repository navigation
fix: match Game Settings pilots by the options file's identity - #3
Merged
Merged
Conversation
The client names a pilot's options file player<id>_options.ini after its character id modulo 1,000,000,000 (OptionClass::Load, 0x7F84F0), while the session ticket and shortcut.ini hold the full 64-bit id. Game Settings compared the full id with the file's, so every pilot whose id is 1,000,000,000 or more (all Net-7 pilots seen) showed offline. That also disabled Save's refusal to write an online pilot's options, and the pilot archive and shortcut.ini names never matched their files. Reduce the observed id, the archive's id and shortcut.ini's section ids the same way before matching. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Game Settings lists every pilot as offline, even with several pilots in game. As a result:
shortcut.iniknow by name.Cause
The client uses two forms of a character's id, and Game Settings compared one with the other:
player<id>_options.inifile nameCharacter_ID % 1000000000OptionClass::Load(0x7F84F0)ShortcutIdentityCharacter_IDTicketClassat SClient+0x12D8,Character_IDat ticket+0x10= SClient+0x12E8shortcut.inisections ([<id>_PDA_EQUIP],[<id>_Skills], …)Character_IDOptionClass::Loadis called from the game task withticket->Character_ID, and starts as follows (from a reconstruction of the client's source from the binary):GamePilotSettingsCatalog.ResolveOnlineIdentitiesadded the fullShortcutIdentity, or in its fallback the byte-swapped local player object id, which is the same value.Loadmatched the file ids against the pilot archive's andshortcut.ini's names, which were also keyed by the full id. So any pilot whose id is 1,000,000,000 or more never matches its own file.Observed on a real install
player*_options.inifiles, andshortcut.iniwith 18 pilots whose ids range from 1,784,938,560 to 4,031,841,088.Fix
GamePilotSettingsCatalog.ToOptionsFileIdentity(id) = (uint)(id % 1_000_000_000), applied to the online ids (both branches), the pilot archive's ids andshortcut.ini's section ids, which are now parsed asulong. Everything that consumes these (the online flags, Save's guard, the names) compares against the file's id, so nothing else changes.Testing
dotnet build Net7ClientManager.slnx: 0 errors, no new analyzer warnings.shortcut.iniknows (old or deleted characters) still read "Unknown pilot · <id>", as before.🤖 Generated with Claude Code