Chrono Compendium

Kajar Laboratories - Fan Works and Submissions => Chrono Cross Modification => Topic started by: FaustWolf on April 16, 2008, 04:27:59 pm

Title: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: FaustWolf on April 16, 2008, 04:27:59 pm
Although Chrono Cross hacking is yet in its infancy, I believe it will soon be time to explore the possibility of locating and interpreting the game's event code -- the instructions that say, "create a dialogue box (with this dude's portrait)," or "make this character walk five steps to her left," or "load this character model."

So, anyone who's worked with event code before (for any game), could you provide some insight as to what we'd be looking for? I assume that each room will have associated with it some code that defines what happens during the scenarios that play out in that room. Would event code consist of pointers to instructions defined in the game executable?

One clue key to exploring Chrono Cross' event code may lie in the fact that each room contains its own code for dialogue and its own overworld NPC character and enemy models, meaning the event code must refer to the data only in that room. This is why we see so many duplicate character and enemy textures strewn throughout the Chrono Cross game image -- each room that has a Cybot enemy, for example, has its very own Cybot model. It also explains why we see so many Kid overworld models -- Kid's NPC model exists separately in each room in which she appears as an NPC. This happens quite often if you decide not to take Kid with you; the game uses Kid's NPC models as opposed to her in-party overworld model.

A twist on the "room segregation of data" phenomenon is that in-battle models are defined only once on the game disc (though player characters have a copy of their battle model sans some animation data for status screen purposes, as Gemini pointed out long ago). Therefore, instructions for loading battle models refer not to any single room, but to a communal battle model collection.

I know so little about event code right now that I'm probably muddling up my own questions on the matter. Anyone happen to know if The Great Ones (Geiger, Chickenlump, JLukas, et al) left notes regarding the intricacies of Chrono Trigger's event code? Their notes, if accessible, may not be perfectly applicable to the event code in Chrono Cross, but they would probably help myself and other hacking novitiates learn some basics.

Also, for those experienced in PSX programming, I'm seeing lots of instruction sets defiined in the game executable (things like "kz_getmodel()" and such). Would each of these pre-defined game instructions have an index number, and the event code simply specifies that index number to get things to happen during storyline scenes? I assume the event code would also be responsible for things like making a loaded character model walk from one point to another, which would necessarily involve specifying the character model's displacement within the room (starting coordinates and ending coordinates). Anyone know what would have to be done in a debugger to observe a game's event code?
Title: Re: Event Code -- what makes it tick?
Post by: halkun on April 17, 2008, 06:03:52 am
Chrono Cross uses a later version of the FF7 engine. The "event code" that you care calling is actually called "fieldscript". To better understand the guts of it, you have to know how the whole game system works.

The game consists of several modules. Kernel, Menu, Field, Worldmap, and Battle. (In FF7 there was also "Minigame", but I think that module was not compiled in. Also The worldmap system is 2D in CC while in FF7 it's 3D)

Kernel is the core program that manages all the other modules. It has the low-level functions and does memory management,  disc access, sound/music and the like. The kernel is multitasking threaded system and can run mutiple tasks at once

Menu is actually the next most powerful. It manages the game variables and also manages game save/load system. Menu is also quasi-responsible for the opening game "start" menu. It also displays the menu ^_^. If it's anything the FF7/FF8/PE and the like, there is a huge global area called a "savemap" where all gamedata is kept. This is mirrored to the memory card on save.

Battle is the stand-alone battle module. This has it's own scripting language for the enemy AI.

Lastly, and the biggest is Field. A single field is a "room" that is "ran" by the field interpreter. A field file is completely self-contained and does not access data from another room. (It can, however access the global savemap for variables) 

The data in the Each "room" has has a 2D layerd background and a 3D "walkmesh" that the characters walk on. The field file contains all the entities in that scene, and all entities have a script that is called to them.

You best bet is to get caught up with FF7's system because it's the simple framework that all other games were based from.

Engine Basics (http://wiki.qhimm.com/FF7/Engine_basics)
The Kernel (http://wiki.qhimm.com/FF7/Kernel)
Menu Overview (http://wiki.qhimm.com/FF7/Menu_Module)
Field module (http://wiki.qhimm.com/FF7/Field_Module)
Fieldscript Opcode index (http://wiki.qhimm.com/FF7/Field/Script/Opcodes)

Fieldscript and Battlescript are different. I'm lacking battlescript info in my wiki, but we have a good deal of that reversed too.

I can answer any question of fieldscript. You can use that to experiment with what CC's fieldscript system. The are both most likely very very similar.
Title: Re: Event Code -- what makes it tick?
Post by: FaustWolf on April 17, 2008, 03:12:55 pm
YEAH! Thanks for sharing your uber knowledge again halkun. I'm sure I'll barrage you with a ton of questions once I've studied your notes on FF7. Now I know to ask about fieldscript at least.

BTW, Chrono Cross Model Project, or my part in it, shall kick back into full gear by May 11. I'll be copying various notes onto the Compendium wiki till then.
Title: Re: Event Code -- what makes it tick?
Post by: halkun on April 18, 2008, 02:15:11 am
Looking at the release dates, it appears that CC may use a slightly modded version of the FF8 fieldscript system. Because this hasn't been reversed very far, I can gave you some tips over what to look for.

1) The fieldscript system starts with a "Base script" that runs every loop. Looking at Square's code, to appears this is actually called the "Directer script" and commonly has an entity name of "Dic" In FF7 and FF8, the entities in the fieldscript actually are labeled in text and not stripped. Look for this in the uncompressed fieldscript data.

2) Find the debug room if one exists and start there. In the case of FF7 and FF8, the debug room is an overhead view with the camera located at 0,0,0 and looking down at 0,0,0. There were minimal variables set. I don't think CC has one though. In this case look for the first scene.

3) Remember that all field files are self-contained. They do not pull data from other "rooms". Each field file is likely split up into sections. (background, palette, walkmesh, entity models, script) if you can find the "top" of one of these data fields and then walk backwards to a referencing header, you can see where a field file "begins" and "ends". They are also most likely compressed with some kind of lzs compression.
Title: Re: Event Code -- what makes it tick?
Post by: ZeaLitY on April 18, 2008, 02:36:06 am
Using the debug menu for Chrono Cross, you're given a second prompt for a numerical value after you deal with the first in selecting a map. The values of the second control scripted events. I don't have any real example, but say you go to the S.S. Invincible. Having 000 or 001, or whatever the default is (I can't remember), it'll load normally. But maybe 002 starts the cut scene when Serge first arrives, and 003 starts the ghost ship cut scene that also takes place on that map. Maybe you can follow that lead somehow.
Title: Re: Event Code -- what makes it tick?
Post by: FaustWolf on April 18, 2008, 02:44:02 am
Thanks ZeaLitY! That will lead to event indices or something at least.

The tools created by Terminus Traductions, the French translation team, are able to separate the rooms into their constituent components and in each room there's a file called "8script" that contains all the room's dialogue when uncompressed. When I get some time I'll investigate the other files and see what the data looks like -- though I may need to develop some way to decompress the other file types in each room.

Provided the fieldscript is compressed, is there any way to see uncompressed fieldscript in game memory? I found that it wasn't too much of a hassle to figure out the compression algorithm used for Front Mission 2 character portraits by comparing the compressed data to the uncompressed data as loaded in VRAM. Obviously I'm not looking in VRAM for fieldscript, but could it be somewhere else in a savestate perhaps?
Title: Re: Event Code -- what makes it tick?
Post by: halkun on April 18, 2008, 04:21:50 am
Yes, you will find the fieldscript uncompressed in memory. The problem is you are only going to have the tokenized opcodes and not command words.

For Q-gears, I wrote a script dumper. What makes it cool is I commented the sheer hell out of it in plain English so anyone can follow along.

http://q-gears.svn.sourceforge.net/viewvc/q-gears/trunk/src/utils/scriptdump/

Here is the source from the above link

scriptdump.c (http://q-gears.svn.sourceforge.net/viewvc/q-gears/trunk/src/utils/scriptdump/scriptdump.c?revision=173&view=markup)
script.c (http://q-gears.svn.sourceforge.net/viewvc/q-gears/trunk/src/utils/scriptdump/script.c?revision=173&view=markup)
script.h (http://q-gears.svn.sourceforge.net/viewvc/q-gears/trunk/src/utils/scriptdump/script.h?revision=173&view=markup)
The makefile (http://q-gears.svn.sourceforge.net/viewvc/q-gears/trunk/src/utils/scriptdump/Makefile.standalone?revision=176&view=markup)
 
Title: Re: Event Code -- what makes it tick?
Post by: FaustWolf on April 18, 2008, 01:09:39 pm
Ooh, toys! Now, Q-Gears isn't compatible with Chrono Cross (yet), correct? I could use this to see what uncompressed fieldscript looks like in general though.

I did some snooping around in the compressed room files this morning, and found that the dialogue files are indeed lzss compressed -- though the tag at the beginning of the compressed file reads "sszl" -- could this be some type of compression not used in other Square games? A "backwards" lzss or something?

But the good news is, Terminus Traductions figured out this "sszl" compression scheme already, and I've been using their tools to decompress the game script without a hitch (though I've encountered problems re-compressing). Aaaaaand -- there's a whole collection of "sszl" compressed files. One (or more) of these might just be our fieldscript!

Important question for coders: I've not yet learned a programming language, so this is going to seem incredibly naive one way or the other. The "ScriptDecompress" tool created by Terminus Traductions targets the eighth file dumped by the "RoomDecompress" tool into each room's folder, yielding uncompressed dialogue script viewable in a text editor. Most of the other dumped files look like they're compressed with the exact same algorithm (this so-called "sszl") as the dialogue script files are. Would it be an easy task to "re-target" the ScriptDecompress tool by tweaking its source code? I've got source code for the script decompressor on hand, and will furnish it if anyone's interested. I can't guarantee 100% that, if successful, the uncompressed files will be the fieldscript, but I have a pretty good hunch that this is the case based on halkun's feedback. If what I'm asking is theoretically a really simple task, like, say, a monkey could do it, then I'll snoop around in the source and take care of it once I know what to look for.

Something to get out of the way for everyone's info: as far as I can tell, the Terminus Traductions tools labeled "RoomDecompress" are merely room dumpers -- they chunk up the compressed room files per the pointer table described by halkun several posts up. I'm not sure if Terminus originally labeled its room tool "decompress" or not; the tools have been circulating for awhile now, and the ones I have may have been renamed or something.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: FaustWolf on April 18, 2008, 02:02:44 pm
'kay, I've lifted this from the script decompressor source code:

for (room_number = 0; room_number < 537; room_number++)
    {

      printf ("\n%d ", room_number);
      sprintf (nom_temp, "..//rooms//disk1//%d//code//8script", room_number);
      f_room = fopen (nom_temp, "rb");

What the heck does an sprintf() function do in C/C++? printf is what goes on-screen in the DOS window as the program does its thing if I'm remembering the "Hello World" exercise I did 10 years ago correctly. This sprintf() is the only thing that has the 8script label anywhere in the source code -- 8script is the name of the dialogue script file targeted for decompression, but I suspect this is an output function and not an input function.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: Luminaire85 on April 18, 2008, 02:26:46 pm
The sprintf() function does exactly the same thing as printf(), but instead of outputting to the console window it outputs to a character buffer (nom_temp in this case). The line of code you've bolded is simply storing the path to a file in nom_temp, replacing the '%d' with the value of room_number. The next command opens that file for reading in binary mode.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: FaustWolf on April 18, 2008, 03:01:42 pm
Hmm, so if if the fopen() opens the file specified by the path in sprintf(), could I re-target the file this program acts on by replacing the "8script" name in the sprintf() path with the name of some other file in that folder I'd like it to try to decompress? Am I understanding that right Luminaire?

EDIT: Just completed a series of tests in which I removed the 8script file from a folder, found another file that was "sszl" compressed, and renamed that file 8script in lieu of the original. The RoomDecompress program chokes on the renamed file, producing an empty "outscript" file (that's what the uncompressed dialogue script is labeled). Something else in the parameters of the source code must be specifically geared to work with the compressed dialogue and it cannot read compressed fieldscript unless some serious tweaking is done.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: halkun on April 21, 2008, 05:34:11 am
if you have the files uncompressed, there is an lzs uncompressor in the qhimm forums somewhere.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: FaustWolf on April 21, 2008, 10:22:53 am
Thanks halkun, I've picked up your lzss.c from qhimm, the one you gave me in the Front Mission 2 portrait thread. How will this program work once compiled? Does it need a certain folder structure or anything? If so, I can find where that is in the source and hopefully alter it to suit our current needs if necessary.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: JLukas on April 22, 2008, 12:35:11 am
Their notes, if accessible, may not be perfectly applicable to the event code in Chrono Cross, but they would probably help myself and other hacking novitiates learn some basics.

Hmm, it's hard to think of what can be useful here since the game engines are so different.  One of the most important things IMO would first be to find a barebones room to study.  A spot in the game where it loads your PCs and that's about it.  Reptite Lair entrance in CT, for example.  Gato's event is another popular example, with a single NPC and battle.  Heavily document those basic areas before moving on.

Find where one event command stops and other begins.  If you're lost in a blob of event code with no clue where to start, look for familiar hex codes.  For example, if an NPC gives you X item, look in a list of Gameshark codes for the hex value.  You use this same method for music, textboxes (strings), NPCs, etc... anything you have a list of.  Search the event for that hex value, and change each one by one until you find the match that causes you to receive a different item.  Next, try to find the byte length of that specific event command.  Set a read breakpoint on surrounding bytes and see if it triggers a common execute address.  What you're looking for is the piece of code responsible for loading the next command.  When you use that as an execute breakpoint, it'll stop on each command loaded.  That will make your job much, much easier figuring out the lengths of individual commands.

As you decode the events, write a program that can convert those commands to something readable, like jsondag is currently doing in the Tech thread.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: FaustWolf on April 22, 2008, 01:01:58 am
Thank you for the methodological insight JLukas! First step is to get what may be the fieldscript decompressed, then we'll see what's up. Thanks to ZeaLitY's work on the debug menu, we've probably got an ordered list of rooms. From everyone's experience, would a given room's fieldscript/event code contain a command telling the game to load another room once the lead character has reached an exit point? If we see that each room's fieldscript contains one or more indices pertaining to other rooms, we might be able to use that to our advantage.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: halkun on April 22, 2008, 02:00:19 am
IN FF7, rooms were loaded using a door lookup table in the header, and the JUMPMAP() opcode. Rooms were referenced by number.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: Agent 12 on April 22, 2008, 04:17:22 pm
Just so you know making the tech editor was INFINITELY more times useful once I figured out what bytes were arguments and which bytes were um....functions?  CL was able to use Geigers Debugger to figure it out I'm sure there's some sort of similar tool for playstation...as an example the hex

70  03 70 70

Before CL came a long I didn't know if this would be

70 -- Play Weapon Sound
03 -- Unkonwn one byte command
70 -- Play weapons Sound
70 -- Play weapons Sound
or

70 -- Play weapons Sound
03 70 -- An unknown command with 7D as the argument
70 -- Play weapons Sound

Turns out it was the second one (03 7D means load animation 7D).  I'm pretty sure the way you figure out is there was a pointer to the next command that would just skip arguments so he would see it was pointing to 70...then 03...then skip 70 and go to the final 70.  This means the byte after 03 was an argument and not a new command.

Phew sorry if that was long winded but it honestly was key to deciphering the code.

--JP
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: halkun on April 24, 2008, 11:21:22 am
Here is an old fieldscript dump from ff7's debug room (It's gotten much better)

Code: [Select]
****** Section n°0 (dic) Script n° 0 ******
000 : PRTYP ( 00 )
002 : RET
003 : RET
                                                                               
****** Section n°0 (dic) Script n° 1 ******
000 : RET
                                                                               
****** Section n°1 (cloud) Script n° 0 ******
000 : CHAR ( 00 )
002 : PC ( 00 )
004 : RET
005 : XYZI ( 00, 00, 00, 00, 00, 00, 00, 00, 01, 00 )
010 : RET
                                                                               
****** Section n°1 (cloud) Script n° 1 ******
000 : RET
                                                                               
****** Section n°2 (tifa) Script n° 0 ******
000 : CHAR ( 01 )
002 : PC ( 02 )
004 : RET
005 : RET
                                                                               
****** Section n°2 (tifa) Script n° 1 ******
000 : RET
                                                                               
****** Section n°3 (cid) Script n° 0 ******
000 : CHAR ( 02 )
002 : PC ( 08 )
004 : RET
005 : RET
                                                                               
****** Section n°3 (cid) Script n° 1 ******
000 : RET
                                                                               
****** Section n°4 (yufi) Script n° 0 ******
000 : CHAR ( 03 )
002 : XYZI ( 00, 00, B6, FF, 7E, FF, 00, 00, 64, 00 )
00D : DIR ( 00, 60 )
010 : SLIDR ( 00, 01 )
013 : RET
014 : RET
                                                                               
****** Section n°4 (yufi) Script n° 1 ******
000 : window( id=01, X=0000, Y=0000, W=008A, H=00A9 )
00A : ASK ( 05, 01, 00, 00, 09, 00 )
011 : gotoNext +15
013 : window( id=01, X=0000, Y=0000, W=0081, H=0059 )
01D : ASK ( 05, 01, 01, 00, 04, 00 )
024 : gotoNextLong +009D
027 : if UByteL(50)[00] != 00 then(00) gotoLong +0007
02E : gotoPrev -1B
030 : gotoNextLong +0090
033 : if UByteL(50)[00] != 01 then(00) gotoLong +000A
03A : SET-WORD ( 20, 1E, 00, 00 )
03F : gotoNextLong +0081
042 : if UByteL(50)[00] != 02 then(00) gotoLong +0008
049 : SPECIAL ( FB )
04B : REQ ( 11, 74 )
04E : RET
04F : if UByteL(50)[00] != 03 then(00) gotoLong +0008
056 : SPECIAL ( FB )
058 : RET
059 : gotoNextLong +0067
05C : if UByteL(50)[00] != 04 then(00) gotoLong +0008
063 : SPECIAL ( FC )
065 : REQ ( 11, 5A )
068 : RET
069 : if UByteL(50)[00] != 05 then(00) gotoLong +0008
070 : SPECIAL ( FC )
072 : RET
073 : gotoNextLong +004D
076 : if UByteL(50)[00] != 06 then(00) gotoLong +0007
07D : SPECIAL ( FE )
07F : gotoNextLong +0041
082 : if UByteL(50)[00] != 07 then(00) gotoLong +0029
089 : SPECIAL ( FD )
08B : RET
08C : REQSW ( 0F, FD )
08F : REQ ( 03, 0F )
092 : CMUSC ( 02, 04, 0F, FD, 03 )
098 : PRQSW ( 0F, FD )
09B : PRQSW ( 06, 0F )
09E : CMUSC ( 06, 07, 0F, FD, 08 )
0A4 : JOIN ( 0F )
0A6 : CMUSC ( 04, 0A, 0F, FD, 07 )
0AC : SPLIT ( 11, 13, 00, 15, 50, 00, 08, 00, 0C, 00, 60, 74, 00, 00 )
0BB : RET
0BC : RET
0BD : RET
0BE : RET
0BF : RET
0C0 : RET
0C1 : RET
0C2 : if UByteL(50)[00] != 00 then(00) gotoLong +0008
0C9 : gotoPrevLong -00C9
0CC : gotoNextLong +0102
0CF : if UByteL(50)[00] != 01 then(00) gotoLong +00DF
0D6 : AKAO ( 00, 00, 00, C0, 7F, 00, 00, 00, 00, 00, 00, 00, 00 )
0E4 : AKAO ( 00, 00, 00, A0, 7F, 00, 00, 00, 00, 00, 00, 00, 00 )
0F2 : AKAO ( 00, 00, 00, A1, 7F, 00, 00, 00, 00, 00, 00, 00, 00 )
100 : AKAO ( 00, 00, 00, A2, 7F, 00, 00, 00, 00, 00, 00, 00, 00 )
10E : AKAO ( 00, 00, 00, A3, 7F, 00, 00, 00, 00, 00, 00, 00, 00 )
11C : AKAO2 ( 00, 00, 00, C8, FF, 7F, 00, 00, 00, 00, 00, 00, 00, 00 )
12B : AKAO2 ( 00, 00, 00, E4, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 )
13A : AKAO2 ( 00, 00, 00, B0, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 )
149 : AKAO2 ( 00, 00, 00, B1, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 )
158 : AKAO2 ( 00, 00, 00, B2, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 )
167 : AKAO2 ( 00, 00, 00, B3, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 )
176 : MUSIC ( 00 )
178 : AKAO ( 00, 00, 00, 28, 3F, 00, 00, 00, 00, 00, 00, 00, 00 )
186 : AKAO ( 00, 00, 00, 29, 3F, 00, 00, 00, 00, 00, 00, 00, 00 )
194 : AKAO ( 00, 00, 00, 2A, 3F, 00, 00, 00, 00, 00, 00, 00, 00 )
1A2 : AKAO ( 00, 00, 00, 2B, 3F, 00, 00, 00, 00, 00, 00, 00, 00 )
1B0 : gotoNextLong +001E
1B3 : if UByteL(50)[00] != 02 then(00) gotoLong +000B
1BA : SPECIAL ( F9 )
1BC : SPECIAL ( F9 )
1BE : SPECIAL ( F9 )
1C0 : gotoNextLong +000E
1C3 : if UByteL(50)[00] != 03 then(00) gotoLong +0007
1CA : battle ( 00, E7, 03 )
1CE : MHMMX
                                                                               
****** Section n°4 (yufi) Script n° 2 ******
000 : RET



Here's how it works. Each entity has a a few scripts. Depending on how you interact with the script determines which script is ran.

The "Main script" is the one at the top (Dic). That script sets up the room and gets all the other entities going.

Code: [Select]
#****** Section n°0 (dic) Script n° 0:setup ******
000 : PRTYP ( 00 )     #Adds character 0 (Cloud) to the party.
002 : RET                  #return

#****** Section n°0 (dic) Script n° 0:loop ******
003 : RET                  #return every frame (do nothing)
                                                                               
#****** Section n°0 (dic) Script n° 1:"O" button******
000 : RET                #if "O" button is pressed... return (do nothing)
 


It gets more complex when you talk to people.

Code: [Select]
#****** Section n°4 (yufi) Script n° 0:setup ******
000 : CHAR ( 03 )                                                    #This entity is char #3
002 : XYZI ( 00, 00, B6, FF, 7E, FF, 00, 00, 64, 00 )     #This is the initial X,Y, and Z location of the character
00D : DIR ( 00, 60 )                                                 #This is the direction the character is facing
010 : SLIDR ( 00, 01 )                                              #Set solid range (Bounding box) of this character to 1
013 : RET                                                                #return

#****** Section n°4 (yufi) Script n° 0:loop ******
014 : RET          #every loop return (do nothing)
                                                                               
#****** Section n°4 (yufi) Script n° 1:"O" button ******
000 : window( id=01, X=0000, Y=0000, W=008A, H=00A9 )  #set up a window
00A : ASK ( 05, 01, 00, 00, 09, 00 )  #ask a question with text found in bank 9


See how it works?
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: FaustWolf on April 24, 2008, 01:52:57 pm
Whoa, thanks for that halkun and jsondag2!

This really helps my understanding of what to expect once the goodies are decompressed. BTW halkun, should the fieldscript be viewable in a text editor, i.e., would it show up just as you've posted, complete with the shorthand for the various commands (CHAR, RET, PC, AKAO, etc)? There's some stuff in the room folders that is not compressed, but it doesn't seem to be viewable in a text editor at all. I suspect walkmeshes and sounds, and I can confirm the latter at least by the AKAO tags present in the file.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: halkun on April 24, 2008, 02:54:35 pm
No, it's just a sequence of hex codes. In the example dump above, the hex codes representing the commnd have been changed to names, and the number of arguments written down.

The only thing that is text in the fieldscript is the entity name. (Dic, Yufi, cloud) and these are in a seperite lookup table. 
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: FaustWolf on April 24, 2008, 03:36:56 pm
Alrighty, thanks. That being the case, I'll have to examine some of the uncompressed files as well for pretty patterns. I can't rule out any of the files in the room folders except the ones I know contain sounds (AKAO tags).
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: halkun on April 24, 2008, 03:53:53 pm
The AKAO blocks are not part of the field script and are actually subsections of the field file itself. The Akao field command calls the AKAO block for music/sound playback.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: Akari on May 01, 2008, 07:19:22 am
I'll tell you a bit of knowledge:

1) You will need learn disasm no mater what, otherwise you will never compleatly understand what fieldscript actualy do.
2) Easiest way to find fieldscript block is to find 200-256 consequental adreses in loaded game memory (cause field script this addreses are actually functions called by each opcode)
3) Most likely you never find actual names for functions (ffvii was great exeption and luck)
4) Easiest way to see something changed in field script - change dialog id called by message displaying opcode.
5) Most likely fieldscript will be entity based. In ffvii and xenogears has 32 fieldscript per entity. First script usually initializing script that called when field loaded, others called by some events or by some opcodes.
6) Easiest opcode to disasm is script flow opcode like conditional/unconditional jump.
7) Some opcodes will pause script execution until some requirements met, like animation stop playing or model finish movement.
8) If you won't be lucky you encount field script lke in FFIX. As I was told it's not entity based and has different paradigm from FFVII.

