GFXtract v0.1 Release

It’s done! I’ve finally finished off the first public version of GFXtract. You can download it on GitHub. I’m pretty glad I actually managed to get it to this point, it’s one of my biggest projects so far and it’s actually been going really smoothly, considering. At this point I can already make scripts to extract a lot of simple formats; in fact I already made 2, one for Turbo Pug’s .tex files and one for the .gxt files in Patapon 1 and 2. I’ll be making a page for scripts soon so you’ll be able to find them there.

So yeah! Obviously GFXtract is far from complete, I’ll be adding stuff for a good while, and before long I’ll start reorganising the system to be more stable, as I’ve mentioned before. For now, I’m just glad I’ve got the first release done!

GFXtract Is Almost Ready

I’ve been making some really nice progress with GFXtract. It’s reading scripts very nicely, executing commands and reading arguments pretty much without issues. As I said before I do plan to make a more general way of handling these, right now a lot of it is handled very specifically but it works well enough for now.

Anyway, it can now actually read in linear pixel data, either with or without a palette.┬áThe colour order can be any order, either with or without alpha (e.g. ARGB, BGR, GARB, etc). The bits per colour (bpc, which is actually bpp for non-paletted images) can be any multiple of 8 up to 32, and bits per pixel (bpp) for paletted images can be any multiple of 4 up to 32. This should handle most formats, although I intend to expand this later on to allow any number of bits, even odd numbers like 13. For bpc however, I will probably require the script to specify which bits are for which channel. And I won’t allow anything above 32 bits, since I highly doubt it’ll ever be necessary (and besides, Ints in Haxe are 32-bit anyway).

I’ve also done a bit of simple image manipulation, namely flipping vertically and horizontally. I think this is really one of the most important transformations, the only other thing that will often be useful is copying out part of an image onto a different image. It will be handy and allow things like piecing together broken sprites or even making things like sheets using animation info.

Another thing that is sorely needed are if statements and for loops. These aren’t super easy to implement though and I think I will leave them until I redesign the script parsing (which hopefully isn’t too far off).

Anyway, at this point GFXtract is already usable for fairly simple formats; I already have fully functional scripts for Patapon (1 and 2) .gxt files, and Turbo Pug .tex files (which I think might be general Unity TEX; I’ll have to check). I’ll just make sure it all works, write up a small readme and then put up a download! Even if it only has basic functionality, it might get some people interested in it.

GFXtract Progress

I’ve recently been putting some more time into GFXtract. Right now I’m primarily focused on getting into a usable state, so it can at least convert the most simple of formats. Once that’s done I plan to reorganise my code, since right now everything about script reading and execution is in the same file. I also want to have some helpers for arguments, that can automatically detect the types and maybe produce more useful errors as well.

Currently I think I’ve covered most of the basic commands, now I just need to get the actual image reading and saving done (along with some simple manipulation like flipping). I’m not sure if I’ll bother with if statements and for loops yet, those could get a bit messy in the project’s current state.

By the way, if you’re interested you can view the project on GitHub.

Dustforce Sprite Extraction

So for the last little while I’ve been trying to extract sprites from Dustforce. It has some really great art and it’s a game I enjoy, which is usually more than enough for me to take a crack and ripping sprites from it. The playable character sprites had already been uploaded by Hitbox Team themselves (Terence specifically), but not any of the other sprites, so I took a swing at the extensionless sprite files. Unfortunately I couldn’t find any documentation on it, and although I found some zlib compressed image data and saw that they were bits of sprites, I wasn’t really sure how to put them together.

I decided to email Hitbox Team, and they replied! Matt Bush, the engine programmer, gladly helped me out with the format specifics, even sharing some bits of the engine’s code. Eventually I managed to construct something that could piece together and spit out the sprites. Unfortunately, these weren’t in a format that could be used for modding, unlike the ones already on the site. So in the end Matt just ended up giving me the original sprites files, which were just like the ones already uploaded and could be used in mods.

Even so, it was really interesting figuring out the format. Anybody who might be interested can check out the code for my extractor on GitHub, I tried to comment it reasonably well and hopefully it’s usable even if you don’t know Haxe. Although, I’m not really sure what it could be useful for. I plan on putting all the sprites up on The Spriter’s Resource, and the game can automatically compile them into the file format itself. But hey, it might just be interesting to check out.

By the way, I’ve reorganised MiscTools, making it a Dropbox folder instead of a zip, This means I can still have all my small programs in one place, but you don’t have to download them all if you only want one or two.

VGSC 2.1 Update

I’ve recently updated VGSC to v2.1. This fixed a bug it had that made loopable files loop. Technically it isn’t really a bug, vgmstream has this enabled by default, however it’s something that most people won’t want. When I wrote v2.0 it seems that I forgot to add the flag that disables it. Later on I intend to give people more options though, so they can enable looping (among other things).

VGSC is up on Github, by the way. Since it’s just a wrapper, it doesn’t have any of vgmstream’s conversion code (that can be found here) but it may still be useful or interesting to some people.

I’ve also rearranged stuff a bit. All of my small programs that had little or specific uses have been packed into a single zip. They’re mainly there just so I still have them, and for anybody who might want to use one or two of them, but I just didn’t want to make a link for every single one of them.