Difference between revisions of "BCSV"
(Clarification on field data) |
(Update identifier info) |
||
Line 34: | Line 34: | ||
== Fields == | == Fields == | ||
− | The fields are defined in the header as 2 sections; | + | The fields are defined in the header as 2 sections; an identifier and the relative offset in each entry |
{|class="wikitable" | {|class="wikitable" | ||
Line 40: | Line 40: | ||
! Offset !! Size !! Description | ! Offset !! Size !! Description | ||
|- | |- | ||
− | | 0x00 || 0x4 || | + | | 0x00 || 0x4 || Identifier |
|- | |- | ||
| 0x04 || 0x4 || Offset | | 0x04 || 0x4 || Offset | ||
|} | |} | ||
− | The | + | The identifier seems to be a hash of some kind. In AC:NH there is a total 2048 unique identifiers, with only 191 being reused in multiple files. For a list of all identifiers in AC:NH and the files they are used in, see here https://pastebin.com/KnbnD1r8 |
+ | |||
+ | The data type for each field is known at compile time and therefore there is no way to 100% know what each data type is. It is possible roughly determine the type by checking the data size, though (IE, data with a size of 2 could be an '''int16''') | ||
== Entries == | == Entries == |
Revision as of 16:22, 31 March 2020
BCSV, known as Binary CSV, stores information relating to general content in a compact CSV format
General
All information in this document is from Animal Crossing: New Horizons
BCSV files contain a header which defines the number of entries, the size of each entry block, and the fields each entry has, followed by a number of entries with context-specific data
Header
The header contains
Offset | Size | Description |
---|---|---|
0x00 | 0x4 | Entry count |
0x04 | 0x4 | Entry size |
0x08 | 0x2 | Field count |
0x0A | 0x2 | Always 0x0101 |
0x0C | 0x4 | VSCB Magic |
0x10 | 0x2 | Always 0x1027 |
0x12 | 0xA | Padding |
0x1C | 0x8*Field count | Fields |
Fields
The fields are defined in the header as 2 sections; an identifier and the relative offset in each entry
Offset | Size | Description |
---|---|---|
0x00 | 0x4 | Identifier |
0x04 | 0x4 | Offset |
The identifier seems to be a hash of some kind. In AC:NH there is a total 2048 unique identifiers, with only 191 being reused in multiple files. For a list of all identifiers in AC:NH and the files they are used in, see here https://pastebin.com/KnbnD1r8
The data type for each field is known at compile time and therefore there is no way to 100% know what each data type is. It is possible roughly determine the type by checking the data size, though (IE, data with a size of 2 could be an int16)
Entries
Entries always begin with their offset relative to the file start, and then contain the blocks data. Nearly every file seems to contain a field with type `0x54607054`, which is always a unique int16 for each entry, though the location of this field is not always the same
Offset | Size | Description |
---|---|---|
0x00 | 0x4 | Offset relative to file start |
0x04 | Entry data |