Skip to main content

RPKG

RPKGs (Resource Packages) are the archive format Glacier 2 Engine games use. Hitman 3 introduced a new kind of resource package file (RPK2), It is structurally similar to RPKG and the game is backward compatible with the previous format.

HITMAN WOA

Base archive structure

TypeSizeDescription*
string32File magic, GKPR or 2KPR
unsigned int32unknown (always seems to be 0x1)not in GKPR
unsigned int8chunk numbernot in GKPR
unsigned int8chunk type (0x00 standard, 0x01 addon)not in GKPR
unsigned int8chunk patch numbernot in GKPR
?8unknown (always seems to be 0x78)not in GKPR
?8unknown (always seems to be 0x78)not in GKPR
unsigned int32resource count
unsigned int32resource data table size
unsigned int32patch deletion entry countonly in patch file
patch entries (if patch deletion entry count > 0):
TypeSizeDescription
unsigned int64resource hash value (RuntimeResourceID)
resource data table, per entry:
TypeSizeDescription
unsigned int64resource hash value (RuntimeResourceID)
unsigned int64resource data offset
unsigned int32resource (compressed) data size (and XOR scrambled flag)
resource metadata table, per entry:
TypeSizeDescription
unsigned char[]32type extension
unsigned int32resource references table size
unsigned int32resource states table size (unused)
unsigned int32resource (uncompressed) size final
unsigned int32resource size requirement inside memory
unsigned int32resource size requirement inside video memory
if the resource references table size is > 0 and there are hash references
TypeSizeDescription
unsigned int32resource reference count
reference flags, per entry:
TypeSizeDescription
byte5language code
bool1is acquired resource
byte2reference type (0x0 Install, 0x1 Normal or 0x2 Weak)
reference RuntimeResourceIDs, per entry:
TypeSizeDescription
unsigned int64reference's RuntimeResourceID