Jump to content


Photo

Unending cutscene


  • Please log in to reply
34 replies to this topic

#1 Bookwyrme

Bookwyrme
  • Modder
  • 5804 posts

Posted 19 August 2007 - 08:23 AM

I've got a cutscene that doesn't end, and, despite reading other threads on the subject, can't figure out why. Actually, it has two problems: It is supposed to fire at rest and does not, and when it does fire, does not end.

I thought I was following directions when I added a line in the TP2, but I seem to have missed something:

EXTEND_TOP ~KorganD.bcs~ ~MageTrio/scripts/TM#KorganD.baf~

KorganD.baf is:

IF
GLOBAL("TM#DrunkenRevelry","GLOBAL",0)
InMyArea("Larz")
InParty("Larz")
CombatCounter(0)
!See([ENEMY])
!StateCheck("Larz",CD_STATE_NOTVALID)
!StateCheck(Myself,CD_STATE_NOTVALID)
OR(11)
AreaCheck("AR0313")
AreaCheck("AR0406")
AreaCheck("AR0021")
AreaCheck("AR0509")
AreaCheck("AR0513")
AreaCheck("AR0522")
AreaCheck("AR0704")
AreaCheck("AR0709")
AreaCheck("AR1105")
AreaCheck("AR1602")
AreaCheck("AR2010")
THEN
RESPONSE #100
SetGlobal("TM#DrunkenRevelry","GLOBAL",1)
Interact("Larz")
END

Larz & Korgan talk, then the cutscene (Named tm#dri1) fires:

IF
True ()
GLOBAL("TM#DrunkenRevelry","GLOBAL",1)
THEN
RESPONSE #100
CutSceneId(Player1)
ActionOverride("Larz",EscapeArea())
ActionOverride("Korgan",EscapeArea())
StartMovie("RestInn")
ActionOverride("Larz",Interact("Korgan"))
END
//END CUTSCENE


They are supposed to then come back & interrupt everyone's rest, but they do not. Also, the movie fires before they EscapeArea, which does rather spoil the whole interrupted-night effect (or would if the return were happening).

So, yes, help would be appreciated*

*Is still very happy that--thanks in a large part to lots of help and advice from folk here--the Trio actually talk long enough to get to the broken cutscene :)

Mods: <a data-cke-saved-href="http://www.shsforums...-auroras-shoes/">Aurora's Shoes (released),

 


 

 


#2 Kulyok

Kulyok
  • Modder
  • 2450 posts

Posted 19 August 2007 - 08:36 AM

EscapeArea() means these actors are given an order to leave and never come back(which is probably not exactly what you had in mind), so Interact action cannot possibly happen after it - and the cutscene gets stuck.

Try just moving them around a little - MoveToPoint, or something.

#3 Bookwyrme

Bookwyrme
  • Modder
  • 5804 posts

Posted 19 August 2007 - 08:38 AM

Ah, thanks. They are, indeed, meant to come back.

*Runs off to fix code.

Oh, and does anyone have any idea why it is not firing at rest? It fires just like any other banter would.

Edited by Bookwyrme, 19 August 2007 - 08:48 AM.

Mods: <a data-cke-saved-href="http://www.shsforums...-auroras-shoes/">Aurora's Shoes (released),

 


 

 


#4 Rabain

Rabain

    God

  • Member
  • 653 posts

Posted 19 August 2007 - 08:55 AM

What you you using to check if the party has rested?

Adding PartyRested() to the checks in the script that start the whole thing off might help!
A knight without armour in a savage land...

#5 Kulyok

Kulyok
  • Modder
  • 2450 posts

Posted 19 August 2007 - 09:04 AM

Oh, and does anyone have any idea why it is not firing at rest? It fires just like any other banter would.


Does your banter have Global("TM#DrunkenRevelry","GLOBAL",1) as its triggering condition? I suspect it's currently Global("TM#DrunkenRevelry","GLOBAL",0) - which might be causing the mistake.

Also, instead of the cutscene, you could set SetGlobal("TM#DrunkenRevelry","GLOBAL",2) in the banter, then RestParty() in the end of the banter, and then add this to Larz's regular script:

