Injustice 2 Format - thethiny/NRS-Asset-Manager GitHub Wiki

Injustice 2 File Format

Detailed binary format specification for IJ2 .xxx files. Struct layouts verified via reverse engineering.

Header (FPackageFileSummary) — 100 bytes

Offset Size Field Value
0x00 4 Tag 0x9E2A83C1
0x04 2+2 FileVersion + LicenseeVersion 732 + 157
0x08 4 TotalHeaderSize varies
0x0C 4 MidwayTeamFourCC "DCF2"
0x10 4 MidwayTeamVersion 80
0x14 4 ShaderVersion 570
0x18 4 BranchVersion "DDEV"
0x1C 4 PackageFlags 0x02080000
0x20 12 NameTable (count + offset) varies
0x2C 12 ExportTable (count + offset) varies
0x38 12 ImportTable (count + offset) varies
0x44 4 GameThreadExportCount varies
0x48 16 GUID varies
0x58 4 EngineVersion 2606
0x5C 4 CookedContentVersion 420
0x60 4 CompressionFlags 4 (Oodle)

FCompressedChunk — 24 bytes

Offset Size Field
0x00 8 UncompressedOffset (u64)
0x08 4 UncompressedSize (u32)
0x0C 8 CompressedOffset (u64)
0x14 4 CompressedSize (u32)

FObjectExport — 72+ bytes

Serialization order:

  1. ClassIndex (i32) — resolve_object
  2. SuperIndex (i32) — resolve_object
  3. OuterIndex (i32) — resolve_object
  4. ObjectName (FName = u32 index + u32 number)
  5. ArchetypeIndex (i32) — resolve_object
  6. ReferencedObjects (i32)
  7. ObjectFlags (u64)
  8. ObjectGuid (16 bytes, serialized as 4 x u32)
  9. SerialSize (u32)
  10. SerialOffset (u64)
  11. ComponentMap (TMap<FName, int> — variable, typically count=0 → 4 bytes)
  12. ExportFlags (u32)

FObjectImport — 28 bytes

Serialization order:

  1. ClassPackage (FName = u32 + u32)
  2. ClassName (FName = u32 + u32)
  3. OuterIndex (i32) — resolve_object
  4. ObjectName (FName = u32 + u32)

TFC (Texture File Cache)

IJ2 stores large texture mips in external .tfc files. See Texture2D Handler for the mip data structure.

Key characteristics:

  • No centralized tables — references are per-texture
  • TextureFileCacheName property specifies the .tfc file
  • TFC data uses the same Oodle block compression format
  • Large mips (1024+) in TFC, small mips inline in UPK