Site wide search powered by YaCy*

Exit: Literary Machines

I give you the future!

May 8th, 2015 by Holy at www.swordofmoonlight.net

Fuh, fuh, fuh, finally, I’ve done it, after all…

Gosh, I don’t know where to begin. Unh-uh, I started last year like in October, or sometime around that time, working on what I thought then would be a two month project or so; or that’s what I was psychically prepared for anyway. What I set out to do was to make a text editor for Sword of Moonlight with the immediate objective of providing a graphical interface way to translate/customize the in-game text that is basically built into the game-player. I knew it would be more than that, and to call it a text-editor, while factual, is not exactly accurate, since those two words are more or less inextricably bound to being a compound word that doesn’t quite capture what I had in mind for Sword of Moonlight; not then nor now. The general nuts and bolts of it haven’t really changed from the offset, still it’s been six months all told, and only then to be able to release the bare minimum functionality of a complete system, and only so that I can give it a rest, before I’ve had more of one thing than I can physically bear.

The “text-editor” itself it turns out IS none other than SOM_MAIN in the flesh. As the title suggests, this is the first tool you encounter when taking Sword of Moonlight out for a spin. Until now it hadn’t actually been a tool, but instead three buttons, with three simple functions, and a fourth for quitting Sword of Moonlight; or the Exit, which is where the name of this blog is taken from in fact. MAIN is actually short for Main Menu, which is a little bit of a play on King’s Field, because that’s what its in-game menu is called. But this new editor side of SOM_MAIN completely changes the meaning. The new SOM_MAIN is a labyrinthine tool rivaled only by SOM_MAP in its outgrowth of screens. It is completely independent of the other tools, it represents the text of the game and that is all, unencumbered by the game project files. This way the projects themselves are able to be language-neutral, and the text removed from the projects can be freely edited, translated, annotated, and organized independently of the projects’ structure.

SOM_MAIN’s buttons haven’t gone anywhere. Only the third one now opens the new text editor, and the old function is available as one of the editor’s save/export options. The editor can also be opened from any of the project editors via some new buttons that live near the text input boxes. The text in the project files act as links to the main text-or-translation file, not unlike URLs on the Internet. Ideally you set that text and never, ever change it, just like a hyperlink. Whereas the project text, the links, is limited to Japanese — or more precisely a Windows variant of Shift-JIS — and in terms of how much text there can be in any one place, in the new text editor text can run as long as it needs to, and is not in any particular language. Its text also contains records of who wrote the text, when it was created, its creator, when it was last edited, and much more, and whatever you can invent. In video games there are bits and pieces of text everywhere, call them items. SOM_MAIN keeps track of all of these things on an item by item basis, and as the-word-item-itself suggests, these items can be organized in the form of an outline, or multiple outlines pertaining to different matters — this is almost exactly like Windows Explorer.

This is the gist of it anyway. The editor has two panels, one for editing and the other to act as a reference, either of another file, or another part of the file you are working with. Once an item is established its text can be edited in real-time, so you can see your changes in a running game session. This will be more important when programming elements are added to the text, but also it’s helpful to see the in-game layouts, especially if you take advantage of the so-called “rich text” facilities which will be unlocked at some point, that includes things like italics.

It’s safe to say that most if not all games include some amount of text in some form. In this way the core of Sword of Moonlight is now the core of all games. You can imagine the project editors being assembled around this core functionality according to what makes sense on a project by project basis. This can include new tools that do new things and new versions of old tools or modified tools.

The new text editor’s native file format is a little-endian, UTF-8, gettext, MO file. This is the dominant open standard for software translation, except that normally portable text files are compiled into the MO files, to make things more palatable and frankly manageable this step is bypassed, while the portable text form is retained as an exchange format and used by copy/paste operations. The extra information is in the form of EXML, which is a SomEx flavor of XML which roughly translates to Embedded XML and is better geared towards video game text where instead of large documents you effectively have many, many micro documents scattered throughout the game worlds.

XML is a lot like HTML. The extra information records are unseen among the word processing elements of the editor. They are at the top of text that appears in the game, and should not be of any relevance to the game. The rich-text is not based on HTML, which is poorly suited for text formatting, but instead is based on a subset of Microsoft’s RTF technology — so expect WordPad like functionality. There is one last thing I want to say…

Translation is something that games have never approached in a very enlightened manner. The truth is there is nothing about this new addition to Sword of Moonlight that wouldn’t be invaluable to anyone making a video game or anything like it, whether with Sword of Moonlight or anything else. It’s probably superior to anything that exists for managing gettext-like translation jobs out there, and especially on Windows. The program itself checks in at around 11K lines of ultra-dense code. You don’t see this kind of an exceptional tool arise every day. The amount of code you need to integrate it into your game software is fairly minimal, everything here is open source, and installing Sword of Moonlight just to use its totally-free text-editor is a small price to pay.

Forum Discussion

Leave a response



Exit | Forum | Sitemap | Main Index | Ex | Top