TSCB and Bdrop: Difference between pages

(Difference between pages)
Jump to navigation Jump to search
4,392 bytes removed ,  5 years ago
no edit summary
imported>Zephenryus
m (→‎Area Array Value Table: Added area size)
 
imported>Leoetlino
No edit summary
 
Line 1: Line 1:
{{lowercase}}
<onlyinclude>
<onlyinclude>
'''T'''errain '''sc'''ene '''b'''inary (TSCB) files describe terrain areas layout and terrain materials.
{{Parameter archive infobox|param_type=bdrop|version=0|type=xml}}
'''DropTable''' (''bdrop'') configures item drops for each actor.
</onlyinclude>
</onlyinclude>


== TSCB File Specification ==
== Parameter objects ==


=== Header ===
=== Header ===
{| class="wikitable"
{| class="wikitable"
!Offset (h)
! Key
!Size
! Type  
!Data Type
! Description
!Description
|-
|-
|0x00
| TableNum
|4
| int
|String
| Number of tables
|TSCB file signature (magic) <code>54 53 43 42</code> or "TSCB"
|-
|-
|0x04
| {{AampIndexedParam|key=Table%02d|start_idx=1}}  
|4
| str64
|Unsigned Int
| Name of the drop table
|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
|4
|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>.
|-
|0x0c
|4
|Unsigned Int
|file_base table relative offset
|-
|0x10
|4
|Float
|<code>world_scale</code> <code>500.0</code>. Scales the terrain along the x- and z-axis.
|-
|0x14
|4
|Float
|Terrain mesh altitude <code>800.0</code>. Moves the terrain along the y-axis (vertically).
|-
|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
|Tile size. Used by the area array.
|-
|0x2c
|4
|Unsigned Int
|Unknown <code>00 00 00 08</code>. <ref>Values <code>1</code>, <code>2</code>, <code>4</code>, <code>5</code>, <code>6</code>, <code>8</code> affects textures. <code>0</code>, <code>3</code>, <code>7</code>, <code>15</code>, <code>16</code> will crash the game.</ref>
|}
 
== Material Information Array ==
 
=== Header ===
The material information header is one value, the section size. This includes the index table and the value table.
{| class="wikitable"
!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 <code>material_info_array</code>
{| class="wikitable"
!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
{| class="wikitable"
!Offset (h)
!Size
!Data Type
!Description
|-
|0x00
|4
|Unsigned Int
|Array index (<code>mat_index</code>) of <code>material_info_array</code>
|-
|0x04
|4
|Float
|Texture u-axis (x-axis)
|-
|0x08
|4
|Float
|Texture v-axis (y-axis)
|-
|0x0c
|4
|Float
|Unknown. values range from 0-1.
|-
|0x10
|4
|Float
|Unknown. values range from 0.2-1.63
|}
|}


== Area Array ==
=== {{Placeholder AAMP param name|name=[TableName]}} ===
 
=== Area Array Lookup Table ===
Following the material information section is a table of relative offsets to each entry in area_array
{| class="wikitable"
!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 <code>extra_info_array</code>
{| class="wikitable"
{| class="wikitable"
!Offset (h)
! Key
!Size
! Type  
!Data Type
! Description
!Description
|-
|0x00
|4
|Float
|X Position
|-
|0x04
|4
|Float
|Z Position
|-
|0x08
|4
|Float
|Area Size (length and width)
|-
|-
|0x0c
| ColumnNum
|4
| int
|Float
| Number of items
|Unknown - Affects grass density.<ref>0 may be default. Higher numbers have increased density.</ref>
|-
|-
|0x10
| RepeatNumMin
|4
| int
|Float
| Min number of items that can be dropped (抽選回数最小)
|Unknown
|-
|-
|0x14
| RepeatNumMax
|4
| int
|Float
| Max number of items that can be dropped (抽選回数最大)
|Unknown
|-
|-
|0x18
| ApproachType
|4
| int
|Float
| {{check}} (姿勢)
|Unknown
|-
|-
|0x1c
| OccurrenceSpeedType
|4
| int
|Unsigned Int
| Drop velocity type (発生速度). 1 for "small", 2 for "large" (see [[bgparamlist#Global]] for the actual values)
|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
| {{AampIndexedParam|key=ItemName%02d|start_idx=1}}
|4
| str64
|Unsigned Int
| Name of the actor that can be dropped
|<code>file_base</code>. Relative offset to file base name string.
|-
|-
|0x24
| {{AampIndexedParam|key=ItemProbability%02d|start_idx=1}}
|4
| float
|Unsigned Int
| Drop probability (0.0 to 100.0)
|Unknown. Usually <code>0</code>.
|-
|0x28
|4
|Unsigned Int
|Unknown. Usually <code>0</code>.
|-
|0x2c
|4
|Unsigned Int
|<code>ref_extra</code>. It seems to be a flag to indicate if there is an attached <code>extra_info_array</code>
|}
|}


=== Extra Information Array ===
Note: the sum of all ItemProbabilities should be equal to 100.0.
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|.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"
!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
 
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 />


[[Category:File formats]]
[[Category:File extensions]]
[[Category:File extensions]]
[[Category:File extensions (STERA)]]
[[Category:File extensions (AAMP)]]
[[Category:Actor parameter files]]
Anonymous user

Navigation menu