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

Author Topic: Scripts with a lot of control codes.  (Read 3806 times)

Rai

  • Hero Member
  • *****
  • Posts: 623
    • View Profile
    • The official webpage for my Super Robot Taisen Alpha translation project.
Scripts with a lot of control codes.
« on: November 12, 2016, 06:43:33 pm »
I'm making a lot of progress towards dumping Goemon 3's script. However, one of the problems with Goemon 3 is that it has a lot of control codes.

A script with a lot of control codes might be difficult to work with for a translator.

Here's an example of some text dumped from Goemon 3:
Spoiler:
おみつ  「[RedText]ものしりじいさん[BlueText]が [RedText]ゴエモン・いんぱくと[BlueText]の[LineEnd]
[Spacing]ざんがいを りようして こしらえた[LineEnd]
[Spacing][RedText]はぐれまち[BlueText] と [RedText]にんじゃやしき[BlueText] を いきき[LineEnd]
[Spacing]できる きかいの ことよ!![LineEnd]
[0xB4] 。」[LineEnd]

So what do you guys think would be the best way to deal with a script with a lot of control codes?

flame

  • Full Member
  • ***
  • Posts: 120
    • View Profile
Re: Scripts with a lot of control codes.
« Reply #1 on: November 12, 2016, 10:24:28 pm »
That's better than what I thought of.
In Zero no Kiseki if there's byte 0x07 where you could have user text, it's a color code and the next byte after specifies the actual color.
So I put in the scripts {07 09} as a color change opcode. {07 00} is the return to default color command. That's meaningless, at least yours has some meaning to it.

