Unending cutscene
#1
Posted 19 August 2007 - 08:23 AM
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
#2
Posted 19 August 2007 - 08:36 AM
Try just moving them around a little - MoveToPoint, or something.
IWD NPC, Xan, The Sellswords, Back to Brynnlaw, Assassinations, Dungeon Crawl, Reunion, Branwen, Coran, Tiax, Xan BG1 Friendship
BG1 NPC, Romantic Encounters
#3
Posted 19 August 2007 - 08:38 AM
*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.
#4
Posted 19 August 2007 - 08:55 AM
Adding PartyRested() to the checks in the script that start the whole thing off might help!
#5
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.
IWD NPC, Xan, The Sellswords, Back to Brynnlaw, Assassinations, Dungeon Crawl, Reunion, Branwen, Coran, Tiax, Xan BG1 Friendship
BG1 NPC, Romantic Encounters
#6
Posted 19 August 2007 - 09:16 AM
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.
#7
Posted 19 August 2007 - 09:26 AM
IWD NPC, Xan, The Sellswords, Back to Brynnlaw, Assassinations, Dungeon Crawl, Reunion, Branwen, Coran, Tiax, Xan BG1 Friendship
BG1 NPC, Romantic Encounters
#8
Posted 19 August 2007 - 10:07 AM
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.
#9
Posted 19 August 2007 - 08:13 PM
#10
Posted 19 August 2007 - 08:16 PM
Edited by Bookwyrme, 19 August 2007 - 08:26 PM.
#11
Posted 19 August 2007 - 10:14 PM
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.
IWD NPC, Xan, The Sellswords, Back to Brynnlaw, Assassinations, Dungeon Crawl, Reunion, Branwen, Coran, Tiax, Xan BG1 Friendship
BG1 NPC, Romantic Encounters
#12
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
Posted 27 August 2007 - 12: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?
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?
#14
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.
IWD NPC, Xan, The Sellswords, Back to Brynnlaw, Assassinations, Dungeon Crawl, Reunion, Branwen, Coran, Tiax, Xan BG1 Friendship
BG1 NPC, Romantic Encounters
#15
Posted 28 August 2007 - 08:34 AM
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.
#16
Posted 28 August 2007 - 08:57 AM
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.
IWD NPC, Xan, The Sellswords, Back to Brynnlaw, Assassinations, Dungeon Crawl, Reunion, Branwen, Coran, Tiax, Xan BG1 Friendship
BG1 NPC, Romantic Encounters
#17
Posted 28 August 2007 - 08:59 AM
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.
#18
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.
#19
Posted 31 August 2007 - 12:16 PM
#20
Posted 31 August 2007 - 01:06 PM
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.