LEGO Worlds/LEGO Star Wars: TFA - .DAT

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
ProfBrickkeeper
Posts: 13
Joined: Mon Jun 13, 2016 7:52 pm

LEGO Worlds/LEGO Star Wars: TFA - .DAT

Post by ProfBrickkeeper »

Hello,

With the latest update to LEGO Worlds and LEGO Star Wars: The Force Awakens coming out later this month, Tt Games/Traveller's Tales has once again taken the initiative to update their .DAT resource format, rendering the current script unusable with the latest games. From my time looking inside the GAME.DAT file, the changes appear to primarily be in the header and footer of the file. For anyone who wants to help, the latest complete GAME.DAT file can be found HERE.

Thanks!
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: LEGO Worlds/LEGO Star Wars: TFA - .DAT

Post by aluigi »

ProfBrickkeeper
Posts: 13
Joined: Mon Jun 13, 2016 7:52 pm

Re: LEGO Worlds/LEGO Star Wars: TFA - .DAT

Post by ProfBrickkeeper »

aluigi wrote:Script 0.9.2 :D
http://aluigi.org/bms/ttgames.bms


Thanks a ton. I appreciate you updating your script to the latest version. This ought to keep current for the next several months. :D
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: LEGO Worlds/LEGO Star Wars: TFA - .DAT

Post by AnonBaiter »

^ But not for long...
https://www.sendspace.com/file/bcuoxz

It's from the WiiU version of that The Force Awakens game. I have yet to obtain the PC/PS3/X360 version to see if it's the same issue.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: LEGO Worlds/LEGO Star Wars: TFA - .DAT

Post by aluigi »

What exact error you get?
I guess I need a full archive because after rebuilding GAME2.dat everything works till I reach the zeroes.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: LEGO Worlds/LEGO Star Wars: TFA - .DAT

Post by AnonBaiter »

Something like this:

Code: Select all

  offset           filesize   filename
--------------------------------------
- enter in folder E:\LEGO_Star_Wars_The_Force_Awakens_WiiU-iND\LEGO Star Wars The Force Awakens [BLGEWR]\content
- open input file E:\LEGO_Star_Wars_The_Force_Awakens_WiiU-iND\LEGO Star Wars The Force Awakens [BLGEWR]\content\GAME.hdr

Error: [myfseek] the offset 0x0000000029440033 in the file -1 can't be reached

Last script line before the error or that produced the error:
  129 goto NAME_OFF MEMORY_FILE
Anyway, if you're looking for the full archive then I'll just upload the one with the lowest size. Deal?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: LEGO Worlds/LEGO Star Wars: TFA - .DAT

Post by aluigi »

Yeah, go with the full archive
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: LEGO Worlds/LEGO Star Wars: TFA - .DAT

Post by AnonBaiter »

aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: LEGO Worlds/LEGO Star Wars: TFA - .DAT

Post by aluigi »

It works perfectly here:
2414 files found in 12 seconds
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: LEGO Worlds/LEGO Star Wars: TFA - .DAT

Post by AnonBaiter »

So that means I'm doing something wrong?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: LEGO Worlds/LEGO Star Wars: TFA - .DAT

Post by aluigi »

For sure there is no problem with GAME2.dat, try with it.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: LEGO Worlds/LEGO Star Wars: TFA - .DAT

Post by AnonBaiter »

I don't know what I'm doing...

Code: Select all

Error: [myfseek] the offset 0x00000000089d0020 in the file -1 can't be reached

Last script line before the error or that produced the error:
  129 goto NAME_OFF MEMORY_FILE
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: LEGO Worlds/LEGO Star Wars: TFA - .DAT

Post by aluigi »

I have an idea, try to temporary renaming GAME2.hdr in something else (like _GAME2.hdr) and retry.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: LEGO Worlds/LEGO Star Wars: TFA - .DAT

Post by AnonBaiter »

No such luck(or maybe it's just my incompetence)...

Code: Select all

  offset           filesize   filename
--------------------------------------
- enter in folder E:\LEGO_Star_Wars_The_Force_Awakens_WiiU-iND\LEGO Star Wars The Force Awakens [BLGEWR]\content
- open input file E:\LEGO_Star_Wars_The_Force_Awakens_WiiU-iND\LEGO Star Wars The Force Awakens [BLGEWR]\content\_GAME2.hdr
- enter in folder E:\LEGO_Star_Wars_The_Force_Awakens_WiiU-iND\LEGO Star Wars The Force Awakens [BLGEWR]\content
  coverage file 0     0%   4          159874288
- open input file E:\LEGO_Star_Wars_The_Force_Awakens_WiiU-iND\LEGO Star Wars The Force Awakens [BLGEWR]\content\_GAME2.dat

- error in src\file.c line 243: fdnum_open()
Error: No such file or directory

Last script line before the error or that produced the error:
  65  open FDSE NAME


Code: Select all

  offset           filesize   filename
--------------------------------------
- enter in folder E:\LEGO_Star_Wars_The_Force_Awakens_WiiU-iND\LEGO Star Wars The Force Awakens [BLGEWR]\content
- open input file E:\LEGO_Star_Wars_The_Force_Awakens_WiiU-iND\LEGO Star Wars The Force Awakens [BLGEWR]\content\_GAME2.hdr
- enter in folder E:\LEGO_Star_Wars_The_Force_Awakens_WiiU-iND\LEGO Star Wars The Force Awakens [BLGEWR]\content
  coverage file 0     0%   4          159874288
- open input file E:\LEGO_Star_Wars_The_Force_Awakens_WiiU-iND\LEGO Star Wars The Force Awakens [BLGEWR]\content\_GAME2.dat

- 0 files found in 1 seconds
  coverage file 0     0%   16         159874288
  coverage file 1   100%   159874288  159874288
  coverage file -1    0%   20         159874288
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: LEGO Worlds/LEGO Star Wars: TFA - .DAT

Post by aluigi »

Ehmmm use the script on the dat file, not the hdr.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: LEGO Worlds/LEGO Star Wars: TFA - .DAT

Post by AnonBaiter »

I did as you said and still nothing. At least it's not triggering any errors, but maybe it's just me.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: LEGO Worlds/LEGO Star Wars: TFA - .DAT

Post by aluigi »

If it works here, it works everywhere.
quickbms ttgames.bms GAME2.DAT
Just put GAME2.DAT in a new empty folder so that there are no hdr files and it must work.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: LEGO Worlds/LEGO Star Wars: TFA - .DAT

Post by AnonBaiter »

Okay, I did exactly that. However, it still doesn't work(maybe it's just me).
Try and run the script with the -V function.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: LEGO Worlds/LEGO Star Wars: TFA - .DAT

Post by aluigi »

If you are using quickbms 0.7.4a with the script 0.9.2, it works.
Tested with both quickbms.exe and quickbms_4gb_files.exe
-V here is useless because it works, you should do that and provide the results.
I have nothing else to add.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: LEGO Worlds/LEGO Star Wars: TFA - .DAT

Post by AnonBaiter »

Here is what I got so far:

Code: Select all

  offset   filesize   filename
--------------------------------------
. 00000000 getdstr SIGN       "" 4
    5f 7c f6 ff                                       _|..
. 00000000 get     HDR_NAME   "GAME2" -1001
- enter in folder E:\empty folder
- open input file E:\empty folder\GAME2.hdr
.
. 00000000 getdstr TMP        "" 16
    5f 7c f6 ff f0 db 03 00 00 00 00 00 00 00 00 00   _|..............
. 00000000 get     INFO_OFF   0xfff67c5f 4
. 00000004 get     INFO_SIZE  0x0003dbf0 4
. 00000000 get     TYPE_BOH   0xecdb0300 -1030
. 00000004 get     FILES      0x3443432e 4
. 00000000 get     HDR_SIZE   0x0003dbec 4
. 00000004 idstr              ".CC4" 4
    2e 43 43 34                                       .CC4
. 00000008 idstr              "0TAD" 4
    30 54 41 44                                       0TAD
. 0000000c get     TYPE_BOH   0xfffffff8 -1030
. 00000010 get     DUMMY      0x00000002 4
. 00000014 get     FILES      0x0000096e 4
. 00000018 get     NAMES      0x00000c20 4
. 0000001c get     NAMES_SIZE 0x00015fc3 4
. 00000000 putarr             "" 10:3104
. 00000000 putarr             "" 1:3104
. 00015fe3 get     DUMMY      0x07c60000 4
. 00015fe7 get     NAME_OFF   0xffffffff 4
. 00015feb get     FOLDER_ID  0x00000000 2
. 00015fed get     SOME_ID    0x00000000 -1028
. 00015fef get     FILE_ID    0x00000000 2
.
. 00000001
. 00015ff1 get     NAME_OFF   0x00000000 4
. 00015ff5 get     FOLDER_ID  0x00000000 2
. 00015ff7 get     SOME_ID    0x00000000 -1028
. 00015ff9 get     FILE_ID    0x000008e9 2
. 00000020 get     NAME       "demodx9playthroughlogfile.txt" -1
. 00000000 getarr  PATH       "" 1:0
. 00000000 putarr  NAME       "\demodx9playthroughlogfile.txt" 10:0
.
. 00000002
. 00015ffb get     NAME_OFF   0x00000001 4
. 00015fff get     FOLDER_ID  0x00000000 2
. 00016001 get     SOME_ID    0x0000001f -1028
. 00016003 get     FILE_ID    0x00000000 2
. 00000021 get     NAME       "emodx9playthroughlogfile.txt" -1
. 00000000 getarr  PATH       "" 1:0
. 00000000 putarr  NAME       "\emodx9playthroughlogfile.txt" 1:2
.
. 00000003
. 00016005 get     NAME_OFF   0x089d0000 4
. 00016009 get     FOLDER_ID  0x00000002 2
. 0001600b get     SOME_ID    0x00000000 -1028
. 0001600d get     FILE_ID    0x0000003e 2

Error: [myfseek] the offset 0x089d0020 in the file -1 can't be reached

Last script line before the error or that produced the error:
  129 goto NAME_OFF MEMORY_FILE


Sorry for dragging this out.