Data Table (V3): Difference between revisions
(Add initial info on DAT files, still needs research and better documentation.) |
m (Update status percentage) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
|TYPE = Data Table | |TYPE = Data Table | ||
|SYSTEM = Vita & Steam | |SYSTEM = Vita & Steam | ||
|TITLES = [[wikipedia:Danganronpa V3: Killing Harmony|Danganronpa V3: Killing Harmony]] (Vita & Steam) | |TITLES = [[wikipedia:Danganronpa V3: Killing Harmony|Danganronpa V3: Killing Harmony]] (Vita, PS4 & Steam) | ||
|CREDIT = [https://github.com/jpmac26/DRV3- | |CREDIT = [https://github.com/jpmac26/DRV3-Sharp CaptainSwag101] | ||
|SIGNEDNESS = Unsigned | |SIGNEDNESS = Unsigned | ||
|ENDIANNESS = [[wikipedia:Little Endian|Little-Endian]] | |ENDIANNESS = [[wikipedia:Little Endian|Little-Endian]] | ||
|STATUS = | |STATUS = 100% (still tinkering) | ||
}} | }} | ||
DAT files are a new file type introduced in [[wikipedia:Danganronpa V3: Killing Harmony|Danganronpa V3: Killing Harmony]], they are used both for global lookup tables and to store room objects. | DAT files are a new file type introduced in [[wikipedia:Danganronpa V3: Killing Harmony|Danganronpa V3: Killing Harmony]], they are used both for global lookup tables and to store room objects. Functionally they are similar to a database or spreadsheet, except the data is internally represented as raw binary data rather than plaintext. | ||
They are comprised of " | They are comprised of one or more "columns" of data, each of which has a name and a fixed data type, such as signed/unsigned integer numbers, ASCII/Unicode text, or floating-point numbers. The data itself is stored in rows aligned with these columns (again, think of a spreadsheet). Every "cell" in a column must conform to its respective column's data type. To store multiple types of data in a given row, multiple columns are required. | ||
The file starts with a header describing the number of columns per row, and the number of rows. | |||
After the header is a list containing the name and data type of each column. Every row has the same number of columns. | |||
Next, the actual row data. This data is stored in order of the columns and repeats for however many rows are defined in the header. The data values are stored as a raw binary representation of the value in whatever data type the column is. This data is typically stored inline, however in the case of ASCII or UTF-16 data, an unsigned 16-bit integer is used instead, which indicates the text string ID that goes in that place. | |||
Finally, any ASCII and UTF-16 string data is stored after the raw row data, respectively. | |||
==Specification== | ==Specification== |
Latest revision as of 11:42, 12 August 2020
Type | Data Table |
---|---|
System | Vita & Steam |
Applicable Titles | Danganronpa V3: Killing Harmony (Vita, PS4 & Steam) |
Credit | CaptainSwag101 |
Default Signedness | Unsigned |
Default Endianness | Little-Endian |
Implementation Status | 100% (still tinkering) |
DAT files are a new file type introduced in Danganronpa V3: Killing Harmony, they are used both for global lookup tables and to store room objects. Functionally they are similar to a database or spreadsheet, except the data is internally represented as raw binary data rather than plaintext.
They are comprised of one or more "columns" of data, each of which has a name and a fixed data type, such as signed/unsigned integer numbers, ASCII/Unicode text, or floating-point numbers. The data itself is stored in rows aligned with these columns (again, think of a spreadsheet). Every "cell" in a column must conform to its respective column's data type. To store multiple types of data in a given row, multiple columns are required.
The file starts with a header describing the number of columns per row, and the number of rows.
After the header is a list containing the name and data type of each column. Every row has the same number of columns.
Next, the actual row data. This data is stored in order of the columns and repeats for however many rows are defined in the header. The data values are stored as a raw binary representation of the value in whatever data type the column is. This data is typically stored inline, however in the case of ASCII or UTF-16 data, an unsigned 16-bit integer is used instead, which indicates the text string ID that goes in that place.
Finally, any ASCII and UTF-16 string data is stored after the raw row data, respectively.
Specification
DAT File | |||||
---|---|---|---|---|---|
Offset | Size | Data Type | Function | Example Value | Notes |
0x00 | 4 Bytes | Int | Structure Count | 88 | |
0x04 | 4 Bytes | Int | Structure Size | 40 | |
0x08 | 4 Bytes | Int | Var Count | 12 | (NOTE: The following 2 entries repeat for each Var in VarCount) |
0x0C | Variable Length | UTF-8 String | Var Name | float1 | May be in English or Japanese text, so the string must be treated as UTF-8 and not ASCII |
0x0C + (length of previous string + 1) | Variable Length | UTF-8 String | Var Type | f32 | Always ASCII, but I imagine the string is still UTF-8 |
After Var Names/Types | Variable Length | String/Data | Data Structures | Comprised of each var type listed above, in order. Repeats until StructureCount. |