Category Archives: Dragon Quest Monsters

One year later

I’m aware it’s been a full year since my last post. I apologize for the long silence. As usual, real life and gaming studying used up a lot of the time. Also sorry for the unapproved comments, I didn’t pay attention to them for a while. Most of the progress was made on the projects covered by Absolute Zero, but the others were also not forgotten. Today I want to focus on Dragon Quest Monsters 1&2. I know that the length of the project is almost comical at this point, so I want to give some insight into what problems there were to solve and why it takes a long time, often resulting in extended stretches with little motivation to work on it.

Dragon Quest Monsters 1&2 is undoubtedly among the nastiest games I’ve worked on. It needed many major programming changes that all came with their own set of resulting issues. Some systems of the game were  just entirely unsuited to languages other than Japanese and needed a lot of manual work to get them working. Here I want to summarize a few of the things that needed to be done, some of the issues along the way, and what we still have left to do at this point.

Names

The Japanese version used 5 bytes/characters for player and monster names. This has been extended to 6 letters by compressing every letter down to 6 bit, at the cost of the size of the input alphabet. The game originally stored location names as plain text in saves, in around 10 bytes. It copied them from the text of the specific map. No compressing method would allow the longer location names to fit in there, so now instead an index gets written to the saves and a new list of location names was created to be referenced by that. Key names in part 2 were also stored as plain text, in just a handful of bytes. These couldn’t be referenced by an index due to the vast number of possible variables, so instead all the variables are encoded in a way that allows dynamically recreating the key name on demand.

Menus

The Japanese version uses tile maps to display the background and text. The screen is divided into 10×10 pixel blocks and each block can get one value assigned, ie. the graphic of a single letter. As this obviously doesn’t work well at all with proportional text, the entire system has seen a major rewrite, now dynamically drawing text, storing it in VRAM, and freeing it when it’s no longer needed. This was necessary, but it also caused a severe number of bugs. Some of them resulted from flawed logic in the original game. I’ll explain it with an example of a bug that I recently fixed, which had troubled me for a very long time.

2

Here you can see the status menu. Note the list on the left, which is a list of your monsters, with another option to show an overview of all your monsters at the same time. Now, when you press O you can see the ancestors of the selected monster.

3

And then this happens. Note the same menu on the left, now in the background. What should show “All” actually shows “24” in this case. At first it looks fine, this only happens when you press any buttons. So what happened? After a lot of debugging, I figured it out. This is the sequence of events:

  • the player presses O, entering the ancestor menu
  • the game draws the new foreground menus, and at the same time creates a backup copy of the background menu
  • whenever the user presses a button, all menus are redrawn, including the background menu. At this point my new system frees the previously displayed text, allowing it to be overwritten by new text
  • after all menus have been redrawn, the final image is created. But instead of using the newly drawn version of the background menu, the game instead uses the backup copy. As the text it displayed has long been invalidated, the result is garbage

This is just one of many examples where the game works in, let’s say, a less than intuitive way. It’s a very time consuming process to identify and fix these issues.

Battle Text

This is the single most time consuming part of the game. When the game displays battle text, it doesn’t fetch any complete sentences. It doesn’t fetch any sentences with some placeholders either. It instead pieces the sentence together bit by bit, splitting it into the small parts mirroring sentence fragments of the Japanese grammar. Here’s a simple example to illustrate this:

<Var:10><Var:30>は <Var:20><Var:35>を <nl>ぱふぱふした!
<Var:10><Var:30> gave <Var:20><Var:35> a puff puff!

The Japanese text is split up into three parts, the first two of which are used by hundreds of strings:

<Var:10><Var:30>は
<Var:20><Var:35>ã‚’
<nl>ぱふぱふした!

Now there is a problem – the Japanese text just puts the names of the two monsters right next to each other, but in English we need to insert an extra “gave” inbetween them. To do this we can’t just change the string. Instead, we need to add another sentence fragment and adjust the battle script to piece the sentence together in the right way. This process needs to be done with a lot of strings. Some don’t need any changes, some can be solved by slight wording changes (ie. active instead of passive, or vice versa), while many others need to have their script adjusted. It’s a time consuming and error-prone process, and every single string the game can display needs to be checked and verified for this reason.

