Find where the mod loadout lives and why it is lost between launches #11
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
#12 Persist the mod loadout and restore it on launch
mintopia/blur
Reference
mintopia/blur#11
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What to build
Find out where Blur stores the player's mod loadout and why our port loses it between launches. Post the findings as a comment on this ticket.
Answer:
Acceptance criteria
BLUR_ENGINE=recompFindings
Short answer: the mod loadout is not in the local save. It lives in the online profile file
MultiplayerProfile.save, a Demonware storage file (service 10). Our server stubs storage, so nothing is stored or returned. The profile resets at every login.1. Where it lives (online profile)
FUN_00bf5b60(0xbf5b60, profile download state machine) passes"MultiplayerProfile.save"(ptr at 0x1102240) toFUN_00d6e340with a buffer capped at 0x2000 bytes (8 KB).FUN_00d6e340(0xd6e340) callsFUN_00cf7770=bdStorage::listFilesByOwner(VA cf7770 indocs/online-server-spec.md§4.2), and only ifDAT_011b375c != 0(logged in) andFUN_00ce3660() == 2(connected). There is noCreateFilefallback. The upload twin is at 0xbf5e84.docs/online-server-spec.md§4.2 (from logs): list at login, fetch if present, otherwise upload a fresh ~3.9 KB file, re-upload after XP/rank changes..../bizarre creations/blur/save/blursave(magic37 E3 CD AB, zlib, 50903 bytes inflated) is the single-player save; the BLURSAVE string at 0xee5a8c is referenced from 0xc203a1. The exe's save-struct names (GameInfo/TierInfo/EventInfo/VehicleInfo/ModInfo/RankInfo/BossInfo) are SP-campaign data. It is written once and holds no MP loadout.SetAbilityLoadout,SetNameOfLoadOut,ChangeLocalPlayerLoadout,ApplyDownloadedProfile,ResetMultiplayerProfile,UserProfileDownloaded,ContinueProfileDownload. The loadout is applied from the downloaded profile.2. Why our port drops it (recomp)
server/lsg.goimplements only service 12/6 and 10/7. Every other task gets an empty success reply (loggedunhandled service S task T).listFilesByOwner(10/5) returns zero files, so the game treats the profile as new and uploads a fresh one.uploadFile(10/1) is acked but discarded, so the next login lists nothing again.BLUR_ONLINE_URL=offthe logged-in gate fails andFUN_00d6e340returns 0, so the profile is never loaded or saved.BLUR_ENGINE=recomp BLUR_FILETRACE=1headless run showed no profile-related file access (onlysettings.xmlprobed, absent).3. Recommended restore
Implement storage service 10 in
blur-online(tasks 1 upload, 4 getFileByID, 5 list): one file per (owner, name), overwrite on re-upload, stable file IDs, ~64 KB cap. This is exactly spec §4.2 and fits ADR 0010 ("storage of profiles" is listed as not implemented).Split the follow-up: yes, two tickets.
BLUR_DWLOG=1.BLUR_ONLINE_URL=off. Only if offline play is wanted.Caveat
Not verified live: I could not reach the multiplayer loadout screen unattended (headless run stops at the splash movie), so "the loadout is inside MultiplayerProfile.save" is an inference. It rests on the download path above (the only profile persistence in the binary), the 8 KB cap vs ~3.9 KB profile, and the loadout API names. Confirm in ticket 1 by logging the uploaded blob after changing a loadout.
Completed and merged by Harmonic (task 12).