Changes

Jump to navigation Jump to search

Splatoon 2/Save

1,519 bytes added, 22:42, 26 October 2018
Add encoding info
Splatoon 2 saves its data in '''<code>save.dat</code>'''.
Since release, there has been 5 revisions to this file:== Tools ==
* Ver 0'''[https: Original shipped version, saves in plain text//leanny.* Ver 1: Introduced encryptiongithub. Added in day 1 patch, <code>1.1.1<io/code>SplatHeX.* Ver 2html SplatHeX]''': Added Stats Data (SaveDataStats)a full fledged save editor for Windows.* Ver 3'''[https: Added Octo Expansion Data (SaveDataMsnOcta)* Ver 4//github.com/3096/effective-spoon/releases/tag/rewrite Splatsave]''': Introduced save body shuffle. Content is the same as Ver 3. Added on an open source program that decrypts and re-encrypts <code>4.0save.0dat</code>.
== Save data offsets Revisions == Since release, there has been '''5''' revisions to this file: {| class="wikitable" border="1"|-! Ver! Added On! Description|-| 0| 1.0.0| Original shipped version, saves in plain text.|-| 1| 1.1.0| Introduced encryption. Added in day 1 patch.|-| 2| Not sure| Added Stats Data (SaveDataStats)|-| 3| 3.0.0| Added Octo Expansion Data (SaveDataMsnOcta)|-| 4| 4.0.0| Introduced save body shuffle. Content is the same as Ver 3|} == Encoding == The encoding process takes place in <code>Cmn::SaveDataFactory::encode</code>. The decoding process takes place in <code>Cmn::SaveDataFactory::decode</code>. The encryption used on the save body is '''AES-128 CBC'''. The key is generated using a <code>sead::Random</code> object initialized from a 16 byte seed stored in the save footer, in which also stores the initialization vector and the CMAC for authentication. The CMAC key is generated from the same <code>sead::Random</code> object after the encryption key. The shuffling for save body takes place after it is encrypted. The game constructs a new <code>sead::Random</code> object initialized with the CRC32 from the save header. It then uses this to generate block sizes larger than 1/16 of body size and smaller than 1/8 of body size (or total remaining size, in case the remaining size is smaller than 1/8 of body size). When the remaining size is smaller than 1/16 of body size, it is added as the size of the last block. The game then uses <code>sead::PtrArrayImpl::shuffle</code> with the same <code>sead::Random</code> object to complete the shuffle. == save.dat file structure ==
'''Save Header:'''
{| class="wikitable" border="1"
| 4
| (Save Version)
| 0, 1, 2 , 3 or 34, etc
|-
| 0x4
----
'''Save Footer:'''<br />
Used for save crypto (as of ver 34)
{| class="wikitable" border="1"
|-
33
edits

Navigation menu