Author Topic: [5000] Place all Chrono Cross lines in the script accurately  (Read 2739 times)

ZeaLitY

  • Entity
  • End of Timer (+10000)
  • *
  • Posts: 10678
  • Spring Breeze Dancin'
    • View Profile
    • My Compendium Staff Profile
[5000] Place all Chrono Cross lines in the script accurately
« on: March 29, 2012, 11:45:58 pm »
Once Cross event editing/viewing becomes available, this should be very easy.
« Last Edit: March 12, 2015, 02:01:57 pm by ZeaLitY »

alfadorredux

  • Entity
  • Mystical Knight (+700)
  • *
  • Posts: 746
  • Just a purple cat
    • View Profile
Re: [?] Place all Chrono Cross lines in the script accurately
« Reply #1 on: March 30, 2012, 11:23:23 am »
We already have a location-by-location event disassembly with the script interpolated in, including all the NPC lines: yaz0r did it a long time ago. Roughly 50% of the fieldscript codes used for building events aren't currently understood, which makes following the branching difficult, but it should be possible, with some work, to link all lines to a location, and most of them to a speaker.

Vehek

  • Errare Explorer (+1500)
  • *
  • Posts: 1716
    • View Profile
Re: [?] Place all Chrono Cross lines in the script accurately
« Reply #2 on: February 02, 2014, 11:06:52 pm »
I've been working a bit on trying to explain how to read conditions in yaz0r's disassemblies.
But for now, I have some worries. I'll admit I'm not a "true" Chrono Cross player. I don't have much personal experience about things like which character combinations are possible at certain parts of the game or how players naturally experience the events of Chrono Cross.
However, after reading the event disassemblies and running tests, the event scripts in Arni seem a lot buggier than I would expect.
I doubt other people will get different results, since my results seem to match up with the event flow in yaz0r's work, but it's good to be sure.
  • Talk to the old woman and man in Home's chief's meadow after the Temporal Vortex but before being told to met Norris at Viper Manor.
    Result: At first they give appropriate reponses, though the old woman prematurely talks about Gonji serving as chief. Then after being told to meet Norris, their dialogue snaps back to their earlier dialogue.
  • Show the Shark Tooth to the sawfish fisherman as Lynx and after getting Serge's body back.
    Result: The responses are flippped. He uses the line for Serge to respond to Lynx, and the line for Lynx to respond to the restored Serge.
  • Talk to Gonji as Lynx after, among other possible things, failing the Marbule Concert or hatching Draggy.
    Result: He mistakenly uses a line meant for Serge.


I only really noticed these errors when I focused in on Home Arni. And I think I already felt frustrated by how some of Arni's scripts were arranged compared to other areas I had looked at. Hopefully, glaring event errors like these are rare in the rest of the game and the rest of the accessible text will match up with what you'd expect.
« Last Edit: February 02, 2014, 11:09:29 pm by Vehek »

ZeaLitY

  • Entity
  • End of Timer (+10000)
  • *
  • Posts: 10678
  • Spring Breeze Dancin'
    • View Profile
    • My Compendium Staff Profile
Re: [5000] Place all Chrono Cross lines in the script accurately
« Reply #3 on: May 05, 2018, 10:56:27 pm »
If it helps anyone on this, yaz0r gave me his original dumped fieldscripts:

http://chronofan.com/Black/Other/ccScript.rar

kolt54321

  • Earthbound (+15)
  • *
  • Posts: 38
    • View Profile
Re: [5000] Place all Chrono Cross lines in the script accurately
« Reply #4 on: May 23, 2018, 11:20:34 pm »
If it helps anyone on this, yaz0r gave me his original dumped fieldscripts:

http://chronofan.com/Black/Other/ccScript.rar

Many thanks for this. I still need to learn how to read these sort of files (pointers and all, need to learn from scratch) but this seems really helpful.

Beswai

  • Iokan (+1)
  • *
  • Posts: 1
    • View Profile
    • sbobet ca
Re: [5000] Place all Chrono Cross lines in the script accurately
« Reply #5 on: November 12, 2018, 12:54:28 am »
I would like to help in providing you with useful information if needed.

