This is the sixth article in Operation Bellflower’s weekly tech posts series. Check out the previous ones here!
In the last couple of articles I’ve shown you how to mess around with the game file’s assembly code to do some simple text replacement and font parameters tuning. But there is, of course, much more to translate in the engine than just some text on the screen. These scenario files we’ve seen earlier are also capable of triggering complex visual effects. Take, for instance, Senmomo’s date display screen.
These show up sporadically in the game. Pictured above is the very first one, showing the date “March 4th” (Literally: month 3, day 4). It might look simple but there’s quite a lot going on here. This screen is generated by an algorithm that takes a date as an input, then displays in turn each of the digits as images (not text!) at the right spot, with a fancy little animation.
At first glance you might think that translating this screen would be straightforward: why don’t we just replace the images for these Japanese digits with our Arabic numerals? Unfortunately it won’t be as easy as that, otherwise I wouldn’t be here making a whole article about it. There are a couple of complications:
- The Japanese counting system is fundamentally different from the western one, and you can’t just take each digit one by one, replace them with the right one in our decimal system and be done with it. For example, numbers starting from 21 use three digits in Japanese, whereas we would need only two.
- The date format we want is different than what’s used here: we’re going for the name of the month followed by a number for the day (for instance, the date shown above would be translated to “March 4”). We could have gone with something more similar to what’s already there, but decided against a potentially ambiguous MM/DD format that might confuse our European audiences.
- Remember, it’s all assembly code. That will severely limit our capabilities to comprehend, let alone modify the aforementioned algorithm that handles date formatting.
By performing some strategic changes to a couple of strings in the game’s scripts and cleverly constructing the translated images, we’ll be able to figure something out. Working out a solution for this was one of my favorite challenges in the entire project and possibly one of the most incredibly stupid hack I’ve ever worked on. But I live by the motto of “if it looks stupid but it works, then it’s not stupid”. So let me share with you the whole adventure that was translating Senmomo’s calendar screens…