News: 11 March 2016 - Forum Rules

Author Topic: Final Fantasy VI - Opera Scene Coding  (Read 2874 times)

Spooniest

  • Hero Member
  • *****
  • Posts: 3417
  • Kuru zotsu!!
    • View Profile
Final Fantasy VI - Opera Scene Coding
« on: December 03, 2014, 07:37:31 pm »
Whenever I've worked on this game in the past, I always, every time, get bogged down with the Opera Scene. Some observations I've made:

  • The game is running on an invisible timer that dictates when a caption will start printing, to keep the words in time with the music.
  • If the game is still busy printing text or displaying something (i.e. a choice between which lyrics to sing), then the next caption will begin printing, whether the current caption has been cleared off the screen or not. That is, the game just decides to skip clearing the text off the screen, and begins printing the next caption right at the end of the one currently on screen, leading to a lockup.
  • If the text of the opera scene is expanded on, it takes longer to print, and fractions of a second longer to clear off the screen. This is most obvious when trying to edit Prince Ralse's only singing line, which the game expects to be no more than two lines long. Any more than that, and the game will be late clearing it off the screen, and skip it.

Here are the captions in question, extracted from a script dump of Final Fantasy III v1.0.

Key:

<C> = A choice
<E$xx> = An event is being called by the game's program and must be executed
<OP$12> = The editor is not specific about what these are; it just says that it's an opcode that specifies the end of *some* events
<Dx> or <Dxx> = A short delay. Any number can be set, and an increase of 1 = .25 seconds.

Quote
[caption #1208]
The next line is_?
   <C>(Oh my hero_)
   <C>(Alas, Draco_)<D17>

[caption #1209]
& Oh <E$03>my <E$04>hero, <E$09>
   so far away now. <E$0C><OP$12>
   Will I ever <E$0A>see your smile? <E$10><OP$12><EOP>
& Love goes away, <E$0D>
   like night into day. <E$0C><OP$12><EOP>
& It's just a fading dream_ & <E$08><OP$12>
   <C>(I wish I_)
   <C>(I'm the darkness) <D14>

[caption #1212]
& I'm the darkness, <E$0E>
   you're the stars. <E$0B><OP$12>
   Our love <E$08>is brighter than
   the sun. <E$11><OP$12><EOP>
& For eternity, <E$0A>
   for me there can be, <E$0C><OP$12><EOP>
& only you, my chosen one_ & <E$08><OP$12>
   <C>(Must I_)
   <C>(Prince Ralse_)<D10>

[caption #1214]
& Must I forget you? <E$0A>
   Our solemn promise? <E$0B><OP$12>
   Will autumn <E$09>take the place
   of spring? <E$10><OP$12><EOP>
& What shall I do? <E$0A>
   I'm lost without you. <E$0C><OP$12>
   Speak <E$06>to me <E$03>once more! & <E$10><OP$12>

[caption #1217]
& We must part now. <E$0A>
   My life goes on. <E$0C><OP$12>
   But my heart <E$08>won't give
   you up. <E$11><OP$12><EOP>
& Ere I walk away, <E$0A>
   let me hear you say. <E$0C><OP$12>
   I meant as much to you_ & <E$13><OP$12>

[caption #1218]
& So gently, <E$0A>
   you touched my heart. <E$0B><OP$12>
   I will be <E$09>forever <E$06>yours. <E$0A><OP$12><EOP>
& Come what may, <E$0C>
   I won't age a day, <E$0C><OP$12>
   I'll wait <E$07>for you, <E$04>always_ & <E$0C><OP$12>

[caption #1227]
[The survivors of the West attack!]
RALSE: Impossible! <E$0C><OP$12>

[caption #1228]
       Attack!! <E$0C><OP$12>

[caption #1229]
       Wait!! <E$08><OP$12>

[caption #1230]
& Maria <E$12><OP$12>

[caption #1231]
& Draco, <E$0C><OP$12>
   I've waited so long. <E$0C><OP$12>
   I knew you'd come. & <E$10><OP$12>

[caption #1232]
& Maria <E$06><OP$12>will finally <E$07><OP$12>
   have to <E$07><OP$12>become my queen! & <E$09><OP$12>

[caption #1233]
& For the <E$07><OP$12>rest of my <E$08><OP$12>life <E$03><OP$12>
   I'll keep you <E$07><OP$12>near_ & <E$08><OP$12>

[caption #1234]
  It's a duel! & <E$08><OP$12>

In particular, I've found that I usually end up having to shorten the Delay before the game makes the third lyric choice for you to exactly 1 second (or <D4>), alleviating the "text bottleneck" I described above.

The scene where the Western survivors counterattack is much more problematic.

Have anything to add? Know something I don't (very likely)?

Hailing frequencies open...
Yamero~~!

henke37

  • Hero Member
  • *****
  • Posts: 643
    • View Profile
Re: Final Fantasy VI - Opera Scene Coding
« Reply #1 on: December 04, 2014, 05:48:59 am »
I think you got the direction wrong for the description of the E control codes. You are calling into the game program, not the other way around.

As for the OP12 control code, could it be a simple wait instruction? Some of those control codes has to take time, try putting a little text before this supposed wait command.

Spooniest

  • Hero Member
  • *****
  • Posts: 3417
  • Kuru zotsu!!
    • View Profile
Re: Final Fantasy VI - Opera Scene Coding
« Reply #2 on: December 04, 2014, 07:19:04 am »
I think you got the direction wrong for the description of the E control codes. You are calling into the game program, not the other way around.

Hmm...the editor isn't very specific (I guess I'm lucky it contains any information at all). The quote is "An event specified in dec. or hex."

I'm kind of a programming luddite, myself, so most of what I'm doing here is plain guesswork, but I did manage to get a version of the Opera scenes with edited text to play back correctly, so this isn't exactly a help request. I'd just like to learn as much about the programming behind this particular aspect of the game as I can.

Can you clarify what you mean by "wait instruction?" What/who is waiting? What for? Why are they all identical (<OP$12>, every time)?
Yamero~~!

Lenophis

  • Discord Staff
  • Hero Member
  • *****
  • Posts: 971
  • The return of the sombrero!
    • View Profile
    • Slick Productions
Re: Final Fantasy VI - Opera Scene Coding
« Reply #3 on: December 04, 2014, 11:18:34 pm »
Ok, now that I have time, I can clear some things up:
Code: [Select]
<10>The game will pause at this point in dialogue and wait for player input.
Code: [Select]
<11>The game will pause at this point in dialogue for a time based on the argument. It cannot be interrupted.
Code: [Select]
<12>For all purposes you could call it "end tag." All control codes look for this to know when to stop looking for specific rules/instructions.
Code: [Select]
<13>Clears current text onscreen to create a new page.
Code: [Select]
<14>Prints a number of spaces based on the argument.
Code: [Select]
<15>Puts the finger in front of the code and allows player input for choices.
Code: [Select]
<16>The game will pause at this point in dialogue based on the argument, but can be advanced by player input.
Code: [Select]
<19>Used for displaying how much GP you get from treasure chests.
Code: [Select]
<1A>Used for displaying what items you get from treasure chests.
Code: [Select]
<1B>Used to display which spell a character learns, not used by the game.


https://ff6randomizer.codeplex.com/ - Randomize your FF6 experience!