Difference between revisions of "Save File Format"
m (→LINF) |
(→FLGS) |
||
(50 intermediate revisions by the same user not shown) | |||
Line 9: | Line 9: | ||
[[Shield Cat]] save files are saved using the following structure: | [[Shield Cat]] save files are saved using the following structure: | ||
− | OTTSAV00 | + | /saves/OTTSAV00/ |
− | where <code>00</code> is the number of the save file. The game | + | where <code>00</code> is the number of the save file. The game will support up to 100 save files, but more can be added later if it is necessary. |
− | + | <code>OTTSAVFF</code> is used for the Autosave file. Save slot <code>0</code> is not used. | |
− | In Gamemaker, it is loaded and saved as a Buffer with type <code> | + | Save information is stored in separate blocks, with each block being stored in it's own file. Details on each file are present below, as well as their expected file sizes. |
+ | |||
+ | In Gamemaker, it is loaded and saved as a Buffer with type <code>buffer_fixed</code>. It is 1 byte aligned. | ||
== Header == | == Header == | ||
− | <code>OTTSAV</code> files start with the following header: | + | <code>OTTSAV</code> files start with the following header string: |
SC_OTTSAV_V00 | SC_OTTSAV_V00 | ||
where <code>00</code> is the version of the save format. <b>During the prototype phase,</b> all save files will use format 00. The format may also change a lot. | where <code>00</code> is the version of the save format. <b>During the prototype phase,</b> all save files will use format 00. The format may also change a lot. | ||
− | == | + | <b>Please Note</b> this is not a string that is to be read with <code>buffer_string</code> or <code>buffer_text</code>. It is instead read as <code>unsigned bytes</code>, and then the bytes are compared to see if the header is correct or not. The value <code>00</code> is actually ASCII, and will be <code>$3030</code>. |
− | The <code>LINF</code> block | + | |
+ | == Block Type and Info == | ||
+ | This is where the data for this particular save file will go. Details about what is stored in each file is available on each file's page. | ||
+ | |||
+ | Each file is saved separately in the save sub directory, which will look something like this: | ||
+ | * LINF.BIN | ||
+ | * FLGS.BIN | ||
+ | * TRSR.BIN | ||
+ | * (etc) | ||
+ | |||
+ | The contents of the <code>LINF.BIN</code> file would be as follows: | ||
+ | SC_OTTSAV_V00LINF(data here)OEND | ||
+ | |||
+ | Please see the details about each block on its associated page: | ||
+ | * [[Save_File_Format/DATE.BIN]] | ||
+ | * [[Save_File_Format/LINF.BIN]] | ||
+ | * [[Save_File_Format/FLGS.BIN]] | ||
+ | * [[Save_File_Format/TRSR.BIN]] | ||
+ | * [[Save_File_Format/ACHV.BIN]] | ||
+ | * [[Save_File_Format/AREA.BIN]] | ||
+ | * [[Save_File_Format/MAPS.BIN]] | ||
+ | |||
+ | == Footer == | ||
+ | <code>OTTSAV</code> files end with the following footer: | ||
+ | OEND | ||
+ | This is used to prevent the file from being truncated, which can cause issues. | ||
− | < | + | == TRSR == |
+ | These are the different treasure locations in the game, and whether you got the treasure at that location or not. This block is <code>128</code> bytes in length, allowing for <code>1024</code> treasures. | ||
+ | <i><b>Please Note</b> that not every treasure slot is used. This allows me to add more treasures later and keep them in the same group.</i> | ||
+ | {{Stub}} | ||
+ | |||
+ | == ACHV == | ||
+ | These are flags for the different Achievements you can get in the game. It is <code>16</code> bytes in length, allowing for <code>128</code> achievements. (However, it is unlikely that this many achievements will be in the game.) | ||
+ | {{Stub}} | ||
+ | |||
+ | == AREA == | ||
+ | This block contains the collectibles data for the different areas in the game. Each area uses <b>128 bits / 16 Bytes</b> of data, following the format specified below. There is support for up to 16 areas, meaning that this block is <b>256 bytes</b> in size. Each chunk of data is followed sequentially, and the area it represents is detailed in the second table. | ||
{| class="wikitable" | {| class="wikitable" | ||
− | !Offset | + | !Byte Offset |
− | !Bytes | + | !Bytes Used |
− | ! | + | !Usage |
|- | |- | ||
!0 | !0 | ||
− | ! | + | !1 Byte |
− | |Lance | + | |The count of all the Fish Scales in an area that Lance has collected. |
|- | |- | ||
− | ! | + | !1 |
!2 Bytes | !2 Bytes | ||
− | | | + | |Reserved for future use |
|- | |- | ||
− | ! | + | !3 |
− | ! | + | !13 bytes |
− | | | + | |All of the Fish Scales in the area. There are <b>99</b> Fish Scales in each area. The <b>first 5 bits</b> of this are used for the 5 "LANCE" letters the player can find in each area, using the total 104 bits. |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|} | |} | ||
− | |||
− | |||
{| class="wikitable" | {| class="wikitable" | ||
− | ! | + | !Chunk Number |
− | + | !Associated Area | |
− | |||
− | |||
− | |||
− | ! | ||
|- | |- | ||
!0 | !0 | ||
− | | | + | |Forest Area |
|- | |- | ||
!1 | !1 | ||
− | | | + | |Cat Town |
|- | |- | ||
!2 | !2 | ||
− | | | + | |Underground Forest |
|- | |- | ||
!3 | !3 | ||
− | | | + | |Marine Exhibit |
− | |||
− | |||
− | |||
|- | |- | ||
!4 | !4 | ||
− | | | + | |Mt. Bophades (Exterior) |
|- | |- | ||
!5 | !5 | ||
− | | | + | |Mt. Bophades (Interior) |
|- | |- | ||
!6 | !6 | ||
− | | | + | |Sky Cat Airship Fleet |
|- | |- | ||
!7 | !7 | ||
− | | | + | |Cat Castle |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
− | ! | + | !8 |
+ | |Deep Woods | ||
|- | |- | ||
− | ! | + | !9 |
− | | | + | |Lake Area |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|} | |} | ||
− | == | + | == OEND == |
− | + | This denotes the end of the file, and prevents the file from being truncated by having some kind of data at the end. | |
− | |||
− | |||
[[Category:Technical Info]] | [[Category:Technical Info]] |
Latest revision as of 18:52, 9 April 2020
Warning! | The information detailed on this page may not be in the present available build, and may only be available in an upcoming build! Therefore, all information here is to be considered volatile and could change or be removed without notice. |
---|
Warning! | The information below is to be considered a draft. This means that the information presented is not final, so don't go running wild with this information. |
---|
Shield Cat saves are stored in the /saves
directory. This directory is platform specific, please see Installation Instructions for its location on your platform.
Please note, save files can only be easily accessed and modified on Windows
, Mac OS
, and Linux
. It may be possible on other platforms, but it is not supported.
Shield Cat save files are saved using the following structure:
/saves/OTTSAV00/
where 00
is the number of the save file. The game will support up to 100 save files, but more can be added later if it is necessary.
OTTSAVFF
is used for the Autosave file. Save slot 0
is not used.
Save information is stored in separate blocks, with each block being stored in it's own file. Details on each file are present below, as well as their expected file sizes.
In Gamemaker, it is loaded and saved as a Buffer with type buffer_fixed
. It is 1 byte aligned.
Header
OTTSAV
files start with the following header string:
SC_OTTSAV_V00
where 00
is the version of the save format. During the prototype phase, all save files will use format 00. The format may also change a lot.
Please Note this is not a string that is to be read with buffer_string
or buffer_text
. It is instead read as unsigned bytes
, and then the bytes are compared to see if the header is correct or not. The value 00
is actually ASCII, and will be $3030
.
Block Type and Info
This is where the data for this particular save file will go. Details about what is stored in each file is available on each file's page.
Each file is saved separately in the save sub directory, which will look something like this:
* LINF.BIN * FLGS.BIN * TRSR.BIN * (etc)
The contents of the LINF.BIN
file would be as follows:
SC_OTTSAV_V00LINF(data here)OEND
Please see the details about each block on its associated page:
- Save_File_Format/DATE.BIN
- Save_File_Format/LINF.BIN
- Save_File_Format/FLGS.BIN
- Save_File_Format/TRSR.BIN
- Save_File_Format/ACHV.BIN
- Save_File_Format/AREA.BIN
- Save_File_Format/MAPS.BIN
OTTSAV
files end with the following footer:
OEND
This is used to prevent the file from being truncated, which can cause issues.
TRSR
These are the different treasure locations in the game, and whether you got the treasure at that location or not. This block is 128
bytes in length, allowing for 1024
treasures.
Please Note that not every treasure slot is used. This allows me to add more treasures later and keep them in the same group.
This page is a stub. Roxy will probably come along later and add more to it. |
---|
ACHV
These are flags for the different Achievements you can get in the game. It is 16
bytes in length, allowing for 128
achievements. (However, it is unlikely that this many achievements will be in the game.)
This page is a stub. Roxy will probably come along later and add more to it. |
---|
AREA
This block contains the collectibles data for the different areas in the game. Each area uses 128 bits / 16 Bytes of data, following the format specified below. There is support for up to 16 areas, meaning that this block is 256 bytes in size. Each chunk of data is followed sequentially, and the area it represents is detailed in the second table.
Byte Offset | Bytes Used | Usage |
---|---|---|
0 | 1 Byte | The count of all the Fish Scales in an area that Lance has collected. |
1 | 2 Bytes | Reserved for future use |
3 | 13 bytes | All of the Fish Scales in the area. There are 99 Fish Scales in each area. The first 5 bits of this are used for the 5 "LANCE" letters the player can find in each area, using the total 104 bits. |
Chunk Number | Associated Area |
---|---|
0 | Forest Area |
1 | Cat Town |
2 | Underground Forest |
3 | Marine Exhibit |
4 | Mt. Bophades (Exterior) |
5 | Mt. Bophades (Interior) |
6 | Sky Cat Airship Fleet |
7 | Cat Castle |
8 | Deep Woods |
9 | Lake Area |
OEND
This denotes the end of the file, and prevents the file from being truncated by having some kind of data at the end.