Author Topic: Game mentioned as "like King's Field" - Hungry Ghosts  (Read 56509 times)

Offline Guyra

  • Decked in Promeus
  • ***
  • Posts: 352
Re: Game mentioned as "like King's Field" - Hungry Ghosts
« Reply #20 on: June 18, 2012, 05:35:07 pm »
Notepad++ didn't help much either. Still only get a Japanese character here and there, in between a hundred other symbols that certainly has got nothing to do with Japanese. :/

Please try sending me such a file. :)

Offline HwitVlf

  • Dark Slayer Destroyer
  • ****
  • Posts: 1667
Re: Game mentioned as "like King's Field" - Hungry Ghosts
« Reply #21 on: June 18, 2012, 07:35:35 pm »
Here are a few files. The "junk" data you're seeing is the text pointer table (at top) and other data between lines to tell the game where/how to draw the text. Let me know if these files are "cleaned" enough for your needs. 

The game handles each line of text as a separate "sentence" rather than using a standard line-break code between lines. That makes it hard to tell if a text line is part of the sentence above or the beginning of a new sentence.

If I stared at the game's files long enough, I might be able to figure how to make a proper text dumper, but I wasn't planning on taking that much time.

Offline Guyra

  • Decked in Promeus
  • ***
  • Posts: 352
Re: Game mentioned as "like King's Field" - Hungry Ghosts
« Reply #22 on: June 18, 2012, 11:22:39 pm »
Ah, yeah, I figured that was probably what it was. :)

Oh yes, this is perfect! :D

Now, how would I go about putting this back into the game after changing it?


Also, if this was easy for you to do(made an app for it, or something?), could you do it with all the files and send me?
« Last Edit: June 19, 2012, 04:36:00 am by Guyra »

Offline HwitVlf

  • Dark Slayer Destroyer
  • ****
  • Posts: 1667
Re: Game mentioned as "like King's Field" - Hungry Ghosts
« Reply #23 on: June 19, 2012, 05:43:28 pm »
Now, how would I go about putting this back into the game after changing it?

Also, if this was easy for you to do(made an app for it, or something?), could you do it with all the files and send me?

To insert changed text, I have been editing the extracted files in a hex editor (ultra edit) then reinserting them into Pack.dat with a second tool I made, then reinserting Pack.dat back into the ISO. But that method means you have to "translate around" all the data junk (pointers etc). If you translate the text-dump files (attached earlier), we'll either have to manually type the new text over the Japanese in a hex editor or take the time to figure out the pointer table format enough to automate the process.

I "cleaned" the text by using a few "search and replace" operations in XVI32 (attached) , which is a a hex editor that supports wild cards. The wildcard feature is a bit confusing, but attached is a picture; mark the "joker char hex" box and type a value into the field to the right, whatever you type will count as the wildcard in the fields above.

"0d0a" is the standard line-break hex value so:
replace "00" with "0d0a" (replaces blank letter slots with line-breaks)
replace "0d0a 0d0a" with "0d0a" several times (removes multiple line breaks next to each other)
replace "0d0a * 0d0a" with "0d0a"  (removes some generic data between text lines)
replace "0d0a * * 0d0a" with "0d0a" (removed rest of the generic data between text lines)

The only junk left should be the pointer tables, but they are easy to see/delete in Notepad++.

Offline HwitVlf

  • Dark Slayer Destroyer
  • ****
  • Posts: 1667
Re: Game mentioned as "like King's Field" - Hungry Ghosts
« Reply #24 on: February 01, 2014, 02:19:57 pm »
I was working on a menu translation for Hungry Ghosts when I turned this project over to Guyra and it looks like it is dead now. Hunger seems like a really good game from what I saw and was worth translating. It's very artistic and original. If anyone wants to pick up the project and has the know-how, let me know and maybe I can send what was done so far. I was actually converting the games narrative into first person "Will you pick it up?" > "Should I pick it up?" because I thought it deepened immersion and suited the game well. So my work may not be any use for people who want to do a direct translation.

