There's a game called MOON. where you play a girl who... you know what, forget it. If you don't know what MOON. is, you probably never even found this website.
Anyway, if you wanted to translate that game into the English language (for the benefit of the proletariat) this is the place to be to do that.
ZIP archive here. You can go ahead and extract that into your MOON. directory, but for the love of god read the instructions first (further down on this website).
As a disclosure, the MOON. kit has NOT been heavily tested. It seems to work, somewhat, most of the time, but if you do weird things like giving the assembler bogus script files who knows what could happen? It isn't really idiot-proofed at all, for the most part, so be a little bit careful and make sure you keep backups.
Okay, there's about half a dozen different releases of MOON., some I know virtually nothing about. As I understand it, TACTICS originally released MOON.in 1997, then released it again in 1998 as MOON.RENEWAL after ONE came out. There was another CD version somewhere along the lines, too.
After that, the voiced MOON.DVD we know and love was released. To make it clear, these translation tools are intended solely for this version of MOON. since the original CD versions are rather hard to get a hold of nowadays anyway. After this, Nexton released MOON.CD which was another CD version of MOON., but this time on 3 CDs or so. It was still voiced. These translation tools should work with it as well, but they haven't been tested.
Later on, there was a MOON.DVDPG release. I have no idea what this contains or adds, but it's DVDPG so who cares? It's going to have an interface even worse than MOON.'s already terrible interface, due to DVD players not being able to do things like SAVE, and do you really want to play through ELPOD scenes on your livingroom TV?
Just to reiterate, The MOON. Kit is for the MOON.DVD release. If you want to translate the original CD releases, 1) Write your own tools, and 2) Get your head checked.
MOON. stores its game data in a file called, appropriately, moon. Pretty much every resource the game uses except for the two opening videos (which are in the 'snd' directory for some reason), the background music (in the ps0 archive) and the sound effects and voices (which are in the ps1 archive) is stored in this archive. Of course, with all the things I excluded, that only really leaves scripts and pictures, which is what that archive contains! It's of particular interest to translators, who want to change the scripts and images. The moon.lst file, just like the 'ps0.lst' and 'ps1.lst' files, provides an index into the archive, containing the location and filenames of everything in the archive. You don't really need to worry about that; just know that it is essential for accessing the stuff in the archive.
There are two different kinds of files in the moon archive, distinguished by their filename extensions.
These are pictures. They're basically specially-compressed Windows BMP images. MOON. has 555 of these. From a cursory glance, there seem to be a total of 77 that appear in-game and have Japanese text that potentially requires translation.
Naturally, they aren't much use in this form, so you need to convert them into BMP images first. A tool is provided in the MOON. kit for this purpose. Thankfully, you don't need to convert them back into TGFs afterwards (which is good, because I haven't provided a tool for that) because MOON. will happily accept the BMPs in place of TGFs.
These are MOON.'s scripts, which contain the vast majority of text in the game, as well as the stuff to drive the use of backgrounds, play the videos, show the sprites, play voices and sound effects etc. The entire game is essentially programmed with these scripts, from the menu to the CG display. MOON. contains 119 of these.
However, they aren't in a convenient text-based format, unlike the scripts for engines like nscr and krkr. As a result, they need to be disassembled, which I have already done for you - the resultant scripts are in the 'scripts' directory in the MOON. kit.
Among other things, these SNX files have an annoying file size limitation - of 64 kilobytes. The issue here is that a number of the scripts come very close to meeting this. As English is a naturally more expansive language than Japanese, it's pretty much inevitable that the English-translated SNX files will end up being larger.
I have, however, already solved this for you, because I've split up the six largest scripts (which is the reason I put the scripts in the ZIP file, rather than simply packing the disassembler.) None of the provided scripts will assemble to an SNX file greater than 36kb, which allows for plenty of room for expansion. If you're particularly wordy, though, it may be a good idea to have a look at your assembled SNX files to make sure they don't get too close.
Finally, the game executable. From a translation perspective, it basically contains a bunch of text boxes (like the prompt asking you if you're sure you want to quit, etc.) It also possesses some other characteristics that make it interesting (and sometimes annoying).
MOON.'s executable when you install the game is moon.exe. If you try, for example, renaming the exe, the game won't run. Why?
The answer is really very simple - the aforementioned moon and moon.lst files are found using the name of the game executable. For example, if you renamed moon.exe to bunnygirl.exe, the game will look for 'bunnygirl' and 'bunnygirl.lst' files. If those are present, the game will run just fine.
This is really quite convenient from a translation perspective, because it allows us to have two copies of MOON. - the original and the translation - in the same directory. The tools and instructions provided expect 'moon_eng.exe', so that's what you'll be calling it. In practice, it's probably good to have a backup MOON. directory anyway, because you'll find that the original has a nice habit of crashing on things like the save/load menu when provided with save files created by the translated MOON..
The replacement MOON. executable provided in the ZIP is called moon_eng.exe.
Without going into it, MOON. expects Japanese characters of a certain width and height, whereas we'd rather Latin characters that aren't so fat and allow us to fit more than 21 of on a line.
The spacing has been altered in the provided moon_eng.exe, the side effect of which is to make Japanese text all overlapped and nearly unreadable - but that's fine, because it's not going to be used for the viewing of Japanese text anyway.
First, it might be a good idea to make a copy of your MOON. install directory specifically for the purposes of translation. Call it 'moon_translation' or 'moon_english' or something.
Grab the ZIP archive linked at the top of this page and extract everything in it into the directory you're going to use for translation.
As mentioned before, MOON. expects the main archive file to have the same base name as the executable. As the executable for running the translation is 'moon_eng.exe', you'll need to have moon_eng and moon_eng.lst files otherwise MOON. will not run. Furthermore, these are the archives you'll be dealing with for translation purposes (replacing the images and scripts of).
To create your moon_eng and moon_eng.lst files, you simply need to copy the existing moon and moon.lst files. The provided copy_moon_archive.bat in the kit will do this for you - just run it. It's also useful for later when you want to refresh your moon_eng and moon_eng.lst after they've gotten a bit large; more on that later.
You can now run moon_eng.exe and the game should start up properly. Note that if you actually try to play the game, the Japanese text will be all overlapped and garbled, for reasons explained previously.
Inside the ZIP archive is a directory tgf, containing a file called placeholder.txt. You can navigate into that directory and delete the file now, if you want - it was only included to create the directory.
This directory is used for storing the extracted TGF images - or, more correctly, the converted BMP files.
To extract the BMPs from the moon archive, run moon_extractTGF.exe. This process will use up about 407mb of disk space.
For translating images, what you will probably want to do is create another directory just for translated images, and copy all the BMPs you need to translate into that. You can then edit them and copy them into the patch directory (explained later) when done. There is no need to change the filename.
The scripts directory contains, well, the game scripts, pre-disassembled and split for your convenience. The application moon_asm.exe will assemble every script in that directory, placing the results in the patch directory. Run it. More about the scripts will be explained later.
The application named moon_patch.exe essentially 'patches' the moon_eng/moon_eng.lst archive with the files inside the patch directory. Note that, as before, the patch directory contains a placeholder.txt file which can be deleted. Not deleting it (and patching the game) will result in the placeholder file being added to the game archive. Because it is never referenced, this won't even be noticable, so it doesn't really matter whether you remove it or not.
Actually, the word 'patch' is extremely appropriate for what this tool does - it appends the files inside the patch directory onto the end of the moon_eng archive and updates the references in moon_eng.lst. On one hand, this is an extremely quick operation. On the other, it results in your moon_eng file becoming bigger each time you patch it. To fix this, occasionally rerun the copy_moon_archive.bat batch file to copy from the original archive files again, then run the patcher.
The patch directory will, in the process of a translation, contain both the assembled SNX files and the edited BMP image files.
The disassembled .txt script files are in a very simple, vaguely assembler-inspired format, with one command per line. The scripts are in SHIFT-JIS format, and if you can't read them, it's probably because of your OS locale, text editor or something else.
# MOON SCRIPT FILE "DAY01.SNX" # # Comments are lines beginning with a # character X_00 000F 0001 SETSTATUS ' 1日目 ------' X_00 0014 0064
BACKGROUND 'BG001' X_24 00 X_25 06 TEXT トラックを降ろされたそこは、すでに建物の中だった。 TEXT どこまでも秘密主義。 TEXT それでもそれに対し不信感を抱く者など、ここには誰もいないのだ。 SPRITE 'CGHA01'
Comments are, as shown, lines that begin with a #. Feel free to add comments and blank lines - they won't affect the assembled output at all. Most of the stuff to be translated will be in the 'TEXT' lines - essentially, everything before after 'TEXT' and the space is the line.
Labels are lines that begin with a :, and are used for a couple of the instructions, wherein they begin with a .
If a line isn't blank, and isn't a comment or a label, it's a command. The first word on the line is the command name. Note that a large number of the commands are undocumented - they have no useful name. This is because I haven't really bothered giving all of them names. You generally don't need to know the names of the commands anyway, since you won't be touching the majority of them. Note that the aforementioned TEXT lines are in fact TEXT commands.
It would be a good idea to use the comments to store the original Japanese text, to use as a reference later on. You can also use it to keep notes and stuff. Basically, comment out the line you're about to translate, then type in the translated version of it, as shown:
X_00 000F 0001 #SETSTATUS ' 1日目 ------' SETSTATUS 'Day 1 -----' X_00 0014 0064
#TEXT トラックを降ろされたそこは、すでに建物の中だった。 TEXT After being unloaded from the truck, we were already in the building.
Translated text lines are automatically wordwrapped for you (and even split across multiple text blocks if necessary). However, you should take care that there are only ASCII characters in your translated lines - even one non-ASCII character will cause the wordwrapper to ignore that line.
If you want to add a linebreak, type \n. For example:
TEXT After being unloaded from the truck,\nwe were already in the building.
Note that a linebreak will only work for TEXT commands - it won't make sense in other places. If, for some reason, you want to use the \ character (which will appear like a yen sign in MOON. anyway), type \\.
SETSTATUS - This is a command that sets the 'status line' which mostly just appears when you save the game - it is used to provide a quick summary of current time and location. Be careful with translating these, and experiment. There's a fairly strict length limit enforced by the limited size of the save/load dialogue display area, and MOON. is also rather fussy about which characters are allowed and which will cause the game to crash on saving/loading. The / character seems to be one of the latter, as an example.
#SETSTATUS ' 2日目 午前 A棟' SETSTATUS 'Day 2, Morning, Building A'
SELECT - This command takes a variable (this is a flag number, but you don't need to worry about it) and a number of strings, corresponding to different options the player can select. These don't seem to have a length limit, but keep them under 40 characters or so, just so they don't cause graphical issues. Note that this, and other text commands other than the TEXT one use ' ' to mark the starts and ends of strings. If you want to use a ' in one of these, precede it with a \. (e.g. \')
#SELECT 0003 '本当に大丈夫?' '顔色悪いよ?' SELECT 0003 'Is she really all right?' 'Doesn\'t she look a bit pale?'
INIT.SNX - the script that is run first. Shows the videos, controls the title screen menu etc. and runs the first 'game' script, DAY01A.SNX (originally DAY01.SNX, but this is one of the scripts I split)
DAY01A.SNX through DAY202.SNX - basically, significant / main events that happen on the day in question. Some days have multiple scripts, but the filename usually make this obvious - for example, day 20 is split across DAY20A, DAY20B and DAY202.
MINMES.SNX - contains the events that happen in the usage of the MINMES machine. This script file contains multiple events, selected through a jump structure at the top.
EL1.SNX through EL8.SNX - similar to MINMES.SNX, contains the ELPOD scenes. The difference is that these scenes are divided up, one event per file.
OMAKE.SNX - contains code for the omake mode stuff, which includes the CG viewer and the BGM recollection
A_D*.SNX, B_D*.SNX, C_D*.SNX, B*.SNX, BOSS.SNX, EM14.SNX, JO_D16.SNX, PR_D16.SNX, UG_D*.SNX, UNGRO.SNX, WC_D*.SNX, X_D*.SNX - the MAPS. You hated them as a MOON. player; now it's time to hate them as a translator. There are 79 of these, all containing text to translate. With the plain 'moving around' interface stuff, it's fairly standard from map to map, I envisage anyone translating this using software that allows him or her to search+replace multiple files at a time. You'd still need to be quite careful, though, and there's always going to be exceptions. The maps are going to be a pain to translate no matter what. They also contain their own event text stuff, so it's not all interface.
DEAD1.SNX - contains the script for one of MOON.'s bad endings; the one you get if you're caught being somewhere you shouldn't be.
TEST.SNX, TITLE.SNX, PROLOGUE.SNX, TATIITI.SNX - testing code, stuff that was going to be used but wasn't etc.; all thoroughly uninteresting and irrelevant to a translator.
tool coding, exe modifications
reverse-engineering most of the instructions, writing the TGF decoding code