TSCB: Difference between revisions
Jump to navigation
Jump to search
m
→Area Array Value Table: Added parameter descriptions
imported>Zephenryus m (→Material Information Value Table: Updated UV information) |
imported>Zephenryus m (→Area Array Value Table: Added parameter descriptions) |
||
(6 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
'''T'''errain '''sc'''ene '''b'''inary (TSCB) files describe terrain areas layout and terrain materials. | '''T'''errain '''sc'''ene '''b'''inary (TSCB) files describe terrain areas layout and terrain materials. | ||
</onlyinclude> | </onlyinclude> | ||
== TSCB File Specification == | == TSCB File Specification == | ||
Line 155: | Line 156: | ||
Each entry contains meta data for one tile in the terrain scene. There are multiple levels of detail (LOD) for the terrain. | 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 | Entries range from 0x30 to 0x54 depending on the size of <code>extra_info_array</code> | ||
{| class="wikitable" | {| class="wikitable" | ||
!Offset (h) | !Offset (h) | ||
Line 175: | Line 176: | ||
|4 | |4 | ||
|Float | |Float | ||
| | |Area Size (length and width) | ||
|- | |- | ||
|0x0c | |0x0c | ||
|4 | |4 | ||
|Float | |Float | ||
| | |Unknown - Affects grass density.<ref>0 may be default. Higher numbers have increased density.</ref> | ||
|- | |- | ||
|0x10 | |0x10 | ||
|4 | |4 | ||
|Float | |Float | ||
| | |Unknown | ||
|- | |- | ||
|0x14 | |0x14 | ||
|4 | |4 | ||
|Float | |Float | ||
| | |Unknown | ||
|- | |- | ||
|0x18 | |0x18 | ||
|4 | |4 | ||
|Float | |Float | ||
| | |Unknown | ||
|- | |- | ||
|0x1c | |0x1c | ||
|4 | |4 | ||
|Unsigned Int | |Unsigned Int | ||
|Unknown. Usually 0, 1 or 2 | |Unknown. Usually <code>0</code>, <code>1</code> or <code>2</code>, crashes on <code>4</code>, <code>16</code>.<ref>May be a flag for grass and water? <code>0</code> seems to indicate no water or grass.</ref> | ||
|- | |- | ||
|0x20 | |0x20 | ||
|4 | |4 | ||
|Unsigned Int | |Unsigned Int | ||
|file_base. Relative offset to file base name string | |<code>file_base</code>. Relative offset to file base name string. | ||
|- | |- | ||
|0x24 | |0x24 | ||
|4 | |4 | ||
|Unsigned Int | |Unsigned Int | ||
|Unknown. Usually 0. | |Unknown. Usually <code>0</code>. | ||
|- | |- | ||
|0x28 | |0x28 | ||
|4 | |4 | ||
|Unsigned Int | |Unsigned Int | ||
|Unknown. Usually 0. | |Unknown. Usually <code>0</code>. | ||
|- | |- | ||
|0x2c | |0x2c | ||
|4 | |4 | ||
|Unsigned Int | |Unsigned Int | ||
|ref_extra. It seems to be a flag to indicate if there is an attached extra_info_array | |<code>ref_extra</code>. It seems to be a flag to indicate if there is an attached <code>extra_info_array</code> | ||
|} | |} | ||
==== Parameters ==== | |||
<code>x</code> - Area tile x coordinate (East-West) | |||
<code>z</code> - Area tile z coordinate (North-South) | |||
<code>area_size</code> - Determines the length and width of the area. It can be calculated with <code>area_size / tile_size * world_scale<code>. <code>tile_size</code> and <code>world_scale</code> are in the tscb header. | |||
=== 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 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 | 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 | ||
{| class="wikitable" | {| class="wikitable" | ||
!Offset (h) | !Offset (h) | ||
Line 282: | 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] | |||
[20, `3, 0, 1`, 0, `3, 1, 1`] = grass, water | |||
[20, `3, 1, 1`, 0, `3, 0, 1`] = water, grass | |||
[`3, 1, 1`, 0] = water | |||
[`3, 0, 1`, 0] = grass | |||
<references /> | <references /> | ||
[[Category:File formats]] | [[Category:File formats]] | ||
[[Category:File extensions]] | |||
[[Category:File extensions (STERA)]] |