Users browsing this thread: 2 Guest(s)
[SOLVED] Ripping sprites from a ".sql" file
#1
I'm a big fan of Mojang's "Callers bane" (formerly known as "Scrolls"). You can download the game client and even set up your own server from here: https://mojang.github.io/CallersBaneSiteArchive/ (important for later)

Recently, I've wanted to get my hands on cutout animation assets and wanted to rip them from the game.

Below is what I have attempted so far:

1. Unity Extraction

Caller's Bane is a Unity Game so it made sense that the assets I was looking for would be within the project files and I initially extracted what I could from the game's resource file. I found card art, background art, player profile pieces and only one single sprite sheet that fit what I was looking for. I practically had every game asset but the unit sprite sheets. I tried decompiling the project with a different tool and opening it up in the Unity editor but I still couldn't find what I was looking for. (tools used: AssetBundleExtractor_3.0beta1_64bit and uTinyRipper_x64)

   

   

2. The SQL file
Since I was stumped, I decided to see if maybe this info was stored server side and took a look at the "callersbane_database.sql" file provided in the link above. It turns out that there are raw files being stored on the files, and so I tried to extract them.

   

I was able to convert the raw data into unit sprites! Unfortunately, it seems that all of the files there are static images or card art, and not the sprite sheets as shown above. (Not 100% certain, still sifting through each line)

   

3. The animation_bundles table
I strongly suspect that the assets I'm looking for is within the animation_bundles table, probably the hexadecimal code to maybe the Unity animator files. Unfortunately I am stumped, I don't know how to manipulate the data to extract anything useful.

   

I hope some of you at least find this little investigation interesting. If any of you have other ways of cracking this, please let me know.

p.s. First time poster, please let me know if I should fix up the post in any way
Reply
Thanked by:
#2
Update: 4.Unpacking the animation_bundles data
I was ready to give up on extracting data from the table but I strongly suspected that the table was for '.anim' files that Unity uses, or something of that sort. I realized that the images where likely embedded right into the file itself. With some research I found out that "89504E470D0A1A0A" is the unique signature of PNG files. Once I found the portion of the hexadecimal string, I took it out and after some liberal removal of probably other '.anim' data got a partial success:

   

I still haven't gotten a full extraction and my other attempt converted looks like it produces tearing.

   

Unfortunately, I cannot seem to get more than a top half extracted so far as it seems that the '.png' portion isn't stored raw, which doesn't allow for a complete extraction so far. On the bright side, I am definitely looking in the right place, I just need to figure out how to manipulate the values. I now believe that the filetype being stored on the db is the unity AssetBundle (which fits with the table name), it will take some time to figure out how to either stream the data to myself or to maybe convert the values into a file and open it up with some other tool.
Reply
Thanked by:
#3
Star 
Update: 5.Files found
Trying to convert the hexadecimal values to a file was a bust. The filetype is unreadable unless you have the proper filename. I decided to look for filename clues by decompilling the Game's Unity Assembly. There, I found that someĀ  scripts keep files locally in Appdata. There, a bunch of unreadable files are kept, as well as the spritesheets, readable, that I've been searching for.

   

Once again, the right solution is a simple overlooked one.
Reply
Thanked by: applecuckoo


Forum Jump: