Shrek Team Action .res file

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
emanuelect
Posts: 35
Joined: Sat May 08, 2021 2:07 am

Shrek Team Action .res file

Post by emanuelect »

I'm trying to translate the game into my language, but I can't open the .res file in the book folder. Inside the file starts with xpr0. Can you create a script for me?

https://mega.nz/file/zgREkBST#xPy4SF3PS ... GWVyPaeZZ0
z4ruz
Posts: 75
Joined: Sun Jan 10, 2021 2:23 pm

Re: Shrek Team Action .res file

Post by z4ruz »

It seems to be already written, just need to find it and try.
emanuelect
Posts: 35
Joined: Sat May 08, 2021 2:07 am

Re: Shrek Team Action .res file

Post by emanuelect »

It wasn't scripted, 2 games were released under the name shrek 2. the script that was created is for shrek 2, not shrek 2 team action.
z4ruz
Posts: 75
Joined: Sun Jan 10, 2021 2:23 pm

Re: Shrek Team Action .res file

Post by z4ruz »

Search by magic (string inside file).
emanuelect
Posts: 35
Joined: Sat May 08, 2021 2:07 am

Re: Shrek Team Action .res file

Post by emanuelect »

Image
grandshot
Posts: 42
Joined: Mon Jun 07, 2021 8:20 pm

Re: Shrek Team Action .res file

Post by grandshot »

Format is XPR0, but have differences. Can you provide more samples?
grandshot
Posts: 42
Joined: Mon Jun 07, 2021 8:20 pm

Re: Shrek Team Action .res file

Post by grandshot »

All provide samples is a single textures. You can open it with TextureFinder.

Image

Set Shift to 2048 for skip header and 8888 = 24 + 8 as pixelfomat.
For most part of textures width is 320. If other would have another sizes, you should be found them by changing Width parameter manually. I can't see width\height params in format.

But, textures 10_1_L, 10_1_R, 10_2_L, 10_2_R is a regular DDS format. So you can try resave getted with TexFinder textures as uncompressed DDS R8G8B8A8, changing extension to *.res. That may work.
emanuelect
Posts: 35
Joined: Sat May 08, 2021 2:07 am

Post by emanuelect »

Apparently the file contains more than just the book image. I started a new game and the whole landscape behind it was missing.
emanuelect
Posts: 35
Joined: Sat May 08, 2021 2:07 am

Re: Shrek Team Action .res file

Post by emanuelect »

No, it didn't, the sight distance set to low, that's why I couldn't see the landscape. However, the book page is not showing.
grandshot
Posts: 42
Joined: Mon Jun 07, 2021 8:20 pm

Re: Shrek Team Action .res file

Post by grandshot »

Try texture size 320x448 instead of 320x449. TexFinder have fault in tex sizes.
emanuelect
Posts: 35
Joined: Sat May 08, 2021 2:07 am

Re: Shrek Team Action .res file

Post by emanuelect »

I meant that you can't see the page in game. Is there any way to open the file with gimp? It would make it easier for me to translate it and put it back into the game.
grandshot
Posts: 42
Joined: Mon Jun 07, 2021 8:20 pm

Re: Shrek Team Action .res file

Post by grandshot »

emanuelect wrote:I meant that you can't see the page in game.


That's may happend because texture size must be 320x448 pixels. TextureFinder saves texture not so correct, to 320x449 pixels. Texture size of pages may be hardcoded in engine, so if size not equal 320x448, its exception and nothing drawing.

Try file in attach, will this work or not.
emanuelect
Posts: 35
Joined: Sat May 08, 2021 2:07 am

Re: Shrek Team Action .res file

Post by emanuelect »

does not work
grandshot
Posts: 42
Joined: Mon Jun 07, 2021 8:20 pm

Re: Shrek Team Action .res file

Post by grandshot »

QuickBMS script for convert textures to DDS. Unzip to the quickbms.exe folder. Change path in xpr_textures_converter.bat to your res folder and execute (make a backup of folder before, of course).
DDS files with the res files names will be created.
After, when you done your work, execute the BAT file again for repack dds to res files.

Remind, what edited DDS must be saved to RGBA8 format, without compression and mipmaps.
Script support only these bookpage textures (320x448 px), all other will be skiped. It's because that res format not contain texture size info, how already noticed. Calculate size easy only for square textures. For non symmetric that's hard.
emanuelect
Posts: 35
Joined: Sat May 08, 2021 2:07 am

Re: Shrek Team Action .res file

Post by emanuelect »

Thank you very much, it works!