Inventories: data for slots 6-7, JSON in save files
Weapon sets and combat-art slots 6-7 live in a shadow inventory per
inventory; the slot methods run the original code on it for slots >= 5,
so item references, icon resources and selection events stay the
game's own. Save games (cInventoryManager::Serialize) and hero files
(saveHero / loadHero) store inventories as JSON ("SRIJ" + length);
vanilla blocks are still read, which migrates old saves. Multiplayer
transfers keep the binary format. nlohmann/json fetched via git.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
37634c77ba
commit
998e315d98
7 files changed
+754
-4
No files matched your search
+7
-3
@@ -3,8 +3,10 @@
|
||||
Goal (user request 2026-10-14): 7 weapon sets and 7 combat-art slots instead
|
||||
of 5 each; skills on 1-7, weapon sets on F1-F7. Inventories are saved as JSON
|
||||
in place of the binary block; vanilla saves are migrated on load. Saves do not
|
||||
need to stay loadable by the original game. Status: mapping, nothing changed
|
||||
yet.
|
||||
need to stay loadable by the original game. Status: inventory data for
|
||||
slots 6-7 (`src/mods/skillslots.cpp`) and the JSON save
|
||||
(`src/mods/inventory_save.cpp`) done and tested (vanilla save migrated,
|
||||
JSON save reloads unchanged); taskbar, unlock levels and equip test open.
|
||||
|
||||
## Where the slots live
|
||||
|
||||
@@ -59,7 +61,9 @@ Returns the number of bytes processed. Callers:
|
||||
`0x604a7d`) and `ItemDataMgr::loadHero` (`0x605900`: `0x605cee`);
|
||||
- multiplayer: `0x5db670` and `0x5df1f0` serialize into a `cFile_ram` and
|
||||
send it as a network event; must keep the binary format;
|
||||
- `0x5def60` (both directions, callers not checked yet).
|
||||
- save games (GAME*.PAK, "AMS"): `cInventoryManager::Serialize` (`0x5def60`,
|
||||
thiscall (stream, write, x)), all 32 inventories behind 0xdeadc0de markers;
|
||||
called from `0x61ae26` / `0x61c0a8`.
|
||||
|
||||
### Hero file chunks (`saveHero` / `loadHero`)
|
||||
|
||||
|
||||
Reference in new issue
Block a user