Generic Archive (*.agt)
Summary
The primary archive format. This is practically a zip, but with a custom format. This file format has remained the same from the earliest known version.
These files are always "encrypted", see Encryption.
Encryption
Almost the entire file is encrypted with a simple repeating XOR cipher. This cipher is hardcoded into the client and has remained the same from the earliest known version.
The very beginning of the file, the header, is plain. After that, from byte 0x20, the rest of the file is encrypted. Even though the encrypted section starts at 0x20, the offset into the cipher is absolute (also starts at 0x20).
Structure
These are the building blocks this archive format is built on. The offsets are relative to the beginning of the structure, not the file.
- Header
- File Info
- Repeated for every file
- File Contents
- Repeated for every file
Header
Offset | Type | Notes |
---|---|---|
0x00 | char[8] | always "NayaPack" |
0x08 | uint32 | always 0 |
0x0C | uint16 | always 1 |
0x0E | uint16 | always 1 |
0x10 | uint32 | File Count |
0x14 | uint32[3] | always 0 |
File Info
Offset | Type | Notes |
---|---|---|
0x00 | uint32 | Compressed Chunks Position |
0x04 | uint32 | Compressed Chunk Count |
0x08 | uint32 | Decompressed Length |
0x0C | uint32 | File Path Length |
0x10 | char[File Path Length] | File Path |
File Contents
Offset | Type | Notes |
---|---|---|
0x00 | uint16[Compressed Chunk Count] | Compressed Chunk Length |
n/a | uint8[Compressed Chunk Length] | Compressed Chunk Data (zlib deflate) |
Locations
Based on 0.02TW as an example:
Data_TW.agt
Data\decal.agt
Data\effects.agt
Data\game.agt
Data\Init.agt
Data\Localize.agt
Data\Option.agt
Data\vehicles.agt
Data\World\autoshop.agt
Data\World\cras.agt
Data\World\data.agt
Data\World\garage.agt
Data\World\koinonia.agt
Data\World\moonpalace.agt
Data\World\oros.agt
Data\World\parkinglot.agt
Patch\Patch.000
Patch\Patch.001
Patch\Patch.002
Patch\Patch.003
Patch\Patch.004
Patch\Patch.005
Patch\Patch.006
Patch\Patch.007
Patch\Patch.008
Patch\Patch.009
Patch\Patch.010