News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Best way to view a script?  (Read 2269 times)

CrackZero

  • Jr. Member
  • **
  • Posts: 16
  • お前はもう死んでいる!
    • View Profile
Best way to view a script?
« on: June 03, 2019, 09:18:45 am »
I'm currently going through a DS Visual Novel and it is very text-heavy. What I've been doing is going through the game and translating one sentence at a time. It's been a lengthy process but it has been enough to get me through most of the first chapter of the game. What I want to know is - What methods do you use to read script in text heavy games likes this? Is there a preferred method or am I pretty much doing the best I can even with the tedium? (Which I don't mind, just looking for ways to be more efficient). 
Currently working on Project Hacker: Kakusei.

filler

  • RHDN Patreon Supporter!
  • Hero Member
  • *****
  • Posts: 919
  • "WINNERS DON'T SELL REPROS"
    • View Profile
    • Filler's Translation Projects
Re: Best way to view a script?
« Reply #1 on: June 03, 2019, 12:25:51 pm »
This one looks pretty easy since it uses S-JIS.



You can find an S-JIS table right here on this site (http://www.romhacking.net/?page=documents&category=8&platform=&game=&author=&perpage=20&level=&title=shift-jis&desc=&docsearch=Go). Open the ROM in a hex editor such as WindHex32 (http://www.romhacking.net/?page=utilities&category=13&platform=&game=&author=&os=&level=&perpage=50&title=&desc=&utilsearch=Go), open the table file, and (in that editor) choose "Option->View Text as Japanese". I go over rudimentarily dumping a script for translation here: https://youtu.be/iyqp1HxHMXw?t=953

CrackZero

  • Jr. Member
  • **
  • Posts: 16
  • お前はもう死んでいる!
    • View Profile
Re: Best way to view a script?
« Reply #2 on: June 03, 2019, 01:54:06 pm »
Thank you! This should make my life a lot easier.

June 04, 2019, 01:32:15 am - (Auto Merged - Double Posts are not allowed before 7 days.)
So.... I'm not sure if I have a problem or not.



As you can see I have the ROM pulled up in WindHex32 and I'm using a Shift-JIS table with the option to view text as Japanese turned on... but it doesn't look nearly as clear as your example and there are a variety of different colours such as red and yellow instead of plain white text. I watched your video and noticed you use something called UltraEdit along with JWPce. Is that going to be necessary for changing the text inside the game? I have tried to do it with two different Hex Editors (Hex Workshop and WindHex32) as well as JWPce.

I'm going to go over more tutorials in the meantime, I think I went in too headstrong with this one. Patience is a virtue.
« Last Edit: June 04, 2019, 01:32:15 am by CrackZero »
Currently working on Project Hacker: Kakusei.

filler

  • RHDN Patreon Supporter!
  • Hero Member
  • *****
  • Posts: 919
  • "WINNERS DON'T SELL REPROS"
    • View Profile
    • Filler's Translation Projects
Re: Best way to view a script?
« Reply #3 on: June 04, 2019, 02:12:35 am »
As you can see I have the ROM pulled up in WindHex32 and I'm using a Shift-JIS table with the option to view text as Japanese turned on... but it doesn't look nearly as clear as your example and there are a variety of different colours such as red and yellow instead of plain white text.
Well, you're not just opening up a text file with the script in it. It's the whole ROM with all the graphics and code in it. You're going to see a bunch of junk characters typically. Try using the "Kana Search" function when you have the table file loaded to find some text you know exists in the game's script. You should see something readable. That video I linked you to is part of a 5 part series. You may want to skim those 5 videos to get a feeling of how to navigate WindHex32. Personally I visually scan the ROM for Japanese text and then just dump from the offsets I take note of. I think that would be sufficient for this project, though I don't know since the ROM is probably a lot larger than what I normally work with.

EDIT:
I watched your video and noticed you use something called UltraEdit along with JWPce. Is that going to be necessary for changing the text inside the game?
No. That's just my text editor of choice. As an on/off web developer I don't mind springing for a commercial text editor and UltraEdit has a lot of nice features that I appreciate. Use whatever works for you.

CrackZero

  • Jr. Member
  • **
  • Posts: 16
  • お前はもう死んでいる!
    • View Profile
Re: Best way to view a script?
« Reply #4 on: June 04, 2019, 03:28:27 pm »
Well, you're not just opening up a text file with the script in it. It's the whole ROM with all the graphics and code in it. You're going to see a bunch of junk characters typically.


Ok, I see. Makes sense for all the data to show up like that.

Quote
Try using the "Kana Search" function when you have the table file loaded to find some text you know exists in the game's script.

I've been trying to do that, but for some reason when I write hiragana or other Japanese characters into the search bar they turn into ????s and take me to 3F or just go blank telling me I entered nothing in the search bar. I went through the help file and there was nothing on it. I'm using a Japanese IME on Windows 10 Pro that has given me no problems in other programs so I'm not quite sure why there would be a problem here.
Currently working on Project Hacker: Kakusei.

filler

  • RHDN Patreon Supporter!
  • Hero Member
  • *****
  • Posts: 919
  • "WINNERS DON'T SELL REPROS"
    • View Profile
    • Filler's Translation Projects
Re: Best way to view a script?
« Reply #5 on: June 04, 2019, 07:27:00 pm »
I've been trying to do that, but for some reason when I write hiragana or other Japanese characters into the search bar they turn into ????s and take me to 3F or just go blank telling me I entered nothing in the search bar. I went through the help file and there was nothing on it. I'm using a Japanese IME on Windows 10 Pro that has given me no problems in other programs so I'm not quite sure why there would be a problem here.
It may not be the right encoding. The table files should be encoded in S-JIS, and I assume the editor either expects S-JIS, or is searching on the table file as it's encoded (which is S-JIS). Here's what I see when copy-pasting from JWPce making sure that the clipboard option is set to "Shift-JIS".



Can you specify the encoding type of your text input method, or try copy-pasting from a text editor where you can be certain the encoding of the text?

CrackZero

  • Jr. Member
  • **
  • Posts: 16
  • お前はもう死んでいる!
    • View Profile
Re: Best way to view a script?
« Reply #6 on: June 04, 2019, 11:27:28 pm »
I assume I'm using Shift-JIS since I have the same clipboard setting in JWPce and I'm using the Shift-JIS table by KingMike(http://www.romhacking.net/documents/179/). Funny thing is, when I try typing in hiragana in JWPce I get the ????'s again yet when I paste from another source the characters appear fine. I tried pasting the line との子もパツとしないわね ("I don't even know what to do."), which is the first spoken sentence in the game,  into WindHex32's Kana search only to get no return. So I tried text search instead and that came up with something however the characters were not Japanese. It was along the lines of "qpoc" which I'm sure had nothing to do with what I was searching for. You've been very helpful so far and I'm thankful for it. I'm glad someone like you is around to help nuisances like me.  :laugh: 
« Last Edit: June 04, 2019, 11:42:43 pm by CrackZero »
Currently working on Project Hacker: Kakusei.

filler

  • RHDN Patreon Supporter!
  • Hero Member
  • *****
  • Posts: 919
  • "WINNERS DON'T SELL REPROS"
    • View Profile
    • Filler's Translation Projects
Re: Best way to view a script?
« Reply #7 on: June 04, 2019, 11:53:23 pm »
Funny thing is, when I try typing in hiragana in JWPce I get the ????'s again yet when I paste from another source the characters appear fine.
Indeed. Why might that be?

I tried pasting the line との子もパツとしないわね ("I don't even know what to do."), which is the first spoken sentence in the game,  into WindHex32's Kana search only to get no return.
Are there any other ways you could search for this line of text, or another line of text? What else have you tried?

CrackZero

  • Jr. Member
  • **
  • Posts: 16
  • お前はもう死んでいる!
    • View Profile
Re: Best way to view a script?
« Reply #8 on: June 05, 2019, 12:58:17 am »
Indeed. Why might that be?

I figured it out. Weirdly, my IME had to be set to Half-Width Alphanumeric if using a Microsoft IME and Direct Input when using Google's.


Quote
Are there any other ways you could search for this line of text, or another line of text? What else have you tried?

I have tried searching for サトル(Satoru) - the main character whose name should appear everywhere and リナ(Rina), the sidekick/deuteragonist and I suppose I could search for "Mysterious Woman" since she is the one saying it. None of these lead to anything conclusive, which is odd because they should be all over the place. Looking at your example I see you made it all the way down to when the prologue ends and the character is talking about being tired - I've got nothing like that when I open it in the hex editor.

Here is a short video of the problem I've been having, maybe it'll clear things up:

https://www.youtube.com/watch?v=q7-xMOd7dfI&feature=youtu.be
« Last Edit: June 05, 2019, 05:05:20 pm by CrackZero »
Currently working on Project Hacker: Kakusei.

filler

  • RHDN Patreon Supporter!
  • Hero Member
  • *****
  • Posts: 919
  • "WINNERS DON'T SELL REPROS"
    • View Profile
    • Filler's Translation Projects
Re: Best way to view a script?
« Reply #9 on: June 05, 2019, 04:00:24 pm »
I still think you're running into an encoding issue. Text encoding is not that mysterious, it's just values that represent characters. Take サトル that you mentioned.

In S-JIS they are encoded as follows:

サ = 8354
ト = 8367
ル = 838B

Since this game is using S-JIS you can search for this string "83548367838B" using WindHex32's "Hex Search" feature and you'll see サトル come up.

Whereas in UTF-16 it's as follows:

サ = 30B5
ト = 30C8
ル = 30EB

These are different values. The "encoding" if you will. My suspicion is that when you use your Japanese text input it's encoding the text you're inputting differently and that's why you're not getting search matches. EDIT: It's like searching for "30B530C830EB" in the hex search instead of "83548367838B". It just doesn't match.

CrackZero

  • Jr. Member
  • **
  • Posts: 16
  • お前はもう死んでいる!
    • View Profile
Re: Best way to view a script?
« Reply #10 on: June 05, 2019, 06:38:28 pm »
Here is what I get when searching 83548367838B:



I suppose that's starting to look better but the text on the right seems to be repeating itself, I think. I've tried changing my computer's region settings to see if it helped with the encoding issue and no luck so far. I know I can go into the table editor to find individual characters hexadecimal codes but that would take far longer than having a search do it for me...

It's frustrating. Knowing what is being said in the game, knowing that hexadecimal bytes have to be replaced with other ones and that the space has to remain the same or increase in size - if I could put even one single English letter in this game it would feel like a step forward. Writing a guide is fine and all, but the back and forth is so artificial. I am missing something simple, I know it. I am determined to figure this out.
Currently working on Project Hacker: Kakusei.

filler

  • RHDN Patreon Supporter!
  • Hero Member
  • *****
  • Posts: 919
  • "WINNERS DON'T SELL REPROS"
    • View Profile
    • Filler's Translation Projects
Re: Best way to view a script?
« Reply #11 on: June 05, 2019, 07:19:50 pm »
That's the correct location of and instance of サトル, but your Japanese is not displayed correctly. I'd try a different S-JIS table. You could also check your current table and make sure of the encoding of サトル. Maybe your table is bad. If not, open the one you have in JWPce and choose "save as" and pick "S-JIS" as the encoding and make sure it has a .tbl extension.

CrackZero

  • Jr. Member
  • **
  • Posts: 16
  • お前はもう死んでいる!
    • View Profile
Re: Best way to view a script?
« Reply #12 on: June 05, 2019, 10:51:13 pm »
That's the correct location of and instance of サトル, but your Japanese is not displayed correctly. I'd try a different S-JIS table. You could also check your current table and make sure of the encoding of サトル. Maybe your table is bad. If not, open the one you have in JWPce and choose "save as" and pick "S-JIS" as the encoding and make sure it has a .tbl extension.

Oh! That latter solution seemed to work!



Hopefully I can get to making progress on this now. Thank you!
Currently working on Project Hacker: Kakusei.

Psyklax

  • Hero Member
  • *****
  • Posts: 1075
    • View Profile
    • Psyklax Translations
Re: Best way to view a script?
« Reply #13 on: June 06, 2019, 01:25:14 am »
I'll just chime in here to say that I've never got WH32EX's kana search to work, ever. I just search in HxD for actual bytes, since I can't trust WH32EX.

filler

  • RHDN Patreon Supporter!
  • Hero Member
  • *****
  • Posts: 919
  • "WINNERS DON'T SELL REPROS"
    • View Profile
    • Filler's Translation Projects
Re: Best way to view a script?
« Reply #14 on: June 08, 2019, 11:49:52 pm »
I'll just chime in here to say that I've never got WH32EX's kana search to work, ever. I just search in HxD for actual bytes, since I can't trust WH32EX.
Just make sure it's all S-JIS. :) Like I said, if you make sure to copy-paste from JWPce with the clipboard export settings as "Shift-JIS" it will work. If you can specify your document encoding I'd assume a copy-paste from another S-JIS encoded document would work. Or if you can specify input encoding I'm sure it will work for some other form of direct input.

EDIT: Note, I have noticed it behave in unexpected ways sometimes so I'm not sure that it's 100% reliable, but I've certainly found it useful on many occasions.