Kingdom Hearts: Final Mix Translation Patch (In progress)

Discussion in 'Code Vault' started by Trilix, Feb 20, 2012.

  1. Enzineda Traverse Town Homebody

    Joined:
    Jul 2, 2013
    23
    112
  2. root670 Destiny Islands Resident

    Joined:
    Feb 28, 2013
    5
    52
    Awesome, now the real translating side of things can happen :).

    Found a bug in your ARDread program, though. As a test, I used dh01.ard (which contains text from the first cut scene in the game, including "So much to do," and "so little time..." in the English version). It extracts 3 text files containing 4, 0, and 99 strings each. For the second one (0 strings), it gives a red error instructing me to submit the name ;)
    This was the output when using the Final Mix version ARD, but the same error occurs with the US version at different offsets. It didn't extract the area of the file that contained "So much to do," in the US version (which is in the section beginning at 0x3ED80 in dh01.ard, the 7th offset in the initial header). I belive this bad entry resulted in the <1KB file named "dh01.ard-1.txt"

    How are you determining if an ARD section contains strings? I noticed when I try to extract strings from another ARD (di01.ard, containing first Destiny Islands cut scene), the cut scene strings are again found in the 7th section of the ard (err, pointed to by the 7th offset in the begging of the file), but this time your tool successfully extracts the strings to di01.ard-1.txt.

    I think the cutscene text from dh01.ard is supposed to be extracted to dh01.ard-1.txt, but your error catching routine discards it as bad data. Oddly, the part that contains the strings in dh01 does in fact end with the "Obtained Postcard." line.
     
  3. crazycatz00 Twilight Town Denizen

    Joined:
    Apr 12, 2013
    40
    236
    Well ****, seems things aren't as hard-coded as I thought. I was literally hard-coding entry numbers (like entry #6; 0-based), as it seemed set-in-stone (something like 10 files matched). Apparently it's not... Wonderful. I must of picked test files that happened to use the same layout... -.-.

    That being the case, I again am not sure what to try. The game has to know somehow what everything is...

    Also: This invalidates my current ARD tool, don't use it for anything that's not testing.
     
  4. root670 Destiny Islands Resident

    Joined:
    Feb 28, 2013
    5
    52
    From what I've seen it goes something like this:

    Let x = 7th section offset in ARD file's header.
    Goto offset x.
    Let y = 2nd offset from section beginning at x.
    Goto beginning of ARD file.

    So x+y would give you an offset to a table of strings. This seems to be the pattern in several files, but I might be wrong.
     
  5. crazycatz00 Twilight Town Denizen

    Joined:
    Apr 12, 2013
    40
    236
    dh01.ard from the US version, the table shows up different.
    x = main_header[8] //9th file; x = 257408; this seems to normally be the 7th file
    goto x
    y = this_header[1] //2nd file; y = 1536
    goto x+y
    z = this_header[2] //3rd file; z = 276
    goto x+y+z
    //KMB starts here; off = 259220

    The fact is uses file 9, not 7, is what messed my extractor up.
    Also, a heads up about my currently-bugged extractor: If you see the .txt file show up, that is really what it read; the red warning doesn't touch the output. ;)

    Attached the 2 ARDs I'm using, tag files, and the program that can read the tag files. I think what I labeled it right.
     

    Attached Files:

  6. sora6645 Kingdom Keeper

    Joined:
    Feb 17, 2011
    51
    909
    hey . did u translate anything eles ?
     
  7. Jadentheman Hollow Bastion Committee

    Joined:
    Mar 31, 2007
    Location:
    None of your business
    51
    742
    Geez Sora. Lol, stay patient.
     
  8. root670 Destiny Islands Resident

    Joined:
    Feb 28, 2013
    5
    52
    He/me/us/them/everyone is currently tring to figure out how strings are stored in the ARD files. I don't think a consistent pattern has been found yet.
     
  9. Miles Cull a Duty 2 : Electric Boogaloo

    Joined:
    Jul 31, 2011
    Gender:
    Male
    Location:
    Ohio
    258
    He may start giving us a percentage when he can. So he may update what he has when he wants or when necessary. It gonna take a good while. It won't be done before HD remix comes out I can say that right now. So just sit back for a bit. ;)
     
  10. Jadentheman Hollow Bastion Committee

    Joined:
    Mar 31, 2007
    Location:
    None of your business
    51
    742
    That's all right. It just means that the patch will be localization accurate
     
  11. Hidden Smithery King's Apprentice

    Joined:
    Feb 2, 2010
    81
    452
    Yeah, there was always meant to be an accuracy update anyway.
     
  12. RoxKraft Moogle Assistant

    Joined:
    Jul 7, 2013
    Gender:
    Male
    Location:
    Florida, Use
    0
    3
    Hey, this project seems pretty amazing. It doesn't matter if 1.5 is coming out with 1FM, I just think it would be awesome to play this on a ps2 and see it get done! I'd be glad to be a beta tester for this or something, (I'm not much help coding :/) but hopefully you could use me at some point!
     
  13. sora6645 Kingdom Keeper

    Joined:
    Feb 17, 2011
    51
    909
    any good progress since the beta 2 trailer that u put on youtube for us ?
     
  14. crazycatz00 Twilight Town Denizen

    Joined:
    Apr 12, 2013
    40
    236
    Hey, I'm just making the tools; I know no Japanese. The journal parts were easy, everything lined up with the US version. Subtitles I can already see don't line up as close, and Google doesn't help much. :p
    ---
    ARD progress: There's no way to tell which entries are strings or not, afaik. My guess is another entry somewhere else tells the game "entry 31 here is the text to use".
    So.... I changed my extractor to just attempt on every entry. This means it will extract a lot of garbage, but then the human translator could decide what's what. There's also a command line argument to tell it to extract only certain entries, for when you know what it has. I'll consider this done until another bug\problem shows up.
    And that leaves the repacker. It sorta works right now, in that it can change the text. But only if it's the exact same size as the original, otherwise the game starts doing some funky stuff. I'm probably just forgetting to update some number somewhere...

    Edit: Might have the repacker working good. Doing some final test-runs, of whether the game takes them or not; assuming it does, I'll release a new version.
    [DOUBLEPOST=1373329081][/DOUBLEPOST]
    Extractor instructions:
    Drag an ARD onto it to extract. Multiple txt files will be made containing the string table (assuming all is right, 1 string per line).
    Warning: Some text files WILL be trash. I can't figure out how to find the string tables only, so I try to extract everything. Delete the trash txt files, you don't need them.
    The text files have a header in them, the part like this "OFFSET=259220;LENGTH=7088;CHARS=7073". DO NOT TOUCH THAT EVER. That's used for recreating the ARD, and nothing you do will change those numbers.
    And finally, the command list: "ARDread ARD_to_extract [-l 1,2,x]". The -l (L) argument tells it to only try those sections, instead of all 32. So "ARDread ew36.ard -l 6,18,31" would extract only from sections 6, 18, and 31 from ew36.ard (those are the only 3 text sections).
    Insertor instructions:
    Drag the original ARD onto it to make a new one. The new ARD will be named "<orig_name_here>.new".
    This program will try to read the 32 text files (default names), and only replace those it finds. If the new size is different enough from the original (~16 characters), it will also update the header tree for all files after this one.
    Tested with all strings consisting of "00" (smallest possible size) and using English equivalents (larger then original), and both seemed to work fine.

    (Funny... the insertor is so much easier to use :p)

    And

    I'm going to take a crack at menu.ard now; others can give it a go as well. ;)

    Edit: I'm dumb, menu.ard has no strings. lol :rolleyes:
     

    Attached Files:

  15. gledson999 Destiny Islands Resident

    Joined:
    Mar 15, 2013
    Gender:
    Male
    Location:
    Brazil
    28
    96
    awesome job Man you're very good programmer, congratulation
     
  16. Jadentheman Hollow Bastion Committee

    Joined:
    Mar 31, 2007
    Location:
    None of your business
    51
    742
    Good job crazycat. Maybe now Sofa can stop asking questions and help contribute to the patch he wants :p
     
  17. Hidden Smithery King's Apprentice

    Joined:
    Feb 2, 2010
    81
    452
    So why is that text misaligned and seemingly random? The tables not matching?
     
  18. Miles Cull a Duty 2 : Electric Boogaloo

    Joined:
    Jul 31, 2011
    Gender:
    Male
    Location:
    Ohio
    258
    Well what ever you are doing. You know what Im saying.
     
  19. crazycatz00 Twilight Town Denizen

    Joined:
    Apr 12, 2013
    40
    236
    Pretty much. The FM table is actually longer then the US one too, it has more entries (at least in the file I was testing).

    :p
    Edit: ---
    Can someone translate these for me? I'd rather a human translate, then crappy Google.
    子犬を助けたお礼にプレゼントをもらった!
    ミを手にいれた
    を手にいれた
    手にいれた
    ミのアビリティを覚えた
    ミのパーティアビリティを覚えた
     
  20. Trilix Twilight Town Denizen

    Joined:
    Jun 23, 2013
    56
    222
    Ok so I'm using your tools (amazing, by the way) to translate the very first cutscene where sora wakes up from his dream and starts talking to kairi on the island. Translated the first 15 lines of dialogue and I now want to pack it all together to see what I've done in game. But when using the ARD inserter I get this:

    Code:
    ARDedit di01.ard
     
    Start
    32 files in archive!
    l:18103
    pad:5
    l:0
    pad:12
    l:18103
    pad:5
    l:0
    pad:12
    l:10417
    pad:11
    l:0
    pad:12
    l:0
    pad:12
    l:18103
    pad:5
    l:0
    pad:12
    l:4691
    pad:9
    Updating #6...
    wp:1724568
    need to update size!
    Updating #7...
    wp:1839508
    need to update size!
    Updating #8...
     
    Unhandled Exception: System.ArgumentOutOfRangeException: Non-negative number required.
    Parameter name: count
      at System.IO.BinaryReader.ReadBytes(Int32 count)
      at JScript 0.main(Object this, VsaEngine vsa Engine)
      at JScript 0.Global Code()
      at JScript Main.Main(String[] )