OK, there are two parts to this. First you want to extract the .pac, for which you can use this QuickBMS script:
Here you'll find a bunch of files, one of being the .cg file. Another one will be cgarc.uka. Use the same script to extract the latter, which will contain the .dds.gz files.
Now I made a program that takes in a folder of .dds.gz files, a .cg file, and the name of a folder where the results should go. Here's the command-line usage:
I tried figuring out the assembling instructions, unfortunately I just couldn't get anywhere with it. I might give it another shot later on (I feel like I got really close) but right now it just converts the images to .png with the correct palette, which seems to be the biggest issue you had. It also automatically decompresses the files so you don't need to do that yourself.
Hopefully this all works fine, but tell me if any problems crop up!
Code:
# Dengeki Bunko: Fighting Climax Ignition .pac format
#
# Written by puggsoy
# script for QuickBMS http://quickbms.aluigi.org
idstring "UKArc\x00\x00\x00"
endian big
getdstring DUMMY 4
get FILES long
set BASE_OFF 0x10
for i = 0 < FILES
getdstring NAME 0x40
get SIZE long
get UNK1 long
get OFFSET long
math OFFSET += BASE_OFF
log NAME OFFSET SIZE
next i
Here you'll find a bunch of files, one of being the .cg file. Another one will be cgarc.uka. Use the same script to extract the latter, which will contain the .dds.gz files.
Now I made a program that takes in a folder of .dds.gz files, a .cg file, and the name of a folder where the results should go. Here's the command-line usage:
Code:
Usage: DBFCPacTool inDir cg outDir
inDir: A folder containing the .dds.gz files to convert
cg: The .cg file to use for the palette
outDir: The folder to save the converted files to
I tried figuring out the assembling instructions, unfortunately I just couldn't get anywhere with it. I might give it another shot later on (I feel like I got really close) but right now it just converts the images to .png with the correct palette, which seems to be the biggest issue you had. It also automatically decompresses the files so you don't need to do that yourself.
Hopefully this all works fine, but tell me if any problems crop up!