The game already supports English text so you might be able to do a translation without any "hacking" at all - just type the English over the original Japanese text.
« Last Edit: March 28, 2014, 11:57:27 am by HwitVlf »

Offline Mord of Swoonlight

  • Lord Veyrac's Illegitimate Son
  • Silvarion Slasher
  • **
  • Posts: 117
Re: Game mentioned as "like King's Field" - Hungry Ghosts
« Reply #25 on: March 28, 2014, 01:32:34 am »
Heyo, long time no chat.  If you don't mind things taking a while, I'd be interested in helping out with the Hungry Ghosts translation.  I was looking for another 'productive distraction' while finishing the thesis.

Offline HwitVlf

  • Dark Slayer Destroyer
  • ****
  • Posts: 1667
Re: Game mentioned as "like King's Field" - Hungry Ghosts
« Reply #26 on: March 28, 2014, 12:49:11 pm »
Mord! Hiya :)
It would be great if you picked up this project. I am so busy right now that I wouldn't be any help. I can tell you that a lot/all of the text is in pak.dat and is in Shift-JIS encoding. There is a lot of text, but I think large passages may be duplications so there is less than it may appear.


Offline Mord of Swoonlight

  • Lord Veyrac's Illegitimate Son
  • Silvarion Slasher
  • **
  • Posts: 117
Re: Game mentioned as "like King's Field" - Hungry Ghosts
« Reply #27 on: March 29, 2014, 06:38:32 pm »
Sure, sounds good.  I don't foresee being able to sink entire days into this, but I would enjoy doing like 15 minutes a day or so.  Slow, but better than never having a finished version! 

I looked over this thread again, but I didn't see a link to pack.dat...  I guess PM me? 

I think it probably makes sense to go about this in a similar way to how I did it before - make a 'true' or strict translation first, then touch things up, make the sentences more natural/coherent and unify the style (e.g., first person like you mentioned earlier) later. And keep everything organized and indexed in a spreadsheet or some other system.  Inserting text back into files can happen later; even if it's slightly more work in the long run, it's good to have discrete goals on a big project. 

Offline Mord of Swoonlight

  • Lord Veyrac's Illegitimate Son
  • Silvarion Slasher
  • **
  • Posts: 117
Re: Game mentioned as "like King's Field" - Hungry Ghosts
« Reply #28 on: March 29, 2014, 08:00:59 pm »
One the organization point: I think I might be able to whip something together to insert the translated text in python without too much headache (ha!  watch me eat those words later).  Just shooting from the hip here, but I think it would be straightforward enough as I go through the files (automate after getting the hang of it from the first few) to make a note of where the translation-needing text starts and ends, then just save the original text blocks in a python dictionary.  Translated versions then can be stored in new dictionaries (making it scalable for translating to other languages, if anyone's interested).  Finally, inserting the new text should be relatively easy, since we would have the exact strings to replace (start/stop positions) in the original dictionaries. 

Then for keeping track, I could just make a color-coded spreadsheet for progress.  (Red=nothing done yet, yellow=needs some work, green=good to go, etc..)

Never worked with hex in python before, but I know it has tools, and it's definitely my language of choice. 

Offline HwitVlf

  • Dark Slayer Destroyer
  • ****
  • Posts: 1667
Re: Game mentioned as "like King's Field" - Hungry Ghosts
« Reply #29 on: March 30, 2014, 03:15:09 am »
You might look into the compiler ARMIPS. It uses ASM files that pretty much do what you describe.

A basic entry to write a line of text to a specific location in a file would look like this:
Code: [Select]
.org 0xB68A8
  .string "Text"
This would write the word "Text" to 0xb68a8 in the previously opened file.

I think the game is laid out in sections so translating even a signal section would be cool. The menu and items would do a lot too.