Save Files: Difference between revisions

Add weather save file information
Tderop (talk | contribs)
 
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. 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.)
Data types for value include:


<ul>
<li>bool</li>
<li>s32 (int32)</li>
<li>f32 (float32)</li>
<li>string32 (string)</li>
<li>string64</li>
<li>string256</li>
<li>vector2f</li>
<li>vector3f</li>
<li>vector4f</li>
</ul>
and respective arrays:
<ul>
<li>bool_array</li>
<li>s32_array</li>
<li>f32_array</li>
<li>string64_array</li>
<li>string256_array</li>
<li>vector2f_array</li>
<li>vector3f_array</li>
</ul>
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 id is found. In the vanilla game, this often corresponds to the name of the file, itself, but this relationship is not strict. It therefore also may not be the case for files added by mods.
Types defined in <code>Pack/Bootup.pack//GameData/gamedata.ssarc/*</code> that do not follow this rule are:
<ul>
<li>In <code>revival_bool_data_*.bgdata</code> the key is bool_data</li>
<li>In <code>revival_s32_data_0.bgdata</code> the key is s32_data</li>
<li>In <code>string32_data_0.bgdata</code> the key is string_data</li>
</ul>
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.
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"