Persist the mod loadout and restore it on launch #12
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Depends on
Reference
mintopia/blur#12
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
The player picks a mod loadout, quits, relaunches, and the same loadout is selected. Use the approach recommended in #11.
Acceptance criteria
BLUR_ENGINE=recompBlocked by
Implemented #11 recommendation: blur-online storage service 10 tasks 1 (uploadFile), 4 (getFileByID), 5 (listFilesByOwner). One file per (owner,name), overwrite on re-upload, stable IDs, 64 KB cap, persisted to
-storage(default storage.json; /data/storage.json in image). Missing/invalid file -> 1000 not found / empty list, so game falls back to default profile; no crash path. Unit test covers upload/overwrite/list/get/reload-from-disk. NOT verified in-game on recomp: no unattended access to the MP loadout screen, and bdFileInfo/upload result layouts follow spec §4.12 (inferred). First live run: use BLUR_DWLOG=1, change a loadout, relaunch; fix layouts if the game re-uploads every login. No game-derived files committed.Reworked as requested: the loadout is now stored locally (no multiplayer account needed). It works in LAN.
Reverted the server storage commits (
981101f,17b647a).Implementation (
aaaed38,561ae63; ADR 0014):Host.store(key[, string]). It persists strings in<save dir>/store/<key>, added to ADR 0008.patches/Screens/MpGUIBank.post.luawrapsMultiplayer.SetAbilityLoadoutandSetCurrentLoadOutType. After each change it saves the whole set.inLobbyfalse) and lobby (true, used by LAN and online lobbies). Each set is 4 loadouts x 3 mod slots plus the selected loadout. The sets are stored asloadouts_profileandloadouts_lobby.MpLobbyandMpModShoppost patches restore before the screen reads them. The lobby then sends the restored loadout to peers (NetRace.ChangeLocalPlayerLoadout).Verified on recomp with the same save dir across launches:
cur=2 sets=7,13,20;7,13,20;6,14,20;7,13,19, andGetCurrentLoadouttype=2.loadout_patchtest (fake Multiplayer API).Not done / not verified
SetNameOfLoadOutreads the keyboard result natively.lua(5.4+), not 5.1. The patch uses only 5.1 constructs.Completed and merged by Harmonic (task 11).