-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Add PlugY save data format info
- Loading branch information
Showing
4 changed files
with
57 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ node_modules/ | |
html/ | ||
xml/ | ||
latex/ | ||
package-lock.json |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
## PlugY Shared Stash (.sss) File Format | ||
|
||
Byte Offset | Size (bytes) | Description | ||
------------|:------------:|------------- | ||
0x00 | 4 | File header. Must be "SSS\0" (0x00535353 when read as a 32 bit unsigned integer). | ||
0x04 | 2 | File version. Will be "01" (0x3130) when file version is 1, or "02" (0x3230) when file version is 2. | ||
|
||
#### File version 1 | ||
|
||
When the file version is "01", there will be no shared gold data in the file. | ||
|
||
Byte Offset | Size (bytes) | Description | ||
------------|:------------:|------------- | ||
0x06 | 4 | Number of pages in the stash data as a 32 bit unsigned integer | ||
0x0A | ... | Beginning of [Stash data](#stash-data-format) | ||
|
||
#### File version 2 | ||
|
||
When the file version is "02", there will be shared gold data in the file. | ||
|
||
Byte Offset | Size (bytes) | Description | ||
------------|:------------:|------------- | ||
0x06 | 4 | Shared gold as a 32 bit unsigned integer | ||
0x0A | 4 | Number of pages in the stash data as a 32 bit unsigned integer | ||
0x0E | ... | Beginning of [Stash data](#stash-data-format) | ||
|
||
## PlugY Personal Stash (.d2x) File Format | ||
|
||
Byte Offset | Size (bytes) | Description | ||
------------|:------------:|------------- | ||
0x00 | 4 | File header. Must be "CSTM" (0x4D545343 when read as a 32 bit unsigned integer). | ||
0x04 | 2 | File version. Will be "01" (0x3130) when file version is 1. No other versions are in use currently. | ||
0x06 | 4 | Unused bytes | ||
0x0A | 4 | Number of pages in the stash data as a 32 bit unsigned integer | ||
0x0E | ... | Beginning of [Stash data](#stash-data-format) | ||
|
||
## Stash Data Format | ||
|
||
For each stash page: | ||
|
||
Byte Offset | Size (bytes) | Description | ||
------------|:------------:|------------- | ||
0x00 | 2 | Stash header. Must be "ST" (0x5453 when read as a 16 bit unsigned integer). | ||
0x02 | 0 or 4 | Flags data (added in PlugY 11.02, doesn't exist in save data from earlier versions). The actual flags can be seen [here](https://github.com/ChaosMarc/PlugY/blob/0116cb44b459ba02832cf8f07092ce4f48aeecdf/PlugY/playerCustomData.h#L19-L27). <br/><br/> It's possible to determine if the flags data exists by checking if the 2 bytes following the next null character == the D2 item header ("JM"); see [the PlugY source code for an example](https://github.com/ChaosMarc/PlugY/blob/0116cb44b459ba02832cf8f07092ce4f48aeecdf/PlugY/InfinityStash.cpp#L258-L264). | ||
0x02 or 0x06 | At least 1 | Stash page name as a null-terminated string. Can be a maximum of 15 characters + the null terminator (16 total bytes). | ||
Varies | ... | Beginning of [D2 Inventory data](formats/d2.md#inventory-data-format) | ||
|
||
## Sources / Further Reading | ||
|
||
* [PlugY save files structures (The Phrozen Keep)](https://d2mods.info/forum/viewtopic.php?f=133&t=31359) | ||
* [loadStash (PlugY 11.02 Source Code)](https://github.com/ChaosMarc/PlugY/blob/0116cb44b459ba02832cf8f07092ce4f48aeecdf/PlugY/InfinityStash.cpp#L243-L282) |