Save Files: Difference between revisions

Tderop (talk | contribs)
No edit summary
Ginger (talk | contribs)
Clarification of horse name sizes and math
Line 105: Line 105:
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.


For arrays the data is also stored in sequential chunks, each with an identical ID. The horse names (<code>Horse_UserName</code>), for example, will take up 96 chunks - with the ID <code>0x7b74e117</code> in the save file. 6 names with 16 chunks = 64 bytes for each name.
For arrays the data is also stored in sequential chunks, each with an identical ID. The horse names (<code>Horse_UserName</code>), for example, will take up 96 chunks (6 names, 16 chunks each) with the ID <code>0x7b74e117</code> in the save file. (Since the horse names are string32, that's 32 utf-8 bytes - normally 32 characters - times 2 because each 4 byte part has a corresponding 4 byte ID for 64 bytes per name, times 6 names in the array for a total of 384 bytes)


Data types for value include:
Data types for value include: