Qhimm.com Forums
Miscellaneous Forums => Scripting and Reverse Engineering => Topic started by: lowena on 2013-01-13 02:09:34
-
Hey guys. I've been scouring the internet, and currently it seems impossible to translate Final Fantasy IX. One can view most of the other files with Noesis, but no work has been done on editing dialog and other in-game text. I want to change that. I am still a novice programmer, and an even worse reverse engineer, and I am well aware it could take weeks or months to get anywhere (keeping in mind I'm a fast learner and have more free time than I want :P ).
FF9 is one of my favorite games of all time (my second favorite FF game, after 8 ), and since I love programming and hacking, and always have, I thought, why not put my determination to good use?
I don't know if anyone is currently working on anything FF9-related, but if you are, speak up! :)
And if anyone would like to recommend anything for me to read about text tables, pointers, and other such hacking-related items related to the PSX and more specifically FF9 where possible, feel free!
-
I was under the impression it was already in English...
lemme check....
Yup, still in English.
Is there something wrong with the current translation?
-
I was under the impression it was already in English...
lemme check....
Yup, still in English.
Is there something wrong with the current translation?
I didn't say I wanted to translate it to English. The problem is, is that it's not in Basque. ;)
Also, it appears on a Brazilian site they have translated FF9 into Portuguese, so it shouldn't be too hard, right? :-X
My first task is to locate the font file and create a text table. So far I'm stuck.
-
Good news everyone! I'm almost done with my text table. Got sentences, just need punctuation. :) Could anyone tell me what they use in FF7 and 8 for putting the character's names in dialogs? In FF9 it's ?A?. The first and 3rd characters I do not know yet, but would like to know them.
-
From tests I did with Makou Reactor, FFVII character names work like normal letters. EA is Cloud, for example.
I did some work on IX's character table, and it worked but obviously the way I programmed it was far from the most efficient way. I'm an amateur programmer.
Here's what I got:
0{"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "+", "-", "=", "*", "%", " "}
1{"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P"}
2{"Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "(", "!", "?", Chr(147), ":", "."} '147 is open double quotes
3{"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p"}
4{"q", "r", "s", "t", "u", "v", "w", "x", "y", "z", ")", ",", "/", "・", "~", "&"}
5{"Á", "À", "Â", "Ä", "É", "È", "Ê", "Ë", "Í", "Ì", "Ï", "Ï", "Ó", "Ò", "Ô", "Ö"}
6{"Ú", "Ù", "Û", "Ü", "á", "à", "â", "ä", "é", "è", "ê", "ë", "í", "ì", "î", "ï"}
7{"ó", "ò", "ô", "ö", "ú", "ù", "û", "ü", "Ç", "Ñ", "ç", "ñ", "Œ", "ß", "’", Chr(148)} '148 is close double-quotes
8{█, Chr(148), █, █, █, █, █, █, █, █, █, █, █, █, █, █}
9{█, █, █, █, █, █, █, █, █, █, █, █, █, █, █, █}
A{"‘", █, █, █, █, █, █, █, █, █, █, █, █, █, █, █}
B{█, █, █, █, █, █, █, █, █, █, █, █, █, █, █, █}
C{█, █, █, █, █, █, █, █, █, █, █, █, █, █, █, █}
D{█, █, █, █, █, █, █, █, █, █, █, █, █, █, █, █}
E{█, █, █, █, █, █, █, █, █, █, █, █, █, █, █, █}
F{█, █, █, █, █, █, █, vbNewLine, █, "$", █, █, █, █, █, "@"} '$ is variable and other stuff
I did it in VB. I don't know why I had two close double quotes down, one may be wrong. @ = END textbox, or end line, or whatever.
The "$" signifies a variable so I could replace it later ($A = Zidane, $B=Vivi, $D=Steiner)
"$8" is used for selection options (I replace it with a choice indicator), and $q0 as current HP, and $q1 as max HP -- probably relating to battle Scan info.
And here are the characters I couldn't place but exist:
_
】
【
∴
∵
♪
→
∈
×
◆
§
<
>
←
∋
↑
△
□
∞
♥
«
»
↓
—
°
★
♂
♀
Ⓤ
˶
'
#
※
;
¡
¿
-
Awesome! Thanks for the detailed reply. How far did you get with your program? Did you ever read anything from the ISO/whatever? If so, I'd love if you could share the code. :)
I'm using Qt and C++, but it would still be helpful.
Right now I'm trying to figure out if there's an easier way to read lines from the binary ISO file without having to specify a hex offset for every line of dialog... so far I've got nothing.
-
I originally extracted files using Noesis, and just put random files into my program to see if they would return text. I wouldn't know how to repack the data, I was mainly interested in what I could find in the files.
The program read two bytes as hex, then split the data into two separate bytes, converted values of A through F to a value of 10 through 15, and then used a jagged array to output a character. I also had it output the hex values into another textbox (which itself could be used to copy hex into and then convert).
And because my file-reading method wasn't any good and would freeze for ages if the file was of any length, so I made it stop reading a file after it had encountered 5 "FF"s, and then I would click a button that took it onto the next.
The visual parts of the program aren't worth looking at since I just developed it to get something working. And I haven't commented any of the code either, but I'll post it anyway: you can probably tell what's going on in some places. I'm also not a very good programmer so it's really just not that good.
Public Class Form1
Dim strSome As String
Dim strThing As String
Dim chrChar As Char
Dim strArray As String
Dim c, cc As Integer
Dim Zidane As String = "Zidane"
Dim Vivi As String = "Vivi"
Dim Dagger As String = "Dagger"
Dim Steiner As String = "Steiner"
Dim offset As Long = 0
Dim i As Integer = 0
Public table = New Object(15) {}
Dim cElse As Char = "█"
Private Sub Form_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
table(0) = New Char(15) {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "+", "-", "=", "*", "%", " "}
table(1) = New Char(15) {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P"}
table(2) = New Char(15) {"Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "(", "!", "?", Chr(147), ":", "."} '147 is open double quotes
table(3) = New Char(15) {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p"}
table(4) = New Char(15) {"q", "r", "s", "t", "u", "v", "w", "x", "y", "z", ")", ",", "/", "・", "~", "&"}
table(5) = New Char(15) {"Á", "À", "Â", "Ä", "É", "È", "Ê", "Ë", "Í", "Ì", "Ï", "Ï", "Ó", "Ò", "Ô", "Ö"}
table(6) = New Char(15) {"Ú", "Ù", "Û", "Ü", "á", "à", "â", "ä", "é", "è", "ê", "ë", "í", "ì", "î", "ï"}
table(7) = New Char(15) {"ó", "ò", "ô", "ö", "ú", "ù", "û", "ü", "Ç", "Ñ", "ç", "ñ", "Œ", "ß", "’", Chr(148)} '148 is close double-quotes
table(8) = New Char(15) {cElse, Chr(148), cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse}
table(9) = New Char(15) {cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse}
table(10) = New Char(15) {"‘", cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse}
table(11) = New Char(15) {cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse}
table(12) = New Char(15) {cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse}
table(13) = New Char(15) {cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse}
table(14) = New Char(15) {cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse, cElse}
table(15) = New Char(15) {cElse, cElse, cElse, cElse, cElse, cElse, cElse, vbNewLine, cElse, "$", cElse, cElse, cElse, cElse, cElse, "@"} '$ is variable
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Label1.Text = ""
strSome = Replace(Replace(TextBox1.Text, " ", vbNullString), vbNewLine, vbNullString)
strSome = strSome.ToUpper()
TextBox1.Text = ""
Do Until strSome = "" Or strSome = " "
strThing = strSome.Substring(0, 2)
TextBox1.Text += strThing
strArray = strThing.ToCharArray()
Select Case strArray(0)
Case Is = "A"
c = 10
Case Is = "B"
c = 11
Case Is = "C"
c = 12
Case Is = "D"
c = 13
Case Is = "E"
c = 14
Case Is = "F"
c = 15
Case Else
c = Int32.Parse(strArray(0))
End Select
Select Case strArray(1)
Case Is = "A"
cc = 10
Case Is = "B"
cc = 11
Case Is = "C"
cc = 12
Case Is = "D"
cc = 13
Case Is = "E"
cc = 14
Case Is = "F"
cc = 15
Case Else
cc = Int32.Parse(strArray(1))
End Select
chrChar = table(c)(cc)
If chrChar = "@" Then
TextBox1.Text += vbNewLine
End If
Label1.Text += chrChar
strSome = strSome.Substring(2)
Loop
Label1.Text = Replace(Label1.Text, "$A", Zidane) 'Zidane's name
Label1.Text = Replace(Label1.Text, "$B", Vivi) 'Vivi's name
Label1.Text = Replace(Label1.Text, "$D", Steiner) 'Steiner's name
Label1.Text = Replace(Label1.Text, "$8", "") 'cursor/choice menu
Label1.Text = Replace(Label1.Text, "$@", " ") 'indent/choice
Label1.Text = Replace(Label1.Text, "$q0", "cHP") 'current HP value
Label1.Text = Replace(Label1.Text, "$q1", "mHP") 'maximum HP value
Label1.Text = Replace(Label1.Text, "@", vbNewLine) 'next box
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
TextBox1.Text = ""
End Sub
Private Sub OpenFileDialog1_FileOk(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles OpenFileDialog1.FileOk
If Not i = -1 Then
offset = 0
txtOffset.Text = offset
End If
TextBox1.Text = ""
Using file As New IO.FileStream(OpenFileDialog1.FileName, IO.FileMode.Open)
Dim value As Integer = file.ReadByte
file.Seek(offset, 0)
Do Until value = -1 Or i = 5
offset += 1
If (value.ToString("X2") = "FF") Then
i += 1
End If
TextBox1.Text += value.ToString("X2")
value = file.ReadByte()
Loop
End Using
txtOffset.Text = offset
lblFileName.Text = OpenFileDialog1.FileName
i = 0
Button1.PerformClick()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
OpenFileDialog1.ShowDialog()
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
OpenFileDialog1_FileOk(sender, Nothing)
offset -= 1
i -= 1
End Sub
Private Sub txtOffset_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtOffset.TextChanged
offset = txtOffset.Text
End Sub
End Class
-
Fortunately you don't need to unpack the files, you can edit the ISO directly. :)
Thanks. I'll keep this updated on my progress with the program.
Also, I'm interested: How did you find the character values? As for me, I used a letter frequency table, and with a little trial and error, found the correct sequence from A-Z.
-
I didn't say I wanted to translate it to English. The problem is, is that it's not in Basque. ;)
Also, it appears on a Brazilian site they have translated FF9 into Portuguese, so it shouldn't be too hard, right? :-X
My first task is to locate the font file and create a text table. So far I'm stuck.
Can you send me that site where they translated the game?
-
Polish guy, RPG (http://www.facebook.com/nintendencja/info), translated FF9 into PL:
(http://grajpopolsku.pl/images/gry/psx/ff9/01.jpg)(http://grajpopolsku.pl/images/gry/psx/ff9/02.jpg)
(http://grajpopolsku.pl/images/gry/psx/ff9/03.jpg)(http://grajpopolsku.pl/images/gry/psx/ff9/04.jpg)
(http://grajpopolsku.pl/images/gry/psx/ff9/08.jpg)(http://grajpopolsku.pl/images/gry/psx/ff9/18.jpg)