Jump to content

Apocalypse PCK Extractor


Bomb Bloke

Recommended Posts

So as far as I know this is the first. smile.png

 

Apocalypse PCK extractor.rar

 

It's very rough-and-ready, but for the most part it works ("for the most part" - it's not 100% done yet). The operation is similar to that of my other conversion tools, but I'm not bundling this together with those yet as they're not at all relevant to Apocalypse...

 

As with most of my stuff, you need Java.

 

Extract the archive into your Apocalypse game folder and copy the PCK/TAB files you want to extract into the bb_tact folder this gives you. You will also need to copy in a PALETTE.PAL file - if you're converting terrain sprites, get this from the terrain folder you're working with (eg, for the police station, copy across MAPS\02POLICE\MAPUNITS\PALETTE.DAT; the PCK/TABs for that set are in the same folder). If you're working with units (X-COM troopers for eg, which are found in TACDATA\UNIT\) just grab a palette from a random terrain folder.

 

If you're using the Steam version, note that most of the data you want is stored in an ISO. The path to this will likely be along the lines of C:\Program Files\Steam\steamapps\common\xcom apocalypse\cd.iso, and you should be able to browse this with WinRar or similar.

 

Open up a command prompt in the BB_Tact folder, and run the PCK2GIF command with your PCK as the parameter. For example, assuming you've copied across the Spitter's files:

 

PCK2GIF spitr

 

... and hit enter. A subfolder of the PCK's title will be created and GIFs for each sprite will be dumped inside.

 

Things to do:

  • Not all archives can be extracted yet. For example, the archives with an "s" tacked onto their name (eg, SPIT-S.PCK, which probably contains the spitter's bullet sprites).
  • I'm not 100% certain the game simply uses the palette file in a given terrain's folder to draw that terrain. I suspect it mashes the colours up with other palettes perhaps.
  • GIF to PCK conversion? Not certain I quite understand the format well enough, and I doubt there's any demand, but it's probably do-able.

Those interested in what I know of the format can read up here.

Link to comment
Share on other sites

The straight answer is yes - it's trivial to deal with the palette side of things.

 

The longer answer is that the resolutions don't match, and units are simply a different shape in Apocalypse - they're taller and thinner, and don't have the same pose as units from the earlier games.

 

But yeah, if you redraw them to suitable sizes, re-order them and scrap all the excess animations, my toolkit will handle the colour side of things without issue.

 

Terrain is a bit of a different story. I could probably write something to convert it automatically, without it looking too bad. I'd need to suss out Apoc's version of the MCD format though. (It actually keeps track of four different tile arrays, one for each tile type (ground, west wall, north wall, and "feature") - the resulting tile counts are huge, but it should be possible to use them with OpenXcom.)

Link to comment
Share on other sites

It was just the colour side i was not sure of, Cut and Paste i can handle, it helps that i don't plan to make Apocalypse units in xcom , i just want bits and pieces for Other Projects.

 

What command do i need to make this Conversion , i have never done it before?

Link to comment
Share on other sites

You just use GIF2PCK like usual, but be aware that if you haven't adapted them to EU sizes first it'll chop them itself (taking the top left 32x40 pixels and discarding the rest - a crop, not a resize). It automatically applies the palette of either UFO:EU or TFTD (depending on which game you installed that particular copy of the toolkit in).

 

If the cropping is going to be a problem, then use the palette swapping method Moriarty described down the bottom of this article. The issue with that is that you have to do it for each sprite you work on, whereas GIF2PCK can do all of them for you using a single command.

 

But you can literally just ignore the palette side of things and let GIF2PCK deal with it all when you do the final conversion. Just keep in mind that the earlier you get it done, the easier it is to keep track of which colours are worth using.

 

(It'd be no fun drawing with ten shades of red, then converting to find that the target palette only really has one shade that's anything like any of them.)

Link to comment
Share on other sites

Probably not the first, XED did have the ability to view and extract the sprites as one of its more obscure functions. Not the most comprehensive of editors, mind you.

 

It's sad to see how many sprites were never used. Many of the enemy guards you see have two, maybe three for the cultists, variations.

 

- NKF

Link to comment
Share on other sites

XED could do that? That's what I get for never trying it out... :laugh:

 

I'm still stuck on some of the sprites; I'm not strictly sure that every record that goes in an Apoc PCK is a sprite... I can't get the game to render some of them. :blink:

Link to comment
Share on other sites

  • 2 years later...

Ah, righto. It can't find xcom.blk. This is a file that contains a whole heap of data needed to decode some of the sprites. Sorry, I hadn't thought too hard about that.

 

It looks like you're going to have to pull it out of the cd.iso file in the "Xcom Apocalypse" folder (like I guess you did to get the PCK files). Open that in WinRar or something, and you'll find the needed file in tacdata. Drag it from there to the tacdata folder in the xcoma folder, and stick bb_tact into the xcoma folder as well. I reckon it'll be ok after that.

 

You may as well pull out everything from the ISO's xcom3 folder to the xcoma folder. Will save a bit of time in the long run, I'd say.

Link to comment
Share on other sites

  • 2 weeks later...
  • 11 months later...

I'm not seeing any screenshot in your post there, but remember that the bb_tact folder is expected to be in your main game folder (which is usually called XCOMA), and it's expecting xcom.blk to be in the main game folder's tacdata folder. Putting xcom.blk into the bb_tact folder won't work, for example.

 

xcastruct.png

Link to comment
Share on other sites

  • 3 years later...

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...