Additionally, support for pronouns was added. The monsters in your party use their respective gender, while enemies are universally referred to as “it”.

What’s left at this point

  • finish checking/fixing all battle text strings
  • replace Japanese graphics, ie. the title screen or the background graphic for the appraising results
  • fix remaining menu issues (most of them should be squashed by now)
  • text editing (mostly to avoid ugly text formatting, currently around 1/3 through the first game)
  • testing

A special thanks goes to Lord Oddeye, who joined the project after the Oriental Blue release. He continued testing just as thoroughly as before, and this time around also helped fix the issues. He brought the majority of the system text formatting up to shape and is now doing the same for the story text.

So much for today. I hope it was an interesting insight into the project, and I’ll try not to take another year for the next update.

Releasing… armips

As usual, it’s been a while! I apologize for my trademark silence, but as everyone knows, it’s nothing unusual.

The previous armips version was released in 2010, and it was very well received at the time. Over the years, I kept adding small new features to it, and I think it’s a good time to release an update now. The most notable additions are static labels, which act like global labels but can be redefined in every file, and the possibility to make all file paths relative to the file that uses them (as opposed to the working directory). Everything together makes for a decently sized update. This is probably the final armips release.

Here are the changes:

  • added automatic optimizations for several ARM opcodes
  • many bugfixes and internal changes
  • added static labels
  • new directives: .warning, .error, .notice, .relativeinclude, .erroronwarning, .ifarm, .ifthumb
  • quotation marks can now be escaped in strings using \”.

[wpdm_file id=4]

SLPM_870.50_31032013_185553_0592Now that the exciting stuff is out of the way, let’s talk a bit about our translations! One game is often asked for, but it hasn’t been mentioned by me for quite a long time – Xenosaga 1&2. The translation is still progressing, and in fact, late last year, the story text was finished. However, there is still a lot of optional text left. The translation is progressing slowly, but the translator is as dedicated to the task as I am.

The game on the left hasn’t made a lot of progress lately, but hopefully that can change soon. I’ll try to at least upload some new media during the coming months.

Oh, I nearly forgot: We collaborated with Absolute Zero to bring you one of the most influential Tales games of the last decade, which just happened to be finished today – Tales of the Tempest! More about that on their site.

Finally an update

A lot of time has passed since the last update. Unfortunately, not a terrible lot of progress has been made. As it’s often in life, you never seem to have as much time as you’d like to have. And the older you become, the less time you have. But I am still just as dedicated to finish all the projects!

Dragon Quest Monsters 1&2’s battle text has seen a lot of updates. We reverse engineered the format, are in the process of adding new variables for proper grammar, and have rewritten many instances of text scripts for better and more fluent readability. We hope to make the whole battle text as natural as possible, with full support for all three genders and other grammatical structures. We also just recently fixed a bug that troubled us for over a year. When you started a new game, your monster would randomly do anything except what you told it to do. In the end, a single byte was wrong. I guess that’s life.

I said that I would be disappointed if we couldn’t finish it this year… and that is true. But university has sucked up a lot of time, and when I had time after months of studying, I was so burned out that I couldn’t make much progress at all. We will still do our best… but you shouldn’t get your hopes up for this year. I have faith that you appreciate our translation and hacking quality enough to bear with the time it takes to reach the end.

Super Robot Wars F/FF’s translation has also progressed. Around 50% of the FF script is now translated. The other projects also haven’t been forgotten!

And to finish this, here is a little excerpt of japanese coding goodness I found in one of the games. The variable index can have the values 1 or 4. No others, both before and after the code. This is how they did it:

index++;
if (index == 2) index++;
if (index == 3) index++;
if (index > 4) index = 1;

Sometimes it feels like a miracle that some of these games even work at all.

Good news, bad news

