How Items and Names Get Sorted in Japanese Games

A reader named Breno sent in a short question about something unusual about Final Fantasy for the NES:

While playing through the original Final Fantasy I noticed that the order the items are displayed on the item screen are not the order in which you buy them, and it does not seem to be arbitrary either. […]Is there something akin to a “alphabetical order” in japanese? If there is, is that the order the items are displayed on the item screen?

This is a two-part e-mail, so let’s look at each question separately.

Item Ordering

First, how are the items in Final Fantasy ordered? To help answer this, Breno was kind enough to send sample images of the party’s inventory after visiting the first shop in the game:

This was one of my first RPGs so I must not have noticed how weird it was for the lesser-used items to appear before the constantly-used onesThis was one of my first RPGs so I must not have noticed how weird it was for the lesser-used items to appear before the constantly-used ones

It’s obvious that the English items aren’t in any standard order. The Japanese items are in the exact same order, yet they don’t follow any particularly obvious order either. They’re not arranged by name, and it seems odd for the Tent/Sleeping Bag item to appear before the potion items that are used much more regularly. So what gives?

My gut instinct as a programmer suggested that it must be some sort of internal order created by the developers. To check this, I opened up the English game in a modification utility called Final Fantasy Hackster:

I've heard so much about Final Fantasy 1 hacking and how some hacks are amazingly well done. I'd love to try them out someday!

Yep, it looks like the items follow the same order as their internal programming order. Still, just to be extra sure, I went into the game’s programming myself and pulled out the game’s item data directly:

I still write most of my tools in oldschool C and I feel like an old dude because of it. But I think it was fitting this time, as both FF1 and C are contemporaries of sorts

So that seems to confirm that the items are sorted by the potentially arbitrary order the developers put them in, and why Tents appear before Heal potions and Pure potions when actually playing the game.

This was just a sample size of three items though, so I filled my inventory with a bunch of other items to be even more certain:

I haven't checked, but my theory is that there's a bunch of fixed-location bytes in memory (probably as an array), each one representing an item, and if the number stored there is non-zero, it means the player has that many of that item and that it should be displayed on the item menu screen. This would be much different from how later games handled items, I assumeI haven't checked, but my theory is that there's a bunch of fixed-location bytes in memory (probably as an array), each one representing an item, and if the number stored there is non-zero, it means the player has that many of that item and that it should be displayed on the item menu screen. This would be much different from how later games handled items, I assume

And yep, the results seem to conclusively confirm that the items are all sorted by the items’ internal IDs. This only applies to the NES/Famicom releases, of course – I’m sure the other twelve or so ports and remakes handle inventory sorting in their own ways.

Japanese “Alphabetical Order”

Breno also asked if the Japanese language has its own alphabetical order. It does indeed have something similar to it, but it’s a bit tough to explain with words alone.

First, Japanese doesn’t have an alphabet as we know it – it’s more like a syllabary. In simple terms, everything in Japanese is built around syllables rather than individual letters.

Incidentally, this is why almost everything in Japanese sounds like a string of “consant+vowel, consonant+vowel, consonant+vowel”, with occasional lone vowels too – it’s because the words are built from syllables. Some quick examples: kimono, teriyaki, kamikaze, Miyamoto. The next time you see a Japanese word or name, take a look and you’ll see it for yourself!

Japanese only has about 50 basic syllables (plus a few more if you combine some), and these syllables can be organized into a somewhat simple chart:

I remember seeing this chart for the first time like it was yesterday - now I'm MAKING them :O

Japanese “alphabetical order” follows this chart from left to right, starting from the top row and working downward. So a word starting with あ (a) would appear in a dictionary before a word starting with え (e), while a word starting with こ (ko) would appear before a word that starts with み (mi). Because there are about 50 of these syllables on this chart (minus a few that got dropped decades ago), this ordering system is known as the “gojūon” (“fifty sounds”).

The gojūon isn’t just for dictionaries and name ordering, though. It plays a big part in Japanese text entry systems. For example, cell phones have long used the gojūon system:

I remember when Japanese phone technology seemed like super-futuristic alien gadgetry to the rest of the world, it was a neat time

