Back again with a big update. Since FE12 uses a lot of different methods for encrypting data I created a method to decrypt every filetype directly on the fly. However, this method still failed for battle animations so I took a closer look at the files and it turned out that in this case it’s not simply one encrypted file for each animation. Instead each animation frame within the files is individually encrypted. Now I can also extract individual frames of battle animation like this:
This might look like clown vomit but this is a real important step when it comes to understanding battle animations for DSFE. This image just lacks a palette but since FE12 features hair color variables for characters I assume the palette is more dynamic. Anyway, sooner or later the mystery of these animations will be solved - that’s for sure.
Here comes the class animation editor when we are on it. It’s quite advanced so far for map sprites. You can take a look at the fully animated sprites with both palettes. This is by the way a case of an interesting palette use. Map sprites are technically 8bit and use a 256 color palette. However, the palette file contains only 64 entries: 32 for the player palette and 32 for the enemy palette. Depending on the affiliation one of the entries shift to the index 224 which then gives us a correct sprite display.
By the way the editor already features GIF-exports of map sprites.
Of course I intend to support import of GIF animations as well since it is the most user friendly way to make map sprite editing easy. Here is also an update for the face editor which now allows edits of big portraits as well:
For image data I developed a special interpreter for binary data that makes reading and writing of binary image files a lot easier. For example displaying this big face graphic is as easy as this:
Size tileSize = new Size(8, 8);
interpreter = new blockInterpreter(imageBin, Palette, tileSize);
blockArea[] main = new blockArea[] {
new blockArea(0, 0, new Size(8, 8), 0x0200),
new blockArea(8, 0, new Size(8, 8), 0x1200),
new blockArea(0, 8, new Size(8, 8), 0x2200),
new blockArea(8, 8, new Size(8, 8), 0x3200),
};
interpreter.AddRange(main);
return interpreter.getBitmap();
blockInterpreter is declared outside here, I mention it just in case.
Eventually this might be interesting for other romhacking projects as well since it allows for really fast prototyping of typical image tasks. I am already documenting most stuff from the source code as well.
The next big thing for my coming update will be imported custom map animations. You can expect that pretty soon. For unit data I also got some help from Radd who worked on FE12 Reverse Recruitment. @Darrman Every help is appreciated. If you have some helpful notes as well feel free to share them.
It’s also amazing to see that many people showing interested for FE12 hacking. Thank you, everyone! I will answer some questions in the future. This project just keeps me very busy and if I am really focussed on something I usually give it my all.