Jump to content
Sign in to follow this  
gerwin

SFP1 CAT file format

Recommended Posts

I was looking at the cat file format, and with the aid of skypats extractor, it really is as simple as can be. 99% of the format is illustrated in the attached image. only the '2' (cyan underlined) value I have not yet traced, cat version maybe?

It should not be to diffucult to make a combined extractor/packer for this. though I am not too familiar with writing winapi (the usual windows dialog programs).

post-32175-1221735399_thumb.png

Share this post


Link to post
Share on other sites

I have no idea, on how easy or difficult it would be to write a combined extractor/packer program for this...

But we allready have a CAT extractor tool and there is no need to pack files back into the CAT file. The game engine will always use the file in the respective folder, unless it doesn´t find the file. Only then it will look into the CAT. In my opinion it could be very dangerous, if we were able to pack the files back into the CAT, as if you screw up the file for some reason, your installation might get killed for all times. With the methode right now, you´ll simply delete the modified file, to force the game to use the working one in the CAT. :wink:

Share this post


Link to post
Share on other sites
I have no idea, on how easy or difficult it would be to write a combined extractor/packer program for this...

But we allready have a CAT extractor tool and there is no need to pack files back into the CAT file. The game engine will always use the file in the respective folder, unless it doesn´t find the file. Only then it will look into the CAT. In my opinion it could be very dangerous, if we were able to pack the files back into the CAT, as if you screw up the file for some reason, your installation might get killed for all times. With the methode right now, you´ll simply delete the modified file, to force the game to use the working one in the CAT. :wink:

 

I personally did not think about writing things back to an existing cat file..

I was thinking since WOI has objectdata.cat and objectdata01.cat IIRC, maybe it will also read objectdataXX.cat with XX being any number. So you might put a specific aircraft LOD's and textures in objectdata02.cat or something?

 

Admitted, also because cat files remain uncompressed, the usage of a packer is debatable...

Share this post


Link to post
Share on other sites

What would be great though is a CAT extractor that preserves folders for files.

Share this post


Link to post
Share on other sites

A "packer" isnt needed... additional usage of another program just to get a plane/object into the game... no. Many already struggle with the weapon editors :ninja:

All add-on objects must go directly into their respective folders... theres no reason to pack them away into a single big file - that would making personal edits/ improvments/ fixes to them more complicicated, ect ect.

 

What would be good is a improved extractor, which allows to mark multiple files and then extract them all at once and perhaps to a destination of your own chice.

Skypat's extractor allows only extraction of single files or of the complete cat into the same directory where the .cat is located.

Share this post


Link to post
Share on other sites

I would love a tool that let you select multiple files for extraction. The current tool extracts 1 file or all files.

Share this post


Link to post
Share on other sites
What would be good is a improved extractor, which allows to mark multiple files and then extract them all at once and perhaps to a destination of your own chice.

Skypat's extractor allows only extraction of single files or of the complete cat into the same directory where the .cat is located.

 

I would love a tool that let you select multiple files for extraction. The current tool extracts 1 file or all files.

 

Absolutely agree, the ability to extract multiple files to a designated folder would be great and very useful.

 

EDIT: Here is a thread where someone was working on a new extracting utility, with some very handy features as said here.

Edited by JimmyBib

Share this post


Link to post
Share on other sites

Well...

 

A "packer" would be useful for people (like myself) who are anal retentive and like to have tidy folders and directories.

 

Additionally, again... for people like myself, It would be real handy to have different .CATs for various eras, objects, terrain etc...

 

Way back in the day, Fighter Squadron had a utility to pack and unpack game files... and it just proved useful in several categories.

 

Just my opinion though... :wink:

Share this post


Link to post
Share on other sites
Well...

 

A "packer" would be useful for people (like myself) who are anal retentive and like to have tidy folders and directories.

 

Additionally, again... for people like myself, It would be real handy to have different .CATs for various eras, objects, terrain etc...

 

Way back in the day, Fighter Squadron had a utility to pack and unpack game files... and it just proved useful in several categories.

 

Just my opinion though... :wink:

 

Okay, it took me a long evening, but look what I attached already!

 

It is a little Cat Archiver program. It does not have much of a user interface, neither does it work with parameters, since these are hard to use in windows for most people.

Instead it archives all files in the folder that it is started from, and always outputs to catpack.cat. But I figure that should enable modders to make any desired cat files reasonably easy.

 

I am a bit unpatient to post it, it could use some more testing and finetuning, so please check what you create with it. So far I tested it with the files of menutext.cat and it produced a 100% exactly the same cat file. It also managed to repack all files from SFP1 objectdata.cat (quite fast) and it gave a functionally indentical file, except that the file order in my Cat file was sorted A-Z.

 

