Carnivores, Carnivores 2, Carnivores Ice Age

The Original Forum. Game archives, full of resources. How to open them? Get help here.
User avatar
friendsofwatto
VVIP member
VVIP member
Posts: 535
Joined: Wed Jun 30, 2004 3:01 pm
Location: Australia
Been thanked: 13 times
Contact:

Post by friendsofwatto » Mon Feb 14, 2005 10:14 am

OK mate, here is a script I wrote up for the *.car format...

Code: Select all

GoTo 32 0 ;
Get numAnim Long 0 ;
Get numSound Long 0 ;
Get numPoint Long 0 ;
Get numTri Long 0 ;
Get picSize Long 0 ;

For nT = 1 to numTri ;
SavePos FOT 0 ;
Set FST Long 64 ;
Log "" FOT FST 0 0 ;
Math FOT += FST ;
GoTo FOT 0 ;
Next nT ;

For nP = 1 to numPoint ;
SavePos FOP 0 ;
Set FSP Long 16 ;
Log "" FOP FSP 0 0 ;
Math FOP += FSP ;
GoTo FOP 0 ;
Next nP ;

SavePos FO 0 ;
Log "" FO picSize 0 0 ;
Math FO += picSize ;
GoTo FO 0 ;

For nA = 1 to numAnim ;
SavePos FOA 0 ;
SavePos JPA 0 ;
Get FNA String 0 ;
Math JPA += 36 ;
GoTo JPA 0 ;
Get JPA2 Long 0 ;
Math JPA2 *= numPoint ;
Math JPA2 *= 6 ;
Set FSA Long 40 ;
Math FSA += JPA2 ;
Log FN FOA FSA 0 0 ;
Math FOA += FSA ;
GoTo FOA 0 ;
Next nA ;

For nS = 1 to numSound ;
SavePos FOS 0 ;
SavePos JPS 0 ;
Get FNS String 0 ;
Math JPS += 32 ;
GoTo JPS 0 ;
Get JPS2 Long 0 ;
Set FSS Long 36 ;
Math FSS += JPS2 ;
Log FN FOS FSS 0 0 ;
Math FOS += FSS ;
GoTo FOS 0 ;
Next nS ;
I have also attached the compiled *.bms script for you, so you don't get end-or-line errors and such.

Now, the script did compile, and i did test it on an archive and got no errors, so it should be close to correct, if not fully correct.

Oh, if you were to use the script I just posted above, you would need to remove all the blank lines - I just put all those lines in there to make it easier to see where the different loops are.

The script should list all the anims, points, triangles, sounds, and the texture image.

Good luck - hopefully if there are any problems with it then you will be able to fix them. Hope it works :oops:

WATTO
watto@watto.org
http://www.watto.org
You do not have the required permissions to view the files attached to this post.
Game Extractor - Read and write thousands of game archives!

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

Post by Mr.Mouse » Mon Feb 14, 2005 11:26 am

F*cking brilliant! :D I tried it on the archeo.car file and it worked! I extracted all files fine! All 1244 of them. :D

Here's the mc.mrf file that contains the new Esoteria .e3 and the Carnivores .CAR scripts.

Backup the old mc.mrf in the MultiEx Commander data/config dir, and put this one in instead. you will be able to open .car files now. Hope they don't have diverging formats for different .car files. Then it should work fine.
You do not have the required permissions to view the files attached to this post.

User avatar
friendsofwatto
VVIP member
VVIP member
Posts: 535
Joined: Wed Jun 30, 2004 3:01 pm
Location: Australia
Been thanked: 13 times
Contact:

Post by friendsofwatto » Mon Feb 14, 2005 12:07 pm

Thanks mate - it was a beast to try and write a script for! I tested it on a Carnivores 2 *.car file within the scriptor - it didn't complain after I fixed a loop that I ran off the end of the file.

The thing I was most worried about was variable overloading - can I use the same variable name in different parts of the script, or not. For example, in each of the loops I wanted to make an FO variable - would I be able to simply reuse the variable name over and over, or do I need to have unique names like I did in the script?

Thanks mate - the scripting is pretty smooth :)

WATTO
watto@watto.org
http://www.watto.org
Game Extractor - Read and write thousands of game archives!

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

Post by Mr.Mouse » Mon Feb 14, 2005 12:20 pm

Oh yes, you can just reuse the same variable you want, just like in regular programming. When the Scriptor encounters a new variable name it will 'declare' that one, when set in commands like "Set", "SavePos" etc.
After that the value of this may change. it will have the last value you give it, if you tend to reuse it for another purpose, just set it to any value you need. For example, if you have a

Code: Select all

Get FileCount Long 0 ;
For T = 1 To FileCount ;
BlahBlah; 
Next T ;
You can simply reuse it, for instance :

Code: Select all

Get FD Long 0 ; 'get a long from the file, stored in FD
Math FD += 4 ; ' do some stuff with FD ;
Set FileCount Long FD ; set FileCount to this value 
or

Code: Select all

SavePos FileCount 0 ;
Log FN FO FS FileCount 0 ;
Whatever you wish.

