Oblivion

I tried to build the mod so that nothing it does is a major obstacle to compatibility. However, there are still compatibility problems I can't account for at this time, where fonts and Oblivion's program code are concerned. Worse is that while I can anticipate problems, I can't be sure which problems will actually happen, because I only own the game in English.

Translating the text
The English version of Oblivion uses Windows-1252 encoding (commonly called "ANSI"). The same encoding should be used or at least usable for languages with the same alphabets (e.g. French, German, Spanish). When editing text files, make sure you're using the right encoding; multi-byte encodings like UTF-8 may handle some symbols inconsistently.

All of NorthernUI's menus use strings pulled from a single file: Data\Menus\NorthernUI\strings.xml. (If any text doesn't pull from there, it's a bug; report it!)

Some of NorthernUI's changes to the game engine require the display of text. In these cases, NorthernUI pulls that text from a single file: Data\OBSE\Plugins\NorthernUI.l10n.txt. Note that some of the text in this file consists of format strings: the percent-sign-prefixed tokens in those strings mark places where other text gets substituted in (like blanks in a mad lib), and those tokens must be left intact. If they're changed, then NorthernUI will reject your string and use the hardcoded (English) default; NorthernUI will warn about this in its log file (open Data\OBSE\Plugins\NorthernUI.log and do a search for "Format string parameters" to see if any warnings were sent).

NorthernUI specifies predefined control schemes and their names in one file: Data\OBSE\Plugins\NorthernUI.ctrl.txt.

NorthernUI has a file, Data\Menus\NorthernUI\localizationconfig.xml, which offers additional localization-related configuration for specific menus. Some menu widgets, for example, can have their sizes adjusted from this file.

The mod is built so that it can be translated to any particular language using just those three files, if none of the below concerns apply.

Translating the fonts
NorthernUI currently ships with Windows-1252 (ANSI) and Windows-1251 font files. The mod is set up so that a trait in localizationconfig.xml can be modified to select which set of fonts to use. In order to add more text encodings, one would have to edit datastore.xml (or better: tell me and have me do it).

Oblivion uses its own font format, which the community has had to reverse-engineer. I have a font editor, but that font editor only supports some text encodings. If Oblivion runs in other languages that use different single-byte encodings, then I will need to be told what encodings those languages use, so I can add them as an option for the font-editor.

The very nice thing about the editor is that even if it can't create fonts for a particular encoding, it should still be able to load fonts for any single-byte encoding. In theory, one could use it to figure out what encoding a font was created with, by comparing character codes to font glyphs by hand.

The larger problem for fonts is multi-byte languages, like Chinese, Japanese, Korean, and Vietnamese. Oblivion's custom font format is built for single-byte languages; it defines exactly 256 characters that can be configured and rendered. CJKV would have to use a different font format, and I don't know how different that format is. Maybe it's exactly the same, and it just defines 65536 characters instead? (The files would be so much larger -- from 15KB to 3.5MB!)

Potential incompatibilities with the DLL
The mod relies heavily on a custom-made DLL file, which patches the game's code in-memory. This has to be done "blindly." I can't just tell my DLL, "Hey, go find the font code and patch it." Instead, I have to find the font code and then tell the DLL, "The font code is at 0x00123456 and I need you to patch that."

So what happens if the font code is in a different place in a non-English version of Oblivion? What happens if I need to patch something else, and that's in a different place? Well, the game will probably crash when it encounters the code at the place my DLL patches... whenever that would be. Could crash on startup. Could run fine for a hundred hours and then crash.

Fortunately, that will only happen if a non-English version of Oblivion has changes to its source code that cause everything to move around.

Unfortunately, Bethesda was rushed for time when they made Oblivion, and they forgot to make all of the game's (non-debug-related) text easy to translate, so to translate it, they would've had to change the source code for each language. Things like the text for yielding in combat are hardcoded like that. So will the changes to that text be enough to move all the other code around? Well, I have no idea! I don't have other languages of the game to test with. So maybe the DLL works perfectly fine as-is, or maybe people can't use NorthernUI in non-English languages without crashing because Bethesda screwed up the yielding feature.

I can say this: if your version of Oblivion uses the exact same version of OBSE as the English version of the game, then you're probably fine. If you can download OBSE from the official site and run it without any new crashes, then you probably don't need to worry. If that's not the case, however, then your version of the game might be incompatible.

The situation gets worse for CJKV-language versions of the game, which will probably have major code changes to support multi-byte encoding. (English Oblivion and the NorthernUI DLL both use single-byte encoding.) I would be enormously surprised if those changes didn't knock absolutely everything out of place.

So what can be done, if the program code is incompatible with the DLL? Not much, unfortunately. NorthernUI is open source, but someone would still have to reverse-engineer the game for any given other language, find all the things I found, understand them as well as I did, and write patches for them. In other words, they'd have to do all the work I did almost from scratch. Bear in mind that I myself used OBSE's source code as a base -- I started already knowing about everything that the OBSE team found. If a language requires a different version of OBSE, then someone who speaks that language would need that version and its source code to even begin to attempt something like this.

Article information

Added on

Edited on

Written by

DavidJCobb

0 comments