PDA

View Full Version : NEXTON LCScriptEngine


Asceai
2008-02-06, 18:00
Does anyone have any documentation/tools re: the SNX scripts used in NEXTON's LCScriptEngine (used in games like Moon. DVD)? The archive format was simple enough to write an unpacker for (xor everything by $CC and the normal [offset][size][filename] pattern was obvious enough), but apart from the fact that each byte of the SNXs are xored by $AA, I know next to nothing about the format, and I figured it would save time in figuring it out if someone had already done so. (I'm looking at you, zalas =p)

Asceai
2008-02-06, 19:07
Oh, and, for reference, I only care about replacing text with English. I don't want to rescript MOON. =p

zalas
2008-02-06, 22:49
I have the format somewhat figured out, and it was enough to translate ONE. However, things like being able to change the player's name is a lot tougher to line wrap. I can give you the tools that I used, but I can't really offer any support since I'm too busy with other stuff.

Asceai
2008-02-07, 00:09
I have the format somewhat figured out, and it was enough to translate ONE. However, things like being able to change the player's name is a lot tougher to line wrap. I can give you the tools that I used, but I can't really offer any support since I'm too busy with other stuff.

If you could supply the tools, I would be grateful. MOON. doesn't have anything for choosing the player name (you are Ikumi no matter what) so that's not really much of an issue.

Unregistered
2008-02-07, 10:54
If you could supply the tools, I would be grateful. MOON. doesn't have anything for choosing the player name (you are Ikumi no matter what) so that's not really much of an issue.
Most version of VASTT seem broken unfortunatly though, can't really export back on the newest version, while the older version would have others evil buggs too :p
But it's usable anyway imo

Asceai
2008-02-07, 21:08
Most version of VASTT seem broken unfortunatly though, can't really export back on the newest version, while the older version would have others evil buggs too :p
But it's usable anyway imo

Well, VASTT uses python plugin modules for the different formats, so if nothing else it does document the format for me, which is more than enough.

Asceai
2008-02-08, 00:31
Well, shoot, VASTT can't read MOON.'s scripts. I'll see if the change in the formats between MOON. and ONE is small enough to hack VASTT into reading it anyway.

AstCd2
2008-02-08, 00:50
VASTT operates using a different plugin for each different file format (or variations on file formats between games from the same company). You don't need to hack the program to get it to work, just make a new plugin.

Asceai
2008-02-08, 01:12
Actually, I was going to just use VASTT's existing plugin as a base, just so I can construct an automated tool (there are 119 scripts, and unless I missed something, I would have to import and export them manually)

EDIT: Okay, so ONE's scripts aren't encoded with the XOR filter, that's something.
EDIT: Nah, ONE's format is _totally_ different. Crazy. Never would have expected this.
EDIT: Dunno what I was really so worried about, the bytecode format is actually rather simple. Providing I don't have to rescript much this should be easy.

Asceai
2008-02-08, 23:12
Well, after messing around with the archive format a bit (WHY does the order that the files appear matter? :<<<) and working on some tools, I can replace text... sorta.

http://img511.imageshack.us/img511/8347/moontl2ir4.jpg

I can fix the fact that the spaces between words don't work properly just by using a fullwidth space, I guess, but I've no idea how to fix the font spacing issue just now. Could someone who has found this issue with other games and resolved it post? I'm new to this =p

EDIT: I know a few pieces of the bytecode, now; enough to create new textboxes as needed, at least. Still no clue about the letter spacing. For now I'll use fullwidths.

Unregistered
2008-02-09, 09:25
May I inquire as to whether you will be translating the game, Moon?

Rasqual Twilight
2008-02-09, 12:28
Try to detect the place in the exe where the font is created (with the CreateFont or CreateFontIndirect Win32 API call) then try to use a proportional font instead, e.g. Arial.

The structure used in CreateFontIndirect is:

typedef struct tagLOGFONT {
LONG lfHeight;
LONG lfWidth;
LONG lfEscapement;
LONG lfOrientation;
LONG lfWeight;
BYTE lfItalic;
BYTE lfUnderline;
BYTE lfStrikeOut;
BYTE lfCharSet;
BYTE lfOutPrecision;
BYTE lfClipPrecision;
BYTE lfQuality;
BYTE lfPitchAndFamily;
TCHAR lfFaceName[LF_FACESIZE];
} LOGFONT, *PLOGFONT;


Likewise, the CreateFont signature is:
HFONT CreateFont(
int nHeight, // height of font
int nWidth, // average character width
int nEscapement, // angle of escapement
int nOrientation, // base-line orientation angle
int fnWeight, // font weight
DWORD fdwItalic, // italic attribute option
DWORD fdwUnderline, // underline attribute option
DWORD fdwStrikeOut, // strikeout attribute option
DWORD fdwCharSet, // character set identifier
DWORD fdwOutputPrecision, // output precision
DWORD fdwClipPrecision, // clipping precision
DWORD fdwQuality, // output quality
DWORD fdwPitchAndFamily, // pitch and family
LPCTSTR lpszFace // typeface name
);

* lfCharSet should be set to ANSI_CHARSET (0) instead of SHIFTJIS_CHARSET (128, or 0x80)
* lfPitchAndFamily should have bit VARIABLE_PITCH (2) flagged instead of FIXED_PITCH (1)
e.g. if the value is 0x65 (0x64 | 0x01), change it to 0x66 (0x64 | 0x02)

Nevertheless, be prepared to obtain non-optimal results, as generally Japanese games tend to assume characters fit on a grid (hence the monospace thingie, some VNs draw text character by character and place them, instead of drawing the string on a bitmap and blit it onto the main surface).
At worse, you'll have to write the text layout routines (word-wrapping, etc.) by yourself, as Haeleth did with rlBabel, for RealLive, IIRC.



EDIT: Link to past thread where I raised the issue.

Asceai
2008-02-16, 22:34
Well, I've hit a bit of a brick wall for the time being. The issue is with jumps in the script, and more importantly, identifying them. Because I don't know 95&#37; of the bytecode, including any jump commands other than the pure $10 ## ## jump, I've no idea how I'm going to record all those for offsetting later, other than fully documenting the bytecode, which is rather detailed and I don't really want to do it.

In addition, although I've found at least one of the jump tables used when interpreting the script, from there it's still difficult to work out what each command does. But if anything's going to happen with a MOON. translation, it's definitely going to require documenting at least some of the bytecode, so there's no real way around it. I want a MOON. translation so I'm not going to give up just yet =p

Unregistered
2008-02-23, 15:55
This isn't related to the engine, just me sucking up Asceai for being such a sexy god.

Asceai, I fucking love you right now. I bought MOON. like two months ago on a whim, was about to start playing it now (with Atlas and Wakan.. not enough moonspeak to play MOON. yeah, there, I said it.) like an hour ago, decided to check this forum for no particular reason, saw this thread.

I seriously love you right now. A hope for a translation (project) is better than no hope whatsoever. Kind of a letdown to stack MOON. back in a shelve for months and months to come, though.
Oh well, FARGO can wait. Now, gotta start refreshing this every five minutes.

Chiyuri
2008-02-23, 18:49
If the translation is going to happen, I sure want to have it.. I got the game like a week ago after trying for months to get it but I even did my best to find a way to make it work on my computer. But now that it finnaly work, I come upon the problem that I can't pull out the text from the game while playing and so can't translate any..

a translation sure would help me..

It's one of these rare game where I can play a character nearer to myself. (Most game these days have a male characters as the main one.. As a girl, I don't like playing as a man much) so such a rare game is very tempting into playing.)

Asceai
2008-02-24, 01:32
Yes, actually, I found when trying to pull text to do string matching that the game text can't be hooked. You can sort of pull it out with a memory editor, but things like AGTH probably won't work.

What I'll probably do, if this goes anywhere, is translate a lot of the smaller bits of text myself and dump the longer scenes on TLWiki or something for other people. I don't really have the time to translate a full game by myself, unfortunately.

Currently the main thing I need is about 30 or so hours of consecutive uninterrupted time to use a debugger and go through the entire interpreting engine, documenting every function. Then determine the ones that require absolute address points, add labels to the disassembler and make the disassembled commands point to those labels. =p

Next to that, sane text spacing is low priority; I'd be happy to just release a translation with fullwidth text if I have to =p

Chiyuri
2008-02-24, 04:46
I'll be waiting then.

Chiyuri
2008-02-24, 09:39
oh, even if I have some knowledge in computer and such.. about half of what you said was rather hard to understand, well actually not understandble at all.. go easy with your words on me please, they are confusing..

Asceai
2008-02-24, 21:30
I'm sorry, I may have worded it poorly. If you tell me what parts were difficult to understand I can explain them in more detail.

Unregistered
2008-02-25, 14:53
Man, it's really awkward how the text strings are set up in this engine.
I tried AGTHing it after Asceai's comment, but the thing would only grab the kanji, and it'd make copies of each at minimum of two times.
Well, seeing how the 'real' way to use AGTH is to easily get the kanji you don't know about, MOON. makes it easier. I guess. It also makes everything look like straight out of a Chinese textbook, one with a bad printer that repeated every single other character.

Also, Asceai, you Superhero King you. I'd marry you.

Chiyuri
2008-02-26, 15:03
I think it's just that there are too many technical terms and so they lost me.