ZeaLitY

  • Entity
  • End of Timer (+10000)
  • *
  • Posts: 10678
  • Spring Breeze Dancin'
    • View Profile
    • My Compendium Staff Profile
Re: [5000] Place all Chrono Cross lines in the script accurately
« Reply #6 on: September 01, 2020, 02:06:24 am »
Going to try and settle these once and for all as part of this update. Just to get me going, here is a classic example of something I couldn't find on the initial attempt:

Quote
---------------------------
| Sub function 0x04BB
---------------------------
0x04BB: opFE6B(0x01)
0x04BE: opCE(140) jump 0x04E1
0x04C3: IF_JUMP(var[0x041A] == 0x0000, 0x04D7)
0x04CB: var[0x041A] = 1
0x04CE: CHARACTER_DIALOG(Character(4), 0x0000, 0x08)

   +-------------------------
   |Radius:
   |The Dead Sea...
   |I cannot imagine what kind
   |of spectacle lies ahead...<Close>
   +-------------------------

0x04D3: WAIT_DIALOG()
0x04D4: JUMP(0x04E0)
0x04D7: var[0x041A] = 0
0x04DA: CHARACTER_DIALOG(Character(4), 0x0001, 0x08)

   +-------------------------
   |Radius:
   |A mysterious ocean area
   |even the locals avoid...
   |I pray for our safety.<Close>
   +-------------------------

0x04DF: WAIT_DIALOG()
0x04E0: OP_RETURN()
0x04E1: opCE(136) jump 0x04ED
0x04E6: CHARACTER_DIALOG(Character(4), 0x0002, 0x08)

   +-------------------------
   |Radius:
   |Come, Serge.
   |The Einlanzer shall
   |lead the way!<Close>
   +-------------------------

0x04EB: WAIT_DIALOG()
0x04EC: OP_RETURN()
0x04ED: opCE(132) jump 0x04F9
0x04F2: CHARACTER_DIALOG(Character(4), 0x0003, 0x08)

   +-------------------------
   |Radius:
   |We need the power of
   |the Einlanzer to
   |destroy that sword.
   +-------------------------
   |We must withdraw for now.<Close>
   +-------------------------

0x04F7: WAIT_DIALOG()
0x04F8: OP_RETURN()
0x04F9: opCE(128) jump 0x0505
0x04FE: CHARACTER_DIALOG(Character(4), 0x0004, 0x08)

   +-------------------------
   |Radius:
   |We need the power of
   |the Einlanzer to
   |destroy that sword.
   +-------------------------
   |We must withdraw for now.
   |Let us stop by my hut.
   +-------------------------
   |There is something I'd like
   |to pick up before heading to
   |the Isle of the Damned.<Close>
   +-------------------------

0x0503: WAIT_DIALOG()
0x0504: OP_RETURN()
0x0505: CHARACTER_DIALOG(Character(4), 0x0005, 0x08)

   +-------------------------
   |Radius:
   |Hmmm...
   |I sense a strange
   |vibe in the air...
   +-------------------------
   |Stay alert, Serge.
   |Let us proceed.<Close>
   +-------------------------

0x050A: WAIT_DIALOG()
0x050B: OP_RETURN()

The second part, "a mysterious ocean area..." was marked unknown/unconfirmed in my initial script classification. Radius basically has a range of dialogue he says here depending on where the player is in the quest to open up the Dead Sea. Since this is my first attempt reading Cross fieldscript, I thought I'd provide my guesses to help figure out how to investigate the triggers for certain dialogue:

