From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Library:Havok" |
|---|
| claim | "Havok packfile header: 0x40 bytes with magic, user tag, file version (0x0B in the reader), pointer size, endian, padding option, section count, contents pointers, a 16-byte version string such as hk_2014.2.0-r1, flags and the section offset; a SectionOffset of 16 adds 16 more bytes." |
|---|
| scope | | level | "library" |
|---|
| applies_to | "Library:Havok" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "hkPackfileHeader" |
|---|
| size_min | 64 |
|---|
| fields | | name | "magic0" |
|---|
| offset | 0 |
|---|
| type | "u32" |
|---|
| note | "0x57E0E057" |
|---|
|
| name | "magic1" |
|---|
| offset | 4 |
|---|
| type | "u32" |
|---|
| note | "0x10C0C010" |
|---|
|
| name | "userTag" |
|---|
| offset | 8 |
|---|
| type | "i32" |
|---|
|
| name | "fileVersion" |
|---|
| offset | 12 |
|---|
| type | "i32" |
|---|
| note | "reader asserts 0x0B" |
|---|
|
| name | "pointerSize" |
|---|
| offset | 16 |
|---|
| type | "u8" |
|---|
| note | "4 or 8" |
|---|
|
| name | "endian" |
|---|
| offset | 17 |
|---|
| type | "u8" |
|---|
| note | "0 = big endian, 1 = little endian" |
|---|
|
| name | "paddingOption" |
|---|
| offset | 18 |
|---|
| type | "u8" |
|---|
| note | "1: pointers padded to pointer size" |
|---|
|
| name | "baseClass" |
|---|
| offset | 19 |
|---|
| type | "u8" |
|---|
| note | "1" |
|---|
|
| name | "sectionCount" |
|---|
| offset | 20 |
|---|
| type | "i32" |
|---|
| note | "3" |
|---|
|
| name | "contentsSectionIndex" |
|---|
| offset | 24 |
|---|
| type | "i32" |
|---|
|
| name | "contentsSectionOffset" |
|---|
| offset | 28 |
|---|
| type | "i32" |
|---|
|
| name | "contentsClassNameSectionIndex" |
|---|
| offset | 32 |
|---|
| type | "i32" |
|---|
|
| name | "contentsClassNameSectionOffset" |
|---|
| offset | 36 |
|---|
| type | "i32" |
|---|
|
| name | "contentsVersion" |
|---|
| offset | 40 |
|---|
| type | "char[16]" |
|---|
| note | "e.g. hk_2014.2.0-r1, padded with 0xFF when written" |
|---|
|
| name | "flags" |
|---|
| offset | 56 |
|---|
| type | "i32" |
|---|
|
| name | "maxPredicate" |
|---|
| offset | 60 |
|---|
| type | "i16" |
|---|
|
| name | "sectionOffset" |
|---|
| offset | 62 |
|---|
| type | "i16" |
|---|
| note | "if 16, 16 further bytes follow (extended header to 0x50)" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "field order and widths in the HKXHeader constructor; offsets computed by summing the widths" |
|---|
| repo | "https://github.com/HKX2/HKX2Library" |
|---|
| commit | "b833954ac38f8a412c903184174d51d3e6aba68a" |
|---|
| path | "HKX2/PackFileCommon.cs" |
|---|
| lines | "35-62" |
|---|
|
| type | "source" |
|---|
| detail | "DeserializePartially reads the byte at 0x11 for endianness and starts the section headers at SectionOffset + 0x40" |
|---|
| repo | "https://github.com/HKX2/HKX2Library" |
|---|
| commit | "b833954ac38f8a412c903184174d51d3e6aba68a" |
|---|
| path | "HKX2/PackFileDeserializer.cs" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Packfile header" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-18T13:54:26.458Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-18T22:08:08.408Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read HKXHeader constructor in HKX2/PackFileCommon.cs at HKX2Library b833954 (lines 35-62): asserted magics 0x57E0E057/0x10C0C010, i32 UserTag, FileVersion 0x0B, bytes PointerSize(4|8)/Endian/PaddingOption/BaseClass(1), i32 SectionCount (3), four i32 contents fields, 16-byte version string, i32 Flags, i16 MaxPredicate, i16 SectionOffset; if 16, 16 more bytes (2+2+4+4+4). Offsets recomputed: 0,4,8,12,16,17,18,19,20,24,28,32,36,40,56,60,62." |
|---|
|
|
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-18T22:08:08.169Z" |
|---|
| summary | "Field order, widths and offsets re-read at the cited commit; raising to high" |
|---|
| changed | |
|---|
|
|
|---|