Apocalypse PCK Extractor

apocalypse pck

  • Please log in to reply
15 replies to this topic

#1 Bomb Bloke

Bomb Bloke

    The Smily Admin

  • Admin
  • PipPipPipPipPip
  • 4,625 posts
  • Gender:Male
  • Location:Tasmania (AU)

Posted 28 July 2012 - 09:49 AM

So as far as I know this is the first.  Posted Image

Attached File  Apocalypse PCK extractor.rar   16.61K   1702 downloads

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.
BB's X-Com Projects Page - X-Com Games At GamersGate
You're just jealous 'cause the voices only talk to me :P
We love Tammy! :)

#2 luke83

luke83

    Sergeant

  • Members
  • PipPipPip
  • 93 posts
  • Gender:Male

Posted 28 July 2012 - 12:47 PM

I jut spent 20min seachign through boxes of old games cds to find my Apoc CD, now to se if i can get this baby to workPosted Image

#3 luke83

luke83

    Sergeant

  • Members
  • PipPipPip
  • 93 posts
  • Gender:Male

Posted 28 July 2012 - 01:20 PM

OK it works , i just extracted one Gang member sprite and there is so many images compared to XCom:EU

Good work BombBloke, now with your tool kit , is it possible to Autoconvert these directly to Xcom:EU Colour pallet?

#4 Bomb Bloke

Bomb Bloke

    The Smily Admin

  • Admin
  • PipPipPipPipPip
  • 4,625 posts
  • Gender:Male
  • Location:Tasmania (AU)

Posted 28 July 2012 - 02:04 PM

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.)
BB's X-Com Projects Page - X-Com Games At GamersGate
You're just jealous 'cause the voices only talk to me :P
We love Tammy! :)

#5 luke83

luke83

    Sergeant

  • Members
  • PipPipPip
  • 93 posts
  • Gender:Male

Posted 28 July 2012 - 02:06 PM

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?

#6 Bomb Bloke

Bomb Bloke

    The Smily Admin

  • Admin
  • PipPipPipPipPip
  • 4,625 posts
  • Gender:Male
  • Location:Tasmania (AU)

Posted 28 July 2012 - 02:25 PM

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.)
BB's X-Com Projects Page - X-Com Games At GamersGate
You're just jealous 'cause the voices only talk to me :P
We love Tammy! :)

#7 NKF

NKF

    Mr. Badger in disguise

  • Site Staff
  • PipPipPipPipPip
  • 4,420 posts
  • Gender:Male
  • Location:In my mind

Posted 28 July 2012 - 04:50 PM

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
NKF, narrow minded fuddy duddy who refuses to let go of the past and will not accept anything newer than 1979.

#8 Bomb Bloke

Bomb Bloke

    The Smily Admin

  • Admin
  • PipPipPipPipPip
  • 4,625 posts
  • Gender:Male
  • Location:Tasmania (AU)

Posted 29 July 2012 - 08:06 AM

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:
BB's X-Com Projects Page - X-Com Games At GamersGate
You're just jealous 'cause the voices only talk to me :P
We love Tammy! :)

#9 jos

jos

    Squaddie

  • Members
  • Pip
  • 29 posts
  • Gender:Male
  • Location:Vancouver, Canada

Posted 17 December 2014 - 02:30 AM

Hey Bomb Bloke,

I'm trying to use your PCK extractor and i'm getting a:

exception in thread "main" java.lang.nullpointerexception

Any idea what's causing this?

#10 Bomb Bloke

Bomb Bloke

    The Smily Admin

  • Admin
  • PipPipPipPipPip
  • 4,625 posts
  • Gender:Male
  • Location:Tasmania (AU)

Posted 25 December 2014 - 12:45 AM

Could mean quite a few things; the rest of the error is required to figure out exactly what the problem is. A full screenshot of the command prompt window you're using (including the command you typed to run the extractor) would be most helpful.
BB's X-Com Projects Page - X-Com Games At GamersGate
You're just jealous 'cause the voices only talk to me :P
We love Tammy! :)

#11 jos

jos

    Squaddie

  • Members
  • Pip
  • 29 posts
  • Gender:Male
  • Location:Vancouver, Canada

Posted 01 January 2015 - 08:05 PM

Here you go:

http://postimg.org/image/hzdlz1d01/

Posted Image

Thanks for any help you can offer BB.

#12 Bomb Bloke

Bomb Bloke

    The Smily Admin

  • Admin
  • PipPipPipPipPip
  • 4,625 posts
  • Gender:Male
  • Location:Tasmania (AU)

Posted 05 January 2015 - 01:42 PM

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.
BB's X-Com Projects Page - X-Com Games At GamersGate
You're just jealous 'cause the voices only talk to me :P
We love Tammy! :)

#13 jos

jos

    Squaddie

  • Members
  • Pip
  • 29 posts
  • Gender:Male
  • Location:Vancouver, Canada

Posted 15 January 2015 - 07:09 PM

Thanks BB that did it.

#14 Solarius Scorch

Solarius Scorch

    I just love the color red...

  • Members
  • PipPipPip
  • 75 posts
  • Gender:Male
  • Location:Poland

Posted 26 December 2015 - 10:38 PM

Hi Bomb Bloke, I also have a similar problem but the Xcom.blk is there. Attached screenshot.
Look at you hacker...
A pathetic creature of meat and bone, panting and sweating as you run through my corridors.
How can you challenge a perfect immortal machine?

-- Shodan, System Shock 2

#15 Bomb Bloke

Bomb Bloke

    The Smily Admin

  • Admin
  • PipPipPipPipPip
  • 4,625 posts
  • Gender:Male
  • Location:Tasmania (AU)

Posted 26 December 2015 - 11:53 PM

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
BB's X-Com Projects Page - X-Com Games At GamersGate
You're just jealous 'cause the voices only talk to me :P
We love Tammy! :)

#16 JacobD88

JacobD88

    Squaddie

  • Members
  • Pip
  • 4 posts

Posted 16 February 2019 - 11:59 AM

Hi @Bomb Bloke

Sadly im getting an error when using this extractor on saucer.pck

Attached Thumbnails

  • saucer.jpg





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users