Loot (.ITS) File Format

From Ōkami Speedrun Wiki
Jump to navigation Jump to search

Note: This page pertains to Reverse Engineering of Okami.

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.

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<uint16> coordinates Location of container (x, y, z)
16 1 uint8 container_type See below for values.
17 8 uint8 array unknowns Unknown.
25 15 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.)
13 On Land (Pots only, but some are 00 or 03, so what's the difference?)

container_type

Value Meaning
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
13 Iron PS2 Rock