Difference between revisions of "Object Placement (.TAT/.TRE/.TSC) File Format"

From Ōkami Speedrun Wiki
Jump to navigation Jump to search
(Created page with "{{File Format}} Object placement format. TSC has objects from category 0x09 (gt), TRE has objects from category 0x0B (vt). == File Format == === Header === {| class="wikita...")
 
(map event req)
Line 3: Line 3:
Object placement format.
Object placement format.


TSC has objects from category 0x09 (gt), TRE has objects from category 0x0B (vt).
TSC has objects from category 0x09 (gt), contains various general objects.
 
TRE has objects from category 0x0B (vt), contains mainly vegetation like grass and trees.


== File Format ==
== File Format ==
Line 35: Line 37:
| 10 || 6 || <code>PackedTuple<uint16_t></code> || Location (x, y, z)
| 10 || 6 || <code>PackedTuple<uint16_t></code> || Location (x, y, z)
|-
|-
| 16 || 16 || <code>uint8_t[16]</code> || Unknown
| 16 || 4 || <code>uint8_t[4]</code> || Unknown
|-
| 20 || 1 || <code>uint8_t</code> || [[Save_File_(OKAMI)_File_Format#World_State_Data|Map event]] bitfield index to determine visibility, i.e. rejuvenation.
|-
| 21 || 11 || <code>uint8_t[11]</code> || Unknown
|-
|-
| 26 || 8 || <code>uint8_t[8]</code> || Unkown/padding
| 32 || 8 || <code>uint8_t[8]</code> || Unkown/padding
|}
|}

Revision as of 08:38, 31 July 2025

Note: This page pertains to Reverse Engineering of Okami File Formats.

Object placement format.

TSC has objects from category 0x09 (gt), contains various general objects.

TRE has objects from category 0x0B (vt), contains mainly vegetation like grass and trees.

File Format

Header

Start (Byte) Width (Bytes) Type Description
0 4 uint32_t Number of Entries
4 40 * numEntries TObjEntry[numEntries] Entries
padding Pad zeroes for 16 byte alignment

Object Entry

Start (Byte) Width (Bytes) Type Description
0 1 uint8_t Object Table Index
1 1 uint8_t Object category. 0x09 = gt/, 0x0B = vt/
2 1 uint8_t Unknown
3 1 uint8_t Unknown
4 3 PackedTuple<uint8_t> Size (width, height, depth).
7 3 PackedTuple<uint8_t> Rotation around axis (x, y, z).
10 6 PackedTuple<uint16_t> Location (x, y, z)
16 4 uint8_t[4] Unknown
20 1 uint8_t Map event bitfield index to determine visibility, i.e. rejuvenation.
21 11 uint8_t[11] Unknown
32 8 uint8_t[8] Unkown/padding