A.Stahl on 4/9/2019 at 09:56
Do we have any information regarding it?
And if not, do we have a tiny FM with just weapons? Simple room with a large number of weapons. I want to make a few experiments...
Yandros on 4/9/2019 at 14:57
Given the technical nature I have moved this to The Editor's Guild.
ZylonBane on 4/9/2019 at 15:11
I thought the save format was just a subset of the MIS format.
PinkDot on 7/9/2019 at 16:19
What is it, that you're trying to accomplish? Do you want to be able to modify the stack count of arrows on saved games etc.?
SAV and any other format like MIS, GAM or COW is made up of so called 'chunks', which are indicated in the file with a header struct:
Code:
char[12] - name/tag
int - version.hi
int - version.lo
20 bytes altogether. This is followed by the actual chunk's data, which is of a various length.
The number of items in a bundle would be stored using a 'StackCount' property, which starts with
P$StackCoun tag in the file.
Note, that each of the tags appears twice - first, inside the body of the file, in the above mentioned chunk header. Second time - at the end of the file, in a so called 'inventory'.
Each inventory item is 20 bytes as well:
Code:
char[12] - name/tag
int - starting offset of the chunk in the file
int - chunk size in bytes
So, going back to your
P$StackCoun chunk - it's very simple. The data is an array of the following struct:
Code:
int - objectID
int - size of the data (for StackCount it's always 4)
int - stack count value - this is the value you're looking for
Now, how do you know which objectID are your arrows etc.?
You can look for another chunk, called P$SymName. The data for this chunk is an array of:
Code:
int - objectID
int - length (varied)
char[length] - object name
Note, this will most likely hold only the explicitely given names by users. If the name is inherited from the Archetype, then it's a bit more complicated to get it...