Upon recommendation from someone over at the Sierra Help Pages, I decided to post about my little project here.
http://www.sierrahelp.com/forums/viewtopic.php?f=2&t=4886Long story short, I'm a Sierra die-hard fan living in Japan, and I thought I'd try my hand at translating a few games to let my wife and Japanese family understand what this is all about (especially the QFG series).
I first stumbled upon the multi-language features of SCI when I found out about the Japanese versions of QFG1, PQ2, KQ5, SQ4 and such, and then I realized ScummVM can actually play these.
Afterwards, I found out about the SCI Companion, and attempted decompiling them to see how they ticked, realizing the syntax is "{English}%J{Japanese}" (or #J), and that ScummVM has an override for font 900 in the case of Japanese language.
I wanted to translate QFG2, but first I thought to try my hand with a smaller title such as Space Quest III.
(By the way, many thanks to the person who decompiled QFG2 here, I will probably be working off that, if that's all right)
The English to Japanese translation part won't be the problem, barring the time it requires, of course. The problems I have right now are essentially technical, so I thought I'd post about my progress here.
A bit of code grepping and poking around the code made me stumble upon the function used for most boxed dialog display, proc255_0 from Class_255_0, and I noticed they were similar enough that stealing logic from QFG1JP should work. This was when I realized the Game class also would require extra global variables.
I hit a few annoyances :
- I run on Linux, so I have to use WINE to run SCI Companion, and it seems to be buggy under that configuration. On the plus side, it's extremely easy to run under a SJIS locale, even easier than on Windows itself.
- Game text in Japanese is in SJIS is a pain to edit under the SCI Companion. I plan on making my own tool for decompiling text resources based on text patches, and another for recompiling them based on a "English|Japanese" Excel file.
- Running the compiler tends to crash SCI Companion under WINE, so I have to compile, leave, restart, compile the next file. (A CLI compiler that works under UNIX would be a real boon ; thankfully I won't need to recompile THAT many files, hopefully)
- Recompiling resources under SCICompanion causes ScummVM to break, so I have to compile every script I need from the start, export them as script.XXX patches; and then restore my original RESOURCE.xxx files.
- I had to hack ScummVM to recognize my patched game as Japanese, so I added an entry in the detection table based on my patched script.255.
- Space Quest III is too old to have all the SCI features required for multi-language (namely, the parserLang or subtitleLang global variable hooks, and the StrSplit kernel function 0x78; aka kernel_120), so I had to hack the language processing functions to force displaying Japanese when a) the game is SQ3, b) a Japanese string has been found; I managed to translate a few things, and to get results, which I displayed here :
https://twitter.com/DarkSoul4242/status/1135097021302358016- The problem now is that the patching of text resources corrupts the game when changing rooms (Crashes when getting to the robot head room, or when riding a trash basket); so I'm guessing there is a limit on how long a text resource can be, and that I'm causing memory corruption by having English and Japanese. I'll likely have to nix the English.