User avatar
friendsofwatto
VVIP member
VVIP member
Posts: 535
Joined: Wed Jun 30, 2004 3:01 pm
Location: Australia
Been thanked: 13 times
Contact:

Post by friendsofwatto » Mon Feb 14, 2005 1:04 pm

OK thanks mate, thats just what I wanted to know - that will make things alittle nicer in the future. Good work!

WATTO
watto@watto.org
http://www.watto.org
Game Extractor - Read and write thousands of game archives!

User avatar
Dinoguy1000
Site Admin
Posts: 759
Joined: Mon Sep 13, 2004 1:55 am
Has thanked: 129 times
Been thanked: 142 times

Post by Dinoguy1000 » Tue Feb 15, 2005 3:17 am

Oh, man, this is sweet! :dance: I can't wait to try it for myself! If you would like, I could upload some more *.car files from both Carnivores and C2 for you to do further testing on! :rock:

EDIT: I tried it on the ALLO.CAR file from Carn2 and it extracted all 1007 files without a hitch! It's too big to upload, but I'll upload it at my site and give a link to it and more.

And I know I'm probably not in much of a position to ask for favors, but is it possible to edit the script to add the type of data to the filename? (e.g. if it's an animation, have something like animX, or a triangle would be triangX...)

machf

Post by machf » Tue Feb 15, 2005 5:37 am

Well, this is great news - thank you for your work, guys.
Now DG was talking about the .3df files... well, I guess that would be easier, as they have a lot in common with the .car files and seem to be a little less complex (no animation data, for example, and no sounds either, I think).

machf
beginner
Posts: 25
Joined: Tue Feb 15, 2005 5:42 am

Post by machf » Tue Feb 15, 2005 5:46 am

I guess you have to register to be able to see any attachments, right?

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

Post by Mr.Mouse » Tue Feb 15, 2005 9:03 am

machf wrote:I guess you have to register to be able to see any attachments, right?
Yes, you do.

And Dinoguy, it is not yet possible to do something like that with the script. Basically, because the script hasn't got a clue which files are what. It just extracts.

User avatar
friendsofwatto
VVIP member
VVIP member
Posts: 535
Joined: Wed Jun 30, 2004 3:01 pm
Location: Australia
Been thanked: 13 times
Contact:

Post by friendsofwatto » Tue Feb 15, 2005 12:42 pm

The closest thing you would be able to do is give each file a different extension based on the file type. Thats what I do for my Game Extractor plugin.

So, Mr Mouse, is there any way to generate the default name (for files that don't have any names) and append a string to the end of it. Similarly for the files with filenames, can we append an extension to them?

The extensions I gave the files, i think, were *.pnt (point), *.tri (triangle), *.anm (animation) and *.snd (sound)

Thanks mate.

WATTO
watto@watto.org
http://www.watto.org
Game Extractor - Read and write thousands of game archives!

User avatar
Dinoguy1000
Site Admin
Posts: 759
Joined: Mon Sep 13, 2004 1:55 am
Has thanked: 129 times
Been thanked: 142 times

Post by Dinoguy1000 » Tue Feb 15, 2005 5:03 pm

Actually, that would work too. Until then, though, we'll just have to go by the file sizes...
Welcome to Xentax!

Rules | Requests | Wiki | Discord

If you run across a post that breaks the rules, please report the post - a mod or admin will handle it from there.

machf
beginner
Posts: 25
Joined: Tue Feb 15, 2005 5:42 am

Post by machf » Tue Feb 15, 2005 10:41 pm

I don't know what I may have done wrong, but I keep getting a "List file was empty, possible error in format" error message whenever I try to open a .car file...
Something to do with ActiveX, apparently, as behind the main window, I've found another one that says "MultiEx ActiveX DLL - Retrieving Archive Contents" which seems to be frozen.

machf
beginner
Posts: 25
Joined: Tue Feb 15, 2005 5:42 am

Post by machf » Tue Feb 15, 2005 10:55 pm

Never mind, I found out the Windows Scripting Host had to be installed for it to run properly...

machf
beginner
Posts: 25
Joined: Tue Feb 15, 2005 5:42 am

Post by machf » Wed Feb 16, 2005 12:41 am

These are the .car files I've been unable to open so far:

Carnivores: Explo.car, Wind.car,

Carnivores 2: Wcircle2.car, Wind.car

Ice Age: Sship1.car, Wcircle2.car, Wind.car

Others: Auto_r.car (the autorifle mod!!)

I'll have to revise them and see how they differ from the standard so far...

The error messages are "Process Error: Get called with invalid datatype" and then "Multiex 3 could not process".

machf
beginner
Posts: 25
Joined: Tue Feb 15, 2005 5:42 am

Post by machf » Wed Feb 16, 2005 1:13 am

Well, a quick check reveals that Explo.car, Wind.car and Wcircle2.car all have 0 sounds, while Sship1.car has 0 animations, so maybe that's wreaking havoc with the FOR loops in the script, which begin at 1... Can you use a conditional before the loop or something?

The Auto_r.car file needs a more thorough revision, but it's long been suspected to be somewhat corrupt, IIRC.

Post Reply