View Single Post
  #12  
Old 20-05-2023, 07:59
sailwhist sailwhist is offline
Banned
 
Join Date: May 2023
Location: gfhfg
Posts: 9
Thanks: 6
Thanked 0 Times in 0 Posts
sailwhist is on a distinguished road
Quote:
Originally Posted by KaktoR View Post
@sailwhist

I will take your example for GTA4.

Sometimes you already see what a game file could include just by file name or folder name.

For example the following file
Code:
GTAIV\pc\audio\sfx\ambient_streams.rpf
"sfx" just means "sound effects" in the audio terminology. This means, you already know what is inside this file or what the file will contain mostly - namely sound/audio files of some sorts.

I don't have the game so I have to check steamdb depot for this game and sort the file list by type. What I can see is that literally all *.rpf files contain sound/audio files, just by looking at the file name and/or folder where the files are located.

Another example for this type is
Code:
GTAIV\pc\audio\sfx\radio_*.rpf
Just looking at all the file names beginning with radio_ I am pretty sure all these files contain all the music for the radio stations in game, just because I know the word "radio" and the name of the radio station in the file name.

But because I don't have the game nor any of the files, I can just guess that the files contain riff-wave files, mp3 files or raw files or whatever else, because I know msc can handle them mostly. And the post creator you have quoted said "you can use msc but i didn't see improve ratio...", so I think my guess is correct here lol.

Next one: movie files
For bink movies (BIK or BK2) you can mostly use BinkPack (bpk), which will compress this files lossless. Just note that sometimes it will not work, either because the bink files using some sort of alpha channel, using a codec which bpk cannot handle correctly, or - which applies to BK2 files - have a newer codec which BinkPack cannot handle at all. If you have Bink video files, you can do the following:
  1. Use HxD and see how the beginning of the file looks like. If the file has a "KB2n" (image) or anything greater then the "n" letter, BinkPack will fail on these files (this is mostly the case in new games, especially games which are build with unreal engine 4/5).
  2. Copy all the Bink video files to a test folder and use bpk on them, testing compression and decompression. Or use bpk file-by-file instead of all at once. This way you can sort out faulty ones of the list and note them somewhere, so you know what files making trouble to exclude them from bpk compression.

Next one: zlib etc.
Again back to steamdb depot for the game GTA4, I also see "*img" files, which are 6.91 GiB in size. I would guess that these files contain all sorts of other files and textures. So now, the post you quoted sais "rest of the file zlib:max:c32m+srep:m3f:a2+lolz... ", which is including this *.img files. In other words, it seems that these *.img files are compressed with either zlib or deflate I would say. Devs simply do this to save space. To be sure, you can follow this little guide (to be fair this is for oodle compression, but just ignoring oodle option and using zlib option isn't that complicated).

We always want to extract all the data/streams in the game files if possible, in other words we want to decompress them (xtool/other tools) to have fully possibility of deduplication (srep) and compression (lolz/lzma/whatever else) in order to compress them even better than the original.
Thank you for your assistance, but still I have no clue how to operate with all of these in DiskSpanGUI and how to apply all these methods, select files by files and make everything combined work altogether in a final compressed game.
Talking about audio/movies - I'm beginning to understand where they stored, but I'm not sure how to find every single audio/movie file in game folder to make sure I compressed all of these files with the right method.
Also, I don't understand how to choose exact settings for that method for gta4 (zlib and etc.). In diskspangui it only shows me presets for that but without numbers like in those guy method. There are a lot of settings in that software which scares me.
I literally don't know everything and I would like to see a detailed guide with an example on some game about how to apply all of these so me and others could use that as a complete FAQ on compressing games.
Thank you.
Reply With Quote