In Wander Wonder you can have a delay in the middle of usertext, and this was used extensively by the original developer. How it works is complicated but translators put { (the single character) where they would like a delay because that's the only valid code. It's meaningless, but in this case the single character is good because it can help make sure lines aren't over their length limit.

So for yours:
What is the "spacing" opcode and why is it important? Is it different than a space?
You should try to avoid linebreak opcodes if possible. Because it's extra work for the translator. You can put in spreadsheet format such that [Line End] is assumed after each line. Your dumper should digest "line end" and either discard it for automatic line wrapping on the insert, or preserve it by making a newline in the spreadsheet.

Seihen

  • Sr. Member
  • ****
  • Posts: 404
    • View Profile
Re: Scripts with a lot of control codes.
« Reply #2 on: November 13, 2016, 03:32:15 am »
What is the "spacing" opcode and why is it important? Is it different than a space?

My guess is that it's a full-width Japanese space (i.e., it takes up as much space as one double-byte character). They're using it probably to line up the text so that it appears neatly in solid rows, since the opening and closing quotations take up space.

Without spacing:

「ものしりじいさんが ゴエモン・いんぱくとの
ざんがいを りようして こしらえた
はぐれまち と にんじゃやしき を いきき
できる きかいの ことよ!!
 。」

With spacing:

「ものしりじいさんが ゴエモン・いんぱくとの
 ざんがいを りようして こしらえた
 はぐれまち と にんじゃやしき を いきき
 できる きかいの ことよ!!
 。」

VicVergil

  • Hero Member
  • *****
  • Posts: 725
    • View Profile
Re: Scripts with a lot of control codes.
« Reply #3 on: November 13, 2016, 06:34:53 am »
Quote
おみつ  「[RedText]ものしりじいさん[BlueText]が [RedText]ゴエモン・いんぱくと[BlueText]の[LineEnd]
[Spacing]ざんがいを りようして こしらえた[LineEnd]
[Spacing][RedText]はぐれまち[BlueText] と [RedText]にんじゃやしき[BlueText] を いきき[LineEnd]
[Spacing]できる きかいの ことよ!![LineEnd]
[0xB4] 。」[LineEnd]

I went and checked the text in-game.

Spoiler:


When it reaches [0xB4]:


And then the message box closes.

[Spacing] is the indentation aligning the next lines with the brackets after the speaker's name (Omitsu here). IMHO it's a waste of screen estate, especially with longer names, and deserves to go away.
So, something like this:

Quote
Omitsu (The Wise Old Man has been
        repairing Goemon Impact

could look better with the speaker's name in its own dedicated line, like this:

Quote
Omitsu
(The Wise Old Man has been
 repairing Goemon Impact

(you could free up a line by removing the 8x8 dakuten from both lines of text)

As a side note however, Goemon and the Space Pirates for the PS1 does use full width Shift-JIS spaces to manually align text rather than this particular adaptative indenting implementation.

As for [0xB4], it's like an RTS figuratively speaking. This particular bit of text appears when you choose one of two options in a question, and then when [0xB4] is reached, it goes back to the main body of text for one last line (not in the dump here) for both options. However I don't get why there's  。」[LineEnd] after considering it's never read (the period doesn't appear at all).

Your text dump is quite readable, compared to other games where the LineBreak doesn't imply waiting for the user to press a button.
« Last Edit: November 13, 2016, 06:48:23 am by GHANMI »

Nightcrawler

  • Hero Member
  • *****
  • Posts: 5785
    • View Profile
    • Nightcrawler's Translation Corporation
Re: Scripts with a lot of control codes.
« Reply #4 on: November 13, 2016, 09:15:58 am »
Agreed that you won't need the [Spacing] tag for insertion, so you don't need to show it for the dump. Just show the spaces.

You can also get rid of you [LineEnd] control codes if you do auto formatting (either in-game or externally). Such controls would be placed automatically for insertion and only need to be line breaks in the dump. Or, as mentioned, you can omit the line breaks entirely if the script if it's in a spreadsheet format or something.

You can also probably shorten your color controls to just and so they won't be so overbearing to the text if they are used alot.
TransCorp - Over 20 years of community dedication.
Dual Orb 2, Wozz, Emerald Dragon, Tenshi No Uta, Glory of Heracles IV SFC/SNES Translations

Rai

  • Hero Member
  • *****
  • Posts: 623
    • View Profile
    • The official webpage for my Super Robot Taisen Alpha translation project.
Re: Scripts with a lot of control codes.
« Reply #5 on: November 13, 2016, 05:20:41 pm »
My guess is that it's a full-width Japanese space (i.e., it takes up as much space as one double-byte character). They're using it probably to line up the text so that it appears neatly in solid rows, since the opening and closing quotations take up space.

Without spacing:

「ものしりじいさんが ゴエモン・いんぱくとの
ざんがいを りようして こしらえた
はぐれまち と にんじゃやしき を いきき
できる きかいの ことよ!!
 。」

With spacing:

「ものしりじいさんが ゴエモン・いんぱくとの
 ざんがいを りようして こしらえた
 はぐれまち と にんじゃやしき を いきき
 できる きかいの ことよ!!
 。」
The "[Spacing]" code is basically a bunch of spaces compressed into one byte.

I went and checked the text in-game.

Spoiler:


When it reaches [0xB4]:


And then the message box closes.

[Spacing] is the indentation aligning the next lines with the brackets after the speaker's name (Omitsu here). IMHO it's a waste of screen estate, especially with longer names, and deserves to go away.
So, something like this:

could look better with the speaker's name in its own dedicated line, like this:

(you could free up a line by removing the 8x8 dakuten from both lines of text)

As a side note however, Goemon and the Space Pirates for the PS1 does use full width Shift-JIS spaces to manually align text rather than this particular adaptative indenting implementation.

As for [0xB4], it's like an RTS figuratively speaking. This particular bit of text appears when you choose one of two options in a question, and then when [0xB4] is reached, it goes back to the main body of text for one last line (not in the dump here) for both options. However I don't get why there's  。」[LineEnd] after considering it's never read (the period doesn't appear at all).

Your text dump is quite readable, compared to other games where the LineBreak doesn't imply waiting for the user to press a button.
You're correct that the "[Spacing]" code aligns the next line, with the speaker's name.

Your suggestion probably won't work because of the way the game is coded.  The game is coded to display 2 lines of text at a time. This limitation can be overcome with ASM hacking; but breaking the limitation will mess up control codes. It's still possible to get 3 lines, but to make it work with no problems will take time.

Agreed that you won't need the [Spacing] tag for insertion, so you don't need to show it for the dump. Just show the spaces.

You can also get rid of you [LineEnd] control codes if you do auto formatting (either in-game or externally). Such controls would be placed automatically for insertion and only need to be line breaks in the dump. Or, as mentioned, you can omit the line breaks entirely if the script if it's in a spreadsheet format or something.

You can also probably shorten your color controls to just and so they won't be so overbearing to the text if they are used alot.

I agree that using spaces instead of the "[Spacing]" control code will work better. I'll also probably get rid of the "[LineEnd]" like you suggested. Shortening the color codes to "[ Red ]" and "[ Blue ]" is also a good idea.