IF
GLOBAL("TM#DrunkenRevelry","GLOBAL",2)
InParty("Korgan")
InParty("Larz")
!StateCheck("Larz",CD_STATE_NOTVALID)
!StateCheck(Myself,CD_STATE_NOTVALID)
THEN
RESPONSE #100
Interact("Korgan")
END

(it should fire just after rest all right - probably no other conditions are needed, since you're not likely to end up in another area after a rest, or in combat).

EDIT: And, yes, you need InParty checks for both Korgan and Larz - and for every interparty banter, actually.

Edited by Kulyok, 19 August 2007 - 09:06 AM.


#6 Bookwyrme

Bookwyrme
  • Modder
  • 5804 posts

Posted 19 August 2007 - 09:16 AM

I'm trying to get it to fire at rest--that is, when the player rents a room & would normally be resting. I thought the combo of
TP2
EXTEND_TOP ~KorganD.bcs~ ~MageTrio/scripts/TM#KorganD.baf~

And then, of course, the tm#korgand.baf itself, which has the initial trigger.

The idea is, the party goes to rest, the two take off for their wild night, the rest movie plays, then the two come back--simulating an interrupted rest.

Mods: <a data-cke-saved-href="http://www.shsforums...-auroras-shoes/">Aurora's Shoes (released),

 


 

 


#7 Kulyok

Kulyok
  • Modder
  • 2450 posts

Posted 19 August 2007 - 09:26 AM

I am not talking about .baf - but about .d. What does it look like?

#8 Bookwyrme

Bookwyrme
  • Modder
  • 5804 posts

Posted 19 August 2007 - 10:07 AM

Oh! Ok, the beginning is very simple:

CHAIN
IF ~GLOBAL("TM#DrunkenRevelry","GLOBAL",1)~ THEN BKORGAN TM#DrunkenRevelry
~Och, this place dunnae be fit fer a dwarf to relax in.~
== BTM#LAR ~So go somewhere else. No one's keeping you.~
//Exchange of pleasantries (sort of) and
DO ~SETGLOBAL("TM#DrunkenRevelry","GLOBAL",2)
ClearAllActions()
StartCutSceneMode()
StartCutScene("tm#dri1")~
EXIT

Edited by Bookwyrme, 19 August 2007 - 05:29 PM.

Mods: <a data-cke-saved-href="http://www.shsforums...-auroras-shoes/">Aurora's Shoes (released),

 


 

 


#9 Gort

Gort
  • Validating
  • 614 posts

Posted 19 August 2007 - 08:13 PM

shouldn't be EndCutSceneMode somewhere?

#10 Bookwyrme

Bookwyrme
  • Modder
  • 5804 posts

Posted 19 August 2007 - 08:16 PM

:blush: Um...yes, I think there should. Thanks!

Edited by Bookwyrme, 19 August 2007 - 08:26 PM.

Mods: <a data-cke-saved-href="http://www.shsforums...-auroras-shoes/">Aurora's Shoes (released),

 


 

 


#11 Kulyok

Kulyok
  • Modder
  • 2450 posts

Posted 19 August 2007 - 10:14 PM

Your dream script looks good, and the banter begins as it should, in fact, begin. So, I can see two possible reasons for the talk misfiring: you have the same variable somewhere in Korgan's regular script, you are setting TM#DrunkenRevelry to 1 somewhere else.

Because the way it is, it should 1) only fire at rest; 2) never fire anywhere else - unless you are triggering variables via console, of course.

#12 berelinde

berelinde

    Troublemaker

  • Modder
  • 4916 posts

Posted 20 August 2007 - 03:03 AM

shouldn't be EndCutSceneMode somewhere?


Interact() is one way to end a cutscene. StartDialogueNoSet(), Dialogue(), and StartDialogue() are a few others. You can add EndCutSceneMode() somewhere, if you like, but it will end anyway once you hit the Interact().

"Imagination is given to man to console him for what he is not; a sense of humor, for what he is." - Oscar Wilde

