I'm working on my FiveM Mod Manager so I need to figure out how to read RPF files. GTA5 uses RPF7. After getting through multiple rabbit holes, I deduced there is little to none documentation about RPF7.
Fortunately, I found out Codewalker has RpfFile
class (which was very well documented, thanks).
This helped me a lot and it's what I started working off of.
I want to dig through the hard part, so other modders/devs don't have to. My goal is to make the documentation as accessible and helpful as possible!
This project is WIP and most of the stuff is subject to change.
Feel free to create an issue if you find something. Anything helps! 🤗
- dexyfex for Codewalker - RPF decoder source code 😉
- OpenIV Team for OpenIV - Helped me while creating and modifying RPFs 🔧
- WerWolv for ImHex - Helped me as an amazing tool for reverse engineering 🔎
- GTAMods Wiki - Great documentation of older RPF versions
- ❔Uncomfirmed
- u8 - u64: Unsigned integer
- i8 - i64: Signed integer
- string: Array of
char
label | type | size |
---|---|---|
RPF Version | u32 / string | 4B |
Entry Count | u32 | 4B |
Names Data Size | u32 | 4B |
Encryption Type | u32 | 4B |
RPF Version should be "RPF7" (0x52504637)
type | hex | decimal | string |
---|---|---|---|
None | 0 | 0 | |
Open | 0x4E45504F | 1313165391 | "OPEN" |
AES | 0x0FFFFFF9 | 268435449 | |
NG | 0x0FEFFFFF | 267386879 |
label | type | size |
---|---|---|
Name Offset | u16 | 2B |
Flags❔ | u24❔ | 3B❔ |
Offset (Always 0x7FFFFF) | u24 | 3B |
First Entry Index | u32 | 4B |
Entry Count | u32 | 4B |
label | type | size |
---|---|---|
Name Offset | u16 | 2B |
Flags❔ | u24❔ | 3B❔ |
Offset (in 512B units) | u24 | 3B |
Size | u32 | 4B |
If file is compressed:
- Flags: size of the compressed file
- Size: size of the original file
...to be continued