Modding => Non-FFT Modding => FFTA/FFTA2 Hacking => Topic started by: looper on October 17, 2014, 07:11:19 pm
Title: Another Texttool
Post by: looper on October 17, 2014, 07:11:19 pm
Yo! You still remember me? I'm the crazy German guy who made a tool to edit text once (this one (http://ffhacktics.com/smf/index.php?topic=6486.0)). Well, it wasn't nice and most likely full of bugs ... However, I was sick the last days so I decided to just do this again. The result: A nice Java-Tool that can read and write texts, woohoo. It supports uncompressed texts, single-byte texts and LZSS-compressed texts*. It's still a beta because I'm too busy to test everything. It's a start at least ;).
* Written LZSS-texts are still uncompressed, but marked as LZSS-compressed. That's necessary because texts in scripts have to be compressed. At least it looks like it.
The tool requires Java 8, get it here (http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html). The source code is available at Github (https://github.com/looperhacks/FFTAText). Complete without docs because I'm lazy.
You can get the latest version from Github, too: https://github.com/looperhacks/FFTAText/releases
Usage After starting the tool, you get prompted for a file. Just choose your rom. The next window has two textfields: The big one for text, the small one for the offset. Everything else should be self-explanatory.
Oh, this tool doesn't support all the nice characters the game supports. If you look at the character-table (http://datacrystal.romhacking.net/wiki/Final_Fantasy_Tactics_Advance:Strings), only characters starting with 0x80 are supported. Kana aren't supported, either, but all the characters from the European version are supported (äßúîò, etc).
So ... that's it. If you find any bugs, please post them here. I'm planning to add some features later, but if you have an idea, you can post them, too :).
Title: Re: Another Texttool
Post by: Darthatron on October 19, 2014, 06:16:24 pm
Nice! I wrote a C# function to compress LZSS. It's usually the same or better compression as the original. Maybe you can add it to save space.
public int LZSSDecompress(byte[] source, ref byte[] dest, out int inSize) { int retlen = source[3] | (source[2] << 0x08) | (source[1] << 0x10) | (source[0] << 0x18); int xIn = 4; int xOut = 0; int tmp = 0; int i = 0; int j = 0;
public int LZSSCompress(byte[] source, out byte[] dest) { List<byte> ret = new List<byte>(); int xIn = 0; int xTemp = 0; int temp = 0; int size = source.Length;
int zCount; int fCount; int notMatched; int length; int pos;