Users browsing this thread: 8 Guest(s)
Help Ripping the Battle Sprites from DB Fighting Climax Ignition
#1
Hello, I need help with extracting the battle sprites from Dengeki Bunko Fighting Climax Ignition (PS3), with a faster method than the one I know (Using hexadecimal editor). I know how to extract the files that contain these sprites, but there is no program to do it instantaneously, since all the files are in a container with extension ".pac," and I have to extract them one by one, making it very tedious.


Another problem is that the sprites come strangely, and the default colors are gray scale. In this way, the colors are applied by another separate file. In theory, a file with extension ".cg." The game is developed by French Bread, and in his other games, like Under Night in Birth, the battle sprites work with the same extensions.

Grateful that those with knowledge of hexadecimal and programming, help me with this.
For you can understand how these files work, I'll explain everything I know, and as accurate as possible:
1. Each character has its own container file (pac)
They contain not only the animations, but the whole operation of the character in battle. Everything you need to rip the sprites is here. It is assumed that only the following files are needed: Each sprite (in .dds.gz format, all separated) and file .cg
As a note, this container does not use any kind of encryption for files.
As an example, I'll use the character "Zero"
Files of this character are: Zer_s.pac ---------> Extraction using hexadecimal editor -----> Zer_s.dds.gz (20 sprites = 20 .dds.gz); Zer_s.cg

2. Extract the .dds.gz using, for example, winrar. You will extract a file '.dds.' You can transform it to .png using DDS Converter.
You should have something like this:
[Image: zer_s.png]

3. The sprite appears split in a strange way, and grayscale. Here, for all I know, enters the role of the file ".cg." According to this page (http://dantarion.com/2014/08/14/breaking...s-and-art/), this file contains information about how to build the sprite, and the color palette of the character. I don’t know if this also contains what colors replace the grayscale palette, but it’s possible.


4. From here, I will explain my method, which is the slowest, but at least it works. Using Photoshop, with a pair of tools, I replaced the colors in grayscale, by the original. But the process is with every color, one by one, and took me an hour and a half to do all the replacement, and for a single sprite. At least the result is satisfactory:
Original character:
[Image: colorsamp_Zer_s00.png]
Recoloured character:
[Image: Zer_s.png]

5. Then, the reconstruction is handmade. Only took me 5 minutes.
[Image: Zer_s_montado.png]
Very good result, close to the original. But it carries hour and a half to do it. With a simple operation, rip sprites of "Zero" would take about 30 hours, who only has 20 sprites. The playable characters are about 250 sprites, which would take 375 hours to rip it. What I come to say with these mathematical operations is: a VERY tedious process.


I have nothing more to explain, so I will say that is what we should try to obtain:
1. Create a program that, at least, can automatically replace the grayscale colors by their original palette. The problem is that each character has its colors, then, you have to prepare a script for each character. Well, maybe someone has another idea or a program that does this function. Rebuild automatically the sprites is not so urgent than the color replacer.


2. A program that can extract the entire contents of “.pac.” At least, the .dds.gz files.
To help, I will share the files that are required: 

http://www.mediafire.com/download/8w2ocbqncsvop9j/Zer_s.pac
http://www.mediafire.com/download/vbjbvr...5/Zer_s.cg
http://www.mediafire.com/download/b4ngmt.../Zer_s.dds

Thanks in advance to all those who try it. And if someone manages to create something that makes the two things mentioned before, I will rip all battle sprites.
Reply
Thanked by:
#2
Wait.

Waaaaaaait.

Is this an Arcsys game?


#helpsifIread

Well, I tried treating it like an Arcsys .pac, and it didn't work. Sorry.
Reply
Thanked by:
#3
Doesn't seem too hard, that page you linked doesn't explain that much but does help with the palette mapping. DDS is a weird and complex format so I probably can't make anything to handle those Scratch that, looks like the type of DDS used in this case is actually really simple. I can make an extractor and something that would colour (and maybe construct) the sprites after you've converted them.

If you could upload a few more pac files that would also help for testing.
You may have a fresh start any moment you choose, for this thing that we call "failure" is not the falling down, but the staying down. -Mary Pickford
Reply
Thanked by:
#4
(09-17-2016, 02:55 AM)puggsoy Wrote: Does seem too hard, that page you linked doesn't explain that much but does help with the palette mapping. [s]DDS is a weird and complex format so I probably can't make anything to handle those[s] Scratch that, looks like the type of DDS used in this case is actually really simple. I can make an extractor and something that would colour (and maybe construct) the sprites after you've converted them.

If you could upload a few more pac files that would also help for testing.

Oh, no problem. Here are the ".pac" of all the characters in the game (Playables and assists): https://www.mediafire.com/folder/pax76q6c1o0af/PAC

Thank you so much for help me.

If you need a preview for the color palettes, download this: http://www.spriters-resource.com/playsta...eet/78667/
Reply
Thanked by: puggsoy
#5
OK, there are two parts to this. First you want to extract the .pac, for which you can use this QuickBMS script:

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!
You may have a fresh start any moment you choose, for this thing that we call "failure" is not the falling down, but the staying down. -Mary Pickford
Reply
Thanked by: Sosfiro, Skyla Doragono
#6
Thumbs Up 
If any of you are able to rip the battle sprites, could you share them with me as well please? I've been looking everywhere for these sprites! Much appreciated! Shy
Reply
Thanked by:
#7
(09-17-2016, 11:51 PM)puggsoy Wrote: OK, there are two parts to this. First you want to extract the .pac, for which you can use this QuickBMS script:

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!

Very good program! You are my hero! I tried it with some characters (Zero, for example), and the color replacer is perfect.
No doubt that I'll include you in the credits, because with this, you've helped me a lot Smile

Seriously, thank you so much, man. As I finish the rips of each character, I'll upload them in a spritesheet.
Reply
Thanked by: puggsoy
#8
(09-18-2016, 04:27 AM)Sosfiro Wrote:
(09-17-2016, 11:51 PM)puggsoy Wrote: OK, there are two parts to this. First you want to extract the .pac, for which you can use this QuickBMS script:

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!

Very good program! You are my hero! I tried it with some characters (Zero, for example), and the color replacer is perfect.
No doubt that I'll include you in the credits, because with this, you've helped me a lot Smile

Seriously, thank you so much, man. As I finish the rips of each character, I'll upload them in a spritesheet.

Alright! Good to hear! Thank you both!
Reply
Thanked by:
#9
puggsoy, I'll report an error. The characters that are in this folder are not colored with the correct palette with the program you've designed:
https://www.mediafire.com/folder/pax76q6c1o0af/PAC

I do not know if you can fix it. Thanks in advance for the inconvenience.
Reply
Thanked by:
#10
OK, so it seems like the .cg files sometimes contain incorrect palettes or something? Not sure what's up with that, but they seem to actually contain the correct palettes consistently.
Here's the updated version (same link but just relinked for convenience), you use it the same way just specify a .pal file instead of .cg.

Hopefully it all works this time!
You may have a fresh start any moment you choose, for this thing that we call "failure" is not the falling down, but the staying down. -Mary Pickford
Reply
Thanked by: Sosfiro
#11
(09-20-2016, 07:48 AM)puggsoy Wrote: OK, so it seems like the .cg files sometimes contain incorrect palettes or something? Not sure what's up with that, but they seem to actually contain the correct palettes consistently.
Here's the updated version (same link but just relinked for convenience), you use it the same way just specify a .pal file instead of .cg.

Hopefully it all works this time!

Very good improvement. But a character does not work, just one. It is what is in the file "Oni.pac" (the character is Tatsuya Shiba) Both the .cg as the .pal can not be converted with the correct colors. Fortunately, it is the only character who fails, but has 300 sprites, so it would be helpful if it can be extracted well. You could find some way to fix it?

You can or not, I believe anyway that you've done a good job with this extraction program.
Reply
Thanked by:
#12
(09-20-2016, 07:48 AM)puggsoy Wrote: OK, so it seems like the .cg files sometimes contain incorrect palettes or something? Not sure what's up with that, but they seem to actually contain the correct palettes consistently.
Here's the updated version (same link but just relinked for convenience), you use it the same way just specify a .pal file instead of .cg.

Hopefully it all works this time!

How to use your program? I can't choose the input-output directories and .pal file because, when i run this program it's closes after pressing any button.
PS. Sorry for this stuped question.
Reply
Thanked by:
#13
You should open it via the command prompt. In the folder, right click somewhere while holding down shift and then click "Open command window here". Then you can run the program with the usage I posted.
You may have a fresh start any moment you choose, for this thing that we call "failure" is not the falling down, but the staying down. -Mary Pickford
Reply
Thanked by: Antabus
#14
Does anyone has a .pac file with Shirai Kuroko, Mashiro Shiina and Koko sprites? I didn't find this files in the Sosfiro's folder on mediafile.
Reply
Thanked by:
#15
(12-07-2016, 11:07 AM)Antabus Wrote: Does anyone has a .pac file with Shirai Kuroko, Mashiro Shiina and Koko sprites? I didn't find this files in the Sosfiro's folder on mediafile.

I uploaded all the .pac from the game. If you get to rip the sprites of any character completely, do not forget to upload it to sprites resource:
https://www.mediafire.com/#pax76q6c1o0af
I am currently busy, and I don't have time to ripping things for a while. Maybe I can continue ripping in January...
Reply
Thanked by: Antabus


Forum Jump: