Tomb Raider (2013) (PC) (PS3) (XBOX) (*.tiger)

The Original Forum. Game archives, full of resources. How to open them? Get help here.
rajasrijan
n00b
Posts: 14
Joined: Tue Nov 04, 2014 4:31 pm
Has thanked: 1 time
Been thanked: 1 time

Re: Tomb Raider (2013) (PC) (PS3) (XBOX) (*.tiger)

Post by rajasrijan » Wed Jan 27, 2016 5:09 am

michalss wrote:
rajasrijan wrote:Hi all
I'm trying to create packer for TR, this is what i'm doing.

Unpacking:
1) Read the SFAT header, get entries pointing to DRM.
2) Read the DRM header, get pointers to CDRM.
3) Extract CDRM

Packing:
1) Create new bigfile.004.tiger, increment file count in SFAT header .
2) Read content from disk, zip it if needed.
3) Store it in new bigfile at the end.
3) Modify the offset in DRM header.

This is working for textures (didn't test on meshes). I tried replacing textures in game start menu and its working.

I'm stuck at finding all the CDRM entries, as there are a lot of CDRM entries which cannot be reached from headers.
Anyone figure out this problem?

I'll put code in github when i have a working not crashing code :) or by sat

Nice, i was working on same thing, i have completed working repacker... problem is that it will repack only files not contains any CDRM... :D

Can you please share your code ? Privately ?
Sure. :)
I'm little busy now :( . Ill send you ASAP.

rajasrijan
n00b
Posts: 14
Joined: Tue Nov 04, 2014 4:31 pm
Has thanked: 1 time
Been thanked: 1 time

Re: Tomb Raider (2013) (PC) (PS3) (XBOX) (*.tiger)

Post by rajasrijan » Sun Feb 14, 2016 7:41 am

Repacker code uploaded on github https://github.com/rajasrijan/TRExplorer.

Unpacker is working correctly but there a lot of bugs in packer. Feel free to have a look. Ill put binary when its stable enough.

Please backup game before using tool.

michalss
Moderator
Posts: 941
Joined: Sun Mar 27, 2011 8:42 pm
Has thanked: 10 times
Been thanked: 131 times

Re: Tomb Raider (2013) (PC) (PS3) (XBOX) (*.tiger)

Post by michalss » Sun Feb 14, 2016 9:54 am

rajasrijan wrote:Repacker code uploaded on github https://github.com/rajasrijan/TRExplorer.

Unpacker is working correctly but there a lot of bugs in packer. Feel free to have a look. Ill put binary when its stable enough.

Please backup game before using tool.
Thx, but is this for 2016 or 2013 ?
Quick BMS Editor GUI - simple easy to use
Goto : viewtopic.php?uid=34229&f=29&t=6797&start=0

Downloads from DropBox : https://dl.dropboxusercontent.com/u/

rajasrijan
n00b
Posts: 14
Joined: Tue Nov 04, 2014 4:31 pm
Has thanked: 1 time
Been thanked: 1 time

Re: Tomb Raider (2013) (PC) (PS3) (XBOX) (*.tiger)

Post by rajasrijan » Sun Feb 14, 2016 10:49 am

michalss wrote:
rajasrijan wrote:Repacker code uploaded on github https://github.com/rajasrijan/TRExplorer.

Unpacker is working correctly but there a lot of bugs in packer. Feel free to have a look. Ill put binary when its stable enough.

