Save file format
Revision as of 11:30, 8 May 2020 by old>Realpsojed (image)
This page explores the save file format used in Stoneshard.
Example: Purse with 2000 gold.
[ "o_inv_moneybag", { "restoration": [], "second_damage": [], "magic_resists": [], "max_charge": 1, "nature_resists": [], "combat": [], "stealth": [], "Duration": 0, "is_cursed": 0, "MaxDuration": 0, "i_index": 1, "Stack": 2000, "chance_and_resist": [], "info": [], "physical_resists": [], "id": "moneybag", "identified": 1, "Name": "Purse", "charge": 1, "magic": [], "lootList": [], "general_resists": [] }, 145, 261, 0, 1, 0, 0, 0, "o_inv_left_hand" ]
The values inside {} are named and pretty self-explanatory. The exceptions to that are as follows:
"i_index" - determines which item image to display. For items with durability: 0 - undamaged item, 1 - damaged item. For arrows: 0-5 - the more arrows in a stack, the more are shown on the item image. For purse: 0 - empty, 1 - with crowns
The last 7 values of an item in inventory are as follows:
X Position:::::: 145 Y Position:::::: 261 State::::::::::: 0 // 0 === Undamaged or Full // 1 Damaged or Empty Charges Left:::: 1 // -4 (from what I can tell indicates None) Sub-Menu?::::::: 1 // (Things that have a sub-inventory like Moneybags and backpacks) Equipped Now:::: 0 // 0 === No // 1 === left hand // 2 === right hand Equipped Swap::: 0 // 0 === No // 1 === Yes the X coordinate of an item that is equipped but is not currently in use (ie: the things you have on the swap menu) will ALWAYS be -10000000.