Serke
2008-04-03, 08:55
I've made an unpacker for TGF files (TGF -> BMP). As for disassembling the scripting engine... Well, it won't be easy (to put it mildly). For some reason Nexton guys chose Borland C++ Builder for compiling their code (ONE executable was produced by Microsoft C/C++ compiler and it doesn't even use MFC) so you'll need to be prepared for horrible suffering.

too lazy to log in
2008-04-08, 17:18
Regarding the jumps...

$10 is a simple unconditional jump, just like Asceai said

$19 is some kind of 'intermodular' call (it 'calls' another SNX)
$1A is an 'intermodular' ret from 'intermodular' call

$11 \
$1B |- some kind of conditional jumps, I guess
$1C /

the_lazy_guy
2008-04-19, 11:42
This is a complete list of all commands used by the game. The engine supports more commands, but they are not used by the game. The commands are very conveniently divided by MOON. engine programmers into two groups: 'low level' commands 0x00-0x14, 0x18-0x1C and 0x1F (some of these commands deal with changing control flow: jumps, 'intermodular' calls and stuff like that) and 'high level' commands. The games uses two kinds of jumps: $10 (unconditional) and $11 (conditional)

$00 (5 bytes) [$00 $XXXX $YYYY]
$01 (5 bytes) [$01 $XXXX $YYYY]
$04 (5 bytes) [$04 $XXXX $YYYY]
$08 (5 bytes) [$08 $XXXX $YYYY]
$09 (5 bytes) [$09 $XXXX $YYYY]
$0C (5 bytes) [$0C $XXXX $YYYY]
$10 (3 bytes) [$10 $XXXX] ; Unconditional jump to address $XXXX
$11 (var.len) [tricky, I'll try to explain it later] ; Conditional jump to address $ZZZZ
$15 (var.len) [$15 stringz] ; This command puts text on the screen.
; The string contains text in Shift-JIS with some control codes mixed in it (I guess)
$16 (1 bytes) [$16]
$17 (var.len) [$17 $XXXX stringz1, stringz2, ... stringzN $00] ; Display choice options (stringz1, stringz2, ...)
; and wait for user choice
$18 (var.len) [$18 stringz] ; stringz is a script file name w/o the SNX extension (ex: 'DAY02')
; I guess this is a some kind of 'intermodular jump' command
$19 (var.len) [$19 stringz] ; 'Intermodular call' command? stringz is a script file name without extension
$1A (1 bytes) [$1A] ; 'Return from intermodular call' command?
$20 (var.len) [$20 stringz] ; stringz is a TGF file name w/o extension (ex: 'BO')
$21 (var.len) [$21 stringz] ; stringz is a TGF file name w/o extension (ex: 'CGHA01')
$24 (2 bytes) [$24 $XX]
$25 (2 bytes) [$25 $XX] ; Image 'fade in' effect?
$28 (3 bytes) [$28 $XXXX]
$2B (var.len) [$2B $XX stringz $YY] ; stringz is a WAV file name w/o extension (ex: 'mon_cd02')
$2C (2 bytes) [$2C $XX]
$2D (var.len) [$2D stringz $XX] ; stringz is a TGF file name w/o extension (ex: icondef)
$2E (var.len) [$2E $XX stringz1 stringz2 stringz3 n*($00_or_this: {$XXXX $XXXX $XXXX $XXXX $YY})]
; '$00_or_this' means that there would be either $00 indicating the command's end or that sequence
; in braces. stringz1, stringz2 and stringz3 are TGF file names w/o extensions
; (ex: t01, t02, t03)
$2F (var.len) [$2F stringz $MMMM $NNNN $PPPP $QQQQ $RRRR $SSSS] ; stringz is a TGF file name
; w/o extension (ex: 'mes')
$30 (2 bytes) [$30 $XX]
$31 (2 bytes) [$31 $XX]
$32 (2 bytes) [$32 $XX]
$33 (2 bytes) [$33 $XX]
$34 (2 bytes) [$34 $XX]
$36 (3 bytes) [$36 $XXXX]
$37 (7 bytes) [$37 $XX $XX $XX $XX $XX $XX]
$38 (7 bytes) [$38 $XX $XX $XX $XX $XX $XX]
$39 (2 bytes) [$39 $XX]
$3A (9 bytes) [$3A $XXXX $XXXX $XXXX $XXXX]
$3B (3 bytes) [$3B $XX $XX]
$3C (3 bytes) [$3C $XX $XX]
$3D (var.len) [$3D $XX stringz] ; stringz is a TGF file name w/o extension (ex: 'FG009')
$3E (var.len) [$3E $XX $XX stringz] ; stringz is a TGF file name w/o extension and
; with CG_/CM_ prefix omitted (ex: 'timeplate')
$3F (3 bytes) [$3F $XX $XX]
$40 (var.len) [$40 stringz] ; stringz is... well, see the example: '10日目 午後 A棟'
$41 (3 bytes) [$41 $XXXX]
$42 (17 bytes) [$42 $XXXX $XXXX $XXXX $XXXX $XXXX $XXXX $XXXX $XXXX]
$45 (1 bytes) [$45]
$46 (1 bytes) [$46]
$4D (9 bytes) [$4D $XXXX $XXXX $XXXX $XXXX]
$4E (var.len) [$4E stringz $XX] ; Play AVI? stringz is AVI file name w/o extension (ex: 'op')
$4F (1 bytes) ; Most probably 'Stop AVI' command
$50 (var.len) [$50 stringz] ; stringz is a TGF file name w/o extension and
; with CG_/CM_ prefix omitted (ex: 'maru')
$51 (2 bytes) [$51 $XX]
$52 (5 bytes) [$52 $XXXX $XXXX]
$56 (6 bytes) [$56 $XX $XXXX $XXXX]
$57 (1 bytes) [$57]
$FF (1 bytes) [$FF]

This may be not much, but it's better than nothing. >_<

Asceai
2008-04-19, 16:26
You, sir, are an utterly wonderful person. Thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you THANK YOU for stopping me from having to go through it with the debugger after all. I'd been putting it off =p

EDIT: Hang on, some of these are different to what I've documented. I guess I may have slipped up..

Serke
2008-04-20, 03:39
No need to thank me (ok, I confess, it was me) since I'm as much interested in seeing the game translated as you do (actually, even more since my knowledge of Japanese is much, much more limited). =)

Hang on, some of these are different to what I've documented. I guess I may have slipped up..Do you mind specifying what exactly is different so that I can double-check it in disassembler and debugger?

...
I thought that it might be a good idea to code simple 'bytecode walker' which goes through every command of bytecode (knowing the length of each command or how to calculate it, that would be easy to code) and writes everything in a log file. Analyzing the log we can find all potential jump commands (I believe there aren't any besides aforementioned $10 and $11, but just to be absolutely sure). For example, let's say we have something looking like this written in our log:

$0000: $18 (7) [$18 'DAY02']

$0200: $00 (5) [$00 $3411 $212A]

$XXXX: $YY (Z) [$YY $0200…]

^^^
Second operand of command $YY at address $XXXX is a word $0200, which coincides with address of command $00, so the command $YY potentially changes normal control flow. There are possibly (the possibility is very low, but we can't just rule it out) jump commands which use relative addressing and with a few more lines of code our 'walker' will be able to spot them too.

Serke
2008-05-20, 09:35
http://img372.imageshack.us/img372/6188/shortglimpsemo4.png

Asceai
2008-05-20, 12:20
Is the text in the script fullwidth or halfwidth? Not that it really matters, since I expected having to go with fullwidth from the start (halfwidth characters being sometimes used for mid-script commands) and thus made the assembler automatically take care of that.

Serke
2008-05-20, 15:57
The characters in the script are within ASCII character set range, if I understood your question correctly.

http://img261.imageshack.us/img261/917/day1hiewex5.png

Asceai
2008-05-20, 18:17
Oh, okay. Well, that's more convenient anyway. Nice work.

Taigyth
2008-09-05, 23:23
Does anyone know where I can get VASTT?

Asceai
2008-09-06, 00:32
#denpa @ irc.synirc.org, type !gamehack

Taigyth
2008-09-06, 17:13
Thank you very much!

Serke
2008-09-17, 12:36
Just came across this (http://www.densetsu.com/display.php?id=288&style=alphabetical) review. Sorry for using the thread like this. =)

Asceai
2008-09-17, 14:13
"Music - ??/10 Sorry. I will try to give a rating of the music if I ever get a chance to find the music file. Like before, there's no sound included with the ripped version."

:(

"excellent H-scenes"

:(

"Although Moon is considered to be an adventure game, you will need to walk around the camp and talk to different people. Unlike those normal adventure games where you just click through texts and choose texts, Moon can let you have some freedom of control. The game features multi-ending. You will make several key-decision making during the game that will effect your ending. Among the decisions, making decision in ELPOD will be an important key in getting a good ending. Overall, the game is very good to play."

:(

Unregistered
2008-09-17, 23:15
Well why would you even bother to read reviews coming from idiots? Really you just need to read one review to understand all you'll do is go 'omg what the hell is wrong with these guys?' everytime you read another...

Chiyuri
2008-09-18, 18:31
Wow, it's been a while since last time i came here.

I read (well actually more like skiped half of it) all of the pages and I didn,t remember anywhere if you were planing to make a translation patch for other people once you are done.

I tried playing the game even since I got it but been forced to copy and paste into a translation tool the text each time really take the fun out of the game. Maybe some feedback on how much you did so far would be nice too, help bring up the hope meter in people.

Asceai
2008-09-19, 00:36
If I'm bored I'll come back to the haxxing side of things, if it hasn't all been worked out by then.

I dunno if I really want to TRANSLATE this though. To be honest, although it's nice and relatively short, the text is pretty disgusting in parts. I, for one, would definitely rather not translate anything in the 'ELPOD' script file, for example =p
Playing the game, I could just skip anything unpleasant. That is not a recourse available to a translator.

Chiyuri
2008-09-19, 03:01
oh well.. guess I'll have to find another alternative.. if I knew how to change the script I might do it myself but my tool for translation are horrible.

Serke
2008-09-19, 07:15
If I'm bored I'll come back to the haxxing side of things, if it hasn't all been worked out by then.
I had to take a break to work on my university graduation project and when I was finally able to continue working on MOON., I found out that I can't decipher most of the notes I made while working on it (you probably know what I'm talking about - these nasty quick notes on scraps of paper). It's not such a big problem, but I figured you're not interested in translating the game anymore, so I just lost my incentive to continue my work.

Unregistered
2008-09-20, 00:25
Just trying bothering zalas/TentacleCat though don't get your hope too high though...

Ixrec
2009-03-30, 18:33
*bump*

I would absolutely love to get to translate MOON. (yes, including the ELPOD scenes), so if anyone still wants to try and hack it, I will most willingly beg you to do so.

Asceai
2009-03-30, 20:25
You want to translate it? Hmm.. okay, okay,

Note that I made comments about the ELPOD scenes back when I was far weaker. Half a dozen black cyc games later and I'd probably be able to handle them myself (but, of course, I'd much rather someone else translate).

Anyway, I think Serke is still around - Serke, what was involved in getting the text renderer to jump forward the right number of pixels after each char? Was it a hardcoded value in the EXE?

Wordwrapping probably isn't necessary - easy enough to have the assembler take care of that.

If you've still got that hacked copy of moon it would be nice to have a copy of it. When I get a bit of time I'll go and look at the assembler/disassembler stuff again. I've still got the crap I wrote for it around somewhere =p

Serke
2009-03-30, 21:14
Anyway, I think Serke is still around - Serke, what was involved in getting the text renderer to jump forward the right number of pixels after each char? Was it a hardcoded value in the EXE?

If you've still got that hacked copy of moon it would be nice to have a copy of it. When I get a bit of time I'll go back and look myself =p
Well... I have about a dozen versions of hacked MOON. executable gathering dust on my hard drive, I guess figuring out which one is which would hardly be any easier than performing the trick again. =) Unfortunately, I wiped the game from my HDD when I needed to free some disk space, so running them all one by one isn't an option either... I'll see what I can do though. I still have IDA database lying somewhere after all.

Asceai, the main problem with MOON., as you probably remember, is the size limitation the engine imposes on a script file. Since the translated text will take more space than the original, untranslated one, some of the scripts must be split in two and I wouldn't advise doing something like this until the engine is pretty thoroughly reverse-engineered (there might be some kind of variables local to the script or other nasty things like that which must be taken into account before splitting). I'm working on another project ATM, so I can't offer any help until I'm done with it, sorry.

Ixrec
2009-04-01, 20:33
Any progress on the hack? I just finished a rough draft of the first day's translation so I felt like comparing progress.

Also, even if you can't get me free reign over the scripting yet, is there any chance you could explain how to get English text in there? I already dled VASTT, though it doesn't like any of the files as is (so I guess I need a custom plugin?).

Asceai
2009-04-01, 21:16
VASTT has support for the 'LcScriptEngine' - however, the LcScriptEngine used by ONE (which VASTT supports) is _quite different_ to the one used by MOON.

Getting English text in there unfortunately is the entire issue here - there simply isn't room in the scripts for it. I'll give it a bit of a look when I next get a packet of free time and see if I can work out how trivial splitting some of the 'bigger' scripts up can be - my disassembler/assembler had issues, IIRC, but I think they were probably just oversights that I didn't get around to fixing because I lost interest in the project for a time. I'll get back to that and see what I can do.

Serke, I seem to recall that you also managed to work out the image format? If you've still got the notes on that, that would be nice.

Serke
2009-04-01, 22:59
int ExtractBMPFromTGF(BYTE *pTGFFileImage, DWORD TGFFileLen, BYTE **OutBuf)
{
int i,j,k;
BYTE c;
size_t NumOfBytesToCopy;
int UnpackedDataLen;
size_t BlockLen;
BYTE *tOutBuf = NULL;
BYTE *InBuf = ( pTGFFileImage + 8 );

UnpackedDataLen = *(DWORD *)pTGFFileImage; // Length of unpacked BMP file
if( !(tOutBuf = (BYTE *)malloc( UnpackedDataLen )) )
{
*OutBuf = NULL;
return 0;
}

BlockLen = *(DWORD *)( pTGFFileImage + 4 );
i = 0;
k = 0;

while ( i < TGFFileLen - 8 )
{
c = InBuf[ i ];
if ( c < 1 )
{
++i;
NumOfBytesToCopy = InBuf[ i ];
++i;
memcpy( &tOutBuf[ k ], &InBuf[ i ], NumOfBytesToCopy );
i += NumOfBytesToCopy;
}
else
{
if ( c != 1 )
{
++i;
for ( j = 0; j < c; ++j )
{
memcpy( &tOutBuf[ k ], &InBuf[ i ], BlockLen );
k += BlockLen;
}
i += BlockLen;
}
else
{
++i;
c = InBuf[ i ];
++i;
for ( j = 0; j < c; ++j )
{
memcpy( &tOutBuf[ k ], &InBuf[ i ], BlockLen );
i += BlockLen;
k += BlockLen;
}
}
}
}

*OutBuf = tOutBuf;
return UnpackedDataLen;
}

Asceai
2009-04-03, 00:03
Aha, now I remember what I was up to! Debugging through that @#*(&#$*( instruction $11!

I think that it's some sort of reverse polish notation evaluation system or something... not sure though. As far as I can tell, a tag of 15 means 'this stuff is a number; just use it like it is', a tag of 16 means 'this is one of those variables used by things like $17 so read it out of a table first', the values get shoved into a stack and seem to get popped off by stuff like tag 2.

Anyway, it appears that tags 12-17 can be counted on to ADD stuff to the stack, while tags 2 to 11 perform operations on stuff in the stack..

EDIT: Okay, for now, assuming that tags $12-$17 mean 'the next two bytes are associated with this tag', tags $2-$11 mean 'do something' and a tag of $0 means 'get me out of here' the inputs seem to be generally valid. I'll put a little bit more time into verifying this, but for now I'm confident that I at least know the instruction length - shouldn't need to do anything much with $11 anyway for translation.

EDIT 2: Okay, with regard to $15 (text) commands, I'm not sure what the effect, if any, of not having the ascii character 5 on the end is, and how important it is, but a total of 6 lines in the entire game are missing this character. (including a line in TEST.SNX which is also missing the normal 01,02 sequence at the start). Currently I'm just 'marking' these lines with '^' just in case the information is important. Here are all the lines, for reference:
TEXT "郁未「あっ…!」^"
TEXT "郁未「えっ…!」^"
TEXT " 「窓もなにもなかったこの部屋でね…」^"
TEXT "さようなら、おかあさん。^"
TEXT "おかあさん…?^"
TEXT "「窓もなにもなかったこの部屋でね…」^"

EDIT 3: As the main point of the exercise was to determine whether the scripts could be split or not, I've decided to target six scripts for splitting - DAY08, DAY07T, DAY01, DAY20, DAY02, DAY03. The next largest script after these, MINMES, contains.. as you can guess, the MINMES events. (which means it is called from all over the place*!!) At the moment I would rather not split this. It is currently 36,817 bytes (36kb) allowing for approx. 178% expansion, which should hopefully be enough (since we'll be using halfwidth chars for the English anyway). These six scripts are all linear, and should be able to be split in half with no issues. I'll just call them the existing script name with a B on the end or something - shouldn't need to update any references to do that.

*Basically, while MOON. lacks jumping to an address in another script (thank GOD), what MINMES.SNX does is it has a heap of $10 and $11-style jumps to jump to the appropriate part based on a variable which is set before a script GOSUBs to MINMES.SNX. This means it would be possible to split MINMES.SNX if needed - replace a number of the jumps in MINMES.SNX with GOTO_SCRIPT 'MINMESB', and copy that part of the jump table (and all of the associated text) into it. Thankfully, that probably won't be needed =p.

Asceai
2009-04-03, 04:03
On another note, I was looking into getting files (like replacement scripts, backgrounds etc.) to load from within MOON. without needing to be in the main 'moon'/'moon.lst' data files. (so that a patch could be made by just providing some replacement files rather than having to unpack and repack the data file)

While MOON. seems to support this (with a 'grp' directory), I couldn't find a way to enable it for just a number of files (it seems as though you have to have ALL of the files external, or ALL in the data file, but you can't have both). So this may not be possible after all :|

I'll try to come up with a fast tool to patch and replace files in moon/moon.lst without unpacking+repacking. This may be difficult because IIRC MOON. actually cares how the files are ordered in the archive, but we'll see. Might be able to get some sort of workaround going.

On the plus side, when looking though the resource reading routines, I _did_ learn that the engine supports .BMP files directly (they still have to be part of the archive) so I probably won't even bother building something to re-encode the files to TGF. The downside, however, is that the TGF files take precedence* =P Oh well. This doesn't especially matter anyway.

*in other words, if you have a BMP and a TGF file with the same name in the archive, the TGF file will be used.

UPDATE: I went ahead and wrote the patcher - works fine, and I can replace any files extremely quickly. I don't even need to reorder anything anyway. The patcher can not, however, add new files that don't already exist to the archive (which is necessary for splitting the scripts, and far from trivial to do cleanly). I'll try and come up with a workaround.

UPDATE 2: Actually, it might be trivial after all. Never mind =P

UPDATE 3: When experimenting with patching scripts, I found something really, really odd - it seems that scripts that appear after the images in the archive are not xored with 0xAA. I wonder why that is...

UPDATE 4: The patcher can now add files, both scripts and images, to the game and they work fine. I changed some of the gotos around to call the newly-named scripts, and added stuff to replace backgrounds etc. and they worked fine. Good news, I guess.

The patcher just appends the new stuff to the 'moon' archive each time, which means that although it'll work fine if you just keep patching the archive over and over with updated files, it'll continue to grow in size each time, so it would be good to copy a backup of the original archives over each time.

A translation patch will probably just provide this patcher and patch the user's moon/moon.lst with the translated files.

ASIDE: Naturally, this means that the interface graphics can now be replaced!

http://img12.imageshack.us/img12/4494/moontl4.jpg

And no, that is not going to be in the final translation patch =p Hell, I'm not even going to be editing images for this. Or doing any translation.

That's basically 'done', so I'm going back to the assembler/disassembler to do some srs coding. Then I'll try splitting the scripts.

Asceai
2009-04-03, 10:48
Assembler/disassembler done + working fine. Scripts can also be split up just fine, so the script size issue is gone.

I still need to replicate Serke's halfwidth hack for MOON. somehow >_> because fullwidth looks awful.

Ixrec
2009-04-03, 16:44
Wow...

Ok now I really need to get moving with the tl. Hopefully I'll have day 2 finished tonight. Past that...I don't know when exactly there start to be different versions of scenes depending on past (ie, days ago) choices so things might get a tad dubious.

On that note, setting English text aside, is there I way I could just go into the scripts and see what's there? So I can figure out what routes I missed?

Asceai
2009-04-03, 17:08
The scripts are just there, sure, but they're also behind a couple of layers, and of course ASSEMBLED which means they're going to be a big mess no matter what you look at them in. I'll upload day01 and day02 (shift-jis format) for you. This won't include MINMES etc.

Oh, and needless to say, you're probably going to end up doing a bit of copy-pasting when the tools are done =p (since you'll need to edit the scripts before reassembling them). Of course, that doesn't mean to start copy-pasting the stuff you have into these two scripts, because those scripts need to be split first! (while I have split them, I'm still not going to rule out issues with the splitting until I've replayed the whole damn thing with them)

http://www.asceai.net/du/u/day01.txt
http://www.asceai.net/du/u/day02.txt

UPDATE:

Oh, and with respect to the two opening videos, I don't know of any way they can be softsubbed. However, they can simply be replaced with subtitled versions. I'm not sure exactly what they use, but it doesn't appear to be the standard directshow filter system since stuff like vsfilter is being ignored entirely. That said, the original quality was never that great so you could replace them with fairly small xvid versions. (I originally thought they would only work with Microsoft Video 1 but it seems that was a flawed assumption on my part).

http://img16.imageshack.us/img16/3721/moontl6.jpg
Ignore the crappy quality, the mispositioned subtitle and everything else. I know nothing about subtitles or encoding and won't be doing this for the project either. Something to note, however, is that MOON.'s output here is substantially worse than the same video played in any other player. I assume it does far less of the nice filtering stuff that modern players do. This is therefore going to be quite annoying as far as finding a nice quality/size balance

Ixrec
2009-04-03, 17:58
Okay, I'll wait for your go-ahead on that process.

Still, these scripts convince me that I'm on the right track with my translations, as there are virtually no discrepancies (though I did notice one retroactive decision I hadn't caught before; I'm sure there are a few more). Thanks for uploading them.

I would eventually like all of the scripts, if possible, since only then would I be able to tell if and/or why I missed entire routes and endings. But for now I'll just tl whatever I can find easily.
*gets back to work*

UPDATE

I was thinking about that too. At some point I'll go locate a subtitling program and see if I can get my tls into an avi or xvid.

Asceai
2009-04-03, 18:39
I would eventually like all of the scripts, if possible, since only then would I be able to tell if and/or why I missed entire routes and endings.

Well, yes, you'll definitely get them, depending on how quickly I get this stuff done. After all, you'll need them for inserting your translations anyway.

Ixrec
2009-04-03, 19:25
Wonderful. I look forward to it.

Asceai
2009-04-03, 20:02
http://img12.imageshack.us/img12/3269/moontl7.jpg

Still a bit hackish, in particular using fullwidth spaces (even though they look halfwidth =p), but I think I might just go with that for now.

Ixrec
2009-04-03, 20:35
I honestly cannot tell the difference between that and a finished product. But then I never play VNs with English patches.

Oh yeah, what's the メザロア in your sig?

Asceai
2009-04-03, 21:10
Oh yeah, what's the メザロア in your sig?

She's a character from an unreleased doujin eroge called 'Eden'. My avatar, for reference.

I honestly cannot tell the difference between that and a finished product. But then I never play VNs with English patches.
This might end up being finished product, because I don't feel like finding out why spaces are being skipped over. I basically just need to add word wrapping to the assembler, check that I can replace all programmatic text in the game, and I'll tidy this stuff up into a translation toolkit.

UPDATE: I went and translated the only MessageBox in the game that appears during normal play (the "終了します。よろしいですか?" one). Seemed it would be silly to go to the trouble of providing a translation system for a single message box, and since the exe needed to be edited ANYWAY...

UPDATE 2: Oh, and I also went and disabled a 'feature' of the game engine where the cursor would move to the options whenever a selection/branch point came up. This is because it's extremely annoying and makes a large portion of the game far more tedious than it should be (namely, the map exploration side). I only disabled it for in-game choices, though, not other menus and stuff (where it is actually sort of useful).

UPDATE 3: Word wrapping implemented. Automatic textbox splitting not yet implemented.

UPDATE 4: Automatic textbox splitting is implemented. I guess this means it's technically.. done? I'll play around a bit more and see if there's any real problems with my stuff before I pack it up all nice.

UPDATE 5: Found a second message box that appears in normal play, the one that asks if you want to start the game in full screen mode or not. Additionally, there's a couple of weird problems involving choices and line wrapping - trying to work out what could be causing it.

UPDATE 6: Well, shit. It appears choices are limited to 19 characters each. This is pretty limiting. I'll see what I can do about changing this.

UPDATE 7: It's harder to change than expected, hmm. This may take some more time.

UPDATE 8: Think I've finally got it. Game is programmed in the most fucking cryptic way at times, not to mention using an utterly madcap compiler.

UPDATE 9: Yep, got it. I didn't disable the length check, just the extra linebreak rubbish, which essentially turned out to be almost equivalent.

http://img21.imageshack.us/img21/4781/moontl9.jpg

So I guess now it's pretty much done...

Oh, for reference, all that map stuff is HARDCODED. I recommend creative (but careful) search+replace, preferably using a tool that lets you operate on multiple files at a time, because there's something like SEVENTY map scripts.

Asceai
2009-04-04, 10:14
おまたせ!
http://asceai.net/moonkit/

Ixrec
2009-04-04, 11:35
AWESOME

I think I'll start with the map scripts as soon as I can figure out how to use this stuff, simply because they look the most complex and I'd like to get them out of the way. Also I dunno about you but I quite liked the map segments when playing the game. Especially since there seem to be a number of implied decision points based on where exactly you go in it.

*edit*

Okay...this is probably an error on my system but when I try to use moon_eng.exe it can't display the main menu. The Quit button will appear when I mouseover it, but the rest of the screen remains black.

Since I got a similar error when I first tried to install moon, I assume I simply used your zip incorrectly. Any chance I had to use your batch file to copy+paste everything instead of just copy+pasting it manually?

*edit2*

Not sure why I didn't notice before, but there's an A_D2 and an A_D4, but no A_D3. So as I've been tling A_D2 (for testing, I'll get the rest en masse later), I see dialgoue I know is from day 2, and other dialogue that has to be from day 3. But the only setstatus commands I see are for day 3. I get that it might've just merged the two days, but then there ought to be day 2 setstatus's as well. Did I miss something?

*edit3*

Never mind, turns out the rest of day 2 are in MAP_A. It makes sense now that I notice that file contains all the default, unchanging phrases.

*edit4*

Back to the black screen issue, since that's really the only obstacle left at this point. I've confirmed that despite the invisible menu, I can click on "begin game," and after more blind clicking I eventually hear the voices from the first scene. So its clearly a very minor and precise issue, but again, I have absolutely no idea what could be causing it.

*edit5*

Irrelevant, but, what's Slype in your screenshot?

GatoNegro
2009-04-04, 14:01
Wow Asceai, i just checked the your hp of the MOON kit and it's awesome, the game was in my to get list, but if it get's a translation i will urgently go and get it! but just how long is the game? i mean how much days are in the game...

Ixrec
2009-04-04, 15:49
20 days. Took me about...two weeks (?) I think to play it once. So it's around the same length as Chaos;Head.

Asceai
2009-04-04, 15:54
Since I got a similar error when I first tried to install moon, I assume I simply used your zip incorrectly.

Could you elaborate on this? What was the error and how did you fix it?

Any chance I had to use your batch file to copy+paste everything instead of just copy+pasting it manually?

Shouldn't do - it should either run or not run at all. I have no idea what could be causing this. Can I confirm exactly which version of MOON. you have (DVD, CD Final etc.)?

Back to the black screen issue, since that's really the only obstacle left at this point. I've confirmed that despite the invisible menu, I can click on "begin game," and after more blind clicking I eventually hear the voices from the first scene. So its clearly a very minor and precise issue, but again, I have absolutely no idea what could be causing it.

Could you give me the exact file size of your original 'moon' file in bytes?

Irrelevant, but, what's Slype in your screenshot?
http://en.wiktionary.org/wiki/slype

but just how long is the game? i mean how much days are in the game...
Yeah, 20 days. As far as the amount of text goes, there's ~1.2mb, which means it has about the same amount of text as Wind -a breath of heart- and PRINCESS WALTZ.

Ixrec
2009-04-04, 16:13
Could you elaborate on this? What was the error and how did you fix it?

The error back then was identical; black screen for everything but a handful of buttons I moused over by accident. But that went away after I reinstalled MOON, so I never found out what the problem was.

Shouldn't do - it should either run or not run at all. I have no idea what could be causing this. Can I confirm exactly which version of MOON. you have (DVD, CD Final etc.)?

Could you give me the exact file size of your original 'moon' file in bytes?

MOON. DVD ver 1.0

moon.exe = 316,416 bytes
moon.lst = 29,660 bytes
moon.? = 179,178,474 bytes

http://en.wiktionary.org/wiki/slype
O_O
I'll just tl it as "corridor."

Asceai
2009-04-04, 16:26
MOON. DVD ver 1.0

moon.exe = 316,416 bytes
moon.lst = 29,660 bytes
moon.? = 179,178,474 bytes

Mine is the same... so, yeah, I'm not sure at all now.

At what stage did you first run moon_eng.exe? Was it after copying moon.lst -> moon_eng.lst / moon -> moon_eng, or was it after running the patcher?

If the latter, run the batch file to copy the files over again, then try running moon_eng.exe. Just trying to narrow down exactly where the problem occurred.

Ixrec
2009-04-04, 16:30
My most inexplicable breakthrough in a long time:

MOON_ENG works without that black background program if I run it in compatibility mode for Windows 2000. (so we get to blame Vista for this one)

I shall begin patch testing shortly.

Asceai
2009-04-04, 16:33
Aha, Vista! I never even thought of that =P Yeah, that would do it. Run it in compat mode then. I'm surprised your normal MOON. doesn't require compat mode, though.

Serke
2009-04-04, 16:44
Very impressive, Asceai, especially considering how lightning fast you were. Looking at the screenshot, I think the letters are sticking too close to each other, but it's a matter of taste I guess. BTW, do you intend to release the source code for the tools? I'd love to stick my nose in it. =)

