Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. The Criminal Enterprises
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Support

    3. Suggestions

*DO NOT* SHARE MEDIA OR LINKS TO LEAKED COPYRIGHTED MATERIAL. Discussion is allowed.

[RDR-CELL-XENON|RAGE-V]Red Dead Redemption knowledge base


Mr. Leisurewear
 Share

Recommended Posts

Mr. Leisurewear

RDR knowledge base - Path to Rage(n)lightment

Who am i ?

Hello i identify myself with the nickname "Mr Leisurewear" (from the nickname that Trevor gave Steve haines in one of the mission),

and in my spare time i hold myself busy with graphics programming and game programming , as this is also my profession it interests me a lot.

3 years ago i started to look into the file formats from Red Dead Redemption, because i have little time available it took me some time to gather enough info about the game.

Soon a small group of people gathered around me and we started converting the whole map of RDR inside V PC which you may have known from the hyped "high profile mod Red Dead Redemption V"

Link to the forum thread

Shortly after i was contacted by Take Two to cease my activities , as to why you can look that up in the thread.

So one year goes by and nothing changed on RDR's front , and we are nearing 1 year after the alleged C&D of our project so i decided to share my knowledge to the gta community.

What the community does with this info is entirely up to them, i hope by dropping this quite large knowledge it creates some momentum towards more Redemption stuff :)

I will be dividing the info up into sections of interest like -> META (Text , xml , tune , etc...), GFX (Graphics), SYSTEMS (Anims , sound, cutscene etc...)

I will be adding info more and more by the day as i continue to find more stuff as i'm constantly researching RDR expect more to come.

I can only do some pieces per day because of time limitations so if it seems a little bit too little of information please wait a few days :p

You can always hit me up on PM for more info !

All of this info will aply to both platforms , CELL and XENON are mostly interchangeable

- Standard information

 

 

-Rage Package Files [xenon, cell] .RPF

 

 

  • Version 6
  • Big Endian
  • Encryption: for the Table Of Contents : AES Rijndael16 , key is inside the XEX or ELF executables of each platform , which is 32 bytes long, sometimes key of certain paltform is interchangeable with other platform
  • Encryption: Blocksize = 128
  • Encryption: Key size = 256
  • Encryption: Ciphermode = ECB , no padding
  • Get the Table of Contents data block size by doing -> Rpf6Header::entryCount * 20
  • Directory and filenames are Hashed using the Jenkins One At A time (JOAAT) Hashing algorithm
  • The name table containing the names of each directory and file (hash) is located inside the TOC after all the entries
Header: (size = 0x10)	magic 		: int32 : 4b	entrycount	: int32 : 4b	unknown		: int32 : 4b	encrypted	: int32 : 4bToc: (starts right behind header block) (tocentry size = 0x20)Direntry:	nameoffset	: int32 : 4b	flags		: int32 : 4b	contententryindex	: uint32 : 4b	contententrycount	: uint32 : 4bFilentry:	nameoffset	: int32	: 4b	size		: int32 : 4b	offset		: unt24 : 3b	Resource Type	: byte  : 1b	flags		: uint32 : 4bData block

 

 

-Rage Package Files [cell] .RPF inside an .SDAT file

 

  • On the PS3 the game downloads a certain amount of files inside the blu ray rpf to the internal hdd , these files are again packaged into an rpf but contained inside a Secure Data pack file (.sdat) , the file is entirely encrypted and can be decrypted using the "make_npdata" tool (google is your friend). Simply feeding this file inside the command line tool will give you the RPF and can be opened with the information above.

 

-Reading RPF files (Pseudo code)

 

  • coming in the next edits

 

 

 

 

-Magnificent streaming AKA RSC's (ReSource Container files)

 

 

-Before you read everything else !

  • In order to accomodate the insanely (by today's standards) small memory sizes of both the 360 and ps3 Rockstar decided to make everything streamable from a certain device. If a certain resource isn't needed anymore it can be unloaded from both the system and graphics memory.
  • PS3 uses 2 seperate memory pools , the system memory which is accessible by the cell processor and the graphics memory which is accessible by the RSX graphics processor. Both are 256MB large.
  • The 360 does it differently it uses a unified memory environment of 512MB large which both the cpu and the gpu can access.
  • Therefore the RSC exists; which is a streamable file who's internal format is divided up into memory pages which can be easily relocated to find a suitable place inside the ram to fill up every piece of memory available efficiently.

-Dissecting a Resource container

 

  • The real RSC data is contained inside the 16 byte size header (0x10)
  • Resource Container example>The header of an RSC (size = 0x10) (not always !!)	magic		: int32 : 4b	version 	: uint32: 4b	SysBitfield	: uint32: 4b	GfxBitfield	: uint32: 4b
  • Not all the RSC's used in the game contain two bitfields however all of the RSC's use at least the Sys bitfield , the Gfx bitfield is only added if the RSC also contains a Graphics segment more on that later.
  • Ebq1wN1.png
  • Notice that the magic "RSC" is actualy backwards ? , this is because both system's processors work in the Big endian order which is the least signifcant byte is first , in V / IV / Payne this will be RSC on the pc versions because intel chips use Little Endian. Therefore in C# tools you need to have a adapted Bianry reader that swaps the bytes on the fly in the stream.
  • After these 16 bytes the actual file begins where the game data is stored.

-What kind of gibberish is underneath there ?

  • To save space on certain media devices these RSC files are compressed.
  • Xenon rsc's use the proprietary LZX compression method which is exposed as a framework inside the Xbox development kit which only licensee's can get.
  • Unfortunatly the method is entirely known and i will post info about that too.
  • Cell rsc's are much simpler , just like the PC streamables for every other rage game they use the commonly used ZLIB Deflate algorithm
  • You can identify ZLIB compressed files by this ZLIB header bytes
  • iG9MpEE.png
  • ZLIB has multiple compression types which generate slightly different header each time , but rockstar uses only compression type which is the BEST COMPRESSION type
  • Identifying an LZX header
  • 6qcraNV.png
  • LZX header actually has some 2 byte header trailer , which can vary based on the file.
  • After these headers the file begins.

-Decompressing both platform RSC's

Coming in next edits

 

 

 

 

-GFX

 

 

  • Coming in the next edits !

 

 

 

Loading more data....

Edited by Mr. Leisurewear
Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...
Mr. Leisurewear

Hi there , i ghave been been really busy with work , so i couldn't post anything more.

i plan todo some more updates this summer tho , but i can't really promise anything sadly ,as my time schedule is pretty variable :/

  • Like 2
Link to comment
Share on other sites

  • 2 years later...

Hello, how do I repack the X-360 .xst files on Red Dead Redemption? I want to translate for Brazil. Could you make the tools to repack .xst files? It looks like ReSource Container files.

  • excuseme 1
Link to comment
Share on other sites

  • 1 year later...

Is there anyone who knows how to take a look at the physics configuration from RDR1? I know a bit about how to configure the euphoria physics.
I want to understand how it worked in RDR1 to create that classic western ragdoll motions in RDR2 as well.
If someone with that kind of knowledge is willed to help me, please send me a PM or add me on Discord leckeres_bratgut#8804 .
I know that the chances for a response are not good but I would really appreciate any help or tips!
Thanks!

  • excuseme 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.