TSCB: Difference between revisions
Jump to navigation
Jump to search
m
added some calculation
imported>Zephenryus m (→Parameters: fixed closing code tag) |
imported>Zephenryus m (added some calculation) |
||
Line 65: | Line 65: | ||
|4 | |4 | ||
|Float | |Float | ||
| | |<code>tile_size</code>. Used by the area array. | ||
|- | |- | ||
|0x2c | |0x2c | ||
Line 156: | 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 <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> | ||
{| class="wikitable" | {| class="wikitable" | ||
!Offset (h) | !Offset (h) | ||
Line 163: | Line 163: | ||
!Description | !Description | ||
|- | |- | ||
|0x00 | |<code>0x00</code> | ||
|4 | |4 | ||
|Float | |Float | ||
|X Position | |X Position | ||
|- | |- | ||
|0x04 | |<code>0x04</code> | ||
|4 | |4 | ||
|Float | |Float | ||
|Z Position | |Z Position | ||
|- | |- | ||
|0x08 | |<code>0x08</code> | ||
|4 | |4 | ||
|Float | |Float | ||
| | |<code>area_size</code> (length and width) | ||
|- | |- | ||
|0x0c | |<code>0x0c</code> | ||
|4 | |4 | ||
|Float | |Float | ||
|Unknown - Affects grass density.<ref>0 may be default. Higher numbers have increased density.</ref> | |Unknown - Affects grass density.<ref>0 may be default. Higher numbers have increased density.</ref> | ||
|- | |- | ||
|0x10 | |<code>0x10</code> | ||
|4 | |4 | ||
|Float | |Float | ||
|Unknown | |Unknown | ||
|- | |- | ||
|0x14 | |<code>0x14</code> | ||
|4 | |4 | ||
|Float | |Float | ||
|Unknown | |Unknown | ||
|- | |- | ||
|0x18 | |<code>0x18</code> | ||
|4 | |4 | ||
|Float | |Float | ||
|Unknown | |Unknown | ||
|- | |- | ||
|0x1c | |<code>0x1c</code> | ||
|4 | |4 | ||
|Unsigned Int | |Unsigned Int | ||
|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> | |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 | |<code>0x20</code> | ||
|4 | |4 | ||
|Unsigned Int | |Unsigned Int | ||
|<code>file_base</code>. Relative offset to file base name string. | |<code>file_base</code>. Relative offset to file base name string. | ||
|- | |- | ||
|0x24 | |<code>0x24</code> | ||
|4 | |4 | ||
|Unsigned Int | |Unsigned Int | ||
|Unknown. Usually <code>0</code>. | |Unknown. Usually <code>0</code>. | ||
|- | |- | ||
|0x28 | |<code>0x28</code> | ||
|4 | |4 | ||
|Unsigned Int | |Unsigned Int | ||
|Unknown. Usually <code>0</code>. | |Unknown. Usually <code>0</code>. | ||
|- | |- | ||
|0x2c | |<code>0x2c</code> | ||
|4 | |4 | ||
|Unsigned Int | |Unsigned Int | ||
Line 225: | Line 225: | ||
==== Parameters ==== | ==== Parameters ==== | ||
<code>x</code> - Area tile x coordinate (East-West) | |||
<code>z</code> - Area tile z coordinate (North-South) | <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>area_size</code> - Determines the length and width of the area. It can be calculated with:<blockquote><code>(area_size / tile_size * world_scale) * 20</code></blockquote><code>tile_size</code> and <code>world_scale</code> are in the header. | ||
=== Extra Information Array === | === Extra Information Array === | ||
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 [3, 1, 1] and grass is [3, 0, 1] | ||
[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 | ||
<references /> | <references /> | ||
[[Category:File formats]] | [[Category:File formats]] | ||
[[Category:File extensions]] | [[Category:File extensions]] | ||
[[Category:File extensions (STERA)]] | [[Category:File extensions (STERA)]] |