Save Files: Difference between revisions

3,330 bytes added ,  10 months ago
Add weather save file information
(Created page with "<onlyinclude> BotW can store up to 9 save states per profile, 6 for normal mode (1 manual save and 5 autosaves) and 2 for master mode (1 manual save and 1 autosave). </onlyinc...")
 
(Add weather save file information)
 
(4 intermediate revisions by 2 users not shown)
Line 29: Line 29:


===Options===
===Options===
<code>option.sav</code> contains the settings set in the options menu (inverted camera, stick sensitivity etc.).
<code>option.sav</code> contains the settings set in the options menu (inverted camera, stick sensitivity etc.). The exact data stored here corresponds to the game flags defined in <code>Pack/Bootup.pack//GameData/savedataformat.ssarc///saveformat_*.bgsvdata</code>, where the <code>file_list</code> array's zero-index dictionary contains the <code>file_name</code> "option.sav"


===Album===
===Album===
Line 40: Line 40:
Each save state contains 3 files:
Each save state contains 3 files:
* caption.jpg A screenshot taken at the time of saving.
* caption.jpg A screenshot taken at the time of saving.
* caption.sav Contains a small amount of data for each save that is displayed in the save select screen (e.g. time and location).
* caption.sav Contains a small amount of data for each save that is displayed in the save select screen (e.g. time and location). The exact data stored here corresponds to the game flags defined in <code>Pack/Bootup.pack//GameData/savedataformat.ssarc///saveformat_*.bgsvdata</code>, where the <code>file_list</code> array's zero-index dictionary contains the <code>file_name</code> "caption.sav"
* game_data.sav The data for each save state.
* game_data.sav The data for each save state. The exact data stored here corresponds to the game flags defined in <code>Pack/Bootup.pack//GameData/savedataformat.ssarc///saveformat_*.bgsvdata</code>, where the <code>file_list</code> array's zero-index dictionary contains the <code>file_name</code> "game_data.sav"


==.sav Folder Format==
==.sav Folder Format==
All data in these files is stored as little endian on Switch and as big endian ion Wii U.
All data in these files is stored as little endian on Switch and as big endian on Wii U.


A save file (with the exception of files in the tracker folder) starts with the following header:
A save file (with the exception of files in the tracker folder) starts with the following header:
Line 94: Line 94:
!Offset !! Size !! Description
!Offset !! Size !! Description
|-
|-
| 0x00 || 4 || '''id''': ID of the data being stored
| 0x00 || 4 || '''id''': ID of the data being stored, crc32 of the internal key
|-
|-
|0x04 || 4 || '''value'''
|0x04 || 4 || '''value'''
|}
|}


In <code>Pack/Bootup.pack/GameData/savedataformat.ssarc/saveformat_*.bgsvdata</code> the game stores a mapping for each ID to the corresponding entry name. This name is then further defined in one of the files in <code>Pack/Bootup.pack/GameData/gamedata.ssarc/*</code>, depending on its data type.
In <code>Pack/Bootup.pack//GameData/savedataformat.ssarc///saveformat_*.bgsvdata</code>, the game stores a mapping for each ID to the corresponding entry name. This name is then further defined in one of the files in <code>Pack/Bootup.pack//GameData/gamedata.ssarc//*</code>, depending on its data type.


Strings are stored with the maximum possible number of characters (e.q. 256 characters for strings defined in string256_data_0.bgdata) and are broken up into 4-byte parts. These are then stored in sequential chunks with the ID repeating for each chunk.
Strings are stored with the maximum possible number of characters (e.q. 256 characters for strings defined in string256_data_0.bgdata) and are broken up into 4-byte parts. These are then stored in sequential chunks with the ID repeating for each chunk.
Line 105: Line 105:
For arrays the data is also stored in sequential chunks, each with an identical ID. The horse names for example will take up 96 chunk with the ID 0x7B74E117 in the save file, 6 names with 16 chunks (= 64 characters) for each name.
For arrays the data is also stored in sequential chunks, each with an identical ID. The horse names for example will take up 96 chunk with the ID 0x7B74E117 in the save file, 6 names with 16 chunks (= 64 characters) for each name.


<references />
Data types for <code>value</code> include bool, int32, float32, string, string64, string256, vector2f, vector3f, vector4, bool_array, int32_array,  float32_array, string64_array, string256_array, vector2f_array, and vector3f_array. Value types are read as, and therefore must correspond to, the type defined in the <code>Pack/Bootup.pack//GameData/gamedata.ssarc/*</code> in the key of the main byml dictionary where the <code>id</code> is found. (Note that, in the vanilla game, this also corresponds to the name of the file, itself, but this relationship is not strict and therefore may not be the case for files added by mods.)
 
Inventory items are stored in <code>PorchItem</code> with a maximum of 420 internal string identifiers, e.g. <code>Weapon_Sword_023</code>. Associated arrays of <code>PorchEquip</code>: boolean and <code>PorchItem_Value1</code>: int32 store if the item is equipped and its current durability * 100 or item count.  Swords, Bows and Shields also store their modifier key in <code>PorchSword_FlagSp</code>: uint32 and modifier value <code>PorchSword_ValueSp</code>: int32.  Similar Flag and Value exist for the Bows and Shields. <code>FlagSp</code> modifiers can take any or all of the following values.
{| class="wikitable"
|+
!Modifier
!Value
|-
|AttackUp
|0x1
|-
|DurabilityUp
|0x2
|-
|CriticalHit
|0x4
|-
|LongThrow
|0x8
|-
|MultiShot
|0x10
|-
|Zoom
|0x20
|-
|QuickShot
|0x40
|-
|SurfMaster
|0x80
|-
|Enchanced Modifer
|0x80000000
|}
Associated data with Cooked Items are held in <code>CookEffect0</code>: vector2f, <code>CookEffect1</code>: vector2f, and <code>StaminaRecover</code>: vector2f arrays.  Values within these arrays are
{| class="wikitable"
|+
!Save Key
!Index
!Description
|-
|CookEffect0
|0
|EffectType
|-
|CookEffect0
|1
|EffectLevel
|-
|CookEffect1
|0
|Cooked Item SellingPrice
|-
|CookEffect1
|1
|Never set
|-
|StaminaRecover
|0
|HitPointRecover
|-
|StaminaRecover
|1
|EffectLevel
|}
Weather data with [[WorldMgr#Weather types|type data]] are found in <code>climateWeather</code> : int32_array, <code>climateWeather2</code>:  int32_array and <code>climateWeather3</code> : int32_array. These values contain the weather for the next three in-game days. Arrays are 20 values in length map directly to climate values of each [[Map area]]. Each int32 value contains 6 packed [[WorldMgr#Weather types|WorldMgr]] weather types that each are 4 bits long (nibble, 0x0-0xF).  These weather types identify are for each 4 hour long period during the day.<references />
[[Category:File_formats]]
[[Category:File_formats]]
4

edits