Difference between revisions of "RPF archive"
Line 13: | Line 13: | ||
Version 2: 0x32465052 | Version 2: 0x32465052 | ||
+ | |||
Version 3: 0x33465052 | Version 3: 0x33465052 | ||
+ | |||
Version 6: 0x52504636 | Version 6: 0x52504636 | ||
+ | |||
Version 7: 0x52504637 | Version 7: 0x52504637 | ||
Revision as of 13:00, 1 November 2015
RPF (RAGE Package Format) is the format of game archives used in RAGE Engine. They can be edited with SparkIV or OpenIV.
Header
The RPF files all contain the same header. The header tells us the version of the archive, how many entries there are and whether or not the archive is encrypted.
4b - INT32 - RPF Version 4b - INT32 - Table of Contents Size 4b - INT32 - Number of Entries 4b - INT32 - Unknown 4b - INT32 - Encrypted
The RPF Version tells us the version of the RPF Archive:
Version 2: 0x32465052
Version 3: 0x33465052
Version 6: 0x52504636
Version 7: 0x52504637
The Table of Contents Size tells us the size of the table of contents segment in the file. The Number of Entries tells us the number of files contained in the archive. The Encryption flag tells us if the archive is encrypted, if the archive is unencrypted it is set to 0, otherwise it is non-zero.
Table of Contents
The Table of contents size is determined by the Table of Contents Size integer in the Header of the RPF archive. It starts after 2048 bytes from the file origin, and is encrypted depending on the encryption flag in the header. The Table of contents contains both Directories and File Entries. Both are different structures and take up different amounts of space.
Directory Entry
Directory entries follow this structure:
4b - INT32 - Name Offset 4b - INT32 - Flags 4b - UINT32 - Content Entry Index 4b - UINT32 - Content Entry Count
The Name Offset refers to the file offset that stores the name of the directory. The Flags just give information about the directory. The Content Entry Index is generally described in the first bit of the unsigned integer. The Content Entry Count describes how many entries are under this directory, and is generally defined in the first 4 bits of the unsigned integer.
File Entry
The File entries follow this structure:
4b - INT32 - Name Offset 4b - INT32 - Size 3b - UINT24 - Offset 1b - UCHAR8 - Resource Type 4b - UINT32 - Flags
The Name Offset refers to the file offset that stores the name of the file. The Size tells us the size of the file. The Offset tells us the file offset the file is stored in. The Resource Type tells us the type of resource that the file is. In the resource flag, the first bit tells us whether the file is compressed or not.
This section is incomplete. You can help by fixing and expanding it.
Tools
The following tools can be used to import & export files into RPF archives.
Grand Theft Auto V | |
---|---|
File Formats | .awc • .dat • .gfx • .gxt2 • .ide • .meta/.ymt/.xml • .mrf • .patch • .rpf • .ybn/.ybd • .ycd • .ydd • .ydr • .yed • .yfd • .yft • .yld • .ymap • .ymf • .ynd • .ynv • .ypdb • .ysc • .ytd • .ytyp • .yvr |
Documentation | Bink Video • Native functions • Weather types |
Tools | OpenIV • GIMS Evo • CodeWalker |
Multiplayer | GTAForums: GTA Online |
Useful links | Community portal • Discussion forums • GTA V Modding Forum • GTA5-Mods • Native Functions Database (alloc8or) |
Grand Theft Auto IV | |
---|---|
File Formats | .dat • .gxt • .ide • .img • .ipl • .nod • .sco • .rpf • .rrr • .wad • .wbd/.wbn • .wdd • .wdr • .wft • .whm • .wpl • .wtd |
Documentation | Audio • Bink Video • Cryptography • Cutscenes • GXT Text • Image listing • Keycodes • Map Listing • Native functions • Paths • Radar Blips • Radio Stations • Saves • Scenarios • VTable • Weapons |
Tools | ASI Loader • ENBSeries • G-Texture • GIMS IV • Ingame WPL Editor • IV Needle • OpenIV • SparkIV • XLiveLess • WPL Manager • X Mod Installer Alice • C++ Script Hook • .NET Script Hook • Scocl |
Tutorials | Importing Textures with OpenIV • Importing Textures with SparkIV |
Modifications | GTA Connected • Gostown IV • Four Multiplayer • IV Multiplayer • CitizenMP:IV Reloaded |
Useful links | Community portal • Discussion forums • Modding forums • Mods on GTAGarage.com |