Ixrec
2009-04-04, 16:49
I'm surprised your normal MOON. doesn't require compat mode, though.

That can only be explained by the magic of official releases working on almost everything for no reason while fan stuff works on exactly what it says it will work on. My home-burned anime DVDs suffer similar problems.

Asceai
2009-04-04, 16:52
Very impressive, Asceai, especially considering how lightning fast you were. Looking at the screenshot, I think the letters are sticking too close to each other, but it's a matter of taste I guess. BTW, do you intend to release the source code for the tools? I'd love to stick my nose in it. =)

You know, I'm almost embarrassed enough at the code to not want to, but what the hell, you know this was a rush job =P

http://www.asceai.net/du/u/moonkitsrc.zip

(note that moon_disasm requires your SNXs to be in the same place mine are, which is in a directory inside another directory called moondata)

Ixrec
2009-04-04, 17:02
I must've missed something. When I run moon_asm (which I understand takes *everything* in the scripts folder and snx's it into the patch folder) I only see a handful of six or so snx's in the patch folder, none of which have the same names as the ones I was working on. Then when I run moon_patch, a window blinks open just like with _asm but I see no visible change in any nearby folders or in the game itself (I'm attempting to insert my tl for the opening scene).

*edit*

Confirmed through individual copy+pasting that moon_asm is only making snx files out of: A_D10, A_D11, A_D12, A_D13, A_D14, A_D15, A_D16

