Important information: this site is currently scheduled to go offline indefinitely by end of the year.

Turok Evolution .TRE archives

The Original Forum. Game archives, full of resources. How to open them? Get help here.
evilpie
beginner
Posts: 23
Joined: Sun Nov 29, 2009 10:13 pm
Been thanked: 9 times

Re: Turok Evolution .TRE archives

Post by evilpie »

I did some test, and its seems like the NUM_FILES is Little Endian and everything else is Big Endian?

Code: Select all

struct TEST
{
    uint NumFiles;
    struct FILES
    {  
        BigEndian ();
        uint Offset;
        if (Offset < FileSize())
        {
            Printf ("Valid Of: %d\n", Offset);
        }
        
        uint Size;
        uint unk;
        uint unk2;
    } files[NumFiles] <optimize=false>;
} test <optimize=false>;

Code: Select all

Get NUM_FILES long

print "%NUM_FILES%"
Endian Big
For I = 0 < NUM_FILES
   # File info
   Get OFFSET long
   #Get SIZE long
   GET S1 BYTE
   GET S2 BYTE
   GET S3 BYTE
   GET S4 BYTE
   #Get Size Long
   
   print "%S1% %S2% %S3% %S4%"
   
   Set Size = S1
   Math S2 <<= 8
   Math S3 <<= 16
   Math S4 <<= 24
   Math Size += S3
   Math Size += S2
   Math Size += S1
   
   Get UNK long
   Get UNK long
   print "%OFFSET% %Size%" 
	
   # Extract file
   Log I OFFSET Size
Next I
gamehead
advanced
Posts: 48
Joined: Fri Nov 16, 2007 9:11 pm
Has thanked: 5 times

Re: Turok Evolution .TRE archives

Post by gamehead »

I am also interested in opening the .TRE archives in this game for the purposes of ripping the soundtrack and the sound effects. does anyone know of any programs that can open the .TRE archive on the PS2 version? how do you use the scripts that are posted on here what programs are they used for Please help, Thanks.
AlphaTwentyThree
double-veteran
double-veteran
Posts: 982
Joined: Mon Aug 24, 2009 10:55 pm
Has thanked: 76 times
Been thanked: 660 times

Re: Turok Evolution .TRE archives

Post by AlphaTwentyThree »

gamehead wrote:how do you use the scripts that are posted on here what programs are they used for Please help, Thanks.
http://aluigi.altervista.org/papers.htm#quickbms
If you like what you see, why not click the little Thank You button? ;) It will definitely motivate me! :)
And here's Mr.Mouse's Facebook link: http://www.facebook.com/permalink.php?s ... 8469022795 - thanks ;)
gamehead
advanced
Posts: 48
Joined: Fri Nov 16, 2007 9:11 pm
Has thanked: 5 times

Re: Turok Evolution .TRE archives

Post by gamehead »

[quote="AlphaTwentyThree"][quote="gamehead"]how do you use the scripts that are posted on here what programs are they used for Please help, Thanks.

Link Removed

Let's check the safety ratings on sites before you post them shall we. The linked site is flagged red by mcafee b/c it contains bad stuff.

http://www.siteadvisor.com/sites/aluigi.altervista.org

Any other sites that may have these programs?
gamehead
advanced
Posts: 48
Joined: Fri Nov 16, 2007 9:11 pm
Has thanked: 5 times

Re: Turok Evolution .TRE archives

Post by gamehead »

OK I now have QuickBMS up and running, Found it on the Xentax blog page now is there a script for the .TRE archives of the PS2 version of Turok Evolution? I tried the ones here and it extracted the files but now they all have filenames from 0 to 7579 and with no extension. they crash MFAudio. what am I doing wrong? do I have the wrong script? Please help. Thanks.

Next I will be trying Driver 3 with this program and a few other games with archives that I can't open. But that will be down the road.
Caboose
advanced
Posts: 67
Joined: Fri Sep 18, 2009 6:20 pm
Has thanked: 16 times
Been thanked: 1 time

Re: Turok Evolution .TRE archives

Post by Caboose »

gamehead wrote:
AlphaTwentyThree wrote:
gamehead wrote:how do you use the scripts that are posted on here what programs are they used for Please help, Thanks.

Link Removed

Let's check the safety ratings on sites before you post them shall we. The linked site is flagged red by mcafee b/c it contains bad stuff.

http://www.siteadvisor.com/sites/aluigi.altervista.org

Any other sites that may have these programs?
That site is owned by the creator of QuickBMS, and all of the other programs there (aluigi).
gamehead
advanced
Posts: 48
Joined: Fri Nov 16, 2007 9:11 pm
Has thanked: 5 times

Re: Turok Evolution .TRE archives

Post by gamehead »

Caboose wrote:
That site is owned by the creator of QuickBMS, and all of the other programs there (aluigi).
Well I just didnt want anyone getting a virus or anything bad b/c I got a nasty one a few months ago and I had to reformat my PC. not fun, for maybe an hour or 2 I officially had a brick. BTW I do have QuickBMS now and I'm trying to fiigure out how to use it, I need a script for Turok Evolution on the PS2. I tried the other scripts on this thread and then after that I tried Game extractor and both programs extracted the files but the files were still useless to me. maybe I used the wrong script. Please Help. Thanks.
AlphaTwentyThree
double-veteran
double-veteran
Posts: 982
Joined: Mon Aug 24, 2009 10:55 pm
Has thanked: 76 times
Been thanked: 660 times

