Well, as the topic says, I'm trying to extract scripts from Vampire Knight DS but it used a very custom table. First the hiragana and katakana didn't follow any standard encoding system.
Like usual unicode or utf-8 or shift-jis will have the character in this order ? ? ? ? ? ?, but this game's encoding is like
9211=? 9212=? 9213=? 9214=? 9215=?
9216=? 9217=? 9218=? 9219=? 921A=?
921B=? 921C=? 921D=? 921E=? 921F=?
and so on.
Then Kanji's are even worse. I believe that the developer for Vampire Knight DS just reused the table from Hoshizora no Comic Garden because the Kanji's in the table are arranged in the order of Kanji's appeared in Hoshizora no Comic Garden game. So I couldn't use any standard table to automatically create the table for Kanji's. The only way I could do is extract a Hoshizora no Comic Garden script, replaced the known katakana & hiragana, then played the game to find out the kanji codes it used for that part.
Like here's the raw script (Extracted from Hoshizora no Comic Garden):
Then I replaced the script with known values and got this:
Then I'll need to play the game until I reached the part where some character say these dialogs and map the values 964E, 9526, 9852, 9782, 9829 to the Kanji's that appear on the game screen.
It will take forever to complete this, I guess. The worst thing is in Vampire Knight, the scripts don't seem to be stored in order that they appear in the game. Their scripts are stored in order of their lengths (character counts), which make hacking even more difficult. T_T (Not to mention that you'll need to play Hoshizora no Comic Garden first to make the encoding table before you can get the Kanji table for Vampire Knight.)
So, before I totally give up, I just wonder if there's any easy way to handle table making? The other games I tried to hack always used standard encoding or only slightly modified table so I'm totally not experienced with custom table at all. Is there supposed to be something stored in the game that tells you how the characters are mapped? I'm not sure if I missed anything and made the hacking more difficult than necessary or if the game is really super hard to hack.
P.S. The whole dialog scripts for both game are stored in Arm9.bin.
Like usual unicode or utf-8 or shift-jis will have the character in this order ? ? ? ? ? ?, but this game's encoding is like
9211=? 9212=? 9213=? 9214=? 9215=?
9216=? 9217=? 9218=? 9219=? 921A=?
921B=? 921C=? 921D=? 921E=? 921F=?
and so on.
Then Kanji's are even worse. I believe that the developer for Vampire Knight DS just reused the table from Hoshizora no Comic Garden because the Kanji's in the table are arranged in the order of Kanji's appeared in Hoshizora no Comic Garden game. So I couldn't use any standard table to automatically create the table for Kanji's. The only way I could do is extract a Hoshizora no Comic Garden script, replaced the known katakana & hiragana, then played the game to find out the kanji codes it used for that part.
Like here's the raw script (Extracted from Hoshizora no Comic Garden):
Code:
9229-925E-9229-925E-922A-9239-9416-
947C-947C-9213-9263-9416-
9229-925D-923A-9226-9232-9251-9415-
9245-922F-925B-923D-964E-9526-923A-923F-9252-922F-925B-923D-
9852-9782-9226-9212-9829-922A-923C-9416-
Then I replaced the script with known values and got this:
Code:
???????
......???
???????
????964E9526??????
98529782??9829???
Then I'll need to play the game until I reached the part where some character say these dialogs and map the values 964E, 9526, 9852, 9782, 9829 to the Kanji's that appear on the game screen.
It will take forever to complete this, I guess. The worst thing is in Vampire Knight, the scripts don't seem to be stored in order that they appear in the game. Their scripts are stored in order of their lengths (character counts), which make hacking even more difficult. T_T (Not to mention that you'll need to play Hoshizora no Comic Garden first to make the encoding table before you can get the Kanji table for Vampire Knight.)
So, before I totally give up, I just wonder if there's any easy way to handle table making? The other games I tried to hack always used standard encoding or only slightly modified table so I'm totally not experienced with custom table at all. Is there supposed to be something stored in the game that tells you how the characters are mapped? I'm not sure if I missed anything and made the hacking more difficult than necessary or if the game is really super hard to hack.
P.S. The whole dialog scripts for both game are stored in Arm9.bin.