that's it for now )
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: FaustWolf on May 01, 2008, 11:03:37 pm
Ah, a date with R3000 assembly awaits me then. When you say "diasm," akari, are you referring to this (http://home.midsouth.rr.com/theirware/DisAsm.htm) open source disassembler, or to knowledge of assembly language in general? I've snooped around in the game executable with ps2dis just to see what assembly looks like, so I respect the daunting challenges that await therein. I always read that IDA Pro is the best thing to go with for reverse engineering though. I'd have to save up for that one.

First, my game plan is to identify which file is the fieldscript for a given room by overwriting one room's suspected fieldscript with another room's suspected fieldscript. If characters start doing things they aren't supposed to in that room, then I'll hopefully have identified which file it is at least. Game freezing will be a near certainty probably, but I'm hoping some event action might be executed according to the foreign fieldscript, and that will be the major clue.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: Akari on May 02, 2008, 02:01:06 am
Ah, a date with R3000 assembly awaits me then. When you say "diasm," akari, are you referring to this (http://home.midsouth.rr.com/theirware/DisAsm.htm) open source disassembler, or to knowledge of assembly language in general?

I was reffered to disassembling and reverse enginearing in total.
I use Agemo Debugger (http://www.enixfans.com/html/agemo/) and it tools as disasm/debugger. It's enough to find all info you need.

If you didn't find script yet here the steps.

1) Find 200-256 consequental adreses in loaded game memory (cause field script this addreses are actually functions called by each opcode). You can do it by writing simple programm in any language that search 200-256 4-bytes values which starts from 0x80xxxxxx.
2) Set break by read from this memory range in agemo debugger and find where this value used.
3) Look at disassembled memory and find from where opcode reads (game executable read opcode - find value with opcode as inde and jump by that address). This is fieldscript. And this is good place to start disasming fieldscript.

Another way to find fieldscript is to analize field data file. This way we used to find script in FFIX, but it very depends on your experience.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: Vehek on July 15, 2008, 03:58:56 am
Now that we can decompress the files, we can research fieldscript! OUT 3 seems to be the file with the fieldscript. I haven't figured out the actual starting points of the scripts yet.
Title: Re: CHRONO CROSS FIELDSCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: FaustWolf on July 15, 2008, 10:50:34 am
Oh, definitely! For in-game testing I'd normally target a room, open up the entire ISO in my hex editor, find the original compressed fieldscript, then insert the altered re-compressed fieldscript over that, then save and see what happens in-game. If you guys have a more efficient means of testing involving savestates, by all means go for it.

I'll be sidelined with my job and I still have to figure out why I'm getting a debug assertion (fseek.c, line 146) error when I launch Dump_Main.bat in the Translation Tools package, so It'll be awhile before I can get my hands dirty in fieldscript.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: Vehek on July 15, 2008, 12:18:50 pm
I've been testing things with the decompressed data in memory.

edit:
Some guesses at commands.
E0 XX YY ZZ?- Dialog message
BB XX YY ZZ?- Give Element. (XX YY is Element)
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: FaustWolf on July 15, 2008, 06:04:19 pm
Excellent, excellent! Wow. Are you using pSX Vehek, or ePSXe for memory dumps?
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: Vehek on July 17, 2008, 05:53:20 pm
I'm using pSX.

How can I figure out where the scripts begin? I think I have the pointers, but I don't know where they're going.

edit:
I think I have the pointers for the opcodes. They're at E18D0 in my memory dumps.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: MDenham on July 18, 2008, 12:51:09 am
I'm using pSX.

How can I figure out where the scripts begin? I think I have the pointers, but I don't know where they're going.

edit:
I think I have the pointers for the opcodes. They're at E18D0 in my memory dumps.
Can you track down when they get loaded?  Based on a disassembly (and guessing where things are loaded - 0000.out @(80)010000 [definitely - according to PS2DIS, at least], 0002.out @0A1200, 0003.out @0E0100, 0004.out @0E0A00) I'm not finding anything resembling pointers at that spot.

Alternatively, can you give what the first couple of pointers are?  I can track down which file they're in from that and that'd help me determine what's being loaded where (stupid "let's break the engine into four or more parts"...).
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: Vehek on July 18, 2008, 12:55:02 am
I'm working with files made from RoomDecompress. That's the "OUT 3" I was referring to.
The pointers are in the same file as the fieldscript, but I can't figure out exactly where in the file they point to.

Edit:
I think the pointer to the decompressed fieldscript gets stored to (80)0E3A48 in memory.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: MDenham on July 18, 2008, 01:14:28 am
I'm working with files made from RoomDecompress. That's the "OUT 3" I was referring to.
The pointers are in the same file as the fieldscript, but I can't figure out exactly where in the file they point to.
They wouldn't be pointing to somewhere in the file; they'd be pointing to somewhere in memory in general (namely, the routines on a per-opcode basis).

...Though am I interpreting what you're saying correctly as that there's a separate table of opcodes->pointers for each room?  If so, that's one hell of a mess.  Fieldscript should use a single table of opcodes, and that table would be somewhere in the engine (which is 0000/0002/0003/0004.out from a "normal" dump of a full disc).

Tables that fit this pattern:
0000.out, 0x91700 - 176 pointers
0002.out, 0x00140 - 333 pointers
0002.out, 0x3E3B0 - 390 pointers
0004.out, 0x00834 - 192 pointers
0004.out, 0x36184 - 52 pointers
0004.out, 0x36404 - 229 pointers

Of those, at least one is Element-related (probably one of the two long ones in 0002.out), and I believe the 52-pointer table is related to character attacks.  The fieldscript opcode routine pointers...  well, I'm leaning towards that being the table in 0000.out, but I'm not sure.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: Vehek on July 18, 2008, 01:25:35 am
Sorry for being unclear. Each room is going to have pointers to the scripts for the entities in the room. Those were the pointers I was talking about in my previous post.

Edit-OK, looks like the script pointers go to: Script pointer + location after pointers.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: Vehek on July 21, 2008, 03:47:22 am
Further studies:
00 - Return
01 XX YY - Go to YYXX
0F XX 80 - Load NPC model XX
9E XX 80 - Set dialog portrait to XX.

Should I try to put what I've found so far in the encyclopedia?
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: Akari on July 21, 2008, 01:56:05 pm
Hmm looks a lot like opcodes in Xenogears. If so - 0x8000 bit means that this is immediate value. If this bit is not set that value will be taken from memory.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: MDenham on July 21, 2008, 08:17:27 pm
Hmm looks a lot like opcodes in Xenogears. If so - 0x8000 bit means that this is immediate value. If this bit is not set that value will be taken from memory.
Not too surprising that the fieldscript engines are similar (if not identical)...
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: Vehek on July 23, 2008, 12:49:09 am
I realized while looking at some fieldscript that opcode BB is more than Give Element.
ZZ controls what it does. So far, I have 82 for Element and 84 for Key Item.

Edit-01 in XX (of the BB opcode) takes away an Element or Key Item.

