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

SpellForce 2 .cff files

Read or post about compression. And decompression. Or ask questions how to decompress your files.
uly
ultra-n00b
Posts: 8
Joined: Thu May 03, 2007 12:29 am

SpellForce 2 .cff files

Post by uly »

Does anyone know what to use to extract the .cff files (and probably .sav files as well) for SpellForce 2? I'm not talking about the .pak files, for which there is already an extractor released.

All of the .cff and .sav files starts with "12 DD 72 DD 03". I thought I've seen this kind of header somewhere, but can't quite recall where...

Take a look at the attached file english.zip. It's probably the localization file. Please rename the extention to .cff.

TIA
You do not have the required permissions to view the files attached to this post.
Darkfox
VVIP member
VVIP member
Posts: 688
Joined: Fri Jul 04, 2003 6:11 pm
Has thanked: 33 times
Been thanked: 16 times

Post by Darkfox »

SAV files? Are they not saved games?
uly
ultra-n00b
Posts: 8
Joined: Thu May 03, 2007 12:29 am

Post by uly »

Yeah, the .sav files are saved games. But I'm really trying to get at the .cff files, just happens to notice that the .sav files have the same header. They probably use the same compression.
Darkfox
VVIP member
VVIP member
Posts: 688
Joined: Fri Jul 04, 2003 6:11 pm
Has thanked: 33 times
Been thanked: 16 times

Post by Darkfox »

Are you certain there is a compression or even usable data involved? Depending on the game it is often that in a saved game the stored data is unusable outside of the saved game file storeing information like current items held and position in the games as well as triggers, etc.

Anyways, the CFF files are a database file not an archive.
uly
ultra-n00b
Posts: 8
Joined: Thu May 03, 2007 12:29 am

Post by uly »

Hmm, database files... that would be quite logical. Any idea which database program I can access these files with?
Darkfox
VVIP member
VVIP member
Posts: 688
Joined: Fri Jul 04, 2003 6:11 pm
Has thanked: 33 times
Been thanked: 16 times

Post by Darkfox »

Unfortunately no. Apparently it is incredibly difficult.
uly
ultra-n00b
Posts: 8
Joined: Thu May 03, 2007 12:29 am

Post by uly »

Oh no! Anything but the incredibly difficult!

Well, thanks for the quick replies.

Please help if anyone has an idea...
User avatar
baccello
beginner
Posts: 29
Joined: Wed Sep 22, 2004 6:44 pm
Contact:

Post by baccello »

Probably it's zlib compressed (see 36 hex offset).
Edit:
After decompression looks lik unicode text.
Image
I'm italian and speak little english :(
uly
ultra-n00b
Posts: 8
Joined: Thu May 03, 2007 12:29 am

Post by uly »

Great! So it is the file I'm looking for!

Sorry if it's a dumb question, but how do you decompress a zlib file? I've looked on the board, got a command line tool but for some reason it didn't work.
Darkfox
VVIP member
VVIP member
Posts: 688
Joined: Fri Jul 04, 2003 6:11 pm
Has thanked: 33 times
Been thanked: 16 times

Post by Darkfox »

Hm. That must be the English text. The Gamedata.cff contains the main script and as I read is very complicated. Perhaps why there is no editors for it yet.

As for zlib... if the ZLIB used by Age of Empires I and II is the same as this you could use compr.exe and uncompr.exe inside a zlibnoh.rar package...

http://aoe.heavengames.com/cgi-bin/aoec ... =5413&st=0

There. Maybe that would work.
User avatar
baccello
beginner
Posts: 29
Joined: Wed Sep 22, 2004 6:44 pm
Contact:

Post by baccello »

CFF file it's an archive of files zlib compressed.

Code: Select all

4 - Header (0x12DD72DD)
4 - Archive Version? (3)
12 - null

// for each files
   4 - File ID?
   2 - (1)
   4 - Compressed size
   2 - (1)
   4 - Uncompressed size
   x - Data File (zlib compressed)
Bye :roll:
I'm italian and speak little english :(
uly
ultra-n00b
Posts: 8
Joined: Thu May 03, 2007 12:29 am

Post by uly »

I've tried both ZLIBnoh as suggested by Darkfox and ZLIBC that I found in the forum, but in both cases, the decompressed file is an empty 0 byte file. baccello, can you tell me how you decompressed the file?
User avatar
baccello
beginner
Posts: 29
Joined: Wed Sep 22, 2004 6:44 pm
Contact:

Post by baccello »

Use this BMS script.

Code: Select all

ComType ZLib1 ;
Set START Long 20 ;
GoTo START 0 ;
Do ;
Get ID Long 0 ;
Get FOO Int 0 ;
Get CS Long 0 ;
Get FOO Int 0 ;
Get US Long 0 ;
SavePos OFF 0 ;
If CS <> 0 ;
CLog "" OFF CS 0 0 US 0;
Math OFF += CS ;
GoTo OFF 0;
EndIf ;
While CS <> 0 ;
I'm italian and speak little english :(
kramla
beginner
Posts: 23
Joined: Sun Jul 15, 2007 4:27 pm
Has thanked: 1 time
Been thanked: 5 times

Re: SpellForce 2 .cff files

Post by kramla »

I have one question, is there any way how to pack unpacked files back to the archive .cff??
(edit archive?). I know how to use hexaeditor, so i think with little help it could not be a problem.

Thank you for the answer.

Kramla

Edit: Now I know how to do it (I finaly found one working zlib packer...).
Csimbi
veteran
Posts: 108
Joined: Thu Nov 06, 2008 9:29 pm
Has thanked: 10 times
Been thanked: 22 times

Re: SpellForce 2 .cff files

Post by Csimbi »

Hi all,
is there a different way to extract said CFF file without the script above?
Thank you!
______
Csimbi
Post Reply