Asceai
2009-04-04, 17:06
I must've missed something. When I run moon_asm (which I understand takes *everything* in the scripts folder and snx's it into the patch folder) I only see a handful of six or so snx's in the patch folder, none of which have the same names as the ones I was working on. Then when I run moon_patch, a window blinks open just like with _asm but I see no visible change in any nearby folders or in the game itself (I'm attempting to insert my tl for the opening scene).

It should assemble absolutely everything in the scripts folder - unless it stops part way because of an error. Run cmd.exe, change directory into your moon translation directory, then run moon_asm from that. This way you should be able to see any error messages. I'm guessing the files that got assembled correctly (the six or so that you saw) were A_D10.txt A_D11.txt A_D12.txt A_D13.txt A_D14.txt A_D15.txt A_D16.txt, and the one it stopped on was A_D2.txt, which I assume you modified at some point?

Ixrec
2009-04-04, 17:08
It should assemble absolutely everything in the scripts folder - unless it stops part way because of an error. Run cmd.exe, change directory into your moon translation directory, then run moon_asm from that. This way you should be able to see any error messages.

cmd.exe......?

Serke
2009-04-04, 17:09
You know, I'm almost embarrassed enough at the code to not want to, but what the hell, you know this was a rush job =P

http://www.asceai.net/du/u/moonkitsrc.zip