Re: Turok Evolution .TRE archives

Post by AlphaTwentyThree »

I know this was a REALLY long time ago and I normally don't do this, but I just found a way to get the original folder structure for these files!!! :) Seems like the array sorting function isn't so useless after all. ;) So here's the final script:

Code: Select all

# extracts the contents of the TRE archives from Turok: Evolution (PS2)
# note: CORRECT NAMES!!!
# (c) 2012-10-02 by AlphaTwentyThree of XeNTaX

get FILES long
for i = 0 < FILES
	get OFFSET long
	get SIZE long
	get DATA_CRC long
	get NAME_CRC long
	putArray 0 i OFFSET
	putArray 1 i SIZE
next i
print "sorting array"
sortarray 0 1
getArray NAMEOFF 0 2
goto NAMEOFF
for i = 0 < FILES
	getCT NAME string 0x0d
	get DUMMY byte
	getArray OFFSET 0 i
	getArray SIZE 1 i
	log NAME OFFSET SIZE
next i
If you like what you see, why not click the little Thank You button? ;) It will definitely motivate me! :)
And here's Mr.Mouse's Facebook link: http://www.facebook.com/permalink.php?s ... 8469022795 - thanks ;)
gamehead
advanced
Posts: 48
Joined: Fri Nov 16, 2007 9:11 pm
Has thanked: 5 times

Re: Turok Evolution .TRE archives

Post by gamehead »

AlphaTwentyThree wrote:I know this was a REALLY long time ago and I normally don't do this, but I just found a way to get the original folder structure for these files!!! :) Seems like the array sorting function isn't so useless after all. ;) So here's the final script:

Code: Select all

# extracts the contents of the TRE archives from Turok: Evolution (PS2)
# note: CORRECT NAMES!!!
# (c) 2012-10-02 by AlphaTwentyThree of XeNTaX

get FILES long
for i = 0 < FILES
	get OFFSET long
	get SIZE long
	get DATA_CRC long
	get NAME_CRC long
	putArray 0 i OFFSET
	putArray 1 i SIZE
next i
print "sorting array"
sortarray 0 1
getArray NAMEOFF 0 2
goto NAMEOFF
for i = 0 < FILES
	getCT NAME string 0x0d
	get DUMMY byte
	getArray OFFSET 0 i
	getArray SIZE 1 i
	log NAME OFFSET SIZE
next i

Hi I tried this script using QuickBMS and I get this error when trying to open the STREE0.TRE archive from the PS2 version of Turok Evolution. The first error is the edited version and the second is the original from here.

ERROR: Invalid command "sortarray" or arguments 2 at line 11

ERROR: Invalid command "sortarray" or arguments 2 at line 15


Press RETURN to quit.

::Program Closes when Return is pressed::

Any ideas why this is happening? I tried 2 different versions of the script. I removed the stuff on top like where it says Xentax on one and the other is completely original. Both failed to extract files. What am I doing wrong Please help. I've been trying to open this archive for a long time. It doesn't seem to like that sortarray line. I even made the script file with a .BMS extension and I got the same error. Please help, Thanks.
AlphaTwentyThree
double-veteran
double-veteran
Posts: 982
Joined: Mon Aug 24, 2009 10:55 pm
Has thanked: 76 times
Been thanked: 660 times

Re: Turok Evolution .TRE archives

Post by AlphaTwentyThree »

You're using an old QuickBMS version. Get the newest one @ http://aluigi.org/quickbms.htm
If you like what you see, why not click the little Thank You button? ;) It will definitely motivate me! :)
And here's Mr.Mouse's Facebook link: http://www.facebook.com/permalink.php?s ... 8469022795 - thanks ;)
AlphaTwentyThree
double-veteran
double-veteran
Posts: 982
Joined: Mon Aug 24, 2009 10:55 pm
Has thanked: 76 times
Been thanked: 660 times

Re: Turok Evolution .TRE archives

Post by AlphaTwentyThree »

Here's also the version for all other *.tre archives (inside the big tre):

Code: Select all

# extracts *.TRE archives from Turok: Evolution (PS2)
# note: for the main STREE.TRE use my other script!
# (c) 2012-10-02 by AlphaTwentyThree of XeNTaX

include "func_getTYPE.bms"
get FILES long
for i = 0 < FILES
	get OFFSET long
	get SIZE long
	get DATA_CRC long
	get NAME_CRC long
	putArray 0 i OFFSET
	putArray 1 i SIZE
	putarray 2 i NAME_CRC