Quote
---------------------------
| Sub function 0x04BB
---------------------------
0x04BB: opFE6B(0x01)
0x04BE: opCE(140) jump 0x04E1 (assuming this is if you have the Einlanzer?)
0x04C3: IF_JUMP(var[0x041A] == 0x0000, 0x04D7) (this looks like the one we want, but from here, searching for var[0x041A] only brings up a lot of Terra Tower results)
0x04CB: var[0x041A] = 1
0x04CE: CHARACTER_DIALOG(Character(4), 0x0000, 0x08) (speaking of which—are there offsets for the Character ID on the Compendium yet? I can create a list based on the Fortune Teller dialogue, but just checking since it would help verify who's saying what for hard-to-identify dialogue)

   +-------------------------
   |Radius:
   |The Dead Sea...
   |I cannot imagine what kind
   |of spectacle lies ahead...<Close>
   +-------------------------

0x04D3: WAIT_DIALOG()
0x04D4: JUMP(0x04E0)
0x04D7: var[0x041A] = 0
0x04DA: CHARACTER_DIALOG(Character(4), 0x0001, 0x08)

   +-------------------------
   |Radius:
   |A mysterious ocean area
   |even the locals avoid...
   |I pray for our safety.<Close>
   +-------------------------
« Last Edit: September 01, 2020, 02:14:18 am by ZeaLitY »

ZeaLitY

  • Entity
  • End of Timer (+10000)
  • *
  • Posts: 10678
  • Spring Breeze Dancin'
    • View Profile
    • My Compendium Staff Profile
Re: [5000] Place all Chrono Cross lines in the script accurately
« Reply #7 on: September 01, 2020, 02:15:32 am »
Attached is another good one.

Quote
0x073B: CHARACTER_DIALOG(Character(4), 0x0013, 0x08)

   +-------------------------
   | So tell me now
   | Even if it is a lie
   | That angels unseen
   | Watch over the works of men.<Close>
   +-------------------------

If anyone could help figure out how to read the fieldscript to determine what triggers the parent subfunction for this dialogue, or why it's dummied out, I might be able to take it from here.

ZeaLitY

  • Entity
  • End of Timer (+10000)
  • *
  • Posts: 10678
  • Spring Breeze Dancin'
    • View Profile
    • My Compendium Staff Profile
Re: [5000] Place all Chrono Cross lines in the script accurately
« Reply #8 on: September 01, 2020, 04:58:50 pm »
Whoops, fell victim to the article naming confusion. found https://www.chronocompendium.com/wiki/index.php/Chrono_Cross_Fieldscript_Notes . Will check this out.

Quote
---------------------------
| Sub function 0x04BB
---------------------------
0x04BB: opFE6B(0x01)
(UNKNOWN COMMAND)
0x04BE: opCE(140) jump 0x04E1
(IF THE VALUE OF THE STORY VARIABLE IS LESS THAN 140< JUMP TO 0x04E1)
0x04C3: IF_JUMP(var[0x041A] == 0x0000, 0x04D7)
(IF VARIABLE 0x041A = 0x0000, JUMP TO 0x04D7, THE UNUSED DIALOGUE)
0x04CB: var[0x041A] = 1
(SETS VARIABLE 0x041A to 1?)
0x04CE: CHARACTER_DIALOG(Character(4), 0x0000, 0x08)
(CALLS RADIUS DIALOGUE; DO WE HAVE LIST OF CHARACTER ID OFFSETS?)

   +-------------------------
   |Radius:
   |The Dead Sea...
   |I cannot imagine what kind
   |of spectacle lies ahead...<Close>
   +-------------------------

0x04D3: WAIT_DIALOG()
0x04D4: JUMP(0x04E0)
0x04D7: var[0x041A] = 0
0x04DA: CHARACTER_DIALOG(Character(4), 0x0001, 0x08)

   +-------------------------
   |Radius:
   |A mysterious ocean area
   |even the locals avoid...
   |I pray for our safety.<Close>
« Last Edit: September 01, 2020, 05:49:14 pm by ZeaLitY »

ZeaLitY

  • Entity
  • End of Timer (+10000)
  • *
  • Posts: 10678
  • Spring Breeze Dancin'
    • View Profile
    • My Compendium Staff Profile
Re: [5000] Place all Chrono Cross lines in the script accurately
« Reply #9 on: September 01, 2020, 05:58:24 pm »
Here's an interesting one. Is it even possible to have the Chrono Cross before the Masa, Mune, and Doreen scene in Hermit's Hideaway?

Quote
0x06F7: IF_HAVE_ITEM(Chrono Cross) ELSE JUMP 0x075F
0x06FC: DISABLE_CHARACTER_CONTROLS()
0x06FD: opBE()
0x06FE: CALL(0x761)
0x0701: SET_POSITION_UNSIGNED(var[0x0012], var[0x0014], 0)
0x0709: DIALOG(0x0027, 0x00)

   +-------------------------
   |The Chrono Cross begins to shimmer.<Close>
   +-------------------------

0x070D: WAIT_DIALOG()
0x070E: RUN_ENTITY_SCRIPT_UNKMODE(Character(0), 0xA9)
0x0711: WAIT(30)
0x0714: PLAY_SOUNDFX(3, 0)
0x071A: PLAY_EFFECT("tt00")
0x071F: WAIT(90)
0x0722: SET_SCREEN_RGB(1, 255, 255, 255, 150)
0x072D: WAIT(180)
0x0730: RUN_ENTITY_SCRIPT_BLOCKING(Character(1), 0xA3)
0x0733: RUN_ENTITY_SCRIPT_BLOCKING(Character(2), 0xA3)
0x0736: RUN_ENTITY_SCRIPT_BLOCKING(Character(3), 0xA3)
0x0739: var[0x00C4] = PARTY_MEMBER_0
0x073F: var[0x00D8] = PARTY_MEMBER_1
0x0745: var[0x00DA] = PARTY_MEMBER_2
0x074B: REMOVE_FROM_PARTY(PC0)
0x074D: REMOVE_FROM_PARTY(PC1)
0x074F: REMOVE_FROM_PARTY(PC2)
0x0751: ADD_CHARATER_TO_PARTY(0)
0x0754: EXECUTE_CHARACTER_SCRIPT()
0x0755: opFE02(2)
0x0759: SET_NEXT_ROOM("CD0-496-Black screen", 0)
0x075E: STOP_SCRIPT_EXEC()
0x075F: STOP()

opBE is an unknown function.

Starting to think I'll need to replay Chrono Cross and carefully move through the unused lines, room by room, and experiment.

Vehek

  • Errare Explorer (+1500)
  • *
  • Posts: 1716
    • View Profile
Re: [5000] Place all Chrono Cross lines in the script accurately
« Reply #10 on: September 01, 2020, 06:13:03 pm »
I found how to trigger the poem last night (it's a debug function called by entity 11), and was writing about it, but I'll dump this first.

You seem to be using an old script dump. In the version I downloaded (it was probably part of the script decompiler package), "opCE" is a check storyline progression opcode. (The debug room text has a nice list labeling the different storyline values.) So it should display at "Masamune Dissapears". The variables referenced in that script are roomVars, local variables. Instead of "Character(4)", it's "ENTITY 4" - the NPC version not in the active party. So after you talk to him once at that point, it sets a temporary flag, switching it to the other dialogue, back and forth.

One of the major issues in reading event scripts - I don't know if the later Cross hackers have made correct dumps - is an inconsistency with if-statements. That's partially my fault for not understanding it back then.
    do condition with two values.
    if true continue with next opcode, jump otherwise.
The logic is if X is true, then run the following line(s) of code, else jump. Due to my incorrect labeling of opcodes back then, not all if-statements conform to this pattern.
Using the jump-to points from the if-statements, and jump-statements within, you can break down the code into if-else blocks.
« Last Edit: September 01, 2020, 06:36:28 pm by Vehek »

ZeaLitY

  • Entity
  • End of Timer (+10000)
  • *
  • Posts: 10678
  • Spring Breeze Dancin'
    • View Profile
    • My Compendium Staff Profile
Re: [5000] Place all Chrono Cross lines in the script accurately
« Reply #11 on: September 09, 2020, 02:34:52 am »
Got it. Looking at the number of unused lines, I don't think I'll have time to continue this as part of the mainline update. But I wanted to get a better script dump up and hosted on Chronofan, though. If yours is more up-to-date and annotated, can you zip and attach?

If you'd rather hold off (owing to the need to correct some of the interpretations), no problem.

I have no idea where I got the script dump I was using; it was some years-old "ccScript.zip" file. yaz0r hangs out on all the usual places on Discord these days and is pretty easily reachable by the way, but yeah, strapped for time.

Vehek

  • Errare Explorer (+1500)
  • *
  • Posts: 1716
    • View Profile
Re: [5000] Place all Chrono Cross lines in the script accurately
« Reply #12 on: September 09, 2020, 03:14:17 am »
I pulled the version I was consulting out of utunnels_utils.zip, which at least in the past was hosted on chronofan.
« Last Edit: September 09, 2020, 03:15:29 am by Vehek »