berelinde's mods
TolkienAcrossTheWater website
TolkienAcrossTheWater Forum


#13 Bookwyrme

Bookwyrme
  • Modder
  • 5804 posts

Posted 27 August 2007 - 12:59 PM

Progress! The scene no longer hangs endlessly. You were right, Kulyok, there was a CHAIN on both sides with the same beginning. It would have taken me days to notice, if ever :P

It still does not fire at rest, though. What's happening instead is that Korgan will banter with some other NPC at rest, ending without rest (of course), and then later have this banter at whatever time it fires. This is the only time his script is changed in any way by the Trio. Would changing things from EXTEND_TOP to EXTEND_BOTTOM in the TP2 make any difference?

Also, I'm finding that in the cut scene, the rest movie fires *before* the two leave the area, which rather undercuts the effect I had hoped for. Is this simply the Way Things Are (in which case, I'll cut the rest scene and insert a Wait, I guess), or is there some way to make the movie fire before the two run off?

Mods: <a data-cke-saved-href="http://www.shsforums...-auroras-shoes/">Aurora's Shoes (released),

 


 

 


#14 Kulyok

Kulyok
  • Modder
  • 2450 posts

Posted 27 August 2007 - 09:59 PM

It still does not fire at rest, though. What's happening instead is that Korgan will banter with some other NPC at rest, ending without rest (of course), and then later have this banter at whatever time it fires. This is the only time his script is changed in any way by the Trio. Would changing things from EXTEND_TOP to EXTEND_BOTTOM in the TP2 make any difference?


Search for TM#DrunkenRevelry in your entire mod and post the results here.

#15 Bookwyrme

Bookwyrme
  • Modder
  • 5804 posts

Posted 28 August 2007 - 08:34 AM

You want the full context, or just a list of the variables?

For now, the list:

In tm#korgand.baf

IF
GLOBAL("TM#DrunkenRevelry","GLOBAL",0)
//stuff
SetGlobal("TM#DrunkenRevelry","GLOBAL",1)
//Interract

In blarz.d

IF ~GLOBAL("TM#DrunkenRevelry","GLOBAL",1)~ THEN BKORGAN TM#DrunkenComplaint
~Och, this place dunnae be fit fer a dwarf to relax in.~
== BTM#LAR ~So go somewhere else. No one's keeping you.~
DO ~SetGlobal("TM#DrunkenRevelry","GLOBAL",2)~
//Some chatter, then Cutscene, varies depending on who actually goes, EXTERN seems to be selecting which of the two correctly:

In tm#dri1 and tm#dri2

IF
GLOBAL("TM#DrunkenRevelry","GLOBAL",2)
THEN
//TO
SetGlobal("TM#DrunkenRevelry","GLOBAL",3)

//blarz.d
CHAIN IF ~GLOBAL("TM#DrunkenRevelry","GLOBAL",3)~ THEN BTM#LAR TM#DR4
~And when I woke my purse was light~
DO ~SetGlobal("TM#DrunkenRevelry","GLOBAL",4)~

//PC responds, and depending on choices, global changes again:
Get going:
DO ~SetGlobal("DrunkenRevelry","GLOBAL",5)~ EXIT

//Get a proper rest (two chances to choose this):

DO ~SetGlobal("TM#DrunkenRevelry","GLOBAL",6) RestParty()~ EXIT

//In the AM after (except for the part about it not firing at all):
CHAIN IF
~
PartyRested()
GLOBAL("TM#DrunkenRevelry","GLOBAL",6)~ THEN BTM#LAR TM#Aftereffects
//banter of various sorts

CHAIN BTM#LAR TM#AfterEffects4
~Please, everyone, stop shouting!~
DO ~SetGlobal("TM#DrunkenRevelry","GLOBAL",7)~
//Final Comment, exit

It is not used anywhere else in the mod.

Edit to add: If I remove the PartyRested() before the morning after talk, it will fire as the next banter in line--but not right away. How *do* the mod writers manage the timing? So far, all I see are the Globals changing!

