Author Topic: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)  (Read 23666 times)

yaz0r

  • Architect of Kajar
  • Porrean (+50)
  • *
  • Posts: 65
    • View Profile
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.

yaz0r

  • Architect of Kajar
  • Porrean (+50)
  • *
  • Posts: 65
    • View Profile
I found CC debug room.

[attachment deleted by admin]

FaustWolf

  • Guru of Time Emeritus
  • Arbiter (+8000)
  • *
  • Posts: 8972
  • Fan Power Advocate
    • View Profile
WHOA. Does it use the same "debug text" that seems to be in every room yaz0r, or is this something completely different?

yaz0r

  • Architect of Kajar
  • Porrean (+50)
  • *
  • Posts: 65
    • View Profile
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.

yaz0r

  • Architect of Kajar
  • Porrean (+50)
  • *
  • Posts: 65
    • View Profile
Here is the save state if anyone want to test it.

[attachment deleted by admin]

yaz0r

  • Architect of Kajar
  • Porrean (+50)
  • *
  • Posts: 65
    • View Profile
Ok, looks like there is very little interest in all this.
Too bad...
« Last Edit: February 02, 2009, 01:43:29 pm by yaz0r »

Akari

  • Iokan (+1)
  • *
  • Posts: 11
    • View Profile
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.

FaustWolf

  • Guru of Time Emeritus
  • Arbiter (+8000)
  • *
  • Posts: 8972
  • Fan Power Advocate
    • View Profile
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.

ZeaLitY

  • Entity
  • End of Timer (+10000)
  • *
  • Posts: 10795
  • Spring Breeze Dancin'
    • View Profile
    • My Compendium Staff Profile
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).

yaz0r

  • Architect of Kajar
  • Porrean (+50)
  • *
  • Posts: 65
    • View Profile
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]

FaustWolf

  • Guru of Time Emeritus
  • Arbiter (+8000)
  • *
  • Posts: 8972
  • Fan Power Advocate
    • View Profile
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?

Vehek

  • Errare Explorer (+1500)
  • *
  • Posts: 1756
    • View Profile
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.

yaz0r

  • Architect of Kajar
  • Porrean (+50)
  • *
  • Posts: 65
    • View Profile
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).
« Last Edit: February 03, 2009, 07:24:33 am by yaz0r »

ZeaLitY

  • Entity
  • End of Timer (+10000)
  • *
  • Posts: 10795
  • Spring Breeze Dancin'
    • View Profile
    • My Compendium Staff Profile
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...

yaz0r

  • Architect of Kajar
  • Porrean (+50)
  • *
  • Posts: 65
    • View Profile
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.