Please backup game before using tool.
Thx, but is this for 2016 or 2013 ?
It's 2013. I don't have 2016 yet. :(
But format should be similar. I dought they will completely reinvent format.

Gh0stBlade
Moderator
Posts: 678
Joined: Mon Jul 05, 2010 8:55 pm
Has thanked: 20 times
Been thanked: 318 times

Re: Tomb Raider (2013) (PC) (PS3) (XBOX) (*.tiger)

Post by Gh0stBlade » Sun Feb 14, 2016 2:05 pm

Repacking Tiger files should be easy if you can unpack them. What exactly is the issue?
Click the thanks button if I helped!

rajasrijan
n00b
Posts: 14
Joined: Tue Nov 04, 2014 4:31 pm
Has thanked: 1 time
Been thanked: 1 time

Re: Tomb Raider (2013) (PC) (PS3) (XBOX) (*.tiger)

Post by rajasrijan » Sun Feb 14, 2016 2:25 pm

Gh0stBlade wrote:Repacking Tiger files should be easy if you can unpack them. What exactly is the issue?
Complete format is not known.

Gh0stBlade
Moderator
Posts: 678
Joined: Mon Jul 05, 2010 8:55 pm
Has thanked: 20 times
Been thanked: 318 times

Re: Tomb Raider (2013) (PC) (PS3) (XBOX) (*.tiger)

Post by Gh0stBlade » Sun Feb 14, 2016 3:02 pm

rajasrijan wrote:
Gh0stBlade wrote:Repacking Tiger files should be easy if you can unpack them. What exactly is the issue?
Complete format is not known.
Which parts are unknown? To my knowledge the entire tiger format is known. Entire CDRM format is known. DRM should be fully known except parts of the duplicated section data at the EOF (I should check that actually).
Click the thanks button if I helped!

rajasrijan
n00b
Posts: 14
Joined: Tue Nov 04, 2014 4:31 pm
Has thanked: 1 time
Been thanked: 1 time

Re: Tomb Raider (2013) (PC) (PS3) (XBOX) (*.tiger)

Post by rajasrijan » Sun Feb 14, 2016 3:27 pm

Gh0stBlade wrote:
rajasrijan wrote:
Gh0stBlade wrote:Repacking Tiger files should be easy if you can unpack them. What exactly is the issue?
Complete format is not known.
Which parts are unknown? To my knowledge the entire tiger format is known. Entire CDRM format is known. DRM should be fully known except parts of the duplicated section data at the EOF (I should check that actually).
Can you point me to the format :) . I dont have the complete DRM format and there are some some CDRMs not reachable from the table at the begenning, those CDRMs are hard to replace.

shadowlonely1989
advanced
Posts: 78
Joined: Sun Nov 30, 2014 1:49 am
Has thanked: 44 times
Been thanked: 4 times
Contact:

Re: Tomb Raider (2013) (PC) (PS3) (XBOX) (*.tiger)

Post by shadowlonely1989 » Mon Feb 15, 2016 1:07 pm

rajasrijan wrote:Repacker code uploaded on github https://github.com/rajasrijan/TRExplorer.

Unpacker is working correctly but there a lot of bugs in packer. Feel free to have a look. Ill put binary when its stable enough.

Please backup game before using tool.
Thanks for your tool! How to use this tool?

I use this command:
TRExplorer bigfile_ENGLISH.000.tiger UNPACK patch_ENGLISH.000.tiger
Not working!
F:\Program Files (x86)\Eidos Interactive\Tomb Raider GOTY Edition>TRExplorer big
file_ENGLISH.000.tiger UNPACK patch_ENGLISH.000.tiger
rajasrijan's tiger decoder.

Tiger Header
Magic :53464154
Version :3
Parts :1
DRMs :8618
Base Path :pc-w
Loading data entries...success

Invalid operation.

F:\Program Files (x86)\Eidos Interactive\Tomb Raider GOTY Edition>pause
Press any key to continue . . .
Terminate batch job (Y/N)?
Thanks!

rajasrijan
n00b
Posts: 14
Joined: Tue Nov 04, 2014 4:31 pm
Has thanked: 1 time
Been thanked: 1 time

Re: Tomb Raider (2013) (PC) (PS3) (XBOX) (*.tiger)

Post by rajasrijan » Mon Feb 15, 2016 1:56 pm