And most naming screens in Japanese video games also follow the gojūon order:

It's also common to see the gojūon chart put on its side like in the MOTHER 2 exampleIt's also common to see the gojūon chart put on its side like in the MOTHER 2 example
On a side note, if you’ve ever heard something like “ra ri ru re ro” or “la li lu le lo” in a game or weird video and wondered what the heck it means, it’s from the final full syllable row in the chart above. It’s become particularly notable outside of Japan thanks to the Metal Gear Solid series.

Anyway, all of this probably seems a bit convoluted at first, but hopefully it helps explain the basics of how Japanese text sorting works. Actually, because Japanese and English use slightly different sorting processes, the name sorting functions in games usually need a bit of reprogramming during localization. I vaguely recall hearing about a localization or two that didn’t take this into account, causing the item sorting to behave oddly. If anyone knows more, let me know in the comments!

  1. Funny how this article comes up just as I was having a conversation about it!

    In Atelier Meruru, the localization has a bug where the item sorting function that sorts alphabetically (it’s labeled “A-Z” and is an important function in an item crafting and resource management game) doesn’t sort alphabetically at all. Rather than the A entries at top, the first items on the list are things like “crimson dye” and “sweet gem”.

    Of course, in Japanese, those items are “aka no senryou” and “amai houseki”…oops!

    (Quite unfortunately, this was not fixed in the Vita port despite the fact a different localization company had taken over.)

    1. Nice, thanks for this. I never would’ve known without your help!

      1. If it perks your interest, same exact thing happened in *deep breath* Shin Megami Tensei – Devil Summoner: Soul Hackers 3DS re-release. Organizing the demon “analyze” list in your comp by “name” organized by its Japanese order. At first I thought is was a glitch, but then I scrolled all the way to the bottom. Lo and behold, Rama, Loki, Leprechaun, Rolwoy, Longinus, all under the same section. Painfully obvious then.

        Not like that was just one little mistake either. Putz demonic compendium entry says he originated in Australia when it’s really supposed to be Austria. Examining the compendium entry for fusion swords is also a dangerous affair, as the translators didn’t abide by the character limit. The game actually panics when some particularly lengthy entries are viewed.

        The best part of it all is the Orochi copy-paste error. In a rush to translate both Soul Hackers and Shin Megami Tensei 4, someone must have accidentally overrode an entry on the SMT 4 translation Excel sheet while copy-pasting demonic compendium entries from Soul Hackers. At least something like that happened, because Orochi’s compendium entry in SMT 4 is actually that of Hoyau Kamui’s entry, despite Hoyau Kamui only appearing in Soul Hackers! Amazingly, this accident still persists today, three years later, within SMT 4: Apocalypse. The icing on the cake? Between SMT 4 and SMT 4: Apocalypse, The entry was reformatted to make the incorrect entry fit cleanly in the bottom screen. They saw the error, yet didn’t recognize it and correct it.

    2. I have not played Meruru yet, but that is very interesting to know. Thank you for mentioning that, Aster.

  2. Retro wrestling games run into odd sorting a lot in Create-A-Wrestler modes. Move names get translated but the sort order isn’t changed. This creates weird clumping where moves with similar names are near each other but not in any order. I can’t remember specifics but I recall at least one instance where the sorting was made alphabetical but them some move names were changed for trademark reasons leaving them where they would have been.

    1. Wow, I guess I should check out those old wrestling games. I’ve always been fascinated by the amount of Japanese wrestling games on old systems.

  3. I’ve also heard of the older “Iroha” order, which is based off a Japanese poem which uses the whole syllabary. Kind of like “the quick brown fox jumped over the lazy dog”.

    Having said that, I don’t think I’ve ever encountered an example of it.

    1. Yeah, I rarely come across Iroha order myself. In my own work I mostly encounter it as a numbering system for character roles, like maybe a movie script might have Soldier い, Soldier ろ, Soldier は, etc. I’m probably just not cultured enough to encounter it more often than that 😛

      1. I recall that in at least 1 Japance city, city block and such actually use the iroha system. I might be wrong though…

      2. In Okami, the Imps have the first five syllables of the Iroha poem on their masks. A tiny little tidbit, but I found it interesting.

    2. Iroha isn’t actually technically older, is it? It just feels older since it’s fallen out of use.

  4. Is that just a typo with the “o” instead of “wo” in the W row, or is there something more sinister at play there?

    1. Originally it was “wo” but in more recent times it’s become “o”. There used to be other “w” characters too but they got dropped in the 1940s I believe.

      1. The weird thing is that every song I’ve listened to pronounces it as “wo”. Maybe it’s just easier to pronounce.

        1. Yeah, the “wo” pronunciation still appears in songs/poems with regularity.

    2. It’s because that character is most commonly pronounced as just ‘o’ in English, and thus it’s the more commonly romanized way. Same with si actually being shown as shi.

  5. A related interesting note is that the NES 6502 really doesn’t have enough oomph to handle alphabetical sorting in real time; it would slow the game down to mud if it sorted inventory items alphabetically on the fly.

    1. That’s pretty interesting, but if sorting is only needed when modifying contents of the item list in RAM, I wouldn’t think that it’s an issue? That might explain the lag some games have with text boxes when purchasing items, though! 😀

  6. Another localization in which sorting behaves weirdly:

    “Toukiden: The Age of Demons” is a Monster Hunter style game in which you can sort your materials via a button press. In the original game, this sorts your materials alphabetically by their English names. But in “Toukiden Kiwami”, which is an expanded version of that game, sorting your items results in utter chaos. I assume they are sorted by their original Japanese names or something like that. In a game with more than 1200 different materials, this makes it infuriating to search for a specific material.

    As a side note, since the Iroha system was mentioned in the comments: Toukiden uses Iroha to label the different regions of the mission areas. (I.e., the first region is labeled “i”, the second region is labeled “ro” etc.) This was changed to numbers in the localization.

  7. I always thought the whole Metal Gear “La Li Lu Le Lo” deal was about some kind of secret society/group which named themselves that so it would be unpronounceable in japanese (because of the lacking ‘L’ syllabes) like those illuminati style memes. Then again, I’m not all that into Metal Gear lore and such so I have nooooo idea about what it actually is about.

    1. Seems to just be Ra-Ri-Ru-Re-Ro in Japanese going by the screenshot. I’m guessing they translated them as L’s because they’re more natural for English speakers.

      1. If I remember correctly, they are meant to be the L syllables in the Japanese version too. They are essentually letters that don’t exist in the Japanese and thus can’t be spoken. Or something like that I guess.

  8. That is intriguing. So it seems to be some arbitrary order for the Japanese version instead of just most commonly used items to least used. I think your theory about the fixed location bytes is pretty plausible when you think about it.

  9. Interestingly enough, this internal item ID stuff has a pretty significant impact on gameplay in FF1. As the result of an oversight, the game pulls a weapon’s ID number instead of its intended crit rate to determine whether or not any given attack will be a crit. A higher number means more crits, and since the weapons’ IDs correspond numerically to game progress, this means that crits get steadily more common over the course of the game. The funny part is that this unintended behavior apparently went over pretty well, because it was kept in the remakes, rather than being corrected. Not really a localization issue, but interesting nonetheless.

    1. In retrospect, that makes a certain kind of sense since you want to do critical hits with more powerful weapons as the story goes forward. Better to constantly smash the crap out of the final boss with Masamune than to attempt a critical hit on Garland with your starting knife.

  10. It seems that in modern RPG games, the default ordering of the items is by their types. So, you have your potions for example in one place, key items in other etc. Of course newly acquired items tends to appear in bottom but at least you can always sort them, right?

  11. While it’s not a video game, the English Chuang Yi release of the Pokemon Encyclopedia orders all the Pokemon in “Japanese alpabetical order”. By Japanese name. Or in other words, they just translated the original Japanese books straight and didn’t rearrange things. It’s two separate volumes too, so good luck finding the Pokemon you’re looking for in there unless you know their original names. I don’t think it even had an index.

  12. Fire Emblem: Radiang Dawn had the token character encyclopedia. Ordered in Japanese order, naturally.

    Made characters with changed names stick out, haha.


Leave a Reply

Your email address will not be published. Required fields are marked *