READ THE RULES: Click here

Follow us on Facebook: https://www.facebook.com/xentax/ :)

Legend of Grimlock [.dat file]

The Original Forum. Game archives, full of resources. How to open them? Get help here.
Post Reply
User avatar
lostprophet
mega-veteran
mega-veteran
Posts: 197
Joined: Wed Apr 07, 2010 7:38 pm
Has thanked: 35 times
Been thanked: 5 times

Legend of Grimlock [.dat file]

Post by lostprophet » Sun Apr 08, 2012 10:47 am

Since the whole .dat file is too big (over 300 MB), I've uploaded the start and the end of the file, using Mr. Mouse's FileCutter tool.
Could somebody take a look at it, please?
Thanks.

Had to remove link, because of the new rules.
Last edited by lostprophet on Sat Apr 14, 2012 11:04 pm, edited 1 time in total.
Hungarian translator and member of Indies4indies.com | Previous translations: http://lostprophet.hu

bacter
veteran
Posts: 142
Joined: Mon Feb 22, 2010 8:42 pm
Has thanked: 2 times
Been thanked: 78 times

Re: Legend of Grimlock [.dat file]

Post by bacter » Sun Apr 08, 2012 3:20 pm

Code: Select all

comtype ZLIB
idstring GRAR
get NR_OF_FILES long
for i = 0 < NR_OF_FILES
  get FILE_ID long
  string namehex p= "%08x" FILE_ID
  get START_POS long
  get PACKED_SIZE long
  get ORIGINAL_SIZE long

  if PACKED_SIZE == 0
    log namehex START_POS ORIGINAL_SIZE
  else
    set THE_POS long 4
    math THE_POS += START_POS
    set THE_SIZE long -4
    math THE_SIZE += START_POS
    clog namehex THE_POS THE_SIZE ORIGINAL_SIZE
  endif
next i

User avatar
lostprophet
mega-veteran
mega-veteran
Posts: 197
Joined: Wed Apr 07, 2010 7:38 pm
Has thanked: 35 times
Been thanked: 5 times

Re: Legend of Grimlock [.dat file]

Post by lostprophet » Sun Apr 08, 2012 5:12 pm

Thanks bacter! Sadly the files in them seem weird, without any extensions, but I'll wait the final version of the game, maybe it'll differ from them.
Hungarian translator and member of Indies4indies.com | Previous translations: http://lostprophet.hu

deltaone
beginner
Posts: 37
Joined: Sat Feb 19, 2011 1:18 am
Has thanked: 4 times
Been thanked: 12 times

Re: Legend of Grimlock [.dat file]

Post by deltaone » Thu Apr 12, 2012 9:13 pm

Minor update, extract with extension ...

Code: Select all

comtype ZLIB
idstring GRAR
get NR_OF_FILES long
for i = 0 < NR_OF_FILES
  get FILE_ID long
  string namehex p= "%08x" FILE_ID
  get START_POS long
  get PACKED_SIZE long
  get ORIGINAL_SIZE long

  if PACKED_SIZE == 0
    log namehex START_POS ORIGINAL_SIZE
  else
    set THE_POS long 4
    math THE_POS += START_POS
    set THE_SIZE long -4
    math THE_SIZE += START_POS
    clog namehex THE_POS THE_SIZE ORIGINAL_SIZE
  endif
  
  Open . namehex 1
  Get TYPE long 1
  
  string name p= "%08x.unk" FILE_ID
  
  if TYPE == 0x014A4C1B
	string name p= "%08x.script" FILE_ID
  endif
  if TYPE == 0x46464952
	string name p= "%08x.wav" FILE_ID
  endif
  if TYPE == 0x4853454d
	string name p= "%08x.mesh" FILE_ID
  endif
  if TYPE == 0x314c444d
	string name p= "%08x.mdl" FILE_ID
  endif
  if TYPE == 0x20534444
	string name p= "%08x.dds" FILE_ID
  endif
  if TYPE == 0x4d494e41
	string name p= "%08x.anim" FILE_ID
  endif
  if TYPE == 0x00000100
	string name p= "%08x.ttf" FILE_ID
  endif
  if TYPE == 0x4d495247
	string name p= "%08x.grim" FILE_ID
  endif
  if TYPE == 0x5367674f
	string name p= "%08x.ogg" FILE_ID
  endif
  if TYPE == 0x000A0000
	string name p= "%08x.tga" FILE_ID
  endif

  log name 0 ORIGINAL_SIZE 1
  
next i
P.S. Anyone know how delete file in .bms ?
Last edited by deltaone on Thu Apr 12, 2012 9:34 pm, edited 1 time in total.

User avatar
XRaptor
mega-veteran
mega-veteran
Posts: 224
Joined: Sat Jul 12, 2008 4:42 pm
Location: Prague
Has thanked: 6 times
Been thanked: 46 times
Contact:

Re: Legend of Grimlock [.dat file]

Post by XRaptor » Thu Apr 12, 2012 9:27 pm

There is no "TYPE", it is filename hash ;-) I have working extractor with almost 1/3 filenames. But it takes some time to get all filenames. Hash count is easy.

Image

User avatar
Mr.Mouse
Site Admin
Posts: 4041
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 412 times
Been thanked: 561 times
Contact:

Re: Legend of Grimlock [.dat file]

Post by Mr.Mouse » Thu Apr 12, 2012 10:40 pm

Please review the new forum rules.
viewtopic.php?f=28&t=1270

eferdi
ultra-n00b
Posts: 2
Joined: Fri Apr 13, 2012 1:33 am

Re: Legend of Grimlock [.dat file]

Post by eferdi » Fri Apr 13, 2012 1:36 am

