UPDATE - 2019: There is now a front end for BombBlokes toolkit, you can find it on the OXCmod site here: https://openxcom.mod.io/xcom-image-extractor
BB_Toolpack / BB_Toolkit / BB's Tools / Bomb Bloke's X-Com Toolkit
Bomb Bloke has been around for a while, and I personally believe that he's modded every part of X-Com possible. To allow others to follow in his footsteps, he's created his toolkit. or toolpack. Well, his "collection of various programs and utilities", as he puts it.
you can download it from strategycore:
you can download it from strategycore:
The toolpack has a lot of tools. A LOT. The documentation is nice and helps you to get started. Here's some additional things that I learned about it while using it. Be aware that I have only used a very small part of the tools provided.
"Image Converters"
I started out using pckview to access the sprites stored in the .pck files. Everything worked fine, until I started trying to push new images to bigob.pck - for some reason, the sprites got mutilated. The bottom part was cut off. So I had to search for another way, and started using pck2gif and gif2pck.
As the name suggests, they convert into and from gif files. That's nice because they have real transparency instead of the color-0-is-interpreted-as-transparency approach that the .bmp files created by pckview use.
The enclosed help file tells you to put the toolkit into the game directory. THIS IS NECESSARY. The Image Converter tools need to access the palettes.dat file found in the UFO games files. If the file isn't there, your .gif files will look all wrong.
The best way is to create a copy of the entire game directory and put the toolkit in there. this way, you will never accidentally destroy or mutilate your game files, and you will always have an easy-to-access repository for the original files.
pck2gif extracts all images from a .pck file and puts them into a subdirectory as .gif files.
CAREFUL: if you already created that subdirectory, started editing it, and then accidentally extract again, it will overwrite all files that are already there. No warning, no asking for confirmation.
gif2pck will take all the pictures in a subdirectory and put them in a .pck file of the same name.
CAREFUL: this, too, will overwrite existing (.pck and .tab) files without warning.
an interesting effect: when I tried gif2pck the first time, the sprite order in the resuting .pck file was all wrong. It might have been because I was running it from a USB memory device: apparently the tool did not actually sort the files itself, but instead relied on the file system to provide them in the correct alphanumerical order. once I moved the whole directory structure to the HDD, everything worked beautifully.
As the name suggests, they convert into and from gif files. That's nice because they have real transparency instead of the color-0-is-interpreted-as-transparency approach that the .bmp files created by pckview use.
The enclosed help file tells you to put the toolkit into the game directory. THIS IS NECESSARY. The Image Converter tools need to access the palettes.dat file found in the UFO games files. If the file isn't there, your .gif files will look all wrong.
The best way is to create a copy of the entire game directory and put the toolkit in there. this way, you will never accidentally destroy or mutilate your game files, and you will always have an easy-to-access repository for the original files.
pck2gif extracts all images from a .pck file and puts them into a subdirectory as .gif files.
CAREFUL: if you already created that subdirectory, started editing it, and then accidentally extract again, it will overwrite all files that are already there. No warning, no asking for confirmation.
gif2pck will take all the pictures in a subdirectory and put them in a .pck file of the same name.
CAREFUL: this, too, will overwrite existing (.pck and .tab) files without warning.
an interesting effect: when I tried gif2pck the first time, the sprite order in the resuting .pck file was all wrong. It might have been because I was running it from a USB memory device: apparently the tool did not actually sort the files itself, but instead relied on the file system to provide them in the correct alphanumerical order. once I moved the whole directory structure to the HDD, everything worked beautifully.
Hints and Tricks for using the GIMP
One problem is: the GIMP is a little bit too smart for our good and reduces the .gif files' palette when opening it, omitting any colors that the current sprite doesn't use.
So if you want to re-paint the sprites, you will have to change the palette, unless you want to be stuck with the few colors that are provided. What I did is "upgrade" the image file to true RGB, and then reduce it to an indexed-palette image again, using a previously saved full UFO battlescape palette. (You could also try editing it as true RGB and later reduce it, but that is likely to result in color bleeding and ugly effects. I recommend using only the original palette colors from the start.)
The easiest and safest way to do that was (for me):
- open the file with GIMP
- click on Image > Mode > RGB
- open another image that uses the full UFO battlescape palette (see below)
- select the first file again
- click on Image > Mode > Indexed
- select "Use custom palette"
- click on the palette button (directly below "use custom...")
- scroll all the way up (you might have to move the whole "Indexed Color Conversion" window to the bottom of the screen if the selection list goes off the top border)
- select "Colormap of Image ??", be sure to choose the image that you know uses the correct palette
once you've done that, the image should still look the same, but the palette is now complete, allowing you to use all available colors.
If you use the GIMP, there's a nice little thing you should use when pixel-painting: the "Palette Editor". You can find it in "Windows > Dockable Dialogs > Palettes". In the list that opens, you will have to scroll all the way up to access the palettes of the currently opened image files. A double-click on the palette (not the name of the palette, but the little image on the left-hand side) opens the Palette Editor. You can use it to conveniently choose the color you want to use for painting, and you can always see what colors you have at your disposal.
So if you want to re-paint the sprites, you will have to change the palette, unless you want to be stuck with the few colors that are provided. What I did is "upgrade" the image file to true RGB, and then reduce it to an indexed-palette image again, using a previously saved full UFO battlescape palette. (You could also try editing it as true RGB and later reduce it, but that is likely to result in color bleeding and ugly effects. I recommend using only the original palette colors from the start.)
The easiest and safest way to do that was (for me):
- open the file with GIMP
- click on Image > Mode > RGB
- open another image that uses the full UFO battlescape palette (see below)
- select the first file again
- click on Image > Mode > Indexed
- select "Use custom palette"
- click on the palette button (directly below "use custom...")
- scroll all the way up (you might have to move the whole "Indexed Color Conversion" window to the bottom of the screen if the selection list goes off the top border)
- select "Colormap of Image ??", be sure to choose the image that you know uses the correct palette
once you've done that, the image should still look the same, but the palette is now complete, allowing you to use all available colors.
If you use the GIMP, there's a nice little thing you should use when pixel-painting: the "Palette Editor". You can find it in "Windows > Dockable Dialogs > Palettes". In the list that opens, you will have to scroll all the way up to access the palettes of the currently opened image files. A double-click on the palette (not the name of the palette, but the little image on the left-hand side) opens the Palette Editor. You can use it to conveniently choose the color you want to use for painting, and you can always see what colors you have at your disposal.