TSCB: Difference between revisions
imported>Leoetlino (import from http://botw-modding-database.wikia.com/wiki/TSCB) |
(No difference)
|
Revision as of 13:27, 9 September 2018
Terrain scene binary (TSCB) files describe terrain areas layout and terrain materials.
TSCB File Specification
Header
Offset (h) | Size | Data Type | Description |
---|---|---|---|
0x00 | 4 | String | TSCB file signature (magic) `54 53 43 42` or "TSCB" |
0x04 | 4 | Unsigned Int | TSCB version? `0A 00 00 00` or "10.0.0.0"[1] |
0x08 | 4 | Unsigned Int | Unknown. |
0x0c | 4 | Unsigned Int | file_base table relative offset |
0x10 | 4 | Float | Unknown 500.0 |
0x14 | 4 | Float | Unknown 800.0 |
0x18 | 4 | Unsigned Int | material_info_array length (number of elements in the array) |
0x1c | 4 | Unsigned Int | area_array length (number of elements in the array) |
0x20 | 4 | Unsigned Int | Probably padding |
0x24 | 4 | Unsigned Int | Probably padding |
0x28 | 4 | Float | world_scale used by area_array for tile size |
0x2c | 4 | Unsigned Int | Unknown (`00 00 00 08`) |
The float values in 0x10
and 0x14
seem to be related to the size of the playable map area. The in game playable map is -5000.0
to 5000.0
along the z-axis and -8000.0
to 8000.0
along the x-axis. While 500.0
and 800.0
do not exactly map to those values, they do seem to be related.
Material Information Array
Header
The material information header is one value, the section size. This includes the index table and the value table.
Offset (h) | Size | Data Type | Description |
---|---|---|---|
0x00 | 4 | Unsigned Int | Material info section size in bytes |
Material Information Array Lookup Table
Following the header is a table of relative offsets to each entry in material_info_array
Offset (h) | Size | Data Type | Description |
---|---|---|---|
0x00 | 4 | Unsigned Int | Relative offset to array entry |
Material Information Value Table
Each entry in the array contains an index and four attributes
Offset (h) | Size | Data Type | Description |
---|---|---|---|
0x00 | 4 | Unsigned Int | Array index (mat_index) |
0x04 | 4 | Float | Unknown. values range from 0.03-0.59. |
0x08 | 4 | Float | Unknown. values range from 0.03-0.59. |
0x0c | 4 | Float | Unknown. values range from 0-1. |
0x10 | 4 | Float | Unknown. values range from 0.2-1.63 |
Area Array
Area Array Lookup Table
Following the material information section is a table of relative offsets to each entry in area_array
Offset (h) | Size | Data Type | Description |
---|---|---|---|
0x00 | 4 | Unsigned Int | Relative offset to array entry |
Area Array Value Table
Each entry contains meta data for one tile in the terrain scene. There are multiple levels of detail (LOD) for the terrain.
Entries range from 0x30 to 0x54 depending on the size of extra_info_array
Offset (h) | Size | Data Type | Description |
---|---|---|---|
0x00 | 4 | Float | X Position |
0x04 | 4 | Float | Z Position |
0x08 | 4 | Float | Scale? |
0x0c | 4 | Float | area_min_height_ground |
0x10 | 4 | Float | area_max_height_ground |
0x14 | 4 | Float | area_min_height_water |
0x18 | 4 | Float | area_max_height_water |
0x1c | 4 | Unsigned Int | Unknown. Usually 0, 1 or 2 |
0x20 | 4 | Unsigned Int | file_base. Relative offset to file base name string |
0x24 | 4 | Unsigned Int | Unknown. Usually 0. |
0x28 | 4 | Unsigned Int | Unknown. Usually 0. |
0x2c | 4 | Unsigned Int | ref_extra. It seems to be a flag to indicate if there is an attached extra_info_array |
Extra Information Array
if ref_extra does not equal 0 there is an extra_info_array attached to this area. The array is 4 or 8 values long.
Every area includes a .hght and .mate file. The extra_info_array indicates if there is an additional .water.extm and / or .grass.extm file
Offset (h) | Size | Data Type | Description |
---|---|---|---|
0x30 | 4 | Unsigned Int | extra_info_array length. Number of elements in array. |
0x34 | 4 | Unsigned Int | Unknown. Usually 20 or 3. |
0x38 | 4 | Unsigned Int | Unknown. Usually 0, 1 or 3. |
0x3c | 4 | Unsigned Int | Unknown. Usually 0 or 1. |
0x40 | 4 | Unsigned Int | Unknown. Usually 0 or 1. |
0x44 | 4 | Unsigned Int | Unknown. Always 0. |
0x48 | 4 | Unsigned Int | Unknown. Always 3 |
0x4c | 4 | Unsigned Int | Unknown. Usually 0 or 1. |
0x50 | 4 | Unsigned Int | Unknown. Always 1. |
[20, 3, 0, 1, 0, 3, 1, 1] = water, grass [20, 3, 1, 1, 0, 3, 0, 1] = water, grass [ 3, 1, 1, 0] = water [ 3, 0, 1, 0] = grass
- ↑ U-King.elf:0x024D2F8C-0x024D300A holds two error messages: "【データロード】メジャーバージョンの不一致" ("[Data load] Major version mismatch") and "【データロード】マイナーバージョンの不一致" ("[Data Load] Minor version mismatch")