Difference between revisions of "Encounter (.ECT) File Format"
Jump to navigation
Jump to search
Heinermann (talk | contribs) (→ECTEntry: note) |
Heinermann (talk | contribs) (fix format description) |
||
Line 7: | Line 7: | ||
==File Format== | ==File Format== | ||
===Overall=== | ===Overall=== | ||
Repeats ECTEntry until the first field is -1. | |||
===ECTEntry=== | ===ECTEntry=== | ||
Line 23: | Line 15: | ||
! Start (Byte) !! Width (Bytes) !! Type !! Field Name !! Note | ! Start (Byte) !! Width (Bytes) !! Type !! Field Name !! Note | ||
|- | |- | ||
| 0 || 6 || PackedTuple<uint16> || coordinates || Location of encounter (x, y, z). | | 0 || 4 || int32 || unk || 6 for every entry. -1 on end. | ||
|- | |||
| 4 || 6 || PackedTuple<uint16> || coordinates || Location of encounter (x, y, z). | |||
|- | |- | ||
| | | 10 || 1 || uint8 || unknown1 || Unknown. | ||
|- | |- | ||
| | | 11 || 1 || uint8 || escape_radius || How far from the center of the arena to escape the encounter. | ||
|- | |- | ||
| | | 12 || 2 || ECTEntryFlags (uint16) || flags || Bitfield of flags. | ||
|- | |- | ||
| | | 14 || 2 || uint16 || pad || Always 00. | ||
|- | |- | ||
| | | 16 || 2 || uint16 || index || Increasing, no dupes in file, some missing? | ||
|- | |- | ||
| | | 18 || 2 || uint16 || unknown3 || Unknown. | ||
|- | |- | ||
| | | 20 || 4 || uint32 || pad2 || Always 00. | ||
|- | |- | ||
| | | 24 || 96 || EnemyEntry[4] || enemy || One for each enemy type in the encounter. | ||
|- | |- | ||
| | | 120 || 1 || uint8 || unknown4 || Unknown. | ||
|- | |- | ||
| | | 121 || 1 || uint8 || unknown5 || Unknown. | ||
|- | |- | ||
| | | 122 || 1 || uint8 || unknown6 || Unknown. | ||
|- | |- | ||
| | | 123 || 1 || uint8 || unknownugh || May affect triggering event? If you set the demon gate behind shinshu tree to 0, the bloom patch doesn't appear when you beat the gate. Probably area restoration ID. | ||
|- | |- | ||
| | | 124 || 1 || uint8 || unknown7 || Unknown. | ||
|- | |- | ||
| | | 125 || 1 || uint8 || unknown8 || Unknown. | ||
|- | |- | ||
| | | 126 || 1 || uint8 || unknown9 || Unknown. | ||
|- | |- | ||
| | | 127 || 1 || uint8 || unknowna || Unknown. | ||
|- | |- | ||
| | | 128 || 1 || uint8 || separate_waves || 00 mix enemy types, 01 separate different enemy types to different waves. | ||
|- | |- | ||
| | | 129 || 7 || uint8 array || padding || All 00. | ||
|} | |} | ||
Latest revision as of 06:45, 31 July 2025
Note: This page pertains to Reverse Engineering of Okami File Formats.
Explanation
This file defines each encounter on a single map.
File Format
Overall
Repeats ECTEntry until the first field is -1.
ECTEntry
Describes a single encounter.
Start (Byte) | Width (Bytes) | Type | Field Name | Note |
---|---|---|---|---|
0 | 4 | int32 | unk | 6 for every entry. -1 on end. |
4 | 6 | PackedTuple<uint16> | coordinates | Location of encounter (x, y, z). |
10 | 1 | uint8 | unknown1 | Unknown. |
11 | 1 | uint8 | escape_radius | How far from the center of the arena to escape the encounter. |
12 | 2 | ECTEntryFlags (uint16) | flags | Bitfield of flags. |
14 | 2 | uint16 | pad | Always 00. |
16 | 2 | uint16 | index | Increasing, no dupes in file, some missing? |
18 | 2 | uint16 | unknown3 | Unknown. |
20 | 4 | uint32 | pad2 | Always 00. |
24 | 96 | EnemyEntry[4] | enemy | One for each enemy type in the encounter. |
120 | 1 | uint8 | unknown4 | Unknown. |
121 | 1 | uint8 | unknown5 | Unknown. |
122 | 1 | uint8 | unknown6 | Unknown. |
123 | 1 | uint8 | unknownugh | May affect triggering event? If you set the demon gate behind shinshu tree to 0, the bloom patch doesn't appear when you beat the gate. Probably area restoration ID. |
124 | 1 | uint8 | unknown7 | Unknown. |
125 | 1 | uint8 | unknown8 | Unknown. |
126 | 1 | uint8 | unknown9 | Unknown. |
127 | 1 | uint8 | unknowna | Unknown. |
128 | 1 | uint8 | separate_waves | 00 mix enemy types, 01 separate different enemy types to different waves. |
129 | 7 | uint8 array | padding | All 00. |
ECTEntryFlags Format
Bit | Field Name | Note |
---|---|---|
0 | always_set | Seems to always be 1. |
1 | unknownb1o1 | Unknown. |
2 | unknownb1o2 | Unknown. |
3 | unknownb1o3 | Unknown. |
4 | day_only | Encounter only available during the day. |
5 | night_only | Encounter only available at night. |
6 | inescapable | Encounter cannot be escaped. |
7 | inescapable2 | Encounter cannot be escaped. Only used for devil gates, most no-indicator fights, and 2 scrolls. |
8 | unrepeatable | Encounter cannot be repeated. |
9 | unknownb2o1 | Unknown. |
a | demon_scroll | Encounter is represented by a demon scroll. |
b | devil_gate | Encounter is represented by a devil gate. |
c | unknownb2o4 | Unknown. |
d | unknownb2o5 | Unknown. |
e | unknownb2o6 | Unknown. |
f | unknownb2o7 | Unknown. |
EnemyEntry Format
Start (Byte) | Width (Bytes) | Type | Field Name | Note |
---|---|---|---|---|
0 | 1 | uint8 | enemy_id | See Enemy ID Table. |
1 | 1 | uint8 | cat_id | Category ID: 02 is enemies |
2 | 6 | uint8[6] | unknowns | Unknown. |
8 | 1 | uint8 | total | Total count of this enemy in this encounter. |
9 | 1 | uint8 | max_concurrent | Maximum number of this enemy present at once. |
10 | 1 | uint8 | unknown1 | Unknown. Always 00. Maybe padding? |
11 | 1 | uint8 | unknown2 | Unknown. |
12 | 12 | uint8 array | padding | All 00. |