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.agtData\decal.agtData\effects.agtData\game.agtData\Init.agtData\Localize.agtData\Option.agtData\vehicles.agtData\World\autoshop.agtData\World\cras.agtData\World\data.agtData\World\garage.agtData\World\koinonia.agtData\World\moonpalace.agtData\World\oros.agtData\World\parkinglot.agtPatch\Patch.000Patch\Patch.001Patch\Patch.002Patch\Patch.003Patch\Patch.004Patch\Patch.005Patch\Patch.006Patch\Patch.007Patch\Patch.008Patch\Patch.009Patch\Patch.010