Difference between revisions of "Loot (.ITS) File Format"

From Ōkami Speedrun Wiki
Jump to navigation Jump to search
(areas restored and item param)
(→‎container_state: possible state)
 
(4 intermediate revisions by the same user not shown)
Line 35: Line 35:
| 7 || 3 || PackedTuple<uint8> || rotation || Rotation around axis (x, y, z).
| 7 || 3 || PackedTuple<uint8> || rotation || Rotation around axis (x, y, z).
|-
|-
| 10 || 6 || PackedTuple<uint16> || coordinates || Location of container (x, y, z)
| 10 || 6 || PackedTuple<int16> || coordinates || Location of container (x, y, z)
|-
|-
| 16 || 1 || uint8 || container_type || See below for values.
| 16 || 1 || uint8 || container_type || See below for values.
Line 47: Line 47:
| 20 || 1 || uint8 ||  || Unknown.
| 20 || 1 || uint8 ||  || Unknown.
|-
|-
| 21 || 1 || uint8 ||  || No respawn. Forced include this entry in the [[Save_File_(OKAMI)_File_Format#Map_Data|Map Data collection bitfield]].
| 21 || 1 || uint8 ||  || No respawn. Force include this entry in the [[Save_File_(OKAMI)_File_Format#Map_Data|Map Data collection bitfield]].
|-
|-
| 22 || 1 || uint8 ||  || Unknown.
| 22 || 1 || uint8 ||  || Unknown.
Line 53: Line 53:
| 23 || 1 || uint8 ||  || Unknown.
| 23 || 1 || uint8 ||  || Unknown.
|-
|-
| 24 || 1 || uint8 ||  || Item parameter. Depends on the item.
| 24 || 4 || uint32 ||  || Item parameter. Depends on the item.
* '''Stray Bead''': bitfield index for the [[Save_File_(OKAMI)_File_Format#Collection_Data|Collection Data]] struct.
* '''Stray Bead''': bitfield index for the [[Save_File_(OKAMI)_File_Format#Collection_Data|Collection Data]] struct.
* '''Praise (Clover)''': amount of praise granted.
* '''Praise (Clover)''': amount of praise granted.
|-
|-
| 25 || 15 || uint8 array || padding || All 00.
| 28 || 12 || uint8 array || padding || All 00.
|}
|}


Line 79: Line 79:
|-
|-
| 07 || Tidal (Sunken Ship chests that are on land at night and underwater during day.)
| 07 || Tidal (Sunken Ship chests that are on land at night and underwater during day.)
|-
| 09 || Physics?
|-
|-
| 13 || On Land (Pots only, but some are 00 or 03, so what's the difference?)
| 13 || On Land (Pots only, but some are 00 or 03, so what's the difference?)
Line 85: Line 87:
===container_type===
===container_type===
{| class="wikitable dataStructure"
{| class="wikitable dataStructure"
! Value !! Meaning
! Value !! Meaning !! Object ID created
|-
| 00 || Free-standing
|-
| 01 || Sasa Chest
|-
| 02 || Pot
|-
| 03 || Wooden Horse
|-
| 04 || Chest
|-
| 05 || Gale Shrine Chest
|-
| 06 || Clover
|-
| 07 || Grass
|-
| 08 || Watermelon
|-
| 09 || Locked Box
|-
| 0a || Bloom Pod
|-
| 0b || Guardian Fruit
|-
| 0c || Electric Chest
|-
| 0d || Clam Shell
|-
| 0e || Flower
|-
| 0f || Flaming Chest
|-
| 10 || One-eyed Doll
|-
| 11 || Frozen Chest
|-
|-
| 12 || Crystal PS3 Rock
| 00 || Free-standing || N/A
|-
|-
| 13 || Iron PS2 Rock
| 01 || Sasa Chest || {{ObjID|B1E}}
|-
| 02 || Pot || {{ObjID|B39}}
|-
| 03 || Wooden Horse || {{ObjID|B38}}
|-
| 04 || Chest || {{ObjID|B4B}}
|-
| 05 || Gale Shrine Chest || {{ObjID|B4C}}
|-
| 06 || Clover || {{ObjID|B44}}
|-
| 07 || Grass || {{ObjID|B3E}}
|-
| 08 || Watermelon || {{ObjID|B41}}
|-
| 09 || Locked Box || {{ObjID|840}}
|-
| 0a || Bloom Pod || {{ObjID|B4F}}
|-
| 0b || Guardian Fruit || {{ObjID|373}}
|-
| 0c || Electric Chest || {{ObjID|B50}}
|-
| 0d || Clam Shell || {{ObjID|B51}}
|-
| 0e || Flower || {{ObjID|B29}}
|-
| 0f || Flaming Chest || {{ObjID|890}}
|-
| 10 || One-eyed Doll || {{ObjID|9FB}}
|-
| 11 || Frozen Chest || {{ObjID|B53}}
|-
| 12 || Crystal PS3 Rock || {{ObjID|B70}}
|-
| 13 || Iron PS2 Rock || {{ObjID|B71}}
|}
|}

Latest revision as of 00:44, 1 August 2025

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

Explanation

This file defines all guaranteed loot locations on a single map.

File Format

Overall

Start (Byte) Width (Bytes) Type Field Name Note
0 4 uint32 Number of Entries Count of loot definitions
4 ITSEntry array entries Loot definitions
padding 00 Pad zeroes for 4 byte alignment

ITSEntry

Describes a single piece of loot. Chests and clovers are automatically included in the Map Data collection bitfield, the index is in the order they appear in this file, and incremented only when a collectable is encountered.

Start (Byte) Width (Bytes) Type Field Name Note
0 1 uint8 contents_id See Item Table.
1 1 uint8 cat_id Category ID: 0a is items.
2 1 uint8 unknown2 Always 01.
3 1 uint8 container_state See below for values.
4 3 PackedTuple<uint8> size Size of container (width, height, depth).
7 3 PackedTuple<uint8> rotation Rotation around axis (x, y, z).
10 6 PackedTuple<int16> coordinates Location of container (x, y, z)
16 1 uint8 container_type See below for values.
17 1 uint8 Area restored spawn requirement. Subtract 1 (since 0 means none) and add 16 to match the index for areas restored map data.
18 1 uint8 Unknown.
19 1 uint8 Unknown.
20 1 uint8 Unknown.
21 1 uint8 No respawn. Force include this entry in the Map Data collection bitfield.
22 1 uint8 Unknown.
23 1 uint8 Unknown.
24 4 uint32 Item parameter. Depends on the item.
  • Stray Bead: bitfield index for the Collection Data struct.
  • Praise (Clover): amount of praise granted.
28 12 uint8 array padding All 00.

container_state

Value Meaning
00 On Land
01 Underwater
02 Buried
03 On Land (unsure the difference from 00)
04 Required Pickup (Only astral pouch and devout beads chests.)
05 Powerslash Only (Kusa Village Gourds.)
06 In Canal (Sei'an Commoner's Quarter chests that are initially on land and later underwater.)
07 Tidal (Sunken Ship chests that are on land at night and underwater during day.)
09 Physics?
13 On Land (Pots only, but some are 00 or 03, so what's the difference?)

container_type

Value Meaning Object ID created
00 Free-standing N/A
01 Sasa Chest 0xB1E (vt/vt1e.dat)
02 Pot 0xB39 (vt/vt39.dat)
03 Wooden Horse 0xB38 (vt/vt38.dat)
04 Chest 0xB4B (vt/vt4b.dat)
05 Gale Shrine Chest 0xB4C (vt/vt4c.dat)
06 Clover 0xB44 (vt/vt44.dat)
07 Grass 0xB3E (vt/vt3e.dat)
08 Watermelon 0xB41 (vt/vt41.dat)
09 Locked Box 0x840 (ut/ut40.dat)
0a Bloom Pod 0xB4F (vt/vt4f.dat)
0b Guardian Fruit 0x373 (et/et73.dat)
0c Electric Chest 0xB50 (vt/vt50.dat)
0d Clam Shell 0xB51 (vt/vt51.dat)
0e Flower 0xB29 (vt/vt29.dat)
0f Flaming Chest 0x890 (ut/ut90.dat)
10 One-eyed Doll 0x9FB (gt/gtfb.dat)
11 Frozen Chest 0xB53 (vt/vt53.dat)
12 Crystal PS3 Rock 0xB70 (vt/vt70.dat)
13 Iron PS2 Rock 0xB71 (vt/vt71.dat)