Edit2: The AT REST is still messed up, too. *Scratches head.

Edited by Bookwyrme, 28 August 2007 - 08:50 AM.

Mods: <a data-cke-saved-href="http://www.shsforums...-auroras-shoes/">Aurora's Shoes (released),

 


 

 


#16 Kulyok

Kulyok
  • Modder
  • 2450 posts

Posted 28 August 2007 - 08:57 AM

Gah. Weights.

Place this drunken revelry banter on top of your banter file. Like, if your banter has "Global(variable, global,1)" as its triggering condition, it has to be in the top of the file; if it has "Global(variable,global,0 )" as triggering condition, place it on the bottom of your banter file.

#17 Bookwyrme

Bookwyrme
  • Modder
  • 5804 posts

Posted 28 August 2007 - 08:59 AM

I admit, weights are something I have not dealt with yet.

From the beginning of this round of tests, though, it has been the first banter in blarz.d and blarz.d is the first of the Trio's banters to load.

Edit: Ok, I ran into Zyraen online, and he suggested Weighting the banter at -1, which worked for the main cutscene/banter. The morning after still does not fire. I don't have time now to test, but does it also need Weighting?

Which will probably lead to my asking a number of questions on Weights in general...

Thanks again, though, everyone, for helping!

Edited by Bookwyrme, 28 August 2007 - 10:12 AM.

Mods: <a data-cke-saved-href="http://www.shsforums...-auroras-shoes/">Aurora's Shoes (released),

 


 

 


#18 Rastor

Rastor

    Yes, I really am a dragon. Yes, I am a jerk. Live with it.

  • Member
  • 2001 posts

Posted 31 August 2007 - 07:25 AM

The morning after still does not fire. I don't have time now to test, but does it also need Weighting?


Yes.
Home of Kitanya, Improved Asylum, more...

Posted Image

#19 Bookwyrme

Bookwyrme
  • Modder
  • 5804 posts

Posted 31 August 2007 - 12:16 PM

Even Weighted, the talk for the following morning doesn't run afterwards. It doesn't even show up next in the talks, when I use Cntrl-I. I really don't know what else to try!

Mods: <a data-cke-saved-href="http://www.shsforums...-auroras-shoes/">Aurora's Shoes (released),

 


 

 


#20 cmorgan

cmorgan
  • Modder
  • 2301 posts

Posted 31 August 2007 - 01:06 PM

When you decompile the file, is it at the top of the banter file?

If things are just completely not working, then there must be a variable off somewhere.


If this really doesn't work forget it. Set it up as a single-condition trigger on the Joined file, by setting the banter as you have done, then setting the global, and referencing the global in the BAF.

Sample code, from Branwen waking up after learning that PC is the Spawn of Evil:
/* Wake up after learning Bhaal */
IF %BGT_VAR%
Global("P#BranMatch","GLOBAL",1)
Global("P#BRLoveTalk3","GLOBAL",0)
Global("P#KnowBhaal","GLOBAL",1)
PartyRested()
InParty(Myself)
!StateCheck(Player1,CD_STATE_NOTVALID)
!StateCheck(Myself,CD_STATE_NOTVALID)
!AreaType(DUNGEON)
THEN
RESPONSE #100
IncrementGlobal("P#BRLoveTalk3","GLOBAL",1)
END

IF %BGT_VAR%
Global("P#BRLoveTalk3","GLOBAL",1)
InParty(Myself)
!StateCheck(Player1,CD_STATE_NOTVALID)
!StateCheck(Myself,CD_STATE_NOTVALID)
THEN
RESPONSE #100
PlaySong(0)
PlaySound("brrom")
StartDialogueNoSet(Player1)
END

and close the variable in dialogue.

Just because you start in an Interact() doesn't mean you have to stay there - if banter weighting is driving you nuts, set up a single condition call to the J file, predicated on the banter running (we do this in Xan getting turned pink by Imoen in BG1 NPC.) The banter then can fire randomly, but once it has fired the script can force a single condition thing. You might even timer it, so it waits for the rest movie, then fires right afterwards absed on that setting.