Working on Translation Tool

For the last few days, I’ve been working on my translation tools for Sol Trigger. Originally, I had the decompression/compression tool separate and was starting to build the text extractor/inserter on it’s own. Since then, I’ve combined them both into one program that I am now calling Sol Trigger Manager. I’ve also improved the decompression/compression part of the tool considerably.

Each of the .TPK files that contain the text in the game, have a specific file header. They all start with “ZZZ0” then the size of the uncompressed file and finally slightly after that a static value that is the same across every file (and as of yet appears unimportant).

It is, however, important that during the re-compression process, we re-insert the file header (decompression removes it, as it isn’t needed in the decompressed file and would screw up pointer calculation).

Before, every time we wanted to work with a file, I was having the person using the program “Create a TPK file header”, which would essentially copy the file header into a new file before decompressing the file. The program would then append the re-compressed data to the TPK file header file.

The problem with appending in C# is that, if we were to do this process more than once, the re-compressed data would keep getting appended to the old data. Because of that, it was necessary to delete the old file before repeating the decompression/re-compression process.

I’ve since rewritten that part of the program. There no longer is a “Create TPK file header” step. Only “Decompress TPK” and “Compress TPK”. Now, before decompressing a file, the program reads the file header, stores it in an array, and saves it for later to write to the re-compressed file. The program then proceeds to decompressing the file.

When we choose to compress the file, the stored file header data is written to the file first, followed by the compressed data.

For one thing, this is a less messy way of doing things. We now do not append data. If the file exists, we overwrite. If not, we create a new file. No more manually deleting old files. Also, now when we re-compress, we can choose to overwrite the original .TPK file. Before, we had to make a new .TPK.cmp file and then manually rename it to .TPK, deleting the old .TPK file.

In the future, I plan on improving this part of the tool more by allowing multiple files to be decompressed/re-compressed all at once.

Now about the text extractor/inserter part of Sol Trigger Manager. I’ve been spending a lot of time on this. I’m not going to pretend to be some expert programmer. I can’t whip something up at the snap of my fingers. I’ve been learning through trial and error, as well as getting help from more experienced programmers.

Currently, I am in the process of writing the code to extract the text, re-insert the text, and auto-update the pointers. The plan is to extract the text into a regular .txt file. We then make the edits that we want and, using the .txt file, re-insert the new text into the .TPK file. The program will then auto-update the pointers where necessary. We’d then re-compress the file, insert it into the game, and bam! we have English.

Concerning the team, at the moment it is still just me. I posted about the project on GBAtemp a few days ago. When I’ve gotten the text extractor/inserter part of the program done, I’ll start looking around more to try and recruit the translators.

Advertisements
Leave a comment

5 Comments

  1. Forte

     /  April 28, 2013

    What are your plans for the font? IIRC, it’s easy to change the letter box size, but you can’t do anything about the letters being monospaced.

    Will you be doing any assembly code rewriting for a VWF or are you settling for monospaced (which would be a shame for such an extensive project)?
    In the event you’ll do the former, it’d be great if you documented your efforts. Apart from some theoretical discussion, I’m not aware anyone has ever done (or documented) a font hack like that for a PSP game in the past. (Either the game came with a VWF to begin with like that digimon game or people didn’t bother)

    Reply
    • My plan is to eventually take whatever time is necessary to get a proper VWF working. I don’t plan on using the default, monospaced font in the final product. I’ll definitely consider documenting the process, if it’ll help out others in similar situations.

      Reply
  2. zero

     /  May 1, 2013

    I have working with these imageepoch games for a little bit but due to my lack of real programming skill I have been relying on others for the programs. I wonder if you would maybe be interested in sharing the extractor/inserter because Criminal Girls and Final Promise Story also use the exact same format. I could also lend a hand with Sol Trigger if needed.

    Reply
    • When it’s completely done and I make sure it’s relatively stable, then sure, I don’t see why not. It’s a fairly simple tool, nothing elaborate. You’ll need .NET Framework 4.5 to run it. I’ll even make up a document explaining how to use it.

      Reply
      • zero

         /  May 4, 2013

        Sounds good. Noticed you were able to get a working dialog insert back into a playable game. That is much further than I got with Sol Trigger. Though I did manage to get a few things translated before putting it on hold for hopes of finding a means to successfully insert the files back into the game. Good luck and let me know if you need some help on the hacking side of things.

        Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: