Author Topic: [Base 1.34] Translation Release Thread (English CV: 1.02)  (Read 57785 times)

Offline DerxwnaKapsyla

  • Administrator
  • A Member group
  • *****
  • Posts: 162
  • What is development and how do I game
    • View Profile
Re: [1.34] Translation Release Thread
« Reply #30 on: June 23, 2015, 03:17:15 AM »
i'm finding that for the most part, the only battle element that gets confusing due to being untranslated is if attacks are super effective or not effective,
other than that, for your own buffs, you can see what they do when you look at their skills out of battle

I haven't properly opened the 1.34 patch myself, working on other stuff mostly, but from what I was told we briefly had things such as "Super Effective" and "not very effective" translated. Even if we didn't, it plays sound effects for when it's appropriate. Super Effective sounds like a barrier breaking, not very effective sounds like a dull noise.
I do the 2humons in RMXP

Offline Bohoy

  • A Member group
  • Posts: 2
    • View Profile
Re: [1.34] Translation Release Thread
« Reply #31 on: June 23, 2015, 09:16:20 AM »
It's true that the wiki documents everything and I could technically just look it all up but I find that clunky and unpractical especially when I know that the information was supposed to be right in front of me.

As I said: I'll be patient and wait for a "just me and the game" situation. And again, thank you all very much for doing the effort of translating this game for everyone else. I'm sure I'm not the only one grateful for it.

Offline Aphid

  • A Member group
  • Posts: 15
    • View Profile
Re: [1.34] Translation Release Thread
« Reply #32 on: June 24, 2015, 10:47:48 AM »
What exactly are you doing to translate the .exe? Hex-editing the file itself for every attempted translation and checking if 'things still work'?

Unfortunately there's something called the Halting problem that makes hand-editing x86 machine code a rather arduous process.

I know a bit about this I can share so that maybe more can help with translating;

First thing you'll have to do is identify the strings used. As a developer, I could be evil and concatenate my strings by induvidual character, or use a RNG to select from multiple variables containing the same text, or some other weird formula, but it's mostly logical to make the units as big as possible, so you have as few of them to work with as you can to keep things simple, and reuse variables. So basically the "it was super effective" message is likely to be a single variable somewhere in the program's memory, and thus you'll find it somewhere in the program. Then the task is to find the thing.

One thing you can do to help your hacker is see if you can create a list of possible byte sequences for every string to be translated, and a list of replacements. (Due to the way Japanese language works there's multiple possible ways of making certain characters through radicals), to make it easier to find these strings. You can find them with any hex editor by searching for the codes. MSFT has information on byte sequences for SHIFT_JIS encoding (codepage 932), and Wiki can be used to find UTF-8 info. E.g. the yen symbol is encoded as 0x818F in JIS, 0xC2A5 in UTF-8, and 0x00A5 in UTF-16. The executable may mix various encodings, we don't know which encoding any particular string is in in memory. You can of course ask the developer for information about the details (but there's a chance they don't know either, as libraries and compilers of programming languages can change this, and many developers don't need or want to know the details about encoding and have libraries 'deal with it').

Now finding the strings is one thing, but changing them is another. When searching short strings, you may find multiple matches. Then trial-and-error is needed to identify which match(es) are actually the strings to be translated, and the matches that are actually other parts of the program. The game is likely to crash when making a mistake, or at least won't show you the translated string.

Machine code can do anything with variables, even re-use it as machine code, so whatever you try to do is not guaranteed to work.  But it's highly likely that the string is just read and passed for rendering, which means you can replace it with any other character sequence, that is the same length. Thus you can only use 'less' characters than the JP version (by using control characters to fill out a string), never more, at least not without a substantial increase in difficulty (reverse engineering). Depending on the encoding used and the character, you can fit 1, 2, 3, or 4 ASCII for each japanese character in your translation on a char-by-char basis. In the end only the total length of the variable matters. 

Actually asking the developer (to export these texts outside of the codebase and into the resource files with a patch) might even be the more convenient option here.   

Offline Elyk

  • Moderator
  • A Member group
  • *****
  • Posts: 66
    • View Profile
Re: [1.34] Translation Release Thread
« Reply #33 on: June 25, 2015, 12:25:17 AM »
The problem isn't nearly as complex as you are making it out to be. Here is a pretty good article about hex editing strings.

It sounds like you think that the strings are embedded in the machine instructions but that's not true. They are easily visible just by scrolling to the read only data section in any hex editor that supports SHIFT_JIS, such as MadEdit. Editing them directly is trivial and was how I was able to quickly edit the few battle strings which actually are translated in the most recent release. Where the problem becomes more complex is when you cannot fit the English string into the Japanese string's slot. The article I linked covers how to handle this. It involves doing some math and diving into the instructions to edit the pointers.

The real problem though lies in the fact that Hemo updates the game frequently. The game hasn't even been out for five months yet and we are on version 1.34. Directly editing the .exe won't work because we'd have to manually find and edit everything all over again. I'm in the process of writing a set of applications and scripts that handle this problem.

The first step is finding and dumping all of the strings. The process I am using is as follows:

The section .rdata, is where all of the read only data (in other words, the strings) are stored. It is also the last section in the binary so I just allow the program to loop until it reaches eof. I have already created and run this. It produced a .csv with about .75k strings in it. The idea is that I can pass this .csv off to somebody who will handle the translation.

Here are some snippets of the output:
Quote
[Offset], JP String, EN String
...
...
...
[0x40aa12],"の封印を解いた・・・",""
[0x40aa2a],"を人形箱に入れた。",""
[0x40aa3e],"%sは 倒れた!",""
[0x40aa4e],"相手の %sは 倒れた!",""
[0x40aa66],"バリアオプションは 壊れた!",""
[0x40aa82],"相手の バリアオプションは 壊れた!",""
[0x40aaa6],"気象が %sになった!",""
[0x40aaba],"気象が 元に戻った!",""
[0x40aace],"地相が %sになった!",""
[0x40aae2],"地相が 元に戻った!",""
[0x40aaf6],"Lv.%2u",""
[0x40aafe],"%6s/%6s",""
[0x40ab06],"%d:%02d",""
[0x40ab0e],"Lv.",""
[0x40ab12],"EXP+",""
[0x40ab1a],"PP+",""
[0x40ab1e],"x",""
...
...
...
[0x410b38],"タ",""
[0x410b3c],"@チ",""
[0x410b40],"ネツヘフフフフフ・囮劔劔・333333・ヘフフフフフ・",""
[0x410b67],"タV@UUUUUU\@",""
[0x410b77],"l@",""
[0x410b7d],"・)@ク・Qク・",""
[0x410b8f],"@@",""
[0x410b97],"`蓮",""
[0x410ba0],"Bタ",""
[0x410ba4],"0B",""
[0x410bb0],"F@",""
[0x410bb4],"狠",""
[0x410bbf],"@m@",""
[0x410bc4],"jテ",""
[0x410bcf],"@mタ",""
[0x410bd4],"沓ヘフL?",""
...
...
...
[0x423348],"Gソ",""
[0x42334b],"ヒソ",""
[0x42334e],"kJユ|dUェ ユUVテ2スソ!・QェQソU ソ   {ソ9K   ソ)s&ソ!{SソY{SェトA{RソY{Rソ・ソ!{ソ!Kソ!{]ソ・ソ!{\ソY{\ソ_ソ!{_ソq{ヌソe・ソ",""
[0x424206],"/QZソ   ;ソ /Pユs覬ソ8/Sェ/ユSソ8/RZ*Rソ8/]ユs訃ソ8/\ェ/ユ\ソ8/_Z*_ソ・ソ #ソ・ソ{ソ #Wユ|ソh#ソ",""
[0x424259],"ソソ",""
[0x42425c],"ウソ0#ソ匂ク ソホ/
ソaロ!ソ9檸+ソ?   ソ",""
As you can see, I have a chunk of valid data there and then a big chunk of garbage. A good percentage of the 7.5k strings are garbage like this but there really isn't any way to tell whether or not you're grabbing something that you're looking for. I've determined that the best way to go about it is just grabbing everything at once and letting people edit which lines they want.

The current hangup is that the offsets are being reported incorrectly. I'm not sure why and the margin of error isn't consistent over the course of the output. Once I figure it out then I'll be ready to share the .csv with people so they can begin editing. I have some ideas but haven't gotten around to working on it again between coursework, my day job, and being too tired during the few free hours I get.

The second step involves placing the new EN strings into a new section of the .exe and then correcting the pointers in the instructions. As I mentioned already this involves doing a bit of math which is trivial. The hard part will be searching for the correct pointer so I can edit it but I imagine that won't be too difficult. Once I am confident that the reported offsets are the correct ones I'll be able to move on to this step. There isn't any sense in performing a search when you find the right spot but report the wrong value.

Now for the final step. A script will need to be written to copy over the translated elements from the old .csv to a new dump. This will likely be trivial.

Down the road this will provide much faster patch updates in response to Hemo's updates. We will be able to just create a new dump, bring our changes over, translate the new/changed strings if there are any, and then push it into the game.

This ended up being a pretty long post but hopefully it answers your question. Even if it isn't it was useful for me to gather my thoughts on things.

Offline Mima evil spirit

  • A Member group
  • Posts: 4
    • View Profile
Re: [1.34] Translation Release Thread
« Reply #34 on: June 26, 2015, 07:07:13 PM »
Um excuse me. For some reason I can't open the file for this as it saids its invalid.
If you hadn't noticed it from the title yet, this will only work with 1.34.

Furthermore, this game will only work in Japanese Locale. Your computer either needs to be in native Japanese Locale, or you need to have Locale Emulator (specifically, NOT AppLocale) to emulate the game in Japanese Locale. Otherwise the game will display corrupted text for the HP Bar and other places. When you install the game you must ALSO install it in Japanese Locale, or else the game will have crashing issues.


Here's a link. In it is a translation patch.

I'm not entirely sure what all is translated, my testing was "does it work? alright lets make the patch. did the patch work? alright let's do it" but from what little testing I did some NPCs had their text translated so this should be mostly everything you'll need to play the game. Battle strings and menu descriptions aren't in, sadly.

To use this, you will need beat. Here's a link to that, too.

To use this:
- Make sure your dat folder's contents are entirely unedited, including custom player images.
- Make a copy of gn_enbu.exe, and place it in your dat folder. Make sure it is named gn_enbu.exe.

-- This is what the contents of your dat folder should look like, for reference:


- Run beat, then choose "Apply Patch."
- Browse to your installation of TPDP, select the "dat" folder, and click OK
- Choose to make a new folder and name it whatever you want. This is where translated resources will go.
- Browse to your TPDP installation, and make a copy of the contents of the dat folder, including gn_enbu.exe, in case I broke something or for another update coming out.
- No, seriously, make backup copy of the dat folder. Make absolutely sure you have one.
- Do you have a backup of the dat folder? Okay.
- Copy the contents of the folder you created during the patching process and dump them into the dat folder. Rename your gn_enbu.exe file in the main directory to preserve a clean copy, and place the newly created gn_enbu.exe in the main directory.
- Make sure everything works correctly.

Nothing seemed to be broken, but my testing wasn't that heavy.

If an update comes out, you will need to place the old clean .arc files back in the dat folder in order to properly update, along with placing the clean gn_enbu.exe file in the main directory. Keep that in mind.

This will only work if your copy is updated to 1.34!


Save frequently in case something is broken so we don't have any unsightly crashes.

The Skill Card menus are going to look really fun. Example:
Spoiler

And this is what to expect from battle screens:
Spoiler

Once again, I apologize for the delay in getting this out. Here's hoping it actually works!

Offline DerxwnaKapsyla

  • Administrator
  • A Member group
  • *****
  • Posts: 162
  • What is development and how do I game
    • View Profile
Re: [1.34] Translation Release Thread
« Reply #35 on: July 11, 2015, 07:43:32 PM »
Could you tell us exactly what you tried to do?
I do the 2humons in RMXP

Offline Mocha

  • A Member group
  • Posts: 3
  • o_o
    • View Profile
Re: [1.34] Translation Release Thread
« Reply #36 on: September 04, 2015, 08:00:42 PM »
This didn't help. Where do I make the new folder in?
( ͡ ͜ʖ ͡)

Offline DerxwnaKapsyla

  • Administrator
  • A Member group
  • *****
  • Posts: 162
  • What is development and how do I game
    • View Profile
Re: [1.34] Translation Release Thread
« Reply #37 on: September 18, 2015, 05:19:34 PM »
I made a quick video on how to patch the game, for the people who were confused on the patching procedure.

https://www.youtube.com/watch?v=1oTDNvEqXig
I do the 2humons in RMXP

Offline Yakumo_Shun

  • A Member group
  • Posts: 8
    • View Profile
Re: [1.34] Translation Release Thread
« Reply #38 on: November 04, 2015, 09:47:45 PM »
I made a quick video on how to patch the game, for the people who were confused on the patching procedure.

https://www.youtube.com/watch?v=1oTDNvEqXig
I'm doing everything right, but beat still crashes. I'm running the game from a(pirated) iso, and went through the manual setup for the game. Also, I was able to update it to 1.34.
The amnesiatic western boy who was saved by the gap youkai. Loves to "Touch Fluffy Tail"s. ...Awoo~

Offline DerxwnaKapsyla

  • Administrator
  • A Member group
  • *****
  • Posts: 162
  • What is development and how do I game
    • View Profile
Re: [1.34] Translation Release Thread
« Reply #39 on: November 04, 2015, 11:04:04 PM »
Operating system?
I do the 2humons in RMXP

Offline Yakumo_Shun

  • A Member group
  • Posts: 8
    • View Profile
Re: [1.34] Translation Release Thread
« Reply #40 on: November 04, 2015, 11:56:05 PM »
Windows 10.
The amnesiatic western boy who was saved by the gap youkai. Loves to "Touch Fluffy Tail"s. ...Awoo~

Offline DerxwnaKapsyla

  • Administrator
  • A Member group
  • *****
  • Posts: 162
  • What is development and how do I game
    • View Profile
Re: [1.34] Translation Release Thread
« Reply #41 on: November 05, 2015, 12:12:30 AM »
I'm more than likely sure your problem lies there. We've had several reports of issues with Windows 10 in the past, but no detailed reports of what the issues are. It goes beyond just patching it, but even playing it. I can't reproduce it due to running Windows 7, so, if anyone else here has 10 and can verify the issues, I'd appreciate it.
I do the 2humons in RMXP

Offline Yakumo_Shun

  • A Member group
  • Posts: 8
    • View Profile
Re: [1.34] Translation Release Thread
« Reply #42 on: November 05, 2015, 12:28:03 AM »
*facepalm* Right, my Os has those type's of issues... Well, for what its worth, I can still boot up and play the game. Updating it is no issue either. Beat crashes during the patching process, but from what I can tell, in the "eng_dat" file, part of data arc 2 and all of 3 go un-patched. Also, all 3 seem to become corrupted in some way(thank you backups...). Not sure if any of this helps...
The amnesiatic western boy who was saved by the gap youkai. Loves to "Touch Fluffy Tail"s. ...Awoo~

Offline DerxwnaKapsyla

  • Administrator
  • A Member group
  • *****
  • Posts: 162
  • What is development and how do I game
    • View Profile
Re: [1.34] Translation Release Thread
« Reply #43 on: November 26, 2015, 07:01:55 PM »
The translation is finished! Check the first post for the download link, and happy thanksgiving everyone! Enjoy your game.
I do the 2humons in RMXP

Offline GlitchyMissingno

  • A Member group
  • Posts: 5
    • View Profile
Re: [1.34] Translation Release Thread
« Reply #44 on: December 18, 2015, 01:58:10 AM »
Is anyone else having trouble with the text in this game? A lot of the item descriptions (and especially the Puppet Book entries) seem to extend way past their text boxes. Do I need to install a certain font to make it work, or is this problem unique to me?
Spoiler