where can i get the grimrock file extractor?
soon we can start do mod this awesome game

User avatar
XRaptor
mega-veteran
mega-veteran
Posts: 224
Joined: Sat Jul 12, 2008 4:42 pm
Location: Prague
Has thanked: 6 times
Been thanked: 46 times
Contact:

Re: Legend of Grimlock [.dat file]

Post by XRaptor » Fri Apr 13, 2012 9:33 am

I will release it later today.

eferdi
ultra-n00b
Posts: 2
Joined: Fri Apr 13, 2012 1:33 am

Re: Legend of Grimlock [.dat file]

Post by eferdi » Fri Apr 13, 2012 10:37 am

awesome would be a rebuild function so we can put new or modified content into the game

User avatar
XRaptor
mega-veteran
mega-veteran
Posts: 224
Joined: Sat Jul 12, 2008 4:42 pm
Location: Prague
Has thanked: 6 times
Been thanked: 46 times
Contact:

Re: Legend of Grimlock [.dat file]

Post by XRaptor » Fri Apr 13, 2012 11:48 am

I think engine is able to load files outside of archive with higher priority. But I have to check it. Otherwise repack is not problem. I'm still gathering filenames to create full list. Just wait ;-)

User avatar
lostprophet
mega-veteran
mega-veteran
Posts: 197
Joined: Wed Apr 07, 2010 7:38 pm
Has thanked: 35 times
Been thanked: 5 times

Re: Legend of Grimlock [.dat file]

Post by lostprophet » Fri Apr 13, 2012 12:20 pm

Just wow, every time I want to translate something XRaptor appears with his super-duper extractor/repacker :D Thank you!
Hungarian translator and member of Indies4indies.com | Previous translations: http://lostprophet.hu

bacter
veteran
Posts: 142
Joined: Mon Feb 22, 2010 8:42 pm
Has thanked: 2 times
Been thanked: 78 times

Re: Legend of Grimlock [.dat file]

Post by bacter » Fri Apr 13, 2012 12:39 pm

If i'm not mistaken the game uses the 32 bit FNV-1a algorithm for the hash calculation.

User avatar
XRaptor
mega-veteran
mega-veteran
Posts: 224
Joined: Sat Jul 12, 2008 4:42 pm
Location: Prague
Has thanked: 6 times
Been thanked: 46 times
Contact:

Re: Legend of Grimlock [.dat file]

Post by XRaptor » Fri Apr 13, 2012 1:21 pm

bacter wrote:If i'm not mistaken the game uses the 32 bit FNV-1a algorithm for the hash calculation.
yes, you are right

User avatar
XRaptor
mega-veteran
mega-veteran
Posts: 224
Joined: Sat Jul 12, 2008 4:42 pm
Location: Prague
Has thanked: 6 times
Been thanked: 46 times
Contact:

Re: Legend of Grimlock [.dat file]

Post by XRaptor » Fri Apr 13, 2012 4:57 pm

Ok, so here it is:

Legend of Grimrock DAT File Extractor
http://raptor.cestiny.cz/download/legen ... actor.html

Quick info:
Because of hashed filenames, I had to create hashtable.txt file and include it to extractor. So don't delete it :-) Now still missing 299 filenames, so only hashes are extracted. But it is not problem, everyone can help to finish it :-)

HashCounter tool is included. So you can simply check hashes for any file. If you will find any new file, simply add it to input.txt file, use HashCounter application and let it generate new hashtable.txt. Then use extractor again.

In hashtable are many files never used in game, but just ignore those items (like dll files etc.). They left from automatic scanning. Game itself uses in-game extension conversion. So for example if it looks for file model.fsb, it means than engine is looking for model.mesh and model.model files or model.animation file. The same it is for *.tga - it looks for *.d3d9_texture etc. But it is not important for you.

About repack - just check if game takes extracted files first. I'm now little lazy to test it (I want to play this game now). There is no problem to implement repack later.

So enjoy it.

User avatar
lostprophet
mega-veteran
mega-veteran
Posts: 197
Joined: Wed Apr 07, 2010 7:38 pm
Has thanked: 35 times
Been thanked: 5 times

Re: Legend of Grimlock [.dat file]

Post by lostprophet » Fri Apr 13, 2012 5:16 pm

XRaptor wrote:Ok, so here it is:

Legend of Grimrock DAT File Extractor
http://raptor.cestiny.cz/download/legen ... actor.html

Quick info:
Because of hashed filenames, I had to create hashtable.txt file and include it to extractor. So don't delete it :-) Now still missing 299 filenames, so only hashes are extracted. But it is not problem, everyone can help to finish it :-)

HashCounter tool is included. So you can simply check hashes for any file. If you will find any new file, simply add it to input.txt file, use HashCounter application and let it generate new hashtable.txt. Then use extractor again.

In hashtable are many files never used in game, but just ignore those items (like dll files etc.). They left from automatic scanning. Game itself uses in-game extension conversion. So for example if it looks for file model.fsb, it means than engine is looking for model.mesh and model.model files or model.animation file. The same it is for *.tga - it looks for *.d3d9_texture etc. But it is not important for you.

About repack - just check if game takes extracted files first. I'm now little lazy to test it (I want to play this game now). There is no problem to implement repack later.

So enjoy it.
Great work! :wink: As you suspected, the game CAN read from external files, but as I've seen, the gametexts are in .lua files. If I edit them directly, with Notepad++, I get an error. Are there any specific editors for these kind of files?
Last edited by lostprophet on Sat Apr 14, 2012 11:04 pm, edited 1 time in total.
Hungarian translator and member of Indies4indies.com | Previous translations: http://lostprophet.hu

Post Reply