So now I am curious too in what way this tool can be of use. (As I suggested before I suspect WOI by default will read from objectdata02.cat objectdata03.cat objectdata04.cat etc. when available)

 

I am afraid I currently don't see any easy way to produce an enhanced file extractor.

the coding libraries I work with have either poor or verry complicated handling of big file lists... they are not much use for making a selection of files to extract.

 

PS1. the unidentified value of 2 in my first post refers to the number of file-extensions,

which are listed right after the filename index.

PS2. cat files do not contain any folder information by design.

PS3. About CatPack: Freeware Beta version, use at your own risk.

CatPack_Beta.zip

Share this post


Link to post
Share on other sites
Okay, it took me a long evening, but look what I attached already!

 

It is a little Cat Archiver program. It does not have much of a user interface, neither does it work with parameters, since these are hard to use in windows for most people.

Instead it archives all files in the folder that it is started from, and always outputs to catpack.cat. But I figure that should enable modders to make any desired cat files reasonably easy.

 

I am a bit unpatient to post it, it could use some more testing and finetuning, so please check what you create with it. So far I tested it with the files of menutext.cat and it produced a 100% exactly the same cat file. It also managed to repack all files from SFP1 objectdata.cat (quite fast) and it gave a functionally indentical file, except that the file order in my Cat file was sorted A-Z.

 

So now I am curious too in what way this tool can be of use. (As I suggested before I suspect WOI by default will read from objectdata02.cat objectdata03.cat objectdata04.cat etc. when available)

 

I am afraid I currently don't see any easy way to produce an enhanced file extractor.

the coding libraries I work with have either poor or verry complicated handling of big file lists... they are not much use for making a selection of files to extract.

 

PS1. the unidentified value of 2 in my first post refers to the number of file-extensions,

which are listed right after the filename index.

PS2. cat files do not contain any folder information by design.

PS3. About CatPack: Freeware Beta version, use at your own risk.

 

Very nice... Looks like I'll be playing with this tonight!

 

KUDOS! :clapping:

Share this post


Link to post
Share on other sites

Actually, something like this would be VERY useful in one important way:

 

Doing a 'merged' SFP1/WOV/WOE/WOI install. There are stock aircraft in the other titles that are not available in WOI (F-100, F-105, etc). Now obviously you could extract all the relevant files (including cockpit files). But for some aircraft that use duplicate files, that means making and putting the proper files in the proper locations...or for third party aircraft that use stock bmps for cockpits, you would have to extract the particular files you need and copy them to the particular directories.

 

However, if you extracted ALL the files from both the Objectdata.cat files from both a merged WOV/WOE install, and a WOI install, combined them all in one directory without any of the WOI/WOE files overwriting the WOI files (the WOI files would be newer), then took the whole directory and made a custom Objectdata.cat file...that should work and fix any issues with using WOV/WOE stuff in WOI...

 

Just a thought...

 

FastCargo

Share this post


Link to post
Share on other sites

thanks , it works perfect

Edited by ravenclaw_007

Share this post


Link to post
Share on other sites
Actually, something like this would be VERY useful in one important way:

Doing a 'merged' SFP1/WOV/WOE/WOI install......

Yes I had that idea too, such an all-inclusive merged install is what I eventually hope to have on my Disk,

(I am only waiting for the older games to get WOI flight-models with the expected patches)

 

thanks , it works perfect

Good to hear it works, thanks for the feedback.

 

Attached is a new version of CatPack. (You can delete the old one)

Features:

-Unpacking of cat archives (by dropping a cat file on the icon).

-Much more error checking.

-No seperate dll required.

PS. you can press ctrl+break to interrupt+quit the program.

CatPack.zip

Share this post


Link to post
Share on other sites

Original extractor:

 

For unpacking lots of files, copy the CAT file into a new folder and extract what you need there. No mess. The only thing there is what you extracted.

 

I was thinking of extracting different types of CAT data into different folders for storage -- decals go here, aircraft stuff go there -- for easy access without later using the extractor. Just never got round to it.

Edited by Lexx_Luthor

Share this post


Link to post
Share on other sites

I don't like WOI very much not as much as I do to the other 3 titles actually. Main reason being the lack of weapons. Bunyap's weapon pack is by far the greatest but unfortunately it cannot be applied to WOI. The September patch for WOV/WOE took away 10 fps after it was applied, so I am giving it up. SFP1 remains the most efficient so far.

 

I think this tool is useful for a merge of aircrafts available from WOV/WOE/WOI.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

By using this site, you agree to our Terms of Use, Privacy Policy, and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..