shadowlonely1989 wrote:
rajasrijan wrote:Repacker code uploaded on github https://github.com/rajasrijan/TRExplorer.

Unpacker is working correctly but there a lot of bugs in packer. Feel free to have a look. Ill put binary when its stable enough.

Please backup game before using tool.
Thanks for your tool! How to use this tool?

I use this command:
TRExplorer bigfile_ENGLISH.000.tiger UNPACK patch_ENGLISH.000.tiger
Not working!
F:\Program Files (x86)\Eidos Interactive\Tomb Raider GOTY Edition>TRExplorer big
file_ENGLISH.000.tiger UNPACK patch_ENGLISH.000.tiger
rajasrijan's tiger decoder.

Tiger Header
Magic :53464154
Version :3
Parts :1
DRMs :8618
Base Path :pc-w
Loading data entries...success

Invalid operation.

F:\Program Files (x86)\Eidos Interactive\Tomb Raider GOTY Edition>pause
Press any key to continue . . .
Terminate batch job (Y/N)?
Thanks!
Try with small letters "unpack". Ill put a fix when I get home :)

P.S. Updated readme
Last edited by rajasrijan on Mon Feb 15, 2016 2:06 pm, edited 1 time in total.

Gh0stBlade
Moderator
Posts: 678
Joined: Mon Jul 05, 2010 8:55 pm
Has thanked: 20 times
Been thanked: 318 times

Re: Tomb Raider (2013) (PC) (PS3) (XBOX) (*.tiger)

Post by Gh0stBlade » Mon Feb 15, 2016 2:04 pm

rajasrijan wrote: Can you point me to the format :) . I dont have the complete DRM format and there are some some CDRMs not reachable from the table at the begenning, those CDRMs are hard to replace.
The DRM format is very close to Tomb Raider Underworld's contains the exact same components except the duplicated DRM Section info at the end of the DRM which is new. The only unknown field is the last 32-bit unsigned integer of the second DRM Section info, everything else is known. The value itself could be related to struct relocation or memory mapping.

I checked the code for your tool. I think the offset calculation is wrong. Also the game needs all hashes to be ordered in ascending order or it will crash.

Regards.
Click the thanks button if I helped!

shadowlonely1989
advanced
Posts: 78
Joined: Sun Nov 30, 2014 1:49 am
Has thanked: 44 times
Been thanked: 4 times
Contact:

Re: Tomb Raider (2013) (PC) (PS3) (XBOX) (*.tiger)

Post by shadowlonely1989 » Mon Feb 15, 2016 2:09 pm

rajasrijan wrote:
shadowlonely1989 wrote:
rajasrijan wrote:Repacker code uploaded on github https://github.com/rajasrijan/TRExplorer.

Unpacker is working correctly but there a lot of bugs in packer. Feel free to have a look. Ill put binary when its stable enough.

Please backup game before using tool.
Thanks for your tool! How to use this tool?

I use this command:
TRExplorer bigfile_ENGLISH.000.tiger UNPACK patch_ENGLISH.000.tiger
Not working!
F:\Program Files (x86)\Eidos Interactive\Tomb Raider GOTY Edition>TRExplorer big
file_ENGLISH.000.tiger UNPACK patch_ENGLISH.000.tiger
rajasrijan's tiger decoder.

Tiger Header
Magic :53464154
Version :3
Parts :1
DRMs :8618
Base Path :pc-w
Loading data entries...success

Invalid operation.

F:\Program Files (x86)\Eidos Interactive\Tomb Raider GOTY Edition>pause
Press any key to continue . . .
Terminate batch job (Y/N)?
Thanks!
Try with small letters "unpack". Ill put a fix when I get home :)
Thanks! How to unpack text from bigfile_ENGLISH.000.tiger pc-w\local\locals.bin?

rajasrijan
n00b
Posts: 14
Joined: Tue Nov 04, 2014 4:31 pm
Has thanked: 1 time
Been thanked: 1 time

