Jump to content

PCK


Bomb Bloke

Recommended Posts

Greets to you modders... :(

 

A while back I wrote a program that converted the terrain PCK files into gif files.

 

Last night, I finally got around to trying this program on the other PCK files in the game. First I wrote a batch file to convert all the unit graphics (as my gif writing code is rather... slow), and converted that.

 

Most interesting. The amount of sprites, and the way the units were animated was amazing! Not what I expected.

 

Anyway, then I moved onto the ufograph folder. Now, my program doesn't work on PCK files that don't have TAB files, so I left most of the contents of that folder alone. But I found a few and converted them.

 

I found two things of interest.

 

First, the INTICON PCK file seems to contain icons for the crafts. However, my poor memory can't tell me where these images are used in the game:

 

https://img.photobucket.com/albums/v213/BombBloke/INTICON.gif

 

The next thing I noticed was that the X1 PCK file did not use the same dimensions as all the other PCK files (that being, 32x40). The BIGOBS PCK file in the units folder also used different dimensions. I guess the X1 PCK contains that lovely skull explosion animation, but here's what my program came up with:

 

https://img.photobucket.com/albums/v213/BombBloke/X1.gif

 

I think I need to try a sprite resolution of 64, perhaps. Or something. Does anyone know? :P

 

I'd test it myself, but I ask because I also wanna open all the OTHER PCK files. There's a ton of the things, but they don't have TAB files. I *guess* that simply means they contain only one image apiece, but those files seem too big to only store a single 32x40 image! Does anyone know the size of those files? I would guess 320x240, but... It'd help to have fore knowledge. :(

 

A final note, my gif files don't work very well under *modern* Windows operating systems. Web browsers are fine, but something is seriously wrong with Microsoft's gif implementation these days. No idea why. :(

Link to comment
Share on other sites

The graphics on the INTICON are used to represent the X-COM craft during the window that opens on interceptions.

 

The best person to ask about the .pcks would be daishiva. One of his editors is supposed to open the big .pck files (like BIGOBS) but i never managed to do it.

Link to comment
Share on other sites

BIGOBS isn't too complex, it's just a matter of telling my program not to use an exact Y dimension (ie Keep drawing after row 40). Since BIGOBS still uses rows of 32 pixils, the resulting file looks more or less normal, except the bottom appears to be snipped off.

 

Ok, so INTICON is from the interception... Ah! I think I remember now.

 

Odd that it sits in the ufograph folder, as opposed to the geograph folder... Are the colors in my image correct? I used the battlescape palette to draw it.

Link to comment
Share on other sites

Some notes:

if a pck file doesnt have a TAB file, then it only contains one image. Sometimes the image is encoded using the pck encryption, sometimes its not encoded (one byte, one pixel). Just gota try it and see what comes out and what doesnt.

 

the bigobs entries are larger than 40 pixels high. pckview opens these files, it just doesnt save a workiing file thats usable in game yet.

 

x1.pck contains the explosion graphics, the sizes are 128x64.

 

if a graphics file contains a background image (scr mostly) they are 320x200.

 

medboard.pck for example:

https://www.daishiva.com/images/med.gif

Link to comment
Share on other sites

128x64... Okay then. :P

 

320x200 images? I think you made a typo there, the game runs in 320x240 res. :(

 

It seems odd... I get the impression nothing has happened in the world since august... but that's just my mental spiral, don't mind me.

 

Where was I, yeah, grabbed PCKView and I'll try it out tonight. Should speed my work. Any ideas on the DAT files sitting in the graphic directories? :(

Link to comment
Share on other sites

Actually, UFO and TFTD do use Mode 13h, which is 320x200x256 colours. 320x240 was an extended version of mode 13h (I think they called it Mode-X) so it's a little more complicated to set up and use than Mode 13h was. At least, this was so back then when we had to set up the screen modes manually.

 

- NKF

Link to comment
Share on other sites

As it turns out, I found Pckview only opened files my own PCK viewer dealt with - those which had TAB files. Figures. :P

 

Anyways, I messed with the other PCK files, and in the end discovered they didn't even use the PCK format. Indeed, it seems that many of the files in those graphic folders use random-ish file formats. But I managed to display them all, so that was good. :(

Link to comment
Share on other sites

I always got the impression that all the images used in UFO and TFTD were stored as raw image data. (Basically 256 colour bitmaps without the palette - these are loaded separately).

 

PCK files are the same thing, but they get a tab file that points to the various sprite start locations in them.

 

The Geoscape textures also use a similar format. Basically a 32 wide bitmap with ... um, 13 textures x 3 zoom settings x 32 pixel width, oh forget it. It's just a long raw bitmap with the textures in it.

 

- NKF

Link to comment
Share on other sites

Not quite true. Some image files are drawn that way, but there is some simple compression in some of those files (the terrain/unit PCK files, for example, and the unit equipment screens).

 

Daishiva posted the image formats here, and that's what I've been using for my little programs. However, as I said, the extension of a file doesn't always tell you which format it uses, as according to his page. I found that all PCK files use the SPK format, unless they have a TAB file. There are two SCR files in the UFO ufograph folder, one of which also uses the SPK format. The other SCR file is the only file I've found so far which uses a raw bitmap style.

 

I checked some of the DAT files with a hex editor, and they seem to be raw bitmaps as well. Haven't really messed with them yet, as they mostly seem to contain stuff like blobs and arrows for the motion scanner, body parts for the med kit, etc.

 

UFO doesn't use the BDY files at all, they're exclusive to TFTD. So I haven't even looked at them at all.

Link to comment
Share on other sites

  • 3 weeks later...
While your on the subject of graphics, did anyone ever fix the screw up in the Tftd interception screen??...The battleships (not dreadnoughts) and supply ships had/still have their images reversed as opposed to the ones in the Ufopedia screen shot.
Link to comment
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
×
  • Create New...