(note that moon_disasm requires your SNXs to be in the same place mine are, which is in a directory inside another directory called moondata)

Thank you! You have nothing to be embarassed about, the code is much cleaner than the one I've recently written for Cartagra. It wasn't a rush job in my case, but I do have an excuse also: it was my first experience with flex/bison and lalr(1) grammars. =)

Asceai
2009-04-04, 17:10
cmd.exe......?

Start->Run and type 'cmd'. If you've never used the command line before, though... hmm. Could you just confirm that you've been working on A_D2.txt, and if so, upload the file as an attachment? I could quickly go through it to see where you slipped up.

Ixrec
2009-04-04, 17:17
I can confirm I've been working on A_D2 and Day01A, and I tried to attach both of them just now so we'll see if that worked.

And as I'm assuming you figured out in that last post, I can't figure out how to get cmd to do anything.

*edit*

I just tried switching back A_D2 and not Day01A, and the result was the inclusion of A_D2 and A_D20 in the patch folder.

Switching back Day01A as well changed nothing.

Asceai
2009-04-04, 17:29
Okay; partly my fault, partly yours.

First of all, the checker is a bit too harsh, and the space before one of the commands broke it. I went and fixed it up.
Second, there's two lines where you've got:
SELECT 0003 'Examine' ''Leave room'
That should be
SELECT 0003 'Examine' 'Leave room'

