Skip to content

Bobrokus/rpf7-docs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 

Repository files navigation

RPF7 Archive Documentation from my research 🔬 (WIP)

Why did I create this?

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!

Contribution is highly appreciated! 🙌

NOTE

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! 🤗

Credits ⭐

  • 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

Legend ❓

  • ❔Uncomfirmed
  • u8 - u64: Unsigned integer
  • i8 - i64: Signed integer
  • string: Array of char

Header

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)

Encryption Type

type hex decimal string
None 0 0
Open 0x4E45504F 1313165391 "OPEN"
AES 0x0FFFFFF9 268435449
NG 0x0FEFFFFF 267386879

Entries Data

Directory Entry

label type size
Name Offset u16 2B
Flags❔ u24❔ 3B❔
Offset (Always 0x7FFFFF) u24 3B
First Entry Index u32 4B
Entry Count u32 4B

File Entry

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

About

RPF7 documentation from my research

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published