Edit 2- More on opcode BB, parameter ZZ:
I think 80 is for the rest of the items (materials, weapons, accessories, etc.)
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: halkun on July 26, 2008, 03:16:19 am
The FF7 opcode list can be found here (http://wiki.qhimm.com/FF7/Field/Script/Opcodes)

I have a hard time believing they would recode the whole thing when there was a perfectly good parser to start with.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: MDenham on July 26, 2008, 06:36:41 am
The FF7 opcode list can be found here (http://wiki.qhimm.com/FF7/Field/Script/Opcodes)

I have a hard time believing they would recode the whole thing when there was a perfectly good parser to start with.
Recode, probably not.  Dummy out or repurpose opcodes that would have no relevance to the new game, though?  Fairly likely, especially if they ran out of opcodes that weren't used in FF7.

It's also entirely possible that they just wrote up a new table of opcodes - the parser doesn't really care what the opcodes in general do, it just converts them to function pointers (at least, that's how I'd write it - maximum code reusability, minimal hassle) - in which case the only way to tell which opcode does what is by checking against the possible options that are known from, say, FF7 (or blindly testing everything).
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: Akari on July 26, 2008, 03:53:36 pm
2halkun: Opcodes in FFVII (and ffvii itself) was written pretty badly and not optimized at all. In later games they rewrite opcodes and all system of working with savemap as well as all bool value was packed as bit flags. Its much closer to Xenogears than to FFVII. I believe FFVIII will be direct reference, but very little known about it.

Example:
In ffvii there was a lot of conditional jumps, better known as "if" opcode.
In xenogears there is only one such opcode: 0x02  or "ConditionalJump" description is

0x02 ConditionalJumpTo(u16 value1, u16 value2, u8 flag, u16 address);
    flag & 0xF0 - how read values.
        0x00 - v value1, v value2, sign from first value is used for both.
        0x40 - v value1, s16 value2, sign from first value is used for both.
        0x80 - s16 value1, v value2, sign from second value is used for both.
        0xC0 - s16 value1, s16 value2.
    flag & 0x0F - condition.
        0x00 - value1 == value2
        0x01 - value1 != value2
        0x02 - value1 >  value2
        0x03 - value1 <  value2
        0x04 - value1 >= value2
        0x05 - value1 <= value2
        0x06 - value1 &  value2
        0x07 - value1 != value2
        0x08 - value1 |  value2
        0x09 - value1 &  value2
        0x0A - (0 NOR value1) &  value2
    do condition with two values.
    if true continue with next opcode, jump otherwise.

As you can see it covers immediate values as well as variables read from memory, it covers signed values as well as unsigned.

General idea though stays the same.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: Vehek on July 30, 2008, 11:25:15 pm
Some of the opcodes I have:
Arguments marked with '*' had bit 0x80 set in examples I saw.

5A aa bb* cc dd* - Jumpmap to map bbaa with parameter cc

96 xx yy* - Add character xx to roster?

25 aa bb cc dd ee ff gg - Set object coordinates. Ex. 25 DB 00 BA 06 C0 00 80 82.

42 00 aa bb cc dd ee ff? gg*? - Move object to coordinates?
42 01 - Needed right after for 42 00 to work?

41 xx yy* - Set movement speed

94 aa bb* cc dd - Conditional jump, checks if character aa is in party.

7E aa 80* - Set movie to be played

7F - Play movie

80 xx yy* - Involved with room graphics. Observed in unused orphanage demo scene to display drawings and reveal door.

02 seems to be a conditional jump command in Chrono Cross too.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: Akari on July 31, 2008, 01:45:45 am
42 00 aa bb cc dd ee ff? gg*? - Move object to coordinates?
42 01 - Needed right after for 42 00 to work?

This things can be meet in xenogears as well. I meet it twice and both times it repeat previous action with some other entity/parameters/window.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: Vehek on August 19, 2008, 05:07:49 pm
Some other opcodes. Some of these are old ones I didn't post before.

88 xx yy* - Play song xx. I've also seen this used in the startup scripts in some of the fieldscripts I've looked at.

E3 aa* bb cc dd - Make character aa say dialog (cc?)bb if in party.

7B xx yy* - Add character xx to active party (if space available)

7C xx yy zz - Not sure, may be required to update after a 7B command. Ex. 7C 2D 02 80; 7C 35 01 0A

7D xx - Remove character xx from active party.

Opcode FE Additional Opcodes:
4A xx yy* - Rename character xx.

5E xx yy* - Element Shop xx.

68 xx yy* - Blacksmith xx

5B - Character Exchange

Edit-I've done some experiments recently, and concluded that 7C may actually have no parameters.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: Vehek on December 17, 2008, 11:23:18 pm
C9 aa bb* cc dd* ee ff* - Battle related. bbaa is the battlescript used. (dd)cc is the battle field.
FE 10 - Initiates a battle
(For an example, go to 0x103464 in memory while at the Chief's Meadow in Home world.)

15 aa bb cc dd ee - Not completely sure yet. 15 80 00 05 00 40 set the fifth (when counting the lowest bit as #0) bit (0x20) of variable 0x80. Effects of other settings of ee not yet tested.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: FaustWolf on December 18, 2008, 12:07:19 am
Holy COW, I didn't know you guys made all this awesome progress while I was gone. I honestly need to brush up on everything opcode related, but looks like all the game data is being cracked bit by bit (byte by byte, I should say).

Not sure if anyone's had a chance to investigate this yet, but any ideas on how we would go about finding pointers to model textures and 3D model data? I assume the fieldscript would contain pointers to overworld character models, whereas some kind of battle script would contain pointers specifying where player character battle models are. I've found where the pointers to NPC models are (these are oddly enough left out by Yazoo's dumper; see here (http://www.chronocompendium.com/Term/Room_Files.html)), it's just the player character models that have escaped me.

Also, reflecting on our problem with using anything larger than Size 0 sprites for player characters in Chrono Trigger, I'm worried that Chrono Cross memory management may be set up to work with *only* textures of 128x128 pixel size for the overworld character models. NPCs and enemies can have 128x256 pixel textures or even two 128x256 pixel textures, but there isn't a single player character who uses anything larger than a 128x128 pixel texture on the overworld. 8)
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: Vehek on December 18, 2008, 02:10:53 am
I haven't completely deciphered fieldscript or battlescript yet, but I don't think they have pointers to things outside themselves.
I've tried messing with that file pointer table you found and it's worked for me.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: Vehek on December 29, 2008, 01:39:24 am
A3 aa bb* cc dd* ee ff*
Similar to opcode C9, but probably for more normal battles where the enemies involved vary.

For ffee on both C9 and A3:

AC xx yy zz*
Seems to be transparency related. When xx was FB, it affected the entity executing the command. FD, FE, and FF affected PC3, PC2, and PC1 respectively.

(http://i239.photobucket.com/albums/ff83/TtravelrKev/Chrono%20Cross%20Stuff/TransparentSerge.png)


10 aa bb cc dd ee
Not sure. 10 vv uu xx yy 40 caused #yyxx to be stored to variable uuvv.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: FaustWolf on December 29, 2008, 01:58:54 am
Oh man, excellent work Vehek! This is really exciting.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: yaz0r on January 16, 2009, 09:33:15 pm
Okay, I've been poking around the CC binary a bit and are the results.

Whatever the 0003 file of each room is, it interpreted by the 0002.out overlay, aka the field engine. This overlay is loaded at 0x800A3308 in memory. The code interpreting the script is the function at 0x800CECE4 and the opcode table is located at 0x800E16B8. I still have some doubts this is where most of the script interpretation is done because of a few details that don't match yet.

The 0003 file is composed of 0x80 bytes of header, a number of entry, followed by entries of size 0x40 times the number of entries. The script bloc starts just after that.

It can be argued that those entries are the script entities, and that the first UInt16 of each entry is the offset in the script bloc where the script for that particular entity begins.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: FaustWolf on January 16, 2009, 09:38:33 pm
Thanks yaz0r! I don't know enough to comment on that at all, but do you agree that the 3.OUT could be the walkmesh, as I think has been proposed elsewhere?
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: Vehek on January 16, 2009, 09:40:55 pm
I don't know much about the code works, but I think the opcode table at 0x800E16B8 is the table for the FE subopcodes.
Regular field opcodes are at 0x800E18D0.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: yaz0r on January 16, 2009, 09:47:24 pm
That would make more sense and clear up my doubts about if the opcode table I was seeing was for sub opcode or not. Seems that ran out of opcode while writing CC and added 134 extra opcodes.

@FaustWolf:
You're talking about 0004.out right ?
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: yaz0r on January 16, 2009, 10:13:29 pm
After a little more digging, it seems the 0003.out header is an array used to access the global variables form the local room.
Parameters of opcodes can be either variable or immediate value if the bit 0x8000 is set (the actual value is of course masked with 0x7FFF).
If it's a variable, the game compute the variable index like this:

int idx = (value & 0x7FFF) >> 6;
int localVariable = roomLocalTable[idx];
int globalVariableIdx = ((value & 0x7FFF) >> 1) & 0x1F

if(localVariable & (1 << globalVariableIdx)) // signed or not ?
{
    return (UInt16)variableTables[globalVariableIdx];
}
else
{
    return (Int16)variableTables[globalVariableIdx];
}
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: FaustWolf on January 16, 2009, 10:14:04 pm
Oh, .OUT 4 it is then. My bad. I'll label that appropriately in our wiki.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: yaz0r on January 16, 2009, 10:18:14 pm
Those are just convensions :)
It could be the walk mesh. As anyone ever tried to display what the data would look like in 3d ?
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: yaz0r on January 18, 2009, 01:48:30 pm
I've started writting a little script decompiler. I have implemented a few opcodes so far and some part of the script are starting to make sense. Here is how the game randomize the title screen sequence:

0x015C: var[0x040E] = rand()
0x015F: var[0x040E] &= 3
0x0165: IF_JUMP(var[0x040E] == 0x0000, 0x0175)
0x016D: opD3("tit0")
0x0172: JUMP(0x01A5)
0x0175: IF_JUMP(var[0x040E] == 0x0001, 0x0185)
0x017D: opD3("tit1")
0x0182: JUMP(0x01A5)
0x0185: IF_JUMP(var[0x040E] == 0x0002, 0x0195)
0x018D: opD3("tit2")
0x0192: JUMP(0x01A5)
0x0195: IF_JUMP(var[0x040E] == 0x0003, 0x01A5)
0x019D: opD3("tit3")
0x01A2: JUMP(0x01A5)
0x01A5: op59()
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: FaustWolf on January 18, 2009, 01:52:57 pm
Wow, awesome! Thanks so much for your work yaz0r!
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: yaz0r on January 18, 2009, 02:15:47 pm
7F - Play movie

From the game assembly, 7F is just stalling the script until a variable is set. Probably waiting for the movie to end.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: Vehek on January 18, 2009, 02:23:17 pm
I was probably just guessing and didn't test 7E by itself. I think all of my research is based off on context or observation of the in-game effects.

Are there any differences between opcode02 and the "Conditional Jump" Akari described?
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: yaz0r on January 18, 2009, 02:43:55 pm
I quickly looked at the assembly and it seemed to match. I didn't dig in much details.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: yaz0r on January 18, 2009, 04:05:10 pm
Here is a decompilation of CC room 0 (the title screen room). It's still hard to read, but it gives a few ideas about how it works.



[attachment deleted by admin]
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: yaz0r on January 18, 2009, 07:21:52 pm
To update the opcode list:

0x00 OP_STOPThis actualy stops the script, it doesn't return to the calling function (if there was one)
0x01 OP_JUMP(Imm16)Jump to offset
0x02 OP_IF_JUMP(Imm16,Imm16,Imm8,Imm16)Conditional jump, as described before
0x05 OP_CALL(Imm16)Call a sub routine. Max stack depth is 4
0x0D OP_RETURNReturn from sub routine
0x10 OP_SET_VAR(Imm16, SVar16, SignBits)Set variable to value
0x11 OP_SET_VAR_TRUE(Imm16)Set variable to 1
0x12 OP_SET_VAR_FLASE(Imm16)Set variable to 0
0x13 OP_VAR_ADD(Imm16, SVar16, SignBits)Add value to variable
0x14 OP_VAR_SUB(Imm16, SVar16, SignBits)Sub value from variable
0x15 OP_VAR_OR_BIT(Imm16, SVar16, SignBits)Or variable with nth bit
0x16 OP_VAR_XOR_BIT(Imm16, SVar16, SignBits)Xor variable with nth bit
0x17 OP_VAR_INC(Imm16)Increment variable by 1
0x18 OP_VAR_DEC(Imm16)Decrement variable by 1
0x19 OP_VAR_AND(Imm16, SVar16, SignBits)And variable with value
0x1A OP_VAR_OR(Imm16, SVar16, SignBits)Or variable with value
0x1B OP_VAR_XOR(Imm16, SVar16, SignBits)Xor variable with value
0x1C OP_VAR_SHIFT_LEFT(Imm16, SVar16, SignBits)Shift left variable by value
0x1D OP_VAR_SHIFT_RIGHT(Imm16, SVar16, SignBits)Shift right variable by value
0x1E OP_VAR_RAND(Imm16)Set variable to random value
0x1F OP_VAR_RAND_MUL(Imm16, UVar16)Set variable to random mul value
0x20 OP_VAR_MUL(Imm16, SVar16, SignBits)Mul variable by value
0x21 OP_VAR_DIV(Imm16, SVar16, SignBits)Div variable by value
0x22 OP_VAR_SIN(?)Compute sin (haven't looked the args yet)
0x23 OP_VAR_COS(?)Compute cos (haven't looked the args yet)
0x24 OP_VAR_TAN(?)Compute tan (haven't looked the args yet)
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: ZeaLitY on January 19, 2009, 03:46:33 am
Thanks a ton.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: yaz0r on January 21, 2009, 10:01:08 am
I'll post my new findings soon, including the decompiled script of Kid from the programmers ending.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: yaz0r on January 22, 2009, 08:00:39 pm
Here is the decompiled script for the room 1745 of CD2 (the programmer room with Kid). Kid is entity 13 in the script.
I've also included the source for the decompiler.

The interesting part:

---------------------------
| Entity 13 script 1
---------------------------
0x0241: var[0x0400] = rand()%6
0x0246: IF_JUMP(var[0x0400] == 0x0000, 0x025F)
0x024E: op42(0x00, -642, -99, var[0x00C0])
0x0257: op42(0x01)
0x0259: WAIT(60)
0x025C: JUMP(0x02C9)
0x025F: IF_JUMP(var[0x0400] == 0x0001, 0x0278)
0x0267: op42(0x00, -627, -99, var[0x00C0])
0x0270: op42(0x01)
0x0272: WAIT(40)
0x0275: JUMP(0x02C9)
0x0278: IF_JUMP(var[0x0400] == 0x0002, 0x0291)
0x0280: op42(0x00, -607, -99, var[0x00C0])
0x0289: op42(0x01)
0x028B: WAIT(60)
0x028E: JUMP(0x02C9)
0x0291: IF_JUMP(var[0x0400] == 0x0003, 0x029F)
0x0299: WAIT(60)
0x029C: JUMP(0x02C9)
0x029F: IF_JUMP(var[0x0400] == 0x0004, 0x02AD)
0x02A7: SET_ANIMATION(9)
0x02AA: JUMP(0x02C9)
0x02AD: IF_JUMP(var[0x0400] == 0x0005, 0x02BB)
0x02B5: WAIT(90)
0x02B8: JUMP(0x02C9)
0x02BB: IF_JUMP(var[0x0400] == 0x0006, 0x02C9)
0x02C3: SET_ANIMATION(1)
0x02C6: JUMP(0x02C9)
0x02C9: STOP()

Basicaly, the code means:

var[0x0400] = rand() % 6
switch(var[0x0400])
{
case 0:
op42(0x00, -642, -99, var[0x00C0])
op42(0x01)
wait(60)
break;

case 1:
op42(0x00, -627, -99, var[0x00C0])
op42(0x01)
WAIT(40)
break;

case 2:
op42(0x00, -607, -99, var[0x00C0])
op42(0x01)
WAIT(60)
break;

case 3:
WAIT(60)
break;

case 4:
SET_ANIMATION(9)
break;

case 5:
WAIT(90)
break;

case 6:
SET_ANIMATION(1)
break;
}



[attachment deleted by admin]
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: MDenham on January 22, 2009, 10:26:34 pm
So, hang on, is the IF_JUMP one taking an address to jump to if the result is false?

If not, you've got your comparisons backwards and they should be != instead.


Disregard, read back through things and either it is a case of massive confusion (read: the list given back on page 3 has all of the comparisons backwards, and it is a jump when true) or the jump is when false.  Either one gives the same result, BTW (jumping if "x>y" is false is the same as jumping if "x<=y" is true).
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: Vehek on January 23, 2009, 12:31:21 am
I was trying some things with the script decompiler (after adding some opcodes to the program) and I noticed it messed up when the byte after a STOP wasn't the next script. (I was testing with Chief's Meadow, Home)
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: yaz0r on January 23, 2009, 05:17:33 am
Disregard, read back through things and either it is a case of massive confusion (read: the list given back on page 3 has all of the comparisons backwards, and it is a jump when true) or the jump is when false.  Either one gives the same result, BTW (jumping if "x>y" is false is the same as jumping if "x<=y" is true).

the IF_JUMP opcode come directly from what was posted on page 3, maybe there is some differences.

I was trying some things with the script decompiler (after adding some opcodes to the program) and I noticed it messed up when the byte after a STOP wasn't the next script. (I was testing with Chief's Meadow, Home)

Sometime there is some barbage bytes at the start of the fieldScript, but I've never seen any garbage bytes between two scripts. I'll look into that.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: MDenham on January 23, 2009, 07:02:00 am
Disregard, read back through things and either it is a case of massive confusion (read: the list given back on page 3 has all of the comparisons backwards, and it is a jump when true) or the jump is when false.  Either one gives the same result, BTW (jumping if "x>y" is false is the same as jumping if "x<=y" is true).

the IF_JUMP opcode come directly from what was posted on page 3, maybe there is some differences.
The main thing that was confusing me is that every processor with a conditional jump that I know of performs the conditional jump when that condition is true.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: yaz0r on January 23, 2009, 09:04:38 am
The main thing that was confusing me is that every processor with a conditional jump that I know of performs the conditional jump when that condition is true.

Well, they could have used a reversed logic for the script engine, there is nothing against it. I'll check that for sure later.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: yaz0r on January 23, 2009, 09:12:32 am
Also, in case you're wondering, script 0 is the init script, script 1 is ran every frame, script 2 is used when interacting with the entity and script 3 is used when colisioning with the entity (mostly used for entity that trigger room change). Also Entity 0 is always the director, and the last is the debug entity present in nearly every room (entity 15 in my exemple).
This is all guess work, but it seems to fit.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: yaz0r on January 23, 2009, 03:04:12 pm
I was trying some things with the script decompiler (after adding some opcodes to the program) and I noticed it messed up when the byte after a STOP wasn't the next script. (I was testing with Chief's Meadow, Home)

For me, Chief's Meadow home (d0455) output the script:

---------------------------
| Entity 0 script 0
---------------------------
0x0009: SET_SHADING_PALETTE(0x0034)
0x000C: op64(-100)
0x0010: Unk opcode 0x83

and stops there because opcode 0x83 isn't handled by the decompiler yet.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: Vehek on January 23, 2009, 03:14:32 pm
As I mentioned, I added some opcodes to the decompiler code.


0x005E: STOP()
0x005F: ENABLE_BACKGROUND_LAYER(128)
0x0062: STOP()
0x0063: if (scriptVar3 && 0x5050) == 0 jump 0xE00
0x0068: Unk opcode 0xFD

Entity 1's first script is supposed to start at 0x67.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: yaz0r on January 23, 2009, 03:17:49 pm
Okay. It's quite probable that an opcode before 0x5E is wrongly decoded. There can only by 31 background layers (according to the code), so the ENABLE_BACKGROUND_LAYER is wrong as well.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: yaz0r on January 23, 2009, 03:24:52 pm
I've checked a few things and it seems there is garbage bytes in the script. I know how to fix that. I'll start working on it asap.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: yaz0r on January 30, 2009, 04:40:44 pm
I found CC debug room.

[attachment deleted by admin]
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: FaustWolf on January 30, 2009, 04:49:41 pm
WHOA. Does it use the same "debug text" that seems to be in every room yaz0r, or is this something completely different?
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: yaz0r on January 30, 2009, 04:58:46 pm
I haven't checked it. Actualy, this room is from the CC demo that was included in a squaresoft demo disc. They left the room 0 in the data, but not the other planner rooms. I found this like 20 min ago so there is not much to report yet. The room allow to change music and probably go to any part of the game bu crash badly as the demo miss most of the data. I'll see it it can be imported into the full game.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: yaz0r on January 30, 2009, 05:59:20 pm
Here is the save state if anyone want to test it.

[attachment deleted by admin]
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: yaz0r on February 02, 2009, 11:54:03 am
Ok, looks like there is very little interest in all this.
Too bad...
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: Akari on February 02, 2009, 04:00:06 pm
I look at your investigation very closely. It can help me with Xenogears =)
I still not understand how and why they store sign of variables in field files.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: FaustWolf on February 02, 2009, 04:02:00 pm
Sorry yaz0r, everyone's backed up on a million projects at once now that things have picked up around here. ZeaLitY will probably put this in his next mega update. It's always been curious that the final version of Chrono Cross never had a "real" debug room.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: ZeaLitY on February 02, 2009, 07:25:18 pm
Yeah. I didn't post because I thought maybe there would be success in putting the debug room back into Chrono Cross (not just the demo version).
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: yaz0r on February 02, 2009, 09:06:33 pm
Ho, I didn't ask for that :)
It's just the lack of feedback I was having on the thread let me thing that only I cared for this stuff :)

Anyway, here is a slightly updated source that should fix the badly decoded opcodes because of the garbage byte (that may be some actual data inlined in the script, I don't know yet).
I haven't tested the new code very much, but it seems to be giving some results. I also worked a bit on the assembly to get more information about the scripting engine.

[attachment deleted by admin]
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: FaustWolf on February 02, 2009, 11:36:09 pm
So Yaz0r, does the decompiler essentially convert fieldscript into a programming-language like script that's sort of readable? I take it we need to decompress the fieldscript first and then load the decompressed fieldscript into the decompiler?
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: Vehek on February 03, 2009, 01:25:46 am
I haven't tested the new version yet, but the type of output is probably the same as before. Faustwolf, you can look at the examples posted before.

Yes, it requires a decompressed fieldscript.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: yaz0r on February 03, 2009, 06:24:14 am
Yeah, that's the idea. The point is to properly decode all the script commandes used in the game to produce a readable script output. I believe such a thing was done for CT before. In the case of those debug string that are present in every room, decoding the field script indicate that squaresoft duplicated a debug entity in every room. That entity (usualy the last) is always active and waiting for a specific input to show the debug menu. That input is passed by an engine variable that I called scriptVar3. If scriptVar3 & 0x08 is set, the debug menu will show up.
Disassembling the script can also give insight about things that were leftovers during development, other yet unknown debug features, ...

About that debug room, just to let you know, the character on the left allows to modify the current party composition. As most of the characters are not present in the demo data, it will crash if you try to add to the party an character missing from the demo. The character in the center is the "go anywhere" character. First choice is go to room by id, second if go to room by place name (like Arni village A/ Arni village B). The last choice let you go to the planners room (not present in the demo data). The top right character is a shortcut to the planners room list. And finaly the bottom right is the sound test character that allows to test music and sound effects.
I'm not sure the debug room can actualy be reinserted into the main game data. The reasons is that the debug room text is japanese and may not work at all in the US build of the game. And if it somehow worked,  the text would probably be completly unreadable (there is no japanese font in CC US afaik). So all the text for that room would have to be rewritten. Also, don't forget that this debug room was taken from the middle of the development of CC. Not all characters (and probably places) weren't finalized yet and later modification would not be present in the debug room. So, reinserting this debug room is probably technically possible, but would require a lot of modifications for it to properly work. So it will never be the "real thing".

As a side note, has anyone ever checked if the japanese version of CC included room 0-8? I can't remember checking that personnaly back when I was hacking the game (I used to compare the US/JAP version of files to see where did the game text was hidden).
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: ZeaLitY on February 03, 2009, 08:17:53 am
Hm. Can you try:

http://www.chronocompendium.com/images/wiki/5/50/Demo_Cross_Characters.png

The one before Orlha? There is 0% chance he is in the game, but just in case...
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: yaz0r on February 03, 2009, 09:25:54 am
I'll give it a try when I get home, but I don't have much hopes.
At any rate, I'll hacking a quick tool to unpack the CC demo files, so I can more easily investigate that debug room and try to insert it into the full game.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: yaz0r on February 03, 2009, 03:56:08 pm
I'll give it a try when I get home, but I don't have much hopes.

Tried all the characters and as expected, only the one actualy present in the demo work.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: yaz0r on February 03, 2009, 05:13:46 pm
Here is the walkmesh for the first room of CC (the elevator room).


[attachment deleted by admin]
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: FaustWolf on February 03, 2009, 05:33:45 pm
Oh maaan, this is awesome yaz0r. Which file number is it that contains the walkmesh again? Is it definitely 0004.OUT?
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: yaz0r on February 03, 2009, 05:46:56 pm
It's the 0004.out and 0005.out.
0004 is the triangle setup, and 0005 is the vertice array.

Here is a quick and dirty code that export a walkmesh to obj.

[attachment deleted by admin]
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: utunnels on February 08, 2009, 10:36:00 am
Ho, I didn't ask for that :)
It's just the lack of feedback I was having on the thread let me thing that only I cared for this stuff :)

Anyway, here is a slightly updated source that should fix the badly decoded opcodes because of the garbage byte (that may be some actual data inlined in the script, I don't know yet).
I haven't tested the new code very much, but it seems to be giving some results. I also worked a bit on the assembly to get more information about the scripting engine.

Hmm, I tried your decompiler today, but I got something like this:

---------------------------
| Entity 1 script 5
---------------------------
0x00CB: op43(0x001100, -880, var[0xFFFFF0C0], 240)
0x00D4: STOP()


What is var[0xFFFFF0C0] supposed to be?




I tried Luccia's room.
It seems this script is used for displaying Lucca's letter:

---------------------------
| Entity 25 script 4
---------------------------
0x0B50: PLAY_SONG(21) // The Girl Who Stole the Stars
0x0B53: op8A() // wait something
0x0B54: op68(0, 0, 0, 60, 60) // screen fade or blink, not sure
0x0B5F: WAIT(60)
0x0B62: op62(165, 100, 0, 0, 820)
0x0B6D: DIALOG(0x0037, 0x00)  // My dear Kid, How are you doing?
0x0B71: WAIT_DIALOG()
0x0B72: DIALOG(0x0038, 0x00)
0x0B76: WAIT_DIALOG()
0x0B77: DIALOG(0x0039, 0x00)
0x0B7B: WAIT_DIALOG()
0x0B7C: DIALOG(0x003A, 0x00)
0x0B80: WAIT_DIALOG()
0x0B81: DIALOG(0x003B, 0x00)
0x0B85: WAIT_DIALOG()
0x0B86: DIALOG(0x003C, 0x00)
0x0B8A: WAIT_DIALOG()
0x0B8B: DIALOG(0x003D, 0x00)
0x0B8F: WAIT_DIALOG()
0x0B90: DIALOG(0x003E, 0x00)
0x0B94: WAIT_DIALOG()
0x0B95: DIALOG(0x003F, 0x00)
0x0B99: WAIT_DIALOG()
0x0B9A: DIALOG(0x0040, 0x00)
0x0B9E: WAIT_DIALOG()
0x0B9F: DIALOG(0x0041, 0x00)
0x0BA3: WAIT_DIALOG()
0x0BA4: DIALOG(0x0042, 0x00)
0x0BA8: WAIT_DIALOG()
0x0BA9: WAIT(60)
0x0BAC: DIALOG(0x0043, 0x00)
0x0BB0: WAIT_DIALOG()
0x0BB1: DIALOG(0x0044, 0x00)
0x0BB5: WAIT_DIALOG()
0x0BB6: DIALOG(0x0045, 0x00)
0x0BBA: WAIT_DIALOG()
0x0BBB: DIALOG(0x0046, 0x00)
0x0BBF: WAIT_DIALOG()
0x0BC0: DIALOG(0x0047, 0x00)
0x0BC4: WAIT_DIALOG()
0x0BC5: DIALOG(0x0048, 0x00)
0x0BC9: WAIT_DIALOG()
0x0BCA: DIALOG(0x0049, 0x00)
0x0BCE: WAIT_DIALOG()
0x0BCF: DIALOG(0x004A, 0x00)
0x0BD3: WAIT_DIALOG()
0x0BD4: DIALOG(0x004B, 0x00)
0x0BD8: WAIT_DIALOG()
0x0BD9: WAIT(60)
0x0BDC: DIALOG(0x004C, 0x00)
0x0BE0: WAIT_DIALOG()
0x0BE1: WAIT(30)
0x0BE4: opFE1D(180, 0)
0x0BEA: op68(0, 0, 0, 0, 60)
0x0BF5: STOP()




This script has something to do with the ghost shadow.
Because if I replace it with a dialgue, the shadow just won't show up.

---------------------------
| Entity 24 script 4
---------------------------
0x0B19: op34(0x00)
0x0B1B: opFE47(3000, 2000, 0)
0x0B24: Unk opcode 0x94




Hmm, it seems that's the letter Luccia gives to Kid.

(http://www.duose.com/p/2009/0208/84868_46875.png)
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: yaz0r on February 08, 2009, 04:41:37 pm
Can you give me the room numbers you've been working on ? Especialy for the first issue you mentioned (0xFFFFF0C0 means that it's a negative value, that should not be possible).
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: utunnels on February 08, 2009, 11:28:43 pm
I copied the decompressed script from memory.
How can I know the room number anyway?
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: Vehek on February 08, 2009, 11:41:37 pm
We have this list (http://www.chronocompendium.com/Term/Chrono_Cross_File_Structure.html#Debug_Mode_Map_Digits_-_Subtract_8_for_Equivalent_Room_.23)
It's room 193 on that list.
(Both versions of the treasury also contain Luccia's lab, set parameter to 01 to go to the lab part).
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: FaustWolf on February 08, 2009, 11:45:44 pm
We also have a list in terms of .OUT files (http://www.chronocompendium.com/Term/Rooms_%3D_356-1966_Rooms.html) if that's helpful.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: utunnels on February 09, 2009, 04:09:44 am
Yeah, that script is for both the treasury and the lab.
If you let the game load Grobyc's model instead of the letter's, Luccia will hold mini Grobyc in her hand when you talk to her.



We have this list (http://www.chronocompendium.com/Term/Chrono_Cross_File_Structure.html#Debug_Mode_Map_Digits_-_Subtract_8_for_Equivalent_Room_.23)
It's room 193 on that list.
(Both versions of the treasury also contain Luccia's lab, set parameter to 01 to go to the lab part).

Ah, so there's aleady a room jump cheat.




It seems most of those with crash/black screen are scenes from disc2.

Quote from: http://www.chronocompendium.com/Term/Chrono_Cross_File_Structure.html
384 - Crash
It's S.S. Zelbess' comedy show.

Quote
439 - Crash
440 - Crash
441 - Black screen
442 - Crash
439 - Terra Tower summit, tele-pot platform scene.
440 - Terra Tower summit, under the stairway.
441 - Terra Tower summit, Frozen Flame scene.
442 - Terra Tower summit, Frozen Flame scene close range.

It seems those scenes are with their Sky Dragon Isle counterparts.

Quote
446 - Crash
El Nido Triangle First Area. Get stuck.

Quote
474 - Crash
475 - Crash
476 - Crash
474 - Clotho
475 - Lachesis
476 - Atropos

Quote
478 - Black screen
479 - Crash
480 - Crash
481 - Crash
482 - Crash
483 - Crash
484 - Crash
485 - Crash
486 - Black screen
487 - Crash

478 - Chronopolis sewer
479 - Chronopolis computer room(entrance to the sewer)
480 - Chronopolis stairway
481 - Chronopolis 4f right room
482 - Chronopolis 3f right room
483 - Chronopolis 2f laser doorway
484 - Chronopolis 4f left room
485 - Chronopolis 3f left room
486 - Chronopolis 2f left room
487 - Chronopolis 2f elevator hall

Quote
491 - Black screen
491 - Crhonopolis Frozen Flame room

Quote
496 - Black screen
497 - Crash
496 - Lucca's house, hall
497 - Lucca's house, stairs

Quote
506 - Black screen
507 - Black screen
508 - Crash
509 - Crash
510 - Crash
511 - Black screen
512 - Black screen
513 - Black screen
514 - Black screen
515 - Black screen
516 - Black screen
517 - Black screen
518 - Black screen
519 - Black screen
520 - Black screen
521 - Black screen
522 - Black screen
523 - Black screen
524 - Black screen
525 - Black screen
526 - Black screen
527 - Black screen
528 - Black screen
529 - Black screen
530 - Black screen
506 - Terra Tower entrance (the yellow boss)
507 - Terra Tower broken bridge(where you have to push the pillars)
508 - Terra Tower spiral stairway
509 - Terra Tower red trunks
...
530 - Terra Tower final form (boat scene)

Quote
534 - Black screen
535 - Black screen
536 - Black screen
537 - Black screen

534 - Ending, Schala's dialogues
535 - Chronopolis fights Dinopolis
536 - Day of Lavos
537 - Dinopolis in its home dimension
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: FaustWolf on February 09, 2009, 04:11:37 am
I wonder why all those crashed for ZeaLitY? utunnels, are you going through the Debug menu too, or are you basing this on investigating the raw data? I'll update these on the main file structure page and the Room Files subpage soon.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: utunnels on February 09, 2009, 04:14:50 am
I think he only used disc1?

I wonder why all those crashed for ZeaLitY? utunnels, are you going through the Debug menu too, or are you basing this on investigating the raw data? I'll update these on the main file structure page and the Room Files subpage soon.

Oh, I used the cheat code instead of debug menu.

http://www.chronocompendium.com/Term/Chrono_Cross_File_Structure.html (http://www.chronocompendium.com/Term/Chrono_Cross_File_Structure.html)
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: ZeaLitY on February 09, 2009, 04:48:40 am
Yep, Disc 1.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: yaz0r on February 09, 2009, 06:23:48 am
I'm modifying the dumper so it can dump the scripts from the whole game in one pass. Also, I'll try to include the dialogue in the script disassembly so it's easier to figure out what the script is doing without having to check the dialog text every time.

I remember that some of the room on disk2 (especialy the developper ending room) overlaps regular rooms on disk1 (ie, they share the same room numbers). I may be wrong, but if I'm not, it means it's not possible to have a global list of rooms that work for both disk1 and 2.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: utunnels on February 09, 2009, 06:30:03 am
I remember that some of the room on disk2 (especialy the developper ending room) overlaps regular rooms on disk1 (ie, they share the same room numbers). I may be wrong, but if I'm not, it means it's not possible to have a global list of rooms that work for both disk1 and 2.

You are probably right, because when I checked those rooms that are not listed, I didn't find the rooms for the developers ending...
Or perhaps they are just regular rooms with different script conditions?
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: Vehek on February 09, 2009, 07:08:03 pm
Not only are some rooms disc-specific, some rooms are just flat-out different by disc (#452-463, which is then followed by a run of disc-specific rooms to 469; 470 is identical; 471 starts more disc-specific rooms, on out to 479...  and then 480 starts another run of "these rooms are not the same...").
(If you don't know, those are by the dumper's numbering.)
The developers' rooms are in place of the Dead Sea rooms, starting with game-order room 462.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: yaz0r on February 10, 2009, 11:38:39 am
Just to let you know, I'm rewritting a disc dumper that will dumps the room with correct index to clean this mess a bit.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: utunnels on February 12, 2009, 11:35:57 pm
Quote from: UTunnels
474 - Lachesis
475 - Clotho
I mistook these 2 with each other. It should be:
474 - Clotho
475 - Lachesis
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: utunnels on February 16, 2009, 02:06:51 am
It seems use the cheat to jump to room 0 won't crash the game in JPN version, instead, it takes you to the title screen.

The room jump number is stored at 800852E0 in JPN version.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: yaz0r on February 18, 2009, 05:23:06 am
Interesting. I'll look into that.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: utunnels on February 18, 2009, 11:17:02 am
Sadly, there're no extra rooms... although the game jumps to some strange places(title screen, movie scene) instead of crash.



The developers' rooms are in place of the Dead Sea rooms, starting with game-order room 462.

It seems Lucca's rooms overlap some endings of disc 1.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: ZeaLitY on February 22, 2009, 10:14:35 am
Is there a way we can rip the Japanese text in the Demo debug room? I can add it to the translation page for future translation work.

If not, I'll just make screenshots of all the dialogue.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: yaz0r on February 22, 2009, 06:40:26 pm
It seems most of the debug room text are available in english in room 242
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: utunnels on February 24, 2009, 01:31:30 am
It seems the character table is different in the demo version.
So I need time to make another one.

Anyway, here's the result using the old table, some kanjis are not correct.

Later, maybe another day.


EDIT

Now the debug script is complete.

Code: [Select]
+---------------+
| text   0h   0 |
+---------------+
{text speed ff}まっぷじゃんぷする?
   えんがちょ
   番号でする
   名前でする
   各担当の部屋に行く{end}

+---------------+
| text   1h   1 |
+---------------+
{text speed ff}マップ番号{input 3 digits number, init 000}{end}

+---------------+
| text   2h   2 |
+---------------+
{text speed ff}マップパラメーター{input 2 digits number, init 00}{end}

+---------------+
| text   3h   3 |
+---------------+
   {text speed ff}やめた
   村、町A
   村、町B
   ダンジョンA
   ダンジョンB
   ワールドマップA
   ワールドマップB{end}

+---------------+
| text   4h   4 |
+---------------+
   {text speed ff}アルニ村A
   テルミナA
   ガルドーブA
   隠者の小屋A
   ゼルベスA
   マブーレA
   もどる{end}

+---------------+
| text   5h   5 |
+---------------+
   {text speed ff}アルニ村B
   テルミナB
   ガルドーブB
   隠者の小屋B
   幽霊船B
   マブーレB
   もどる{end}

+---------------+
| text   6h   6 |
+---------------+
   {text speed ff}オパーサの浜A
   風鳴きの岬A
   溺れ谷A
   影切りの森A
   地下水脈A
   がけルートA
   蛇骨館A
   ヒドラの沼A
   水竜の島A
   死炎山A
   古竜の砦A
   次のページ
   もどる{end}

+---------------+
| text   7h   7 |
+---------------+
   {text speed ff}カオスフィールド
   死の門A
   亡者の島A
   海月海A
   爆心地A
   世界のへそA
   土竜の島A
   天竜の島A
   星の塔A
   前のページ{end}

+---------------+
| text   8h   8 |
+---------------+
   {text speed ff}オパーサの浜B
   風鳴きの岬B
   溺れ谷B
   影切りの森B
   地下水脈B
   がけルートB
   蛇骨館B
   ヒドラの沼B
   幽霊船B
   水竜の島B
   死炎山B
   古竜の砦B
   次のページ
   もどる{end}

+---------------+
| text   9h   9 |
+---------------+
   {text speed ff}神の門B
   亡者の島B
   海月海B
   炎の孤児院B
   世界のへそB
   土竜の島B
   天竜の島B
   モノリス祭{ff}{ff}B
   クロノポリスB
   前のページ{end}

+---------------+
| text   ah  10 |
+---------------+
   {text speed ff}全世界図A
   大陸図西A
   死海
   もどる{end}

+---------------+
| text   bh  11 |
+---------------+
   {text speed ff}全世界図B
   大陸図西B
   神の庭
   もどる{end}

+---------------+
| text   ch  12 |
+---------------+
   {text speed ff}やめた
   メンバー編成
   パーティー編成{end}

+---------------+
| text   dh  13 |
+---------------+
まだだよーん{end}

+---------------+
| text   eh  14 |
+---------------+
   {text speed ff}0:セルジュ
   1:キッド
   2:ギル
   3:イシト
   4:スラッシュ
   5:蛇骨大佐
   6:リデル
   7:カーシュ
   8:ゾア
   9:マルチェラ
  10:コルチャ
  49:ヤマネコ
   次のページ
   もーいいや{end}

+---------------+
| text   fh  15 |
+---------------+
   {text speed ff}11:ルチアナ
   12:ポシュル
   13:ラズリー
   14:ザッパ
   15:オーチャ
   16:ラディウス
   17:ファルガ
   18:ママチャ
   19:グレン
   20:レナ
   21:ミキ
   次のページ
   前のページ{end}

+---------------+
| text  10h  16 |
+---------------+
   {text speed ff}22:ハーレー
   23:ジャネス
   24:竜の子
   25:星の子
   26:スプリガン
   27:ラッキーダン
   28:カブ夫
   29:改良ラブルー
   30:ジルベルト
   31:スカール
   32:キノコ
   次のページ
   前のページ{end}

+---------------+
| text  11h  17 |
+---------------+
   {text speed ff}33:イレーネス
   34:メル
   35:リーア
   36:バンクリフ
   37:スネフ
   38:スティーナ
   39:ドク
   40:ギャダラン
   41:ピエール
   42:オルハ
   43:C13号base
   次のページ
   前のページ{end}

+---------------+
| text  12h  18 |
+---------------+
   {text speed ff}44:C13号a
   45:C13号b
   46:C13号aa
   47:C13号ab
   48:C13号bb
   49:ヤマネコ
   50:グレン2
   前のページ{end}

+---------------+
| text  13h  19 |
+---------------+
   {text speed ff}やめた
   加藤さんちに行く
   吉井さんちに行く
   木越さんちに行く
   打道さんちに行く
   斉藤さんちに行く
   宮川さんちに行く
   千葉さんちに行く{end}

+---------------+
| text  14h  20 |
+---------------+
 {text speed ff}音楽テスト
   曲
   常駐効果音
   やめた{end}

+---------------+
| text  15h  21 |
+---------------+
   {text speed ff}番号入力
   曲止める
   もどる
   やめた{end}

+---------------+
| text  16h  22 |
+---------------+
曲番号{input 2 digits number, init 00}{end}

+---------------+
| text  17h  23 |
+---------------+
   {text speed ff}番号入力
   もう一回
   常駐効果音止める
   もどる
   やめた{end}

+---------------+
| text  18h  24 |
+---------------+
効果音番号{input 3 digits number, init 000}{end}

+---------------+
| text  19h  25 |
+---------------+
属性{input 1 digits number, init 0}{end}

+---------------+
| text  1ah  26 |
+---------------+
0ー7まで{end}

+---------------+
| text  1bh  27 |
+---------------+
{text speed ff}ここはNo.{varb 0}です
   まっぷじゃんぷ
   このまっぷ
   じゃんぷまえ
   いっこまえ
   各担当の部屋に行く
   すぺしゃる
   やめた{end}

+---------------+
| text  1ch  28 |
+---------------+
マップ番号{input 3 digits number, init 000}{end}

+---------------+
| text  1dh  29 |
+---------------+
マップパラメーター{input 2 digits number, init 00}{end}

+---------------+
| text  1eh  30 |
+---------------+
あんさん、
これより前はありまへんで{end}

+---------------+
| text  1fh  31 |
+---------------+
   {text speed ff}やめた
   加藤さんちに行く
   吉井さんちに行く
   木越さんちに行く
   打道さんちに行く
   斉藤さんちに行く
   宮川さんちに行く
   千葉さんちに行く{end}

+---------------+
| text  20h  32 |
+---------------+
   {text speed ff}全面RGBいじり
   水中RGBいじり
   キャラRGBいじり
   キャラrotいじり
   スケールいじり
   れくとせっと
   もどる
   やめた{end}

+---------------+
| text  21h  33 |
+---------------+
   {text speed ff}変更開始
   デフォルト
   もどる
   やめた{end}

+---------------+
| text  22h  34 |
+---------------+
{text speed ff}モード:{varb 3}
  R:{varb 0}
  G:{varb 1}
  B:{varb 2}
赤入力 {input 3 digits number, init 000}{end}

+---------------+
| text  23h  35 |
+---------------+
255までー{end}

+---------------+
| text  24h  36 |
+---------------+
   {text speed ff}つぎ
   赤入力もう一回{end}

+---------------+
| text  25h  37 |
+---------------+
{text speed ff}モード:{varb 3}
  R:{varb 0}
  G:{varb 1}
  B:{varb 2}
緑入力 {input 3 digits number, init 000}{end}

+---------------+
| text  26h  38 |
+---------------+
255までー{end}

+---------------+
| text  27h  39 |
+---------------+
   {text speed ff}つぎ
   緑入力もう一回{end}

+---------------+
| text  28h  40 |
+---------------+
{text speed ff}モード:{varb 3}
  R:{varb 0}
  G:{varb 1}
  B:{varb 2}
青入力 {input 3 digits number, init 000}{end}

+---------------+
| text  29h  41 |
+---------------+
255までー{end}

+---------------+
| text  2ah  42 |
+---------------+
   {text speed ff}つぎ
   青入力もう一回{end}

+---------------+
| text  2bh  43 |
+---------------+
{text speed ff}モード:{varb 3}
  R:{varb 0}
  G:{varb 1}
  B:{varb 2}
モード選択 {input 1 digits number, init 0}{end}

+---------------+
| text  2ch  44 |
+---------------+
03までー{end}

+---------------+
| text  2dh  45 |
+---------------+
   {text speed ff}おゎり
   モード選択もう一回{end}

+---------------+
| text  2eh  46 |
+---------------+
   {text speed ff}変更開始
   デフォルト
   もどる
   やめた{end}

+---------------+
| text  2fh  47 |
+---------------+
{text speed ff}今の数值 R:{varb 0}
     G:{varb 1}
     B:{varb 2} 
   赤入力 {input 3 digits number, init 000}{end}

+---------------+
| text  30h  48 |
+---------------+
255までー{end}

+---------------+
| text  31h  49 |
+---------------+
{text speed ff}今の数值 R:{varb 0}
     G:{varb 1}
     B:{varb 2}
   緑入力 {input 3 digits number, init 000}{end}

+---------------+
| text  32h  50 |
+---------------+
255までー{end}

+---------------+
| text  33h  51 |
+---------------+
{text speed ff}今の数值 R:{varb 0}
     G:{varb 1}
     B:{varb 2}
   青入力 {input 3 digits number, init 000}{end}

+---------------+
| text  34h  52 |
+---------------+
255までー{end}

+---------------+
| text  35h  53 |
+---------------+
   {text speed ff}変更開始
   デフォルト
   もどる
   やめた{end}

+---------------+
| text  36h  54 |
+---------------+
{text speed ff}今の数值 R:{varb 0}
     G:{varb 1}
     B:{varb 2} 
   赤入力 {input 3 digits number, init 000}{end}

+---------------+
| text  37h  55 |
+---------------+
255までー{end}

+---------------+
| text  38h  56 |
+---------------+
{text speed ff}今の数值 R:{varb 0}
     G:{varb 1}
     B:{varb 2}
   緑入力 {input 3 digits number, init 000}{end}

+---------------+
| text  39h  57 |
+---------------+
255までー{end}

+---------------+
| text  3ah  58 |
+---------------+
{text speed ff}今の数值 R:{varb 0}
     G:{varb 1}
     B:{varb 2}
   青入力 {input 3 digits number, init 000}{end}

+---------------+
| text  3bh  59 |
+---------------+
255までー{end}

+---------------+
| text  3ch  60 |
+---------------+
   {text speed ff}変更開始
   デフォルト
   もどる
   やめた{end}

+---------------+
| text  3dh  61 |
+---------------+
{text speed ff}今の数值 X:{varb 0}
     Z:{varb 1}
     Y:{varb 2} 
  rotx {input 4 digits number, init 0000}{end}

+---------------+
| text  3eh  62 |
+---------------+
{text speed ff}4096までー{end}

+---------------+
| text  3fh  63 |
+---------------+
   {text speed ff}つぎ
   rotxもう一回{end}

+---------------+
| text  40h  64 |
+---------------+
{text speed ff}今の数值 X:{varb 0}
     Z:{varb 1}
     Y:{varb 2} 
  rotz  {input 4 digits number, init 0000}{end}

+---------------+
| text  41h  65 |
+---------------+
{text speed ff}4096までー{end}

+---------------+
| text  42h  66 |
+---------------+
   {text speed ff}つぎ
   rotzもう一回{end}

+---------------+
| text  43h  67 |
+---------------+
{text speed ff}今の数值 X:{varb 0}
     Z:{varb 1}
     Y:{varb 2} 
  roty {input 4 digits number, init 0000}{end}

+---------------+
| text  44h  68 |
+---------------+
{text speed ff}4096までー{end}

+---------------+
| text  45h  69 |
+---------------+
   {text speed ff}おゎり
   rotyもう一回{end}

+---------------+
| text  46h  70 |
+---------------+
{text speed ff}いかほど?
   全部
   X
   Z
   Y
   キャンセル {end}

+---------------+
| text  47h  71 |
+---------------+
{input 2 digits number, init 00}/10{end}

+---------------+
| text  48h  72 |
+---------------+
0以外の数字でね。{end}

+---------------+
| text  49h  73 |
+---------------+
   {text speed ff}れくとさいず
   えんがちょ{end}

+---------------+
| text  4ah  74 |
+---------------+
{text speed ff}rectsizeX {input 3 digits number, init 000}{end}

+---------------+
| text  4bh  75 |
+---------------+
{text speed ff}rectsizeZ {input 3 digits number, init 000}{end}

+---------------+
| text  4ch  76 |
+---------------+
{text speed ff}xz {varb 0} {varb 1}
turn {varb 2}{end}

+---------------+
| text  4dh  77 |
+---------------+
RGB-CACL{close after 20}

+---------------+
| text  4eh  78 |
+---------------+
R{close after 10}

+---------------+
| text  4fh  79 |
+---------------+
G{close after 10}

+---------------+
| text  50h  80 |
+---------------+
B{close after 10}

+---------------+
| text  51h  81 |
+---------------+
Mode{close after 10}

+---------------+
| text  52h  82 |
+---------------+
MODE{varb 3}
R   {varb 0}
G   {varb 1}
B   {varb 2}{end}

+---------------+
| text  53h  83 |
+---------------+
   {text speed ff}アルニ村全景A
   セルジュの家1FA
   セルジュの部屋A
   村器の家の前A
   村器の家A
   波止場A
   酒場A
   酒場奥A
   地下A
   レナの家A
   民家A
   もどる{end}

+---------------+
| text  54h  84 |
+---------------+
   {text speed ff}アルニ村全景B
   セルジュの家1FB
   セルジュの部屋B
   村器の家の前B
   村器の家B
   波止場B
   カフェB
   カフェ奥B
   ラッキーダンの部屋B
   レナの家B
   民家B
   もどる{end}

+---------------+
| text  55h  85 |
+---------------+
   {text speed ff}町中心A
   橋A
   ザッパ家前A
   墓地A
   港A
   次のページ
   もどる{end}

+---------------+
| text  56h  86 |
+---------------+
   {text speed ff}アイテム屋A
   アイテム屋奥A
   バーA
   バー隠し部屋A
   民家1A
   民家2A
   ザッパ工房A
   カーシュ部屋A
   ダリオ&グレン部屋A
   墓守部屋A
   宿カウンターA
   次のページ
   前のページ{end}

+---------------+
| text  57h  87 |
+---------------+
   {text speed ff}宿奥1A
   宿奥2A
   バン家バン部屋A
   バン家父部屋A
   テルミナ
   テルミナ
   テルミナ
   テルミナ
   前のページ{end}

+---------------+
| text  58h  88 |
+---------------+
   {text speed ff}町中心B
   橋B
   ザッパ家前B
   墓地B
   港B
   次のページ
   もどる{end}

+---------------+
| text  59h  89 |
+---------------+
   {text speed ff}アイテム屋B
   アイテム屋奥B
   バーB
   バー隠し部屋B
   民家1B
   民家2B
   ザッパ工房B
   カーシュ部屋B
   ダリオ&グレン部屋B
   墓守部屋B
   宿カウンターB
   次のページ
   前のページ{end}

+---------------+
| text  5ah  90 |
+---------------+
   {text speed ff}宿奥1B
   宿奥2B
   バン家バン部屋B
   バン家父部屋B
   バン家{ff}{ff}関B
   テルミナ
   テルミナ
   テルミナ
   前のページ{end}

+---------------+
| text  5bh  91 |
+---------------+
   {text speed ff}船着き場A
   商業塔A
   住居塔A
   竜の社の塔A
   診療所A
   診療所奥A
   道具屋A
   酒場A
   コルチャの家A
   メルの家A
   竜の社A
   もどる{end}

+---------------+
| text  5ch  92 |
+---------------+
   {text speed ff}船着き場B
   商業塔B
   住居塔B
   竜の社の塔B
   診療所B
   診療所奥B
   道具屋B
   酒場B
   コルチャの家B
   メルの家B
   竜の社B
   もどる{end}

+---------------+
| text  5dh  93 |
+---------------+
   {text speed ff}隠者小屋外A
   隠者小屋中A
   隠者小屋地下A
   もどる{end}

+---------------+
| text  5eh  94 |
+---------------+
   {text speed ff}隠者小屋外B
   もどる{end}

+---------------+
| text  5fh  95 |
+---------------+
   {text speed ff}甲板A
   通路1A
   通路2A
   宿A
   ちゅう房、食堂A
   船倉A
   船底A
   右げんA
   楽屋A
   バーA
   船器室A
   次のページ
   もどる{end}

+---------------+
| text  60h  96 |
+---------------+
   {text speed ff}ギャンブルA
   スラッシュ船甲板A
   スラッシュ船通路A
   スラッシュ部屋A
   スッタッフ部屋A
   スラッシュ船イベントA
   前のページ{end}

+---------------+
| text  61h  97 |
+---------------+
   {text speed ff}ルート1A
   ルート2A
   ルート3A
   浜次元の屝A
   もどる{end}

+---------------+
| text  62h  98 |
+---------------+
   {text speed ff}ルート1B
   ルート2B
   ルート3B
   浜次元の屝B
   もどる{end}

+---------------+
| text  63h  99 |
+---------------+
   {text speed ff}岬への道A
   岬A
   岬先端A
   もどる{end}

+---------------+
| text  64h 100 |
+---------------+
   {text speed ff}岬への道B
   岬B
   岬B夕日
   岬先端B
   岬先端B夕日
   もどる{end}

+---------------+
| text  65h 101 |
+---------------+
   {text speed ff}ルート1A
   ルート2A
   もどる{end}

+---------------+
| text  66h 102 |
+---------------+
   {text speed ff}ルート1B
   ルート2B
   もどる{end}

+---------------+
| text  67h 103 |
+---------------+
   {text speed ff}影切りの森入口A
   影切りの森2A
   影切りの森3A
   滝の中A
   地下入口前A
   もどる{end}

+---------------+
| text  68h 104 |
+---------------+
   {text speed ff}影切りの森入口B
   影切りの森2B
   影切りの森3B
   滝の中B
   地下入口前B
   もどる{end}

+---------------+
| text  69h 105 |
+---------------+
   {text speed ff}地下水脈入口A
   地下水脈A
   地下水脈井戸A
   もどる{end}

+---------------+
| text  6ah 106 |
+---------------+
   {text speed ff}地下水脈入口B
   地下水脈B
   地下水脈井戸B
   もどる{end}

+---------------+
| text  6bh 107 |
+---------------+
   {text speed ff}ガケ船着場A
   ガケ下A
   ガケ上A
   もどる{end}

+---------------+
| text  6ch 108 |
+---------------+
   {text speed ff}ガケ船着場B
   ガケ下B
   ガケ上B
   もどる{end}

+---------------+
| text  6dh 109 |
+---------------+
   {text speed ff}正門A
   表庭A
   B2廊下A
   地下牢A
   {ff}{ff}問部屋A
   地下水路1A
   地下水路2A
   地下水路3A
   もどる{end}

+---------------+
| text  6eh 110 |
+---------------+
   {text speed ff}正門B
   表庭B
   裏庭
   竜小屋
   1F入口
   客室(カーシュの部屋)
   客室2
   客室3
   客室4
   えっけんの間
   中空橋西
   中空橋東
   次のページ
   もどる{end}

+---------------+
| text  6fh 111 |
+---------------+
   {text speed ff}図書室
   秘宝庫
   3F廊下
   屋上
   蛇骨館大佐の部屋
   リデルの部屋
   B1兵士駐留所、廊下
   兵士部屋
   食堂、台所
   宝物庫、実験室
   武器庫
   次のページ
   前のページ{end}

+---------------+
| text  70h 112 |
+---------------+
   {text speed ff}B2廊下B
   地下牢B
   {ff}{ff}問部屋B
   地下水路1B
   地下水路2B
   地下水路3B
   前のページ{end}

+---------------+
| text  71h 113 |
+---------------+
   {text speed ff}ルート1A
   ルート2A
   ルート3A
   ルート4A
   木の上1A
   木の上2A
   竜木A
   竜木の中A
   寄り1A
   寄り2A
   もどる{end}

+---------------+
| text  72h 114 |
+---------------+
   {text speed ff}ルート1B
   ルート2B
   ルート3B
   ルート4B
   木の上1B
   木の上2B
   竜木B
   竜木の中B
   寄り1B
   寄り2B
   もどる{end}

+---------------+
| text  73h 115 |
+---------------+
   {text speed ff}古竜の砦入口1A
   古竜の砦2A
   古竜の砦3A
   古竜の砦4A
   古竜の砦5A
   古竜の砦6A
   古竜の砦心臟7A
   {ff}{ff}の間1A
   {ff}{ff}の間2A
   {ff}{ff}の間3A
   {ff}{ff}の間4A
   次のページ
   もどる{end}

+---------------+
| text  74h 116 |
+---------------+
   {text speed ff}{ff}{ff}の間1A
   {ff}{ff}の間2A
   {ff}{ff}の間3A
   {ff}{ff}の間4A
   {ff}{ff}の間1A
   {ff}{ff}の間2A
   {ff}{ff}の間3A
   {ff}{ff}の間4A
   古竜の砦20A
   古竜の砦21A
   古竜の砦22A
   次のページ
   もどる{end}

+---------------+
| text  75h 117 |
+---------------+
   {text speed ff}古竜の砦心臟小23A
   古竜の砦24A
   古竜の砦25A
   古竜の砦26A
   古竜の砦27A
   古竜の砦外28A
   古竜の砦儀式29A
   古竜の砦子宮30A
   もどる{end}

+---------------+
| text  76h 118 |
+---------------+
   {text speed ff}古竜の砦入口1B
   古竜の砦2B
   古竜の砦3B
   古竜の砦4B
   古竜の砦5B
   古竜の砦6B
   古竜の砦心臟7B
   {ff}{ff}の間1B
   {ff}{ff}の間2B
   {ff}{ff}の間3B
   {ff}{ff}の間4B
   次のページ
   もどる{end}

+---------------+
| text  77h 119 |
+---------------+
   {text speed ff}{ff}{ff}の間1B
   {ff}{ff}の間2B
   {ff}{ff}の間3B
   {ff}{ff}の間4B
   {ff}{ff}の間1B
   {ff}{ff}の間2B
   {ff}{ff}の間3B
   {ff}{ff}の間4B
   古竜の砦20B
   古竜の砦21B
   古竜の砦22B
   次のページ
   もどる{end}

+---------------+
| text  78h 120 |
+---------------+
   {text speed ff}古竜の砦心臟小23B
   古竜の砦24B
   古竜の砦25B
   古竜の砦26B
   古竜の砦27B
   古竜の砦外28B
   古竜の砦儀式29B
   古竜の砦子宮30B
   もどる{end}

+---------------+
| text  79h 121 |
+---------------+
   {text speed ff}甲板
   通路1
   通路2
   ちゅうぼう、食堂
   船倉
   船底
   右げん
   船員部屋
   デストラップ
   もどる{end}

+---------------+
| text  7ah 122 |
+---------------+
   {text speed ff}{ff}{ff}関
   階段
   通路
   台所
   子供部屋1
   子供部屋2
   ららの部屋
   ルッカの部屋
   もどる{end}

+---------------+
| text  7bh 123 |
+---------------+
   {text speed ff}入口A
   中腹A
   ルート1A
   ルート2A
   山腹A
   紅竜の間A
   もどる{end}

+---------------+
| text  7ch 124 |
+---------------+
   {text speed ff}入口B
   中腹B
   ルート1B
   ルート2B
   山腹B
   紅竜の間B
   もどる{end}

+---------------+
| text  7dh 125 |
+---------------+
   {text speed ff}入口A
   さる階段A
   玉座A
   さる階段浮上後A
   入口浮上後A
   玉座浮上後A
   玉座浮上後イベントA
   もどる{end}

+---------------+
| text  7eh 126 |
+---------------+
   {text speed ff}入口B
   さる階段B
   玉座B
   もどる{end}

+---------------+
| text  7fh 127 |
+---------------+
   {text speed ff}テラスA
   月光回廊A
   下部広間A
   ルート1A
   ルート2A
   ルート3A
   最下層部A
   ルート4A
   ルート5A
   次のページ
   もどる{end}

+---------------+
| text  80h 128 |
+---------------+
   {text speed ff}居住区A
   永遠の{ff}{ff}A
   内壁A
   外壁A
   システム部A
   庭園A
   コントロールルームA
   エレベーターA
   塔部頂上A
   次のページ
   もどる{end}

+---------------+
| text  81h 129 |
+---------------+
   {text speed ff}右翼部A
   右翼駅A
   右翼格納庫A
   右翼線路A
   右翼先端A
   左翼部A
   左翼駅A
   左翼格納庫A
   左翼下部A
   左翼線路A
   左翼先端A
   次のページ
   もどる{end}

+---------------+
| text  82h 130 |
+---------------+
   {text speed ff}最上部大回廊A
   武闘場1A
   武闘場2A
   武闘場3A
   ねはんA
   天国階段A
   もどる{end}



Yeah, Mr. Gil's name is there.

   0:セルジュ
   1:キッド
   2:ギル
   3:イシト
   4:スラッシュ
   5:蛇骨大佐
   6:リデル
   7:カーシュ
   8:ゾア
   9:マルチェラ
  10:コルチャ
  49:ヤマネコ
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: Chrono'99 on February 24, 2009, 03:53:17 am
Woah, Gil instead of Alf?! Interesting...
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: utunnels on February 24, 2009, 10:44:28 am
http://www.chronocompendium.com/Forums/index.php/topic,5302.msg147949.html#msg147949 (http://www.chronocompendium.com/Forums/index.php/topic,5302.msg147949.html#msg147949)

Now the debug script has been dumped.



Woah, Gil instead of Alf?! Interesting...

Yeah, so the character was the fiendlord at first...



It seems most of the debug room text are available in english in room 242
Where is the address for the room number in the demo version?

BTW:
It seems this rom can't run under pcsx. So I'm afraid I can't rip the background of the debug rom.
Anyway, with a valid ram dump from other emulator(vram.bin), I can still manage the game script.

Here's the char table for the demon version(ccd.txt). The source code is in the attachment,  however, i still need the room number address.

Code: [Select]
00={00}
01={new line}
02={new page}
03=pause
04??=delay?
05??=tex speed #
06??=close after #
07????=item name
08??=character#
18??=party member#
0A??=var #
0B??=var #
0E??=color#
10=number input
12??=accent key word
19??=element or item?
20=
21=(
22=)
23=-
24=`
25=+
26=.
27=/
28=0
29=1
2A=2
2B=3
2C=4
2D=5
2E=6
2F=7
30=8
31=9
32=A
33=B
34=C
35=D
36=E
37=F
38=G
39=H
3A=I
3B=J
3C=K
3D=L
3E=M
3F=N
40=O
41=P
42=Q
43=R
44=S
45=T
46=U
47=V
48=W
49=X
4A=Y
4B=Z
4C=a
4D=b
4E=c
4F=d
50=e
51=f
52=g
53=h
54=i
55=j
56=k
57=l
58=m
59=n
5A=o
5B=p
5C=q
5D=r
5E=s
5F=t
60=u
61=v
62=w
63=x
64=y
65=z
67=!
68="
69=$
6A=%
6B=&
6C=*
6D=:
6E=?
6F=-
70=[
71=]
72=。
73={73}
74={74}
75= 
76=あ
77=い
78=う
79=え
7A=お
7B=か
7C=き
7D=く
7E=け
7F=こ
80=さ
81=し
82=す
83=せ
84=そ
85=た
86=ち
87=つ
88=て
89=と
8A=な
8B=に
8C=ぬ
8D=ね
8E=の
8F=は
90=ひ
91=ふ
92=へ
93=ほ
94=ま
95=み
96=む
97=め
98=も
99=や
9A=ゆ
9B=よ
9C=ら
9D=り
9E=る
9F=れ
A0=ろ
A1=ゎ
A2=を
A3=ん
A4=が
A5=ぎ
A6=ぐ
A7=げ
A8=ご
A9=ざ
AA=じ
AB=ず
AC=ぜ
AD=ぞ
AE=だ
AF=ぢ
B0=づ
B1=で
B2=ど
B3=ば
B4=び
B5=ぶ
B6=べ
B7=ぼ
B8=ぱ
B9=ぴ
BA=ぷ
BB=ぺ
BC=ぽ
BD=ぁ
BE=ぃ
BF=ぅ
C0=ぇ
C1=ぉ
C2=っ
C3=ゃ
C4=ゅ
C5=ょ
C6=。
C7=「
CA=ー
CC=…
CD=?
CE=!
CF=·
D0=0
D1=1
D2=2
D3=3
D4=4
D5=5
D6=6
D7=7
D8=8
D9=9
DA=A
DB=B
DC=C
DD=D
DE=E
DF=F
E0=G
E1=H
E2=I
E3=J
E4=K
E5=L
E6=M
E7=N
E8=O
E9=P
EA=Q
EB=R
EC=S
ED=T
EE=U
EF=V
F0=W
F1=X
F2=Y
F3=Z
F4=/
F5=、
F6=―
F7=‥
F800=a
F801=b
F802=c
F803=d
F804=e
F805=f
F806=g
F807=h
F808=i
F809=j
F80A=k
F80B=l
F80C=m
F80D=n
F80E=o
F80F=p
F810=q
F811=r
F812=s
F813=t
F814=u
F815=v
F816=w
F817=x
F818=y
F819=z 
F81A=ア
F81B=イ
F81C=ウ
F81D=エ
F81E=オ
F81F=カ
F820=キ
F821=ク
F822=ケ
F823=コ
F824=サ
F825=シ
F826=ス
F827=セ
F828=ソ
F829=タ
F82A=チ
F82B=ツ
F82C=テ
F82D=ト
F82E=ナ
F82F=ニ
F830=ヌ
F831=ネ
F832=ノ
F833=ハ
F834=ヒ
F835=フ
F836=ヘ
F837=ホ
F838=マ
F839=ミ
F83A=ム
F83B=メ
F83C=モ
F83D=ヤ
F83E=ユ
F83F=ヨ
F840=ラ
F841=リ
F842=ル
F843=レ
F844=ロ
F845=ワ
F846=ヲ
F847=ン
F848=ガ
F849=ギ
F84A=グ
F84B=ゲ
F84C=ゴ
F84D=ザ
F84E=ジ
F84F=ズ
F850=ゼ
F851=ゾ
F852=ダ
F853=ヂ
F854=ヅ
F855=デ
F856=ド
F857=バ
F858=ビ
F859=ブ
F85A=ベ
F85B=ボ
F85C=パ
F85D=ピ
F85E=プ
F85F=ペ
F860=ポ
F861=ァ
F862=ィ
F863=ゥ
F864=ェ
F865=ォ
F866=ッ
F867=ャ
F868=ュ
F869=ョ
F86A=ヴ
F86B=ヶ
F86C=蛇
F86D=骨
F86E=大
F86F=佐
F870=秘
F871=密
F872=竜
F873=星
F874=子
F875=夫
F876=改
F877=良
F878=昏
F879=兵
F87A=士
F87B=敵
F87C=味
F87D=方
F87E=全
F87F=体
F880=時
F881=喰
F882=紳
F883=器
F884=緑
F885=白
F886=黑
F887=黄
F888=青
F889=赤
F88A=機
F88B=械
F88C=幽
F88D=霊
F88E=船
F88F=号
F890=徒
F891=亜
F892=哀
F893=愛
F894=悪
F895=握
F896=圧
F897=扱
F898=話
F899=惑
F89A=球
F89B=腕
F89C=慿
F89D=璧
F89E=絆
F89F=贈
F8A0=安
F8A1=暗
F8A2=案
F8A3=闇
F8A4=以
F8A5=位
F8A6=偉
F8A7=囲
F8A8=委
F8A9=威
F8AA=意
F8AB=易
F8AC=為
F8AD=異
F8AE=川
F8AF=罠
F8B0=移
F8B1=鍛
F8B2=舟
F8B3=衣
F8B4=違
F8B5=遺
F8B6=医
F8B7=井
F8B8=域
F8B9=育
F8BA=一
F8BB=印
F8BC=員
F8BD=因
F8BE=引
F8BF=飲
F8C0=院
F8C1=陰
F8C2=隠
F8C3=右
F8C4=雨
F8C5=嘘
F8C6=噂
F8C7=云
F8C8=運
F8C9=雲
F8CA=営
F8CB=享
F8CC=映
F8CD=栄
F8CE=永
F8CF=泳
F8D0=英
F8D1=衛
F8D2=党
F8D3=鋭
F8D4=益
F8D5=駅
F8D6=越
F8D7=円
F8D8=園
F8D9=宴
F8DA=延
F8DB=援
F8DC=沿
F8DD=演
F8DE=社
F8DF=翔
F8E0=煙
F8E1=縁
F8E2=遠
F8E3=鉛
F8E4=汚
F8E5=央
F8E6=奥
F8E7=往
F8E8=押
F8E9=横
F8EA=王
F8EB=屋
F8EC=憶
F8ED=臆
F8EE=乙
F8EF=博
F8F0=恩
F8F1=温
F8F2=穏
F8F3=音
F8F4=化
F8F5=仮
F8F6=価
F8F7=加
F8F8=可
F8F9=嫁
F8FA=家
F8FB=銀
F8FC=科
F8FD=暇
F8FE=果
F8FF=火
F900=花
F901=荷
F902=宗
F903=課
F904=珠
F905=貨
F906=過
F907=我
F908=牙
F909=画
F90A=芽
F90B=介
F90C=会
F90D=解
F90E=塊
F90F=宣
F910=壊
F911=快
F912=怪
F913=悔
F914=懐
F915=帆
F916=鎧
F917=炎
F918=海
F919=界
F91A=皆
F91B=絵
F91C=開
F91D=階
F91E=貝
F91F=外
F920=害
F921=崖
F922=招
F923=街
F924=溺
F925=召
F926=各
F927=拡
F928=格
F929=殻
F92A=獲
F92B=確
F92C=穫
F92D=角
F92E=盟
F92F=閣
F930=隔
F931=学
F932=楽
F933=額
F934=掛
F935=割
F936=活
F937=冠
F938=診
F939=勧
F93A=巻
F93B=完
F93C=官
F93D=廟
F93E=干
F93F=髮
F940=幹
F941=患
F942=感
F943=慣
F944=換
F945=敢
F946=歓
F947=汗
F948=環
F949=甘
F94A=監
F94B=看
F94C=管
F94D=簡
F94E=艦
F94F=浜
F950=観
F951=貫
F952=還
F953=間
F954=関
F955=含
F956=眼
F957=岩
F958=頑
F959=顔
F95A=願
F95B=危
F95C=喜
F95D=水
F95E=基
F95F=幕
F960=奇
F961=嬉
F962=寄
F963=希
F964=忌
F965=揮
F966=旗
F967=既
F968=期
F969=棄
F96A=輩
F96B=帰
F96C=気
F96D=祈
F96E=規
F96F=記
F970=貴
F971=起
F972=軌
F973=騎
F974=偽
F975=儀
F976=岸
F977=技
F978=擬
F979=欺
F97A=犠
F97B=義
F97C=議
F97D=詰
F97E=歌
F97F=吉
F980=客
F981=逆
F982=久
F983=休
F984=及
F985=吸
F986=宮
F987=急
F988=救
F989=求
F98A=泣
F98B=究
F98C=級
F98D=給
F98E=旧
F98F=藤
F990=牛
F991=去
F992=居
F993=竜
F994=拒
F995=拠
F996=許
F997=距
F998=魚
F999=供
F99A=競
F99B=共
F99C=凶
F99D=協
F99E=叫
F99F=岬
F9A0=境
F9A1=強
F9A2=恐
F9A3=教
F9A4=橋
F9A5=況
F9A6=狂
F9A7=狭
F9A8=胸
F9A9=脅
F9AA=興
F9AB=郷
F9AC=鏡
F9AD=響
F9AE=館
F9AF=応
F9B0=驚
F9B1=仰
F9B2=凝
F9B3=業
F9B4=局
F9B5=曲
F9B6=極
F9B7=玉
F9B8=勤
F9B9=均
F9BA=禁
F9BB=筋
F9BC=緊
F9BD=粧
F9BE=近
F9BF=金
F9C0=九
F9C1=句
F9C2=区
F9C3=苦
F9C4=駆
F9C5=具
F9C6=愚
F9C7=歪
F9C8=空
F9C9=偶
F9CA=遇
F9CB=隅
F9CC=屈
F9CD=掘
F9CE=窟
F9CF=繰
F9D0=君
F9D1=訓
F9D2=群
F9D3=軍
F9D4=係
F9D5=刑
F9D6=兄
F9D7=型
F9D8=契
F9D9=形
F9DA=恵
F9DB=敬
F9DC=景
F9DD=系
F9DE=経
F9DF=継
F9E0=坊
F9E1=計
F9E2=警
F9E3=軽
F9E4=迎
F9E5=劇
F9E6=激
F9E7=欠
F9E8=決
F9E9=穴
F9EA=結
F9EB=血
F9EC=月
F9ED=件
F9EE=健
F9EF=恋
F9F0=兼
F9F1=剣
F9F2=嫌
F9F3=建
F9F4=拳
F9F5=検
F9F6=権
F9F7=犬
F9F8=研
F9F9=肩
F9FA=賢
F9FB=鍵
F9FC=険
F9FD=練
F9FE=連
F9FF=路
FA00=験
FA01=原
FA02=厳
FA03=幻
FA04=減
FA05=源
FA06=現
FA07=言
FA08=限
FA09=個
FA0A=古
FA0B=呼
FA0C=固
FA0D=孤
FA0E=己
FA0F=庫
FA10=戸
FA11=故
FA12=湖
FA13=虎
FA14=誇
FA15=五
FA16=互
FA17=娯
FA18=後
FA19=御
FA1A=悟
FA1B=語
FA1C=誤
FA1D=護
FA1E=交
FA1F=候
FA20=光
FA21=公
FA22=功
FA23=効
FA24=厚
FA25=口
FA26=向
FA27=好
FA28=工
FA29=巧
FA2A=幸
FA2B=広
FA2C=抗
FA2D=攻
FA2E=露
FA2F=労
FA30=校
FA31=構
FA32=清
FA33=港
FA34=甲
FA35=紅
FA36=考
FA37=航
FA38=荒
FA39=衡
FA3A=鋼
FA3B=降
FA3C=香
FA3D=高
FA3E=剛
FA3F=録
FA40=劫
FA41=砦
FA42=合
FA43=刻
FA44=告
FA45=国
FA46=酷
FA47=巫
FA48=獄
FA49=腰
FA4A=込
FA4B=頃
FA4C=今
FA4D=廊
FA4E=浪
FA4F=俺
FA50=困
FA51=婚
FA52=恨
FA53=風
FA54=根
FA55=混
FA56=魂
FA57=左
FA58=差
FA59=查
FA5A=砂
FA5B=鎖
FA5C=座
FA5D=牢
FA5E=狼
FA5F=下
FA60=再
FA61=最
FA62=塞
FA63=妻
FA64=宰
FA65=才
FA66=採
FA67=歳
FA68=済
FA69=災
FA6A=砕
FA6B=祭
FA6C=細
FA6D=菜
FA6E=裁
FA6F=老
FA70=載
FA71=際
FA72=剤
FA73=在
FA74=材
FA75=罪
FA76=財
FA77=咲
FA78=作
FA79=昨
FA7A=柵
FA7B=策
FA7C=冊
FA7D=郎
FA7E=類
FA7F=令
FA80=察
FA81=札
FA82=殺
FA83=三
FA84=参
FA85=山
FA86=散
FA87=産
FA88=算
FA89=賛
FA8A=酸
FA8B=斬
FA8C=暫
FA8D=残
FA8E=仕
FA8F=裂
FA90=融
FA91=使
FA92=刺
FA93=司
FA94=史
FA95=四
FA96=妖
FA97=姉
FA98=姿
FA99=虹
FA9A=市
FA9B=師
FA9C=志
FA9D=思
FA9E=指
FA9F=支
FAA0=施
FAA1=止
FAA2=死
FAA3=私
FAA4=糸
FAA5=紙
FAA6=至
FAA7=視
FAA8=詞
FAA9=詩
FAAA=試
FAAB=資
FAAC=飼
FAAD=歯
FAAE=事
FAAF=似
FAB0=児
FAB1=字
FAB2=慈
FAB3=持
FAB4=人
FAB5=次
FAB6=夏
FAB7=治
FAB8=示
FAB9=耳
FABA=自
FABB=式
FABC=識
FABD=軸
FABE=列
FABF=劣
FAC0=執
FAC1=失
FAC2=室
FAC3=質
FAC4=実
FAC5=舎
FAC6=写
FAC7=射
FAC8=捨
FAC9=赦
FACA=者
FACB=謝
FACC=車
FACD=邪
FACE=借
FACF=烈
FAD0=若
FAD1=寂
FAD2=弱
FAD3=主
FAD4=取
FAD5=守
FAD6=手
FAD7=殊
FAD8=種
FAD9=酒
FADA=首
FADB=受
FADC=呪
FADD=授
FADE=樹
FADF=需
FAE0=囚
FAE1=収
FAE2=周
FAE3=就
FAE4=修
FAE5=拾
FAE6=習
FAE7=臭
FAE8=衆
FAE9=襲
FAEA=蹴
FAEB=週
FAEC=集
FAED=住
FAEE=充
FAEF=十
FAF0=従
FAF1=柔
FAF2=獣
FAF3=縦
FAF4=重
FAF5=銃
FAF6=叔
FAF7=宿
FAF8=祝
FAF9=縮
FAFA=晶
FAFB=術
FAFC=春
FAFD=瞬
FAFE=楯
FAFF=準
FB00=盾
FB01=純
FB02=巡
FB03=順
FB04=処
FB05=初
FB06=所
FB07=暑
FB08=緒
FB09=書
FB0A=諸
FB0B=助
FB0C=女
FB0D=除
FB0E=傷
FB0F=例
FB10=償
FB11=勝
FB12=誓
FB13=商
FB14=唱
FB15=将
FB16=小
FB17=少
FB18=床
FB19=承
FB1A=掌
FB1B=昇
FB1C=沼
FB1D=消
FB1E=冷
FB1F=礼
FB20=燒
FB21=省
FB22=章
FB23=笑
FB24=紹
FB25=銅
FB26=衝
FB27=証
FB28=詳
FB29=象
FB2A=賞
FB2B=障
FB2C=丈
FB2D=乗
FB2E=齡
FB2F=歴
FB30=冗
FB31=城
FB32=場
FB33=嬢
FB34=情
FB35=条
FB36=浄
FB37=状
FB38=蒸
FB39=飾
FB3A=植
FB3B=織
FB3C=職
FB3D=色
FB3E=触
FB3F=鈴
FB40=食
FB41=則
FB42=伸
FB43=信
FB44=侵
FB45=寝
FB46=審
FB47=心
FB48=慎
FB49=新
FB4A=森
FB4B=深
FB4C=申
FB4D=真
FB4E=神
FB4F=隸
FB50=臣
FB51=親
FB52=身
FB53=辛
FB54=進
FB55=針
FB56=震
FB57=刃
FB58=塵
FB59=尽
FB5A=陣
FB5B=図
FB5C=吹
FB5D=推
FB5E=鬼
FB5F=麗
FB60=吟
FB61=粋
FB62=遂
FB63=酔
FB64=随
FB65=枢
FB66=澄
FB67=寸
FB68=世
FB69=是
FB6A=凄
FB6B=制
FB6C=勢
FB6D=性
FB6E=成
FB6F=政
FB70=整
FB71=笛
FB72=晴
FB73=正
FB74=牲
FB75=生
FB76=盛
FB77=精
FB78=聖
FB79=声
FB7A=製
FB7B=西
FB7C=請
FB7D=喚
FB7E=静
FB7F=旅
FB80=斉
FB81=席
FB82=斥
FB83=昔
FB84=析
FB85=石
FB86=積
FB87=責
FB88=来
FB89=跡
FB8A=切
FB8B=接
FB8C=折
FB8D=設
FB8E=節
FB8F=了
FB90=説
FB91=雪
FB92=絶
FB93=仙
FB94=先
FB95=千
FB96=占
FB97=専
FB98=戦
FB99=洗
FB9A=染
FB9B=潜
FB9C=線
FB9D=#
FB9E=善
FB9F=両
FBA0=然
FBA1=#
FBA2=狙
FBA3=礎
FBA4=祖
FBA5=粗
FBA6=素
FBA7=組
FBA8=僧
FBA9=創
FBAA=双
FBAB=倉
FBAC=壮
FBAD=層
FBAE=想
FBAF=捜
FBB0=掃
FBB1=庇
FBB2=操
FBB3=早
FBB4=#
FBB5=巣
FBB6=蓄
FBB7=争
FBB8=相
FBB9=窓
FBBA=総
FBBB=草
FBBC=葬
FBBD=装
FBBE=走
FBBF=送
FBC0=騒
FBC1=像
FBC2=増
FBC3=憎
FBC4=造
FBC5=側
FBC6=即
FBC7=息
FBC8=捉
FBC9=束
FBCA=測
FBCB=足
FBCC=速
FBCD=属
FBCE=賊
FBCF=族
FBD0=続
FBD1=江
FBD2=存
FBD3=孫
FBD4=尊
FBD5=損
FBD6=村
FBD7=他
FBD8=多
FBD9=太
FBDA=堕
FBDB=惰
FBDC=打
FBDD=舵
FBDE=秀
FBDF=淚
FBE0=#
FBE1=耐
FBE2=帯
FBE3=待
FBE4=態
FBE5=替
FBE6=袋
FBE7=貸
FBE8=退
FBE9=隊
FBEA=代
FBEB=台
FBEC=第
FBED=題
FBEE=滝
FBEF=何
FBF0=宅
FBF1=択
FBF2=濯
FBF3=只
FBF4=叩
FBF5=達
FBF6=奪
FBF7=脱
FBF8=辿
FBF9=棚
FBFA=谷
FBFB=誰
FBFC=単
FBFD=担
FBFE=探
FBFF=料
FC00=短
FC01=端
FC02=挙
FC03=団
FC04=弾
FC05=断
FC06=段
FC07=男
FC08=談
FC09=知
FC0A=#
FC0B=恥
FC0C=智
FC0D=置
FC0E=致
FC0F=療
FC10=遅
FC11=築
FC12=畜
FC13=逐
FC14=茶
FC15=臟
FC16=着
FC17=仲
FC18=忠
FC19=昼
FC1A=柱
FC1B=注
FC1C=虫
FC1D=駐
FC1E=貯
FC1F=丁
FC20=兆
FC21=墓
FC22=帳
FC23=#
FC24=張
FC25=彫
FC26=徴
FC27=懲
FC28=挑
FC29=朝
FC2A=潮
FC2B=町
FC2C=聴
FC2D=調
FC2E=超
FC2F=隣
FC30=頂
FC31=鳥
FC32=直
FC33=沈
FC34=珍
FC35=鎮
FC36=墜
FC37=追
FC38=痛
FC39=漬
FC3A=潰
FC3B=爪
FC3C=吊
FC3D=亭
FC3E=低
FC3F=停
FC40=定
FC41=帝
FC42=底
FC43=庭
FC44=弟
FC45=抵
FC46=提
FC47=程
FC48=艇
FC49=泥
FC4A=#
FC4B=的
FC4C=適
FC4D=#
FC4E=量
FC4F=領
FC50=徹
FC51=撤
FC52=鉄
FC53=典
FC54=宇
FC55=天
FC56=展
FC57=店
FC58=宙
FC59=転
FC5A=伝
FC5B=殿
FC5C=田
FC5D=電
FC5E=吐
FC5F=力
FC60=渡
FC61=登
FC62=賭
FC63=途
FC64=都
FC65=努
FC66=度
FC67=土
FC68=奴
FC69=怒
FC6A=倒
FC6B=刀
FC6C=塔
FC6D=島
FC6E=投
FC6F=#
FC70=東
FC71=盗
FC72=灯
FC73=当
FC74=等
FC75=答
FC76=統
FC77=到
FC78=#
FC79=討
FC7A=踏
FC7B=逃
FC7C=頭
FC7D=闘
FC7E=働
FC7F=臨
FC80=動
FC81=同
FC82=堂
FC83=導
FC84=洞
FC85=瞳
FC86=道
FC87=得
FC88=特
FC89=毒
FC8A=独
FC8B=読
FC8C=突
FC8D=届
FC8E=那
FC8F=輪
FC90=内
FC91=謎
FC92=馴
FC93=縄
FC94=南
FC95=難
FC96=二
FC97=匂
FC98=#
FC99=肉
FC9A=日
FC9B=乳
FC9C=如
FC9D=任
FC9E=忍
FC9F=認
FCA0=熱
FCA1=年
FCA2=念
FCA3=燃
FCA4=悩
FCA5=納
FCA6=脳
FCA7=波
FCA8=派
FCA9=破
FCAA=馬
FCAB=廃
FCAC=拝
FCAD=排
FCAE=敗
FCAF=離
FCB0=杯
FCB1=背
FCB2=配
FCB3=倍
FCB4=媒
FCB5=虛
FCB6=買
FCB7=売
FCB8=泊
FCB9=#
FCBA=薄
FCBB=迫
FCBC=漠
FCBD=爆
FCBE=縛
FCBF=陸
FCC0=凍
FCC1=箱
FCC2=複
FCC3=肌
FCC4=畑
FCC5=発
FCC6=罰
FCC7=抜
FCC8=伴
FCC9=判
FCCA=半
FCCB=反
FCCC=板
FCCD=犯
FCCE=率
FCCF=立
FCD0=般
FCD1=範
FCD2=飯
FCD3=晩
FCD4=番
FCD5=盤
FCD6=#
FCD7=否
FCD8=雑
FCD9=彼
FCDA=悲
FCDB=屝
FCDC=利
FCDD=理
FCDE=裏
FCDF=里
FCE0=比
FCE1=疲
FCE2=皮
FCE3=碑
FCE4=猫
FCE5=肥
FCE6=被
FCE7=費
FCE8=避
FCE9=非
FCEA=備
FCEB=尾
FCEC=微
FCED=美
FCEE=鼻
FCEF=匹
FCF0=膝
FCF1=必
FCF2=筆
FCF3=百
FCF4=標
FCF5=漂
FCF6=表
FCF7=描
FCF8=病
FCF9=秒
FCFA=品
FCFB=貧
FCFC=敏
FCFD=不
FCFE=付
FCFF=律
FD00=#
FD01=婦
FD02=布
FD03=#
FD04=怖
FD05=普
FD06=浮
FD07=父
FD08=符
FD09=腐
FD0A=譜
FD0B=負
FD0C=武
FD0D=舞
FD0E=部
FD0F=略
FD10=封
FD11=#
FD12=伏
FD13=副
FD14=復
FD15=服
FD16=福
FD17=腹
FD18=払
FD19=物
FD1A=分
FD1B=憤
FD1C=奮
FD1D=流
FD1E=留
FD1F=粒
FD20=紛
FD21=文
FD22=聞
FD23=#
FD24=平
FD25=柄
FD26=並
FD27=閉
FD28=壁
FD29=別
FD2A=片
FD2B=編
FD2C=#
FD2D=龍
FD2E=慮
FD2F=翼
FD30=辺
FD31=返
FD32=便
FD33=勉
FD34=弁
FD35=保
FD36=捕
FD37=歩
FD38=補
FD39=募
FD3A=暮
FD3B=母
FD3C=包
FD3D=報
FD3E=宝
FD3F=崩
FD40=抱
FD41=放
FD42=#
FD43=法
FD44=泡
FD45=砲
FD46=訪
FD47=#
FD48=亡
FD49=妨
FD4A=帽
FD4B=忘
FD4C=忙
FD4D=房
FD4E=落
FD4F=乱
FD50=暴
FD51=望
FD52=某
FD53=棒
FD54=冒
FD55=謀
FD56=防
FD57=北
FD58=僕
FD59=牧
FD5A=没
FD5B=枯
FD5C=本
FD5D=魔
FD5E=埋
FD5F=裸
FD60=妹
FD61=枚
FD62=毎
FD63=末
FD64=万
FD65=慢
FD66=満
FD67=#
FD68=影
FD69=脈
FD6A=妙
FD6B=民
FD6C=眠
FD6D=務
FD6E=夢
FD6F=頼
FD70=無
FD71=霧
FD72=娘
FD73=冥
FD74=命
FD75=明
FD76=迷
FD77=鳴
FD78=滅
FD79=免
FD7A=面
FD7B=模
FD7C=毛
FD7D=盲
FD7E=網
FD7F=浸
FD80=木
FD81=黙
FD82=目
FD83=問
FD84=紋
FD85=門
FD86=夜
FD87=爺
FD88=野
FD89=矢
FD8A=厄
FD8B=役
FD8C=約
FD8D=薬
FD8E=訳
FD8F=雷
FD90=躍
FD91=柳
FD92=#
FD93=輸
FD94=優
FD95=勇
FD96=友
FD97=地
FD98=憂
FD99=有
FD9A=#
FD9B=由
FD9C=誘
FD9D=遊
FD9E=雄
FD9F=絡
FDA0=夕
FDA1=予
FDA2=余
FDA3=与
FDA4=誉
FDA5=預
FDA6=幼
FDA7=容
FDA8=揺
FDA9=樣
FDAA=用
FDAB=羊
FDAC=葉
FDAD=要
FDAE=踊
FDAF=翌
FDB0=回
FDB1=覚
FDB2=撃
FDB3=見
FDB4=元
FDB5=更
FDB6=行
FDB7=始
FDB8=終
FDB9=出
FDBA=称
FDBB=上
FDBC=常
FDBD=版
FDBE=数
FDBF=選
FDC0=前
FDC1=対
FDC2=值
FDC3=中
FDC4=器
FDC5=通
FDC6=点
FDC7=飛
FDC8=入
FDC9=能
FDCA=変
FDCB=未
FDCC=名
FDCD=戻
FDCE=論
FDCF=和
FDD0=遥
FDD1=陽
FDD2=養
FDD3=抑
FDD4=欲
FDD5=浴
FDD6=←
FDD7=↑
FDD8=↓
FDD9=→
FDDA=+
FDDB=(
FDDC=)
FDDD=%
FDDE=.
FDDF=“
FDE0=:
FDE1=々
FDE2=-
FDE3=『
FDE4=』
FDE5=〇
FDE6=”
FDE7=_
FDE8=×
FDE9=&
FDEA=☆
FDEB=□
FDEC=△
FDED=※
FDEE=<
FDEF=>
FDF0=〆
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: Vehek on February 24, 2009, 02:59:18 pm
Quote
Where is the address for the room number in the demo version?
I thought yaz0r was talking about room 242 in the English final.

Here's room 242's script, dumped by utunnels' tools, with the regular dialog and normal debug menu text removed.

Edit: It's not the same. Still interesting though.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: utunnels on February 24, 2009, 08:03:58 pm
I need the address because the scripts in other rooms are different from the final version.

-----------
Nevermind, it seems I can go to other rooms via the debug room...
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: utunnels on February 25, 2009, 08:48:43 am
The intro scene (with the game over background).

+---------------+
| text   0h   0 |
+---------------+
{text speed 2a}かつて星のみた夢が、闇をしりぞけ、{delay 14}
ひとつの未来を生んだ。{delay 3c}
しかしそれは、新たな悪夢の
幕開けでもあった……。{delay 5a}
伝説の宝「凍てついた炎をめぐり、{delay 14}
龍と人と運命との、時空を超えた
最後の戦いが始まろうとしていた……。{delay 46}
 
    星のみる夢は、{delay a}
      まだ終ゎらない…… {end}

-----------------

The dream that the planet once dreamt, repelled the darkness and gave birth to a new future...
However, the curtain to a new nightmare is about to open...
For the legendary treature, the Frozen Flame, a fated battle across dimensions between human and dragons is about to begin...
The planet's dream, has not yet ended...
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: FaustWolf on February 25, 2009, 06:23:09 pm
Bit of a graphical curiosity I noticed while manually reconstructing the demo Debug Room:
(http://img144.imageshack.us/img144/1082/carryoveroddity.png)

In VRAM, the obvious tile size is 128x16, but I may be wrong and maybe they're subdivided and taken care of by the tile assembly data. However, notice how if you restrict the image to approximately what you'd see in game, parts of the tiles could complete the image if they carried over to the other side of the screen? Does the CC game engine use such a technique?
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: utunnels on February 26, 2009, 10:47:41 am
Hmm, sorry, I think I didn't get your words before.
What do you mean by "128x16"?

They are 16x16 sprites, aren't they?
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: FaustWolf on February 26, 2009, 12:16:41 pm
When I looked at the VRAM, it appeared that the background was composed of 128x16 pixel tiles. However, if they're truly 16x16 pixel tiles like in SNES games, it's perfectly reasonable that the tile assembly here would take care of the issue I was experiencing while reconstructing; I wasn't subdividing the 128x16 image pieces.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: utunnels on February 26, 2009, 08:30:31 pm
I think it  was just a coincidence. In some rooms, the tiles are completely out of order.
Do you use a vram viewer? So those tiles are using the same palette? Sometimes they don't, so that'll make them hard to be assembled manually.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: yaz0r on February 27, 2009, 07:23:37 pm
Sorry for the lack of news, I've been very busy irl. Just to let you know, here his the room 242 field script disassembly. As you can see, there have been a bit of progress. A lot of unhandled opcode remains but it's starting to give interesting results.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: utunnels on February 27, 2009, 08:29:56 pm
That is awesome.
Now we can have a direct view of the dialogues without checking them manually.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: ZeaLitY on February 28, 2009, 11:17:50 am
Since we have the power to investigate this now...

I think in room 295 - Water Dragon Isle Campfire scene, in the US ROM, there's some unused text in the debug portion:

Code: [Select]
--------DUMMY START--------
   
* DEBUG MENU
~~~Quit
~~~Knife
~~~Pos

* Press Button to Cont

* Press Button to End
   
* Draw Knife

* Sheaf Knife

 [Water Dragon Isle, amazing dialogue in Debug Menu]
 
 [Kid?]
   So tell me now
   Even if it is a lie
   That angels unseen
   Watch over the works of men.
 
 [Hydra Marshes (Home), debug menu with strage dwarve lines]
 
--------DUMMY START--------

The interesting part is the poem, "So tell me now / even if it is a lie / that angels unseen / watch over the works of men." I wonder if that ever had a use?
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: utunnels on February 28, 2009, 11:48:15 am
Yeah, it is interesting.
The US translation is a aabb quatrain, while the JPN one is a aaba quatrain.

 オレに言ゎせりゃ
 デタラメもいいとこさ、
 見えない天使が人の行いを
 見守ってるなんてのは。

P.S. It is obviously spoken by Kid, if it is actually used somewhere.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: utunnels on March 01, 2009, 11:26:44 am
Finally I got PCSX to work.
It seems the loading screen will last for ages, so I thought it was simply frozen.
I think I was a bit too late.

Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: utunnels on March 02, 2009, 11:46:15 am
Here's the raw script pack from demo version with room numbers.
If someone wants to translate it...

------------
Well, it seems the room numbers are different from the final version...

Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: OneWingedAngel on September 02, 2018, 08:38:14 pm
This thread has been dead for 9.5 years, but:

Is the list of opcodes (https://www.chronocompendium.com/Term/Chrono_Cross_Fieldscript_Notes.html) the full list of known codes?  I'm reading through the dump of fieldscript, and I think I've figured out a couple that aren't on that list.

I am 99% sure that opAE(0x01) indicates that this entity's script 4 is the "on key item interaction" script.  In every case I've looked at, it appears in script 0 *if and only if* the entity's script 4 has one or more IF checks using USED_KEY_ITEM.

Are others still working on deciphering fieldscript?  I couldn't find a more recent thread discussing it.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: ZeaLitY on September 03, 2018, 11:43:57 pm
I don't think anyone's been actively messing with it. Prizvel and Danetta were the most recent people working on hacking on Cross, but not sure if they touched fieldscript.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: OneWingedAngel on September 13, 2018, 12:14:14 pm
Here's my plan of attack to get things moving on this front again:

1) Translate the Terminus Traduction tools into English.  I might leave most/all of the actual variables in French, and only translate comments, printed strings, and scripting commands.  I've found their code to be really well organized/structured, and their tools more complete than the other sets.  This also includes removing the French translation that sits in the Textes_Avant folder in the distributed version (so that extracting and reinserting does what you'd expect) and fixing the accent issue with script extraction.  I'll try to write better documentation that provides instructions for the *order* of scripts to run.

2) Move utunnel's fieldscript decompiler (and compiler?) into the TT tools.  That is, have the TT tools run the LZSS decompressor and fieldscript decompiler on file 0003 in each room, as part of its script extraction routine.

3) Rewrite/edit the decompiled fieldscript format to be more human-friendly / editable.  This includes a few things:

     - Remove the hexidecimal indexing at the start of each line, or at least make it optional.

     - Change the format of decompiled IF statements to point to a marker in the code (e.g. LANDING_POINT(2)), not a hex reference.  As is, all IF statements are decompiled literally, indicating the file position marker to jump to if the condition is/not met.  This makes it difficult to add lines (or change a line to an opcode with a different byte length) to the fieldscript, as it requires the user to change *every* file position marker after the added lines.

     - Make the IF statements more consistent.  As others have noted, some of the IF-type opcodes seem to be upside down, or are phrased in the negative (e.g. IF_CHARACTER_NOT_IN_PARTY).  As far as I can tell, all IF opcodes are most directly phrased as IF(condition) CONTINUE, ELSE GOTO(reference).

     - Add metadata files for labeling entities and scripts at decompile time (add comments to individual entities and scripts).  If the metadata file for a room doesn't exist when it is decompiled, the decompiler will make a "blank" or default file with the right number of entities and scripts per entity.  A human can then edit that file to overwrite default names and descriptions, so it decompiles "nicer" next time.

4) Write a fieldscript compiler that's compatible with the new format, and have the TT tools recompress and insert it when the script is reinserted.

5) Make some sort of database / something of unknown opcodes (frequency, where they occur relative to other operations, etc), as a reference for trying to decipher them.  Yes, this is vague.

---------------------------------

I'm going to do all of this in a public GitHub repo, both in order to generate a history of changes from code written by others that's publicly available and to (hopefully) foster collaboration with others.  In particular, just about anyone should be able to contribute to the fieldscript metadata labeling, once those files exist-- no programming, just labeling.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: ZeaLitY on September 13, 2018, 03:41:04 pm
Let me know if you need to contact the Terminus people. I think yaz0r is still active...I swear he e-mailed me about something or other a year ago, so I should have his e-mail on the Compendium account if you need.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: kolt54321 on September 26, 2018, 01:17:46 am
Here's my plan of attack to get things moving on this front again:


Please do let us know if you get things running! I'd be interested to hear.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: Danetta on October 22, 2018, 07:23:33 am
I also had a thought about porting all the stuff into TT or smth, but TT is also Windows-specific, which is not very pretty.
I still think it's worth to make TT platform-independent.


By the way, I rewrited some of the old decompiler's code to make it more organized and easy-to-change. Never finished the work tho.
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: OneWingedAngel on February 12, 2019, 04:13:17 pm
The list of opcodes that was at https://www.chronocompendium.com/Term/Chrono_Cross_Fieldscript_Notes.html seems to have vanished, and the link to "fieldscript" from https://www.chronocompendium.com/Term/Chrono_Cross_Fieldscript.html is now dead.  Does anyone have an archived version of this page, or know to where it got moved?
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: Mauron on February 12, 2019, 04:47:33 pm
There are some issues with the Encyclopedia at the moment. Refreshing a page that gives a page not found error should fix it, or you can use the secondary link at https://www.chronocompendium.com/wiki/index.php/Chrono_Cross_Fieldscript_Notes (https://www.chronocompendium.com/wiki/index.php/Chrono_Cross_Fieldscript_Notes)
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: Grobycftw on November 24, 2020, 11:46:45 am
Hi :) If anyone can update the Chrono Cross Fieldscript Notes
I found what the Command :  FE 6D - Unknown     does!

FE 6D - Recover Stars to max !

If you look in the decompiled script, let's say
0425.room_023_arni_home_-_serge's_room.script.cpt

you can find
0x037E: HEAL_GROUP(249)
0x0382: opFE6D()
0x0384: CURE_ALL_STATUS_AILEMENT(249, 57)

it is always with the Heal Group/Cure Ailement function!

*It is possible to prevent the opFE6D() if you set it to 0C0C you will not recover star's when you go at the inn/serge's bed !
But I've encounter a little issue, when decompiling/recompile Termina's Inn (Home)
using PurpleCat Tools   :(
The room is corrupt, everything is fine until you try to sleep at the Inn, control's stopped and you're stuck forever :/  but all the other Inns work!




***Edit

Just founded the command
45 TT UU VVWW XX YY ZZ - Unknown, UU may be a character ID.

here's an example :
45 00 FF 1E 80 45 01 FF
0xFF is the current party leader

This Command makes the NPC (usualy it's an NPC) Run to current party leader when near by!
Strangely changing it to the Second or Third party Character doesn't change anything
but you can remove the command with no issue.

*To make my test, I always set all the value of a Command to 0C
*0C = No-op

***Edit
Command D1 is Similar to 0F XX YY.
D1 XXYY - Unknown
0F XXYY - Load NPC model: Loads the ~YYXXth NPC model for this room for the current entity.

Example :
D1 04 80
Load Model 04 for Current Entity, I think D1 is used when you have the same model loaded Multiple times in the room.
(D1 04 80 Loads the Googhoul's Model in
1358.room_334_fort_dragonia_another_-_west_maze.script.cpt)
(There's 2 Googhoul) - would need more testing/data to be 100% sure.


***Edit
I think command C5 is related to the Sound.
C5 UUVV WWXX YYZZ -  Unknown

In my example :
C5 0A 80 7F 80 00 80
This put the "Wing's Flapping" sound effect on Ghoogool
The closer you get to the Ghoogool the Louder the sound is. (not sure if it always set like this)
Title: Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
Post by: ZeaLitY on November 26, 2021, 03:40:09 am
Thanks; got it all added to the fieldscript page!