Difference between revisions of "Save File (OKAMI) File Format"
Jump to navigation
Jump to search
The following article is currently a Work In Progress and will have more details soon.
The following article is currently a Work In Progress and will have more details soon.
The following article is currently a Work In Progress and will have more details soon.
The following article is currently a Work In Progress and will have more details soon.
Heinermann (talk | contribs) (→Appendix: add bestiary IDs) |
Heinermann (talk | contribs) (→Tracker Data: link to IDs) |
||
Line 153: | Line 153: | ||
| 0x00B2 || 0x52 || <code>uint16_t</code> || 2 || Unknown (probably padding). | | 0x00B2 || 0x52 || <code>uint16_t</code> || 2 || Unknown (probably padding). | ||
|- | |- | ||
| 0x00B4 || 0x54 || <code>uint32_t[3]</code> || 0x0C || Bitfield for whether a bestiary tome is unlocked. | | 0x00B4 || 0x54 || <code>uint32_t[3]</code> || 0x0C || Bitfield for whether a bestiary tome is unlocked. See [[#Bestiary IDs]]. | ||
|- | |- | ||
| 0x00C0 || 0x60 || <code>uint32_t[3]</code> || 0x0C || Bitfield for whether a bestiary tome is read. | | 0x00C0 || 0x60 || <code>uint32_t[3]</code> || 0x0C || Bitfield for whether a bestiary tome is read. See [[#Bestiary IDs]]. | ||
|- | |- | ||
| 0x00CC || 0x6C || <code>uint8_t</code> || 1 || Unknown | | 0x00CC || 0x6C || <code>uint8_t</code> || 1 || Unknown | ||
Line 161: | Line 161: | ||
| 0x00CD || 0x6D || <code>uint8_t[3]</code> || 3 || Probably padding | | 0x00CD || 0x6D || <code>uint8_t[3]</code> || 3 || Probably padding | ||
|- | |- | ||
| 0x00D0 || 0x70 || <code>uint32_t[3]</code> || 0x0C || Bitfield for whether an area has been visited once before. | | 0x00D0 || 0x70 || <code>uint32_t[3]</code> || 0x0C || Bitfield for whether an area has been visited once before. Index is the [[Map_Table#Vanilla_Index|Vanilla Map ID]]. | ||
|- | |- | ||
| 0x00DC || 0x7C || <code>uint32_t</code> || 4 || Time played. | | 0x00DC || 0x7C || <code>uint32_t</code> || 4 || Time played. |
Revision as of 23:27, 1 July 2025
Note: This page pertains to Reverse Engineering of Okami File Formats.
Save File
The save file is exactly 2 846 400 bytes (2.71MB), with a fixed allocation of 30 save slots.
Okami HD save file information is located at Steam/userdata/<user-id>/587620/remote/Steam/OKAMI
.
Save Slot
Each save slot is 94880 (0x172A0) bytes.
Offset | Type | Size | Description |
---|---|---|---|
0x0000 | uint32_t |
4 | 00 00 40 40 |
0x0004 | uint32_t |
4 | Area name string ID |
0x0008 | uint64_t |
8 | Slot checksum |
0x0010 | uint64_t |
8 | Save time RTC (result of wk::OSGetTimeRTC from flower_kernel.dll )
|
0x0018 | CharacterStats |
0x48 | Character Stats such as health, food, praise, godhood, position, and some unlocks. |
0x60 | TrackerData |
0x80 | Tracking information such as first-time item acquisition, logbook, bestiary, time played, etc. |
0xE0 | CollectionData |
0x11B0 | Items collected, inventory, current map, travel guides and various tomes collected, time and day, brush techniques, map states, rejuvenated areas, animals fed, money, demon fangs, enemies slain, etc. |
0x1290 | MapData[83] |
0x49EC | Persistent map flags and values (more map flags in CollectionData). Index is the Map Table vanilla index. |
0x5C7C | uint32_t[83][16] |
0x14C0 | Conversation dialog bits. 512 bits per map. If a bit is set, then the dialog has been completed before. First index is the Map Table vanilla index. Second is the bitfield index, which corresponds to the dialogue index in the map's MSD file. |
0x713C | uint32_t |
4 | unknown |
0x7140 | TextureData |
0x10160 | Texture information for drawn in-game art. i.e. the Imp Mask drawn in the Moon Cave. |
Bitfields
Bit access by id is done a specific way, using arrays of 32-bit integers and testing bits from highest to lowest.
The following is an example of how to test a bit at a specific index.
bool IsBitSet(uint32_t *data, uint32_t index) { return (data[index / 32] & (0x80000000 >> (index % 32))) != 0; }
The logic can be verified by using the Item Table IDs on the first item acquisition bitfield.
Character Stats
Save Offset | Relative Offset | Type | Size | Description |
---|---|---|---|---|
0x0018 | 0x00 | uint16_t |
2 | Current health |
0x001A | 0x02 | uint16_t |
2 | Max health |
0x001C | 0x04 | uint16_t |
2 | Current food (Astral Pouch) |
0x001E | 0x06 | uint16_t |
2 | Max food (Astral Pouch) |
0x0020 | 0x08 | uint16_t |
2 | unknown |
0x0022 | 0x0A | uint16_t |
2 | Current praise |
0x0024 | 0x0C | uint16_t |
2 | Total praise |
0x0026 | 0x0E | uint16_t |
2 | unknown (padding?) |
0x0028 | 0x10 | uint32_t[1] |
4 | Bitmask for dojo techniques unlocked |
0x002C | 0x14 | uint32_t |
4 | unknown |
0x0030 | 0x18 | uint8_t |
1 | Main weapon equipped. See #Weapon IDs. |
0x0031 | 0x19 | uint8_t |
1 | Sub weapon equipped. See #Weapon IDs. |
0x0032 | 0x1A | uint8_t |
1 | Current transformation (for Karmic Transformers).
0 = Original Form 7 = Karmic Transformer 1 8 = Karmic Transformer 6 9 = Karmic Transformer 5 10 = Karmic Transformer 4 11 = Karmic Transformer 2 12 = Karmic Transformer 9 13 = Karmic Transformer 7 14 = Karmic Transformer 3 15 = Karmic Transformer 8 |
0x0033 | 0x1B | uint8_t |
1 | unknown (padding?) |
0x0034 | 0x1C | uint16_t |
2 | Godhood Points |
0x0036 | 0x1E | uint16_t |
2 | unknown (padding?) |
0x0038 | 0x20 | uint64_t |
8 | Weapons upgraded with gold dust. Use 1 << weapon ID to test.
|
0x0040 | 0x28 | uint16_t |
2 | Vengeance Slip (deflect enemy attacks) timer. |
0x0042 | 0x2A | uint16_t |
2 | Steel Fist Sake (attack boost) timer. |
0x0044 | 0x2C | uint16_t |
2 | Steel Soul Sake (defense boost) timer. |
0x0046 | 0x2E | uint16_t |
2 | unknown (padding?) |
0x0048 | 0x30 | float[3] |
0xC | x, y, z |
0x0054 | 0x3C | float[3] |
0xC | u, v, w |
Tracker Data
Save Offset | Relative Offset | Type | Size | Description |
---|---|---|---|---|
0x0060 | 0x00 | uint32_t[8] |
0x20 | Bitfield for first time item acquisition flags, using Item Table IDs. |
0x0080 | 0x20 | uint32_t[3] |
0x0C | Bitfield for game story progression flags. When major events happen, one of these gets set. |
0x008C | 0x2C | uint32_t[2] |
8 | Bitfield for unique animal types fed. Each animal type will get one bit set (i.e. all sparrows only have 1 bit), but each unique animal also gets a separate bit (such as Warrior canines and Inaba the hare). |
0x0094 | 0x34 | uint32_t[2] |
8 | Unknown Bitfield, mainly for event related fights or encounters. |
0x009C | 0x3C | uint32_t[1] |
4 | Bitfield for brush upgrades. Doesn't give the upgrade if it's set, probably more for tracking. |
0x00A0 | 0x40 | uint32_t |
4 | Number of game overs during the run. |
0x00A4 | 0x44 | uint32_t[1] |
4 | Bitfield for options set.
1 = Controller Vibration: Off 2 = Camera Control: Invert Y Axis 4 = Just saved 6 = Camera Control: Invert X Axis 9 = ??? gives all karmic transformers when set and specific code called 10 = Filter: Light 11 = Filter: Heavy 12 = Aspect Ratio: 4:3 13 = Mini-Games: On |
0x00A8 | 0x48 | uint32_t[1] |
4 | Bitfield for areas restored. |
0x00AC | 0x4C | uint16_t |
2 | BGM Volume (0 - 127). |
0x00AE | 0x4E | uint16_t |
2 | SE Volume (0 - 127). |
0x00B0 | 0x50 | uint16_t |
2 | Voice Volume (0 - 127). |
0x00B2 | 0x52 | uint16_t |
2 | Unknown (probably padding). |
0x00B4 | 0x54 | uint32_t[3] |
0x0C | Bitfield for whether a bestiary tome is unlocked. See #Bestiary IDs. |
0x00C0 | 0x60 | uint32_t[3] |
0x0C | Bitfield for whether a bestiary tome is read. See #Bestiary IDs. |
0x00CC | 0x6C | uint8_t |
1 | Unknown |
0x00CD | 0x6D | uint8_t[3] |
3 | Probably padding |
0x00D0 | 0x70 | uint32_t[3] |
0x0C | Bitfield for whether an area has been visited once before. Index is the Vanilla Map ID. |
0x00DC | 0x7C | uint32_t |
4 | Time played. |
Collection Data
Map Data
Relative Offset | Type | Size | Description |
---|---|---|---|
0x00 | uint32_t[32] |
0x80 | Map specific data, not shared like the remaining structure. For example, index 0 on Kamiki is a bitfield, index 0 on Shinshu is a counter. |
0x80 | uint32_t[3] |
0xC | Bitfield for revealing buried objects. Shares same ID with collected object bitfield. |
0x8C | uint32_t[3] |
0xC | Bitfield for collected objects. Includes chests, permanent fruit, blooming clovers. |
0x98 | uint32_t[1] |
0x4 | Unknown. |
0x9C | uint32_t |
0x4 | Time of day. Usually synchronized with world time of day. |
0xA0 | uint32_t[3] |
0xC | Bitfield for map areas restored. |
0xAC | uint32_t[1] |
0x4 | Bitfield for trees bloomed. |
0xB0 | uint32_t[1] |
0x4 | Bitfield for cursed trees bloomed (the ones that throw cursed fruit at you). |
0xB4 | uint32_t[4] |
0x10 | Bitfield for fixed fights cleared. Maybe other uses. |
0xC4 | uint32_t[2] |
0x8 | Bitfield for whether NPCs have more to say. |
0xCC | uint32_t[2] |
0x8 | Unknown Bitfield related to NPCs. Same IDs as above. |
0xD4 | uint32_t[2] |
0x8 | Bitfield for maps explored (i.e. dungeons). |
0xDC | uint32_t[1] |
0x4 | Unknown Bitfield. |
0xE0 | uint32_t[1] |
0x4 | Unknown Bitfield. |
Texture Data
Save Offset | Relative Offset | Type | Size | Description |
---|---|---|---|---|
0x7140 | 0x00 | uint8_t[0x8000] |
0x8000 | Texture 1 Image bits (4 bits per pixel) (256x256) |
0xF140 | 0x8000 | uint32_t[16] |
0x40 | Texture 1 unknown colour information |
0xF180 | 0x8040 | uint32_t[16] |
0x40 | Texture 1 unknown colour information |
0xF1C0 | 0x8080 | hx::Texture[2] |
0x30 | Texture 1 unknown |
0xF1F0 | 0x80B0 | uint8_t[0x8000] |
0x8000 | Texture 2 Image bits (4 bits per pixel) (256x256) |
0x171F0 | 0x100B0 | uint32_t[16] |
0x40 | Texture 2 unknown colour information |
0x17230 | 0x100F0 | uint32_t[16] |
0x40 | Texture 2 unknown colour information |
0x17270 | 0x10130 | hx::Texture[2] |
0x30 | Texture 2 unknown |
Appendix
Weapon IDs
Reflectors 0x00 - Divine Retribution 0x01 - Snarling Beast 0x02 - Infinity Judge 0x03 - Trinity Mirror 0x04 - Solar Flare Glaives 0x10 - Tsumugari 0x11 - Seven Strike 0x12 - Blade of Kusanagi 0x13 - Eighth Wonder 0x14 - Thunder Edge Rosaries 0x20 - Devout Beads 0x21 - Life Beads 0x22 - Exorcism Beads 0x23 - Resurrection Beads 0x24 - Tundra Beads 0xFF - None
Bestiary IDs
0 - Green Imp 1 - Red Imp 2 - Yellow Imp 3 - Blue Imp 4 - Black Imp 5 - Headless Guardian 6 - Bell Guardian 7 - Halo Guardian 8 - Executioner Guardian 9 - Namahage 10 - Blade Namahage 11 - Bucket Namahage 12 - Umbrella Namahage 13 - Cannon Namahage 14 - Clay Soldier 15 - Clay Samurai 16 - Clay Drummer 17 - Clay Flyer 18 - Clay Shogun 19 - Bud Ogre 20 - Chimera 21 - Igloo Turtle 22 - Dead Fish 23 - Crow Tengu 24 - Ubume 25 - Fire Eye 26 - Ice Mouth 27 - Thunder Ear 28 - Earth Nose 29 - Fire Doom Mirror 30 - Ice Doom Mirror 31 - Thunder Doom Mirror 32 - Wind Doom Mirror 33 - Poltergeist 34 - Ichiro 35 - Jiro 36 - Saburo 37 - Blue Cyclops 38 - Great Tengu 39 - Crimson Helm 40 - Red Ogre 41 - Blue Ogre 42 - Bull Charger 43 - Spider Queen 44 - Bandit Spider 45 - Orochi 46 - True Orochi 47 - Waka (w/ flute) 48 - Waka (w/ swords) 49 - Blight 50 - Evil Rao 51 - Oki 52 - Nagi 53 - Dogu 54 - Ninetails 55 - Canine Warrior Chu 56 - Canine Warrior Jin 57 - Canine Warrior Gi 58 - Canine Warrior Tei 59 - Canine Warrior Chi 60 - Canine Warrior Ko 61 - Canine Warrior Rei 62 - Canine Warrior Shin 63 - Tube Fox 64 - Golden Demon Lechku 65 - Silver Demon Nechku 66 - Yami (red) 67 - Yami (green) 68 - Yami (blue) 69 - Yami (yellow) 70 - Yami (hand)