You also slipped up somewhere around here:
TEXT So I left the room. :LABEL92
the label should be on a separate line
TEXT So I left the room.
:LABEL92
Need to be careful about things like that.

EDIT: Uploaded the updated moon_asm

EDIT 2: Your day01a.txt is fine.

Ixrec
2009-04-04, 17:33
Okay; partly my fault, partly yours.

First of all, the checker is a bit too harsh, and the space before one of the commands broke it. I went and fixed it up.
Second, there's two lines where you've got:
SELECT 0003 'Examine' ''Leave room'
That should be
SELECT 0003 'Examine' 'Leave room'

You also slipped up somewhere around here:
TEXT So I left the room. :LABEL92
the label should be on a separate line
TEXT So I left the room.
:LABEL92
Need to be careful about things like that.

Ok, found the double apostrophes and fixed those.

But the line break issue makes no sense to me at all because most of my files have less than a dozen already (without word wrap I wouldn't be able to work on them efficiently).

And when you say you fixed the checker, does that mean I need to redownload some part of the moonkit?

Asceai
2009-04-04, 17:34
Really? The files I had contained virtually no line breaks at all to begin with.

Also I just did a text search for that double apostrophe and it didn't appear anywhere in either file.

The files have LF linebreaks, not CR/LF like you might be used to.

What are you using to edit them? Notepad? If so, try using Wordpad. It can read those files just fine.

And when you say you fixed the checker, does that mean I need to redownload some part of the moonkit?

Refresh, I attached the zip to my post.

Ixrec
2009-04-04, 17:39
The files have LF linebreaks, not CR/LF like you might be used to.

What are you using to edit them? Notepad? If so, try using Wordpad.

Then I fail *runs off to unfail*

Ixrec
2009-04-04, 17:45
YES! WE HAVE ENGLISH TEXT IN THE GAME!

Unfortunately, I'm seeing commands like TEXT and SOUND randomly interspersed with the actual dialogue so more editing will be necessary.

That and wordwrapping in the middle of a word has to be dealt with somehow. I'd prefer not to have to insert line breaks manually...but...

Asceai
2009-04-04, 17:48
Unfortunately, I'm seeing commands like TEXT and SOUND randomly interspersed with the actual dialogue so more editing will be necessary.

Unfortunately, this is due to doing the editing in notepad (or whatever you were using) rather than an editor that supports the line breaks. Might be an idea to re-extract the scripts from the moon kit and redoing the editing.

That and wordwrapping in the middle of a word has to be dealt with somehow. I'd prefer not to have to insert line breaks manually...but...

That should not be happening at all. Wordwrapping should only wrap on spaces - I'm guessing it's due to the presence of fullwidth/sjis characters on the line in question or something. Lemme have a look through your day01a.txt... just a sec.

EDIT: Okay, no, the issue is that I accidentally broke the wordwrapping somehow when I fixed the other problem. Just a moment =P

EDIT 2: Fixed. New version uploaded.

Ixrec
2009-04-04, 17:53
Unfortunately, this is due to doing the editing in notepad (or whatever you were using) rather than an editor that supports the line breaks. Might be an idea to re-extract the scripts from the moon kit and redoing the editing.

Already fixed this problem in the file, just some quick text searches in WordPad. For some reason it's not carrying over to the game yet...

*edit*

Oh, that's why. For some reason now it doesn't like my Day01A file so the asm isn't making all the snx's again.

Asceai
2009-04-04, 17:59
Already fixed this problem in the file, just some quick text searches in WordPad. For some reason it's not carrying over to the game yet...

Remember that you need to run both moon_asm and moon_patch each time you change something.

And a note to grab the updated moon_asm I uploaded in my previous post, which fixes your wordwrapping issues.

Ixrec
2009-04-04, 18:02
Remember that you need to run both moon_asm and moon_patch each time you change something.

And a note to grab the updated moon_asm I uploaded in my previous post, which fixes your wordwrapping issues.

Did do all that.

*edit*

I keep looking through my Day01A file, and though I found one erroneous command (a STOP_SOUND 01 had somehow changed to jsut 01), fixing that didn't change asm's reaction to it.

Asceai
2009-04-04, 18:14
I keep looking through my Day01A file, and though I found one erroneous command (a STOP_SOUND 01 had somehow changed to jsut 01), fixing that didn't change asm's reaction to it.

Actually, it's complaining about this line:
SELECT 0003 'Search for a clue about my mother's death.' 'Let Haruka answer.'

Need to have a \ before the ' in "mother's"

SELECT 0003 'Search for a clue about my mother\'s death.' 'Let Haruka answer.'

Ixrec
2009-04-04, 18:18
Actually, it's complaining about this line:
SELECT 0003 'Search for a clue about my mother's death.' 'Let Haruka answer.'

Need to have a \ before the ' in "mother's"

SELECT 0003 'Search for a clue about my mother\'s death.' 'Let Haruka answer.'

Duh...one second.

*edit*

It's beautiful...

So yeah, working perfectly, awesome. Thanks at least a million. Now I can really get some work done.

Ixrec
2009-04-04, 23:02
Ugh......My A_D2 script is not getting accepted again. I just scrolled through the whole file and I can't find anything out of place. Please help.

*edit*

Same for Day01A. Evidently, I need a way to know where moon_asm is crashing in these files.97

Asceai
2009-04-04, 23:32
Ugh......My A_D2 script is not getting accepted again. I just scrolled through the whole file and I can't find anything out of place. Please help.

*edit*

Same for Day01A. Evidently, I need a way to know where moon_asm is crashing in these files.97

First issue:
SELECT 0003 'I like you.' 'It's nothing.'
Should be:
SELECT 0003 'I like you.' 'It\'s nothing.'

Second issue:
: LABEL378
Should be:
:LABEL378

Ixrec
2009-04-05, 01:02
*edit* figured this one out on my own

Ixrec
2009-04-05, 10:40
moon_patch is crashing.

Problem signature:
Problem Event Name: APPCRASH
Application Name: moon_patch.exe
Application Version: 0.0.0.0
Application Timestamp: 49d7620a
Fault Module Name: StackHash_1eb2
Fault Module Version: 0.0.0.0
Fault Module Timestamp: 00000000
Exception Code: c0000005
Exception Offset: 009c9940
OS Version: 6.0.6000.2.0.0.768.3
Locale ID: 1041
Additional Information 1: 1eb2
Additional Information 2: a5c970e51ab7e899f0fd5f408cd11adc
Additional Information 3: 748e
Additional Information 4: b28f7e5e43bfe659e5915aea23c48106

*edit* nvm, again I figured it out (for some reason I'd changed moon_eng.lst back to moon.lst)

Ixrec
2009-04-08, 22:43
Turns out I did need to come back here after all.

This time, image editing. I have an English version of the image CM_DAY2 which simply says "Day 2" and is supposed to be used at the top left of the map screens on day 2. But despite putting that bmp into the patch folder and running moon_patch, it simply refuses to change. I also tried changing the large red dot on the map to a purple one, and that change also did not make it into the game somehow. Any idea what's causing this?

*edit*

I just attempted to flip all of the main menus bmps, and that replacement actually worked (although the menu itself was invisible as a result). But for some reason when I tried to flip them back so I could use the program again, it would not change. For now I just recopied the moon files again, but it's obvious that there's some incredibly critical step to this image patching I just did not see on the moonkit tutorial.

Asceai
2009-04-08, 23:43
I have no idea. The only thing I can think of is that the file extension of the BMPs could possibly be in lowercase? Check that out. It must be uppercase, otherwise the patcher will simply add the files instead of replacing the TGF with it.

EDIT: Oh ho ho, I think I know what else the problem could be. You know that bit in the MOON. kit where it tells you to occasionally rerun that batch file, to get your moon_eng and moon_eng.lst file sizes back down? Try rerunning that, then running the moon_patch with your images in the right directory and see how it goes.

EDIT 2: Nope, that seems to be fine. I'm pretty sure it's related to the filename being lowercase or something. I can update the patcher to make it not care about the case.

EDIT 3: Argh, it's BOTH. Hang on, I'll update the patcher.

EDIT 4: Okay, new patcher uploaded (and attached). I'll update the one in the moon kit when I get to it.

Ixrec
2009-04-09, 01:05
Thank you so much. That worked perfectly, completely and instantly.

Chiyuri
2009-04-23, 05:18
Well I made a comback in the forum just to see how things were going and seem like I missed quite a bit.. I tried reading all of the page on this thread after last time I had been on but.. *did not understand a single part of it -.- *

So I'll just ask a quick question since I,m confused by all of these files on some of the post.
Is the patch done?

GatoNegro
2009-04-23, 06:45
is begin done, all the information is here: http://www.tsukuru.info/tlwiki/index.php?title=MOON.

hkuclion
2009-04-23, 07:43
after Parsing those IF structure in the script, I had to say that it's too complex

even had
"IF 17 39 00 15 01 00 02 16 9E 00 15 00 00 02 0F 00 .LABEL79 "
represent in the format
"goto_unless(G[57] == 1 && F[158] == 0) @LABEL79"

has any one have any idea about how to rebuild the IF ELSE and SWITCH CASE structure automatically with program? a sample file is posted

Asceai
2009-04-23, 15:46
after Parsing those IF structure in the script, I had to say that it's too complex

even had
"IF 17 39 00 15 01 00 02 16 9E 00 15 00 00 02 0F 00 .LABEL79 "
represent in the format
"goto_unless(G[57] == 1 && F[158] == 0) @LABEL79"

has any one have any idea about how to rebuild the IF ELSE and SWITCH CASE structure automatically with program? a sample file is posted

I gave up. To me, it wasn't really worth it. I mean, you can sort of see which ones are variable and which ones are const and change some of the values if you NEED to but yeah-- while it's not really clean, leaving it 'raw' is easiest for my sanity. Determining the length of each IF instruction was enough =p