• Welcome to Freedom Reborn Archive.
 

Cutscene Weirdness (Is the game psychic or what?)

Started by Urthman, May 23, 2007, 03:23:56 PM

Previous topic - Next topic

Urthman

OK, so I'm trying to edit one of the cutscenes from the original FF1 campaign, the one where Law and Order rescue Liberty Lad. 

I wanted to delete a line of dialogue.  So I just deleted the whole line with that speak command.

When I play the game and it comes to that sequence, the CS gets hung up right where the deleted line was. If I type the line into the console manually, the CS continues as normal!

Any idea what is going on here?  How does the game know that I deleted a line and that it's supposed to wait for it?   It's not like the next line has a "wait until the previous guy is done speaking" command in it.  Or does it somehow?

I can post the relevant section of the mission.py later if it will help.

Previsionary

posting the mission.py would be most useful because I can barely remember how that mission is set up.

M25

Cutscenes are divided up into steps.  Each step has a pair of parentheses around it.   Something like

(
"speak('blah blah')",
),

The short answer to your question is to delete not only the line, but also the parentheses.


Why did it work when you entered the line manually?

Each step has to have one entry in it that includes a callback telling the cutscene to go to the next step (look in cshelper.py at the functions and you'll see the callbacks).  speak() is one of those functions that includes a callback.

If the cutscene doesn't encounter a callback in a step, it'll hang.   If it encounters more than one callback, it will skip steps. 

Deleting the line created a step that didn't have a callback in it, causing the whole thing to stop.  Typing the line manually caused a callback, and the cutscene continued to the next step.

Urthman

Ah.  Thanks M25. That helps alot.

Dang.  It seems like every single scripting thing in python has some non-obvious complication like that.   :banghead:

Epimethee

Try another language (such as Pascal – they used THAT to teach programming?) and you might find that Python isn't all that bad. ;)

Once you get familiar enough with the language syntax, it goes usually rather well, I think. Mind you, I'm not familiar enough with other games to compare, but the method of coding cutscenes implemented in FF can often be (to me at least) indeed rather byzantine.

FWIW, the parentheses in the cs delimit a tuple, which is almost identical to a list (itself delimited by []). So, a cutscene is a list [] of steps () containing multiple text strings "" which get converted to commands at run time.