Save Files: Difference between revisions

Jump to navigation Jump to search
→‎.sav Folder Format: Data type clarifications, various formatting fixes
m (Spelling/punctuation. (Yay pedantry))
(→‎.sav Folder Format: Data type clarifications, various formatting fixes)
Line 29: Line 29:


===Options===
===Options===
<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"
<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). 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"
* 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. 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"
* 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==
Line 99: Line 99:
|}
|}


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.


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.
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: int32</code> 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: in32</code> and modifier value <code>PorchSword_ValueSp: int32</code>.  Similar Flag and Value exist for the Bows and Shields. <code>FlagSp</code> modifiers can take any or all of the following values.
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"
{| class="wikitable"
|+
|+
Line 140: Line 140:
|0x80000000
|0x80000000
|}
|}
Associated data with Cooked Items are held in <code>CookEffect0: vector2f</code>, <code>CookEffect1: vector2f,</code> and <code>StaminaRecover: vector2f</code> arrays.  Values within these arrays are
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"
{| class="wikitable"
|+
|+
autopatrol, editnews
201

edits

Navigation menu