TSCB: Difference between revisions
Jump to navigation
Jump to search
m
→Header: Added tscb image
imported>Zephenryus m (added some calculation) |
imported>Zephenryus m (→Header: Added tscb image) |
||
Line 12: | Line 12: | ||
!Description | !Description | ||
|- | |- | ||
|0x00 | |<code>0x00</code> | ||
|4 | |4 | ||
|String | |String | ||
|TSCB file signature (magic) <code>54 53 43 42</code> or "TSCB" | |TSCB file signature (magic) <code>54 53 43 42</code> or "TSCB" | ||
|- | |- | ||
|0x04 | |<code>0x04</code> | ||
|4 | |4 | ||
|Unsigned Int | |Unsigned Int | ||
|TSCB version? <code>0A 00 00 00</code> or "10.0.0.0"<ref>U-King.elf:0x024D2F8C-0x024D300A holds two error messages: "【データロード】メジャーバージョンの不一致" ("[Data load] Major version mismatch") and "【データロード】マイナーバージョンの不一致" ("[Data Load] Minor version mismatch")</ref><ref>Game crashes on load screen if not equal to <code>0A 00 00 00</code></ref> | |TSCB version? <code>0A 00 00 00</code> or "10.0.0.0"<ref>U-King.elf:0x024D2F8C-0x024D300A holds two error messages: "【データロード】メジャーバージョンの不一致" ("[Data load] Major version mismatch") and "【データロード】マイナーバージョンの不一致" ("[Data Load] Minor version mismatch")</ref><ref>Game crashes on load screen if not equal to <code>0A 00 00 00</code></ref> | ||
|- | |- | ||
|0x08 | |<code>0x08</code> | ||
|4 | |4 | ||
|Unsigned Int | |Unsigned Int | ||
|Unknown. Always <code>00 00 00 01</code>. Game crashes on load screen if not equal to <code>00 00 00 01</code>. | |Unknown. Always <code>00 00 00 01</code>. Game crashes on load screen if not equal to <code>00 00 00 01</code>. | ||
|- | |- | ||
|0x0c | |<code>0x0c</code> | ||
|4 | |4 | ||
|Unsigned Int | |Unsigned Int | ||
|file_base table relative offset | |<code>file_base</code> table relative offset | ||
|- | |- | ||
|0x10 | |<code>0x10</code> | ||
|4 | |4 | ||
|Float | |Float | ||
|<code>world_scale</code> <code>500.0</code>. Scales the terrain along the x- and z-axis. | |<code>world_scale</code> <code>500.0</code>. Scales the terrain along the x- and z-axis. | ||
|- | |- | ||
|0x14 | |<code>0x14</code> | ||
|4 | |4 | ||
|Float | |Float | ||
|Terrain mesh altitude <code>800.0</code>. Moves the terrain along the y-axis (vertically). | |Terrain mesh altitude <code>800.0</code>. Moves the terrain along the y-axis (vertically). | ||
|- | |- | ||
|0x18 | |<code>0x18</code> | ||
|4 | |4 | ||
|Unsigned Int | |Unsigned Int | ||
|material_info_array length (number of elements in the array) | |<code>material_info_array</code> length (number of elements in the array) | ||
|- | |- | ||
|0x1c | |<code>0x1c</code> | ||
|4 | |4 | ||
|Unsigned Int | |Unsigned Int | ||
|area_array length (number of elements in the array) | |<code>area_array</code> length (number of elements in the array) | ||
|- | |- | ||
|0x20 | |<code>0x20</code> | ||
|4 | |4 | ||
|Unsigned Int | |Unsigned Int | ||
|Probably padding | |Probably padding | ||
|- | |- | ||
|0x24 | |<code>0x24</code> | ||
|4 | |4 | ||
|Unsigned Int | |Unsigned Int | ||
|Probably padding | |Probably padding | ||
|- | |- | ||
|0x28 | |<code>0x28</code> | ||
|4 | |4 | ||
|Float | |Float | ||
|<code>tile_size</code>. Used by the area array. | |<code>tile_size</code>. Used by the area array. | ||
|- | |- | ||
|0x2c | |<code>0x2c</code> | ||
|4 | |4 | ||
|Unsigned Int | |Unsigned Int | ||
Line 83: | Line 83: | ||
!Description | !Description | ||
|- | |- | ||
|0x00 | |<code>0x00</code> | ||
|4 | |4 | ||
|Unsigned Int | |Unsigned Int | ||
Line 97: | Line 97: | ||
!Description | !Description | ||
|- | |- | ||
|0x00 | |<code>0x00</code> | ||
|4 | |4 | ||
|Unsigned Int | |Unsigned Int | ||
Line 111: | Line 111: | ||
!Description | !Description | ||
|- | |- | ||
|0x00 | |<code>0x00</code> | ||
|4 | |4 | ||
|Unsigned Int | |Unsigned Int | ||
|Array index (<code>mat_index</code>) of <code>material_info_array</code> | |Array index (<code>mat_index</code>) of <code>material_info_array</code> | ||
|- | |- | ||
|0x04 | |<code>0x04</code> | ||
|4 | |4 | ||
|Float | |Float | ||
|Texture u-axis (x-axis) | |Texture u-axis (x-axis) | ||
|- | |- | ||
|0x08 | |<code>0x08</code> | ||
|4 | |4 | ||
|Float | |Float | ||
|Texture v-axis (y-axis) | |Texture v-axis (y-axis) | ||
|- | |- | ||
|0x0c | |<code>0x0c</code> | ||
|4 | |4 | ||
|Float | |Float | ||
|Unknown. values range from 0-1. | |Unknown. values range from 0-1. | ||
|- | |- | ||
|0x10 | |<code>0x10</code> | ||
|4 | |4 | ||
|Float | |Float | ||
Line 147: | Line 147: | ||
!Description | !Description | ||
|- | |- | ||
|0x00 | |<code>0x00</code> | ||
|4 | |4 | ||
|Unsigned Int | |Unsigned Int | ||
Line 154: | Line 154: | ||
=== Area Array Value Table === | === Area Array Value Table === | ||
Each entry contains meta data for one tile in the terrain scene. There are multiple levels of detail ( | 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 <code>0x30</code> to <code>0x54</code> depending on the size of <code>extra_info_array</code> | Entries range from <code>0x30</code> to <code>0x54</code> depending on the size of <code>extra_info_array</code> | ||
Line 231: | Line 231: | ||
=== Extra Information 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. | if <code>ref_extra</code> does not equal <code>0</code> there is an <code>extra_info_array</code> attached to this area. The array is 4 or 8 values long. | ||
Every area includes a [[HGHT|.hght]] and [[MATE|.mate]] file. The extra_info_array indicates if there is an additional [[Water.extm|.water.extm]] and / or [[Grass.extm|.grass.extm]] file | Every area includes a [[HGHT|.hght]] and [[MATE|.mate]] file. The <code>extra_info_array</code> indicates if there is an additional [[Water.extm|.water.extm]] and / or [[Grass.extm|.grass.extm]] file | ||
{| class="wikitable" | {| class="wikitable" | ||
!Offset (h) | !Offset (h) | ||
Line 240: | Line 240: | ||
!Description | !Description | ||
|- | |- | ||
|0x30 | |<code>0x30</code> | ||
|4 | |4 | ||
|Unsigned Int | |Unsigned Int | ||
|extra_info_array length. Number of elements in array. | |extra_info_array length. Number of elements in array. | ||
|- | |- | ||
|0x34 | |<code>0x34</code> | ||
|4 | |4 | ||
|Unsigned Int | |Unsigned Int | ||
|Unknown. Usually 20 or 3. | |Unknown. Usually 20 or 3. | ||
|- | |- | ||
|0x38 | |<code>0x38</code> | ||
|4 | |4 | ||
|Unsigned Int | |Unsigned Int | ||
|Unknown. Usually 0, 1 or 3. | |Unknown. Usually 0, 1 or 3. | ||
|- | |- | ||
|0x3c | |<code>0x3c</code> | ||
|4 | |4 | ||
|Unsigned Int | |Unsigned Int | ||
|Unknown. Usually 0 or 1. | |Unknown. Usually 0 or 1. | ||
|- | |- | ||
|0x40 | |<code>0x40</code> | ||
|4 | |4 | ||
|Unsigned Int | |Unsigned Int | ||
|Unknown. Usually 0 or 1. | |Unknown. Usually 0 or 1. | ||
|- | |- | ||
|0x44 | |<code>0x44</code> | ||
|4 | |4 | ||
|Unsigned Int | |Unsigned Int | ||
|Unknown. Always 0. | |Unknown. Always 0. | ||
|- | |- | ||
|0x48 | |<code>0x48</code> | ||
|4 | |4 | ||
|Unsigned Int | |Unsigned Int | ||
|Unknown. Always 3 | |Unknown. Always 3 | ||
|- | |- | ||
|0x4c | |<code>0x4c</code> | ||
|4 | |4 | ||
|Unsigned Int | |Unsigned Int | ||
|Unknown. Usually 0 or 1. | |Unknown. Usually 0 or 1. | ||
|- | |- | ||
|0x50 | |<code>0x50</code> | ||
|4 | |4 | ||
|Unsigned Int | |Unsigned Int | ||
Line 289: | Line 289: | ||
[ 3, 1, 1, 0] = water | [ 3, 1, 1, 0] = water | ||
[ 3, 0, 1, 0] = grass | [ 3, 0, 1, 0] = grass | ||
It seems that water is [3, 1, 1] and grass is [3, 0, 1] | It seems that water is <code>[3, 1, 1]</code> and grass is <code>[3, 0, 1]</code> | ||
[20, `3, 0, 1`, 0, `3, 1, 1`] = grass, water | [20, `3, 0, 1`, 0, `3, 1, 1`] = grass, water | ||
[20, `3, 1, 1`, 0, `3, 0, 1`] = water, grass | [20, `3, 1, 1`, 0, `3, 0, 1`] = water, grass | ||
[`3, 1, 1`, 0] = water | [`3, 1, 1`, 0] = water | ||
[`3, 0, 1`, 0] = grass | [`3, 0, 1`, 0] = grass | ||
== <code>stera</code> File Positions == | |||
[[File:Stera File Positions.png|alt=stera File Positions|thumb|<code>stera</code> File Positions]] | |||
<code>stera</code> files referenced in the area array are positioned using a [[wikipedia:Z-order_curve|z-order curve]] or the [[wikipedia:Moser–de_Bruijn_sequence|Moser-de Bruijn sequence]]. | |||
<references /> | <references /> | ||
[[Category:File formats]] | [[Category:File formats]] | ||
[[Category:File extensions]] | [[Category:File extensions]] | ||
[[Category:File extensions (STERA)]] | [[Category:File extensions (STERA)]] |