You may have heard that Square-Enix announced that Dragon Quest Monsters will be remade for the 3DS. Isn’t that great? Now you have two versions of the game to look forward to! Naturally, we still hope that you look forward to the PSX version the most.

The announcement inspired us to work a bit on the PSX game since the last update. I’ve finished the total revamp of the menu system. There were still a few issues with background text appearing over foreground menus due to the way I initially implemented it. Now everything looks the same as before, but VRAM space is dynamically allocated and freed (and plenty of it is available, more than 3 times as much than before).

I’ve been thinking about writing a bit about the work and thought process that was involved during the creation of that menu system revamp.  It’s a very important hack which needed a lot of planning and many changes, yet it’s almost invisible to the user. It might be interesting to learn about the inner workings of a game and the hacking process. Is there any interest in such insight?

Aside from the menu stuff, monster and player names can now be 6 characters long, extending the original length of 5 characters. In order to do this, every character is encoded into 6 bits instead of the 8 of a full byte. More than this is unfortunately not possible as the saves are very tightly packed.

The biggest hurdle still left is the battle text. It’s a huge mess of variables and fragments of sentences that only really make sense in Japanese. It will have to be completely redone, and it will be a lot of work. Besides that, I think there are only a couple of menus left, a couple of graphics here and there, and probably other minor things.

Now, I will be honest. Some translations will be finished before others. Here is a small rundown of what to expect…

  • Dragon Quest Monsters 1&2 is very advanced and the most likely to be released next
  • Oriental Blue is also advanced, but still needs a lot of annoying work. It will probably follow after DQM
  • Super Robot Wars F… the translation has slowed down, and there’s a lot of editing to be done. It will still take a lot of time
  • Xenosaga 1&2 is similar, unfortunately. The translation is progressing very slowly lately, so don’t expect a release anytime soon

You might have noticed that there is one game missing from the list… and that game is Super Robot Wars D. I’m sorry to announce that, but the project is dead. It’s officially cancelled. The reasons are numerous, but largely come down to a serious lack of time of many people involved. If someone wants to continue it, I can hand him my stuff. I will, however, only give it to people who can prove their worth as hackers. Only people who can prove their experience and intention to finish it will be considered. There will be no support. Advanced low level knowledge is required.

As for the rest, time is still scarce for everyone involved. There won’t be any surprise releases in the near future, but there’s plenty to look forward to in the long term!

It’s over

It’s over. It has been a nice time, but everything must come to an end… After 8 months of a carefree life without posting news… here we are.
Everything is still alive. I don’t have all that much time anymore, and my interest is slightly fading, but I fully intend to finish any projects listed under my name on the translation page.

Now on to the updates.

Dragon Quest Monsters 1&2 has received a new menu text system. VRAM is now dynamically allocated and deallocated as the strings need it, giving effectively infinite space. It didn’t have any allocation systems previously (positions were hard coded for the translation), and had only very little space limited to half of a single VRAM page, so the improvements that can now be made are very nice.

The translations for SRWFF and Xenosaga 1&2 are still progressing slowly but steadily.

The hacking for Oriental Blue is also progressing. It had quite a few intense graphic formats that had to be reverse engineered, and they were shared by just about everything in the game… including every single map. Of which, incidentally, we need to edit about 50 due to japanese signs. It’s a challenging work, especially as we are very limited in what colors and how much VRAM we can use, so the process is very time consuming. Deets is doing a great job at the image editing front though, as we learned to expect. As said before, Oriental Blue will be the next translation to be released.

We’ll eventually release updated patches for Super Robot Wars J and Tales of Innocence, but don’t expect them anytime soon. All issues are minor and don’t get into the way of playing the games at all (except one crash in Tales of Innocence, but that can be averted by saving and reloading the game after receiving fabled recipes). The patches will fix all known issues and will be the final updates to those translations.

A new armips version will also be released eventually. It adds optimizations for some ARM opcodes (automatic conversions for: ldr=->mov/mvn, movmvn, bicand, cmpcmn) and fixes a couple of minor issues.

So until the next update, no news is good news.