Re: Tomb Raider (2013) (PC) (PS3) (XBOX) (*.tiger)

Post by rajasrijan » Mon Feb 15, 2016 2:25 pm

Gh0stBlade wrote:
rajasrijan wrote: Can you point me to the format :) . I dont have the complete DRM format and there are some some CDRMs not reachable from the table at the begenning, those CDRMs are hard to replace.
The DRM format is very close to Tomb Raider Underworld's contains the exact same components except the duplicated DRM Section info at the end of the DRM which is new. The only unknown field is the last 32-bit unsigned integer of the second DRM Section info, everything else is known. The value itself could be related to struct relocation or memory mapping.

I checked the code for your tool. I think the offset calculation is wrong. Also the game needs all hashes to be ordered in ascending order or it will crash.

Regards.
This was working with the vanilla game, without any updates, now its not. I thought there was more CDRM sections needed in new file to stop the crash(they seem to be loading 0x8000 bytes at ones and doing some switch case logic. So I thought more sections, still learning :) ).I fixed one offset calculation in NEXT section, I hope that's the one you're talking about.

You mean the hashes in the tiger header right?
If ascending order is needed then complete file repack will be required or a binary patch if its a simple security check. What do you think?

Gh0stBlade
Moderator
Posts: 678
Joined: Mon Jul 05, 2010 8:55 pm
Has thanked: 20 times
Been thanked: 318 times

Re: Tomb Raider (2013) (PC) (PS3) (XBOX) (*.tiger)

Post by Gh0stBlade » Mon Feb 15, 2016 2:41 pm

rajasrijan wrote: So I thought more sections, still learning :) ).I fixed one offset calculation in NEXT section, I hope that's the one you're talking about.
I mean the direct offset for both tiger->drm and drm->cdrm is wrong. (Try it on patch.000.tiger it's very likely your tool will crash)
rajasrijan wrote: This was working with the vanilla game, without any updates, now its not.
Save yourself the trouble and work with the patched version of the game. By doing so, you can simply modify the patch.*.tiger file which is much smaller. Adding new DRM files to those means they are loaded instead of the ones in the original Bigfile.
rajasrijan wrote: I thought there was more CDRM sections needed in new file to stop the crash(they seem to be loading 0x8000 bytes at ones and doing some switch case logic.
I'm not sure what you mean by this, could you explain it further please? If i recall correctly, CDRM files are not always compressed. That is very important, take a look at my tools here: https://github.com/Gh0stblade/cdcEngineTools those are for TR8 though.
rajasrijan wrote: You mean the hashes in the tiger header right?
If ascending order is needed then complete file repack will be required or a binary patch if its a simple security check. What do you think?
Yep, hashes in the tiger header must be sorted by ascending order or the engine will crash. I wrote an injector years ago and couldn't figure out why I kept getting crashes, turns out that was the problem. If you just work with the patch files then repacking will be much easier. From a technical perspective you shouldn't be altering the Bigfile.000.tiger since effectively, if you alter a file in there which has been patched in patch.000.tiger it will have no effect.

Regards.
Click the thanks button if I helped!

rajasrijan
n00b
Posts: 14
Joined: Tue Nov 04, 2014 4:31 pm
Has thanked: 1 time
Been thanked: 1 time

Re: Tomb Raider (2013) (PC) (PS3) (XBOX) (*.tiger)

Post by rajasrijan » Sun Feb 21, 2016 6:25 am

Hi,
Save yourself the trouble and work with the patched version of the game. By doing so, you can simply modify the patch.*.tiger file which is much smaller. Adding new DRM files to those means they are loaded instead of the ones in the original Bigfile.
Patch files seem to contain a lot of RDEF files. Any idea what those are?
I mean the direct offset for both tiger->drm and drm->cdrm is wrong. (Try it on patch.000.tiger it's very likely your tool will crash)
fixed. now it should work with all files

regards

Post Reply