next i
print "sorting array"
sortarray 0 1
get BNAME basename
string BNAME += "_"
for i = 0 < FILES
	getArray OFFSET 0 i
	getArray SIZE 1 i
	getArray CRC 2 i
	putVarChr MEMORY_FILE SIZE 0
	log MEMORY_FILE 0 0
	append
	log MEMORY_FILE OFFSET SIZE
	append
	string CRC p= "_0x%08x" CRC
	set NAME BNAME
	string NAME += i
	string NAME += CRC
	callfunction getTYPE 1
	if EXT != ""
		string NAME += EXT
	endif
	log NAME 0 SIZE MEMORY_FILE
next i
If you like what you see, why not click the little Thank You button? ;) It will definitely motivate me! :)
And here's Mr.Mouse's Facebook link: http://www.facebook.com/permalink.php?s ... 8469022795 - thanks ;)
gamehead
advanced
Posts: 48
Joined: Fri Nov 16, 2007 9:11 pm
Has thanked: 5 times

Re: Turok Evolution .TRE archives

Post by gamehead »

AlphaTwentyThree wrote:Here's also the version for all other *.tre archives (inside the big tre):

Code: Select all

# extracts *.TRE archives from Turok: Evolution (PS2)
# note: for the main STREE.TRE use my other script!
# (c) 2012-10-02 by AlphaTwentyThree of XeNTaX

include "func_getTYPE.bms"
get FILES long
for i = 0 < FILES
	get OFFSET long
	get SIZE long
	get DATA_CRC long
	get NAME_CRC long
	putArray 0 i OFFSET
	putArray 1 i SIZE
	putarray 2 i NAME_CRC
next i
print "sorting array"
sortarray 0 1
get BNAME basename
string BNAME += "_"
for i = 0 < FILES
	getArray OFFSET 0 i
	getArray SIZE 1 i
	getArray CRC 2 i
	putVarChr MEMORY_FILE SIZE 0
	log MEMORY_FILE 0 0
	append
	log MEMORY_FILE OFFSET SIZE
	append
	string CRC p= "_0x%08x" CRC
	set NAME BNAME
	string NAME += i
	string NAME += CRC
	callfunction getTYPE 1
	if EXT != ""
		string NAME += EXT
	endif
	log NAME 0 SIZE MEMORY_FILE
next i
Alright that seems to have worked, I downloaded the version you linked me to and that opened the big .tre file and it's showing me all the stuff inside. I tried the new script you posted to extract everything from the small .tre files and I now get this error:

requested script "func_getTYPE.bms" not found

Press RETURN to quit

I'm getting closer but is there something i'm missing from my program or no? Thanks again.
AlphaTwentyThree
double-veteran
double-veteran
Posts: 982
Joined: Mon Aug 24, 2009 10:55 pm
Has thanked: 76 times
Been thanked: 660 times

Re: Turok Evolution .TRE archives

Post by AlphaTwentyThree »

The func_getTYPE.bms is located here: viewtopic.php?f=13&p=69577#p69577
If you like what you see, why not click the little Thank You button? ;) It will definitely motivate me! :)
And here's Mr.Mouse's Facebook link: http://www.facebook.com/permalink.php?s ... 8469022795 - thanks ;)
gamehead
advanced
Posts: 48
Joined: Fri Nov 16, 2007 9:11 pm
Has thanked: 5 times

Re: Turok Evolution .TRE archives

Post by gamehead »

AlphaTwentyThree wrote:The func_getTYPE.bms is located here: viewtopic.php?f=13&p=69577#p69577
Thanks for the script, it did work. I'm after the SFX and music. They are stored in either .VAG files or .AAA files inside a sound.tre archive. I need to get the right interleave of the files. I'm using a program called ADPCM player which is just like MFAudio but better. ADPCM player can't see the raw .tre archives but could see the sound.tre archive some of the files could be played but the audio is garbled and the settings cannot be changed. When trying an extracted audio file from sound.tre the settings can be changed and I just need to find the right interleave setting and it's still a bit garbled. Can you suggest a program to convert these files to WAV/mp3 so I can put them on my iPod. I'm not sure where I can upload one of the files as it's too big for the forum and I'm not sure what's a good file hosting site. :?:
Shichi1337
ultra-n00b
Posts: 1
Joined: Fri Dec 09, 2022 10:01 am

[GCN] Turok Evolution .tre file

Post by Shichi1337 »

Hello, i've messed around a while with the .bms script in the old thread here: viewtopic.php?t=3881
But nothing seems to work properly, do I miss something or what else?

Every time I tried, it gives me this error:

Code: Select all

- select BMS script. type ? for using the content of clipboard like a script
- select input archives/files, type * for the whole folder and subfolders
- select output folder where extracting files
- filter string: "*"
- filter   1: *
- start the scanning of the input folder: C:\Stuff\Apps\quickbms\in
- open input file C:\Stuff\Apps\quickbms\in\supertree0.tre
- open script C:\Stuff\Apps\quickbms\turok_evolution.bms
- set output folder C:\Stuff\Apps\quickbms\out

  offset           filesize   filename
--------------------------------------

- error in src\extra\xalloc.c line 703: xdbg_realloc()

Error: memory allocation problem
       Access denied


press ENTER to quit
I don't know if specific regional changes were made in this Turok Evolution .TRE file, because I ripped my game, basically a german version of the game, but as you see...

Any help would be appreciated.
Post Reply