Cut Scene Problem

Started by balduran, September 12, 2005, 08:41:57 AM

Previous topic - Next topic

balduran

I'm having problems getting this cutscene to work. It is supposed to make the NPC Azure kill Trajan, but all that happens is that she receives the 25000 XP.

I rewrote the code several times, but all in vain.
The first time it inserted the code into azure.bcs, which is her script. Next I tried to put it into the dialogue file, but it didn't work again. I tried different actions, neither of which actually did anything. I even tried to make a cutscene.bcs but all it did was to give the XP, just like all the others.
Next I looked into the DLG file of Camitis (one of the guys from the "Find who burried Tirdir" quest) and copied his cutscene, as it gives a working example of what I am trying to achieve. Here's his code as it is in "camitis.dlg":
Quote
StartCutSceneMode()
SetInterrupt(FALSE)
DialogueInterrupt(FALSE)
AttackOneRound("amsi")
Kill("amsi")
SetGlobal("CamRetiEscape","GLOBAL",1)
SetGlobalTimer("CamitisRun","LOCALS",5)
EscapeAreaObjectMove("AR0500","TRAN0500",1550,3627,13)
SetInterrupt(TRUE)
EndCutSceneMode()

I pasted this code into my dialogue file and made the cosmetic changes it needed (you can see them in the two examples below. Both of them are used in my *.d file. After compilation, one goes to Trajan.dlg and the other - to Azurej.dlg). But guess what happened when I tested it - only XP again.

Quote
StartCutSceneMode()
SetInterrupt(FALSE)
DialogueInterrupt(FALSE)
ActionOverride("Azure",AttackOneRound("trajan"))
ActionOverride("Azure",Kill("trajan"))
SetGlobal("TrajanPlot","GLOBAL",8)
Wait(2)
AddexperienceParty(25000)
SetInterrupt(TRUE)
EndCutSceneMode()



Quote
StartCutSceneMode()
SetInterrupt(FALSE)
DialogueInterrupt(FALSE)
AttackOneRound("trajan")
Kill("trajan")
SetGlobal("TrajanPlot","GLOBAL",8)
Wait(2)
AddexperienceParty(25000)
SetInterrupt(TRUE)
EndCutSceneMode()
Blessed be the one who has nothing to say, and yet remains silent.

Too many chieftan, too little indian.

http://balduran.blackwyrmlair.net

-- Azure NPC Romance
-- BG2 Improvements
-- IWD Improvements

jastey

#1
I don't have experience with the command "kill" but I could imagine it doesn't work if used in a dialogue.

I would suggest splitting the cutscene into an own bcs. That would mean the dialogue of the last person speaking would be:

IF ~~ THEN BEGIN 1
 SAY ~text~
 IF ~~ THEN DO ~ClearAllActions()
StartCutSceneMode()
StartCutScene("cutscene")
~ EXIT
END


and then you compile an own cutscene.baf which would go:

IF
    True()
THEN
    RESPONSE #100
           CutSceneID("Azure")
           SetInterrupt(FALSE)
           DialogueInterrupt(FALSE)
           Wait(1)
           AttackOneRound("trajan")
           Wait(1)
           Kill("trajan")
           SetGlobal("TrajanPlot","GLOBAL",8)
           Wait(2)
           AddexperienceParty(25000)
           SetInterrupt(TRUE)
           EndCutSceneMode()
END

Of course "cutscene" is not the name to be used, it should be an 8 letter name of your choice. :)

Baronius used this "kill" command in a cutscene for his TGC and it worked well, actually I took the above structure from there.


If you don't mind I would move this thread to the "Infinity Engine Modding Workshop" forum, as people who might have a similar problem might find it there quicker.

balduran

This one works even worse than what I've tried so far. I didn't even get the XP. I should probably ask someone who has more experience than me to try and make the cutscene.
Blessed be the one who has nothing to say, and yet remains silent.

Too many chieftan, too little indian.

http://balduran.blackwyrmlair.net

-- Azure NPC Romance
-- BG2 Improvements
-- IWD Improvements

jastey

This might sound like a stupid question but are "Azure" and "trajan" really the death variables of the cres (no spelling mistakes somewhere)?

I wouldn't call myself over-experienced with cutscenes but if you have problems finding a volunteer I can have a look at the files.

balduran

#4
Yes, these are the variables.

If you want, I can send you an archive with the files, just give me your e-mail.

(edited) I attached the archive for convinience.
Blessed be the one who has nothing to say, and yet remains silent.

Too many chieftan, too little indian.

http://balduran.blackwyrmlair.net

-- Azure NPC Romance
-- BG2 Improvements
-- IWD Improvements

jastey

I'm not at home right now, I'll download it tonight.

balduran

Ok, I hope you are more successful than I am so far.
Blessed be the one who has nothing to say, and yet remains silent.

Too many chieftan, too little indian.

http://balduran.blackwyrmlair.net

-- Azure NPC Romance
-- BG2 Improvements
-- IWD Improvements

jastey

Bug report:  :)

Trajan didn't have DV, it was blanc. I added "trajan" as a death variable.

Your cutscene reads:

I changed "ActionOverride("Azure",Kill("trajan"))" to just "Kill("trajan")" (I am not sure this command can be used with "", it is a command telling the script that NPC xy should be killed)

And then it worked fine.

Maybe you could include some ActionOverride("Azure", MoveToObject("trajan")), so she won't kill him if they are meters apart as it was in the last run-through for me.

One thing I noticed: In the cutscene you set SetInterrupt(TRUE) at the end but not FALSE at the beginning.

Hope that solved the problem for you, too.

balduran

#8
Hm, so I  I have removed the DV afterall. In the first version, there was trajan DV, but I made a new cre to make sure that the problem was in the script, not in Trajan himself. But I guess I have forgotten the variable.

So you say you used Kill("trajan") or Kill(trajan)?
Blessed be the one who has nothing to say, and yet remains silent.

Too many chieftan, too little indian.

http://balduran.blackwyrmlair.net

-- Azure NPC Romance
-- BG2 Improvements
-- IWD Improvements

jastey

That's how it always goes. I usually forget to compile the new introduced cutscene, and then wondering in-game why it doesn't work again this time.

It's Kill("trajan"), the DV are always in "" except for Player1 etc.

balduran

This time the scene worked and Trajan really died. But it seems that actions happen all at once, and he died before Azure could MoveToObject to him. So instead I made Azure ForceSpell him to die.


Thanks for your help :D


One last thing: When you tested the scene, did you have your AI On or it was Off? Because for some reason the chain dialogue between Azure and Trajan breaks when I have the AI On. :banghead:
Blessed be the one who has nothing to say, and yet remains silent.

Too many chieftan, too little indian.

http://balduran.blackwyrmlair.net

-- Azure NPC Romance
-- BG2 Improvements
-- IWD Improvements

jastey

Glad that's settled. :)

The AI was on, I think. At least I didn't turn it off knowingly.
-What exactly do you mean with the chain dialogue breaks if the AI is on?

balduran

Well, there are the two Chains (3 actually) that Azure converses in. The first is with Kiral (the elf with the green armour) and the chain in Trajan's dialogue. Here, I'll show you the code:

This is Kiral's chain
QuoteCHAIN kiral 1
   ~How are you?~
   == azurej IF ~~ THEN
   ~Kiral! What are you doing here?~
   == kiral IF ~~ THEN ~I was looking for you.~
   == azurej IF ~~ THEN ~What for? Last time we saw each other, you told me I cannot be allowed inside Suldanessellar. Did you prehaps come to tell me that this has changed?~
   == kiral IF ~~ THEN ~My reason for being here hase little to do with Suldanessellar or my people. I wanted to tell you that one of our scouts spotted Trajan's location.~
   == azurej IF ~~ THEN ~You know where the traitor is? You must tell me, now!~
END kiral 2

Trajan's chain works in exactly the same fashion, except for the difference that it finishes with EXTERN insted of END.


Both chains are OK if the Party AI is Off, but when I accidentally tested them with AI ON the chains exited the dialogue window when Azure was supposed to say her first line of the chain. In the case above she was supposed to say
Quote~Kiral! What are you doing here?~

but it doesn't happen. The same was with Trajan's chain.


I even noticed another problem: When Sharo sees Azure for the first time, he's supposed to ActionOverride her to talk, but it only happens if the AI is OFF.

QuoteIF
   Global("AzureInParty","GLOBAL",1)
   See("Azure")
   Global("SharoMet","GLOBAL",0)
THEN
   RESPONSE #100
  MakeGlobal()
  SetGlobal("SharoInParty","GLOBAL",1)
  ActionOverride("Azure",StartDialogNoSet([PC]))
END

With AI ON she seems to be overrided (the doll trembles weirdly) but the conversation doesn't happen.

Kiral is also supposed to start his conversation with Azure, but it happens, yet again, only with AI OFF.

QuoteIF
   NumTimesTalkedTo(0)
   See("Azure")
   !StateCheck("Azure",STATE_SLEEPING)
THEN
   RESPONSE #100
  MakeGlobal()
  StartDialogNoSet("Azure")
END
Blessed be the one who has nothing to say, and yet remains silent.

Too many chieftan, too little indian.

http://balduran.blackwyrmlair.net

-- Azure NPC Romance
-- BG2 Improvements
-- IWD Improvements

jastey

I tested with the download you provided and in both cases (Trajan and Kiral, all three CLUAed in) it works fine for me with AI on (you mean the "lantern" in the right down corner is on, yes?), so  :confused:

Baronius

#14
The latter problem is interesting. I suppose the dialogues are pausing dialogues, so even if an AI script (due to the enabled Party AI) triggered for some reason, it still shouldn't affect your dialogue. And if this were the problem, it wouldn't have worked for jastey either.

'Trembling body' occurs when the game tries to display the dialogue but its condition is FALSE for some reason. (This is similar to the case when a creature has SHOUTDLG in its Override script slot, but the DLG file is unavailable, or the dialogue's line has no condition or its condition returns FALSE.)
Breaking dialogue is another matter. Direct references (CHAIN) have no condition, so the aforementioned phenomenon can't happen. Was Azure's DLG file available when the dialogue stopped? Perhaps you left it open in a DLG editor program which keeps the file open (and it can't be accessed in GENERIC_READ mode) until you close it... in this case it has nothing to do with the Party AI, maybe it was just a coincidence.
Otherwise I have no idea why the dialogue breaks.


QuoteThis time the scene worked and Trajan really died. But it seems that actions happen all at once, and he died before Azure could MoveToObject to him. So instead I made Azure ForceSpell him to die.
MoveToObject only starts the movement, and doesn't pause the script while the movement is being performed. You need to use Wait(n) after the MoveToObject command, with a proper n value (in seconds).
Mental harmony dispels the darkness.

balduran

#15
QuoteWas Azure's DLG file available when the dialogue stopped?

The only thing that is usually active when I test the mods, is my Explorer window, so it shouldn't be an issue. But as J. Compton suggested, maby the problem is not in the scripts and the dialogue, but rather in my BGII installation.

I'll reinstall and if the problem is gone, then it would mean that some other modder out there has released a mod, which messes somehow with the game's artificial intelligence.


QuoteI suppose the dialogues are pausing dialogues, so even if an AI script (due to the enabled Party AI) triggered for some reason, it still shouldn't affect your dialogue. And if this were the problem, it wouldn't have worked for jastey either.

Doesn't WeiDu make all mod-added dialogues pausing by default?



BTW, I'll move the topic as Jastey suggested.
Blessed be the one who has nothing to say, and yet remains silent.

Too many chieftan, too little indian.

http://balduran.blackwyrmlair.net

-- Azure NPC Romance
-- BG2 Improvements
-- IWD Improvements

balduran

I finally reinstalled the game and tested the mod. It was working this time, both with AI ON and AI OFF. Conversations started when they were supposed to and chains didn't break.

Thank you for all the help, and accept my humble apologies for bugging you with such a minor issue.
Blessed be the one who has nothing to say, and yet remains silent.

Too many chieftan, too little indian.

http://balduran.blackwyrmlair.net

-- Azure NPC Romance
-- BG2 Improvements
-- IWD Improvements

jastey


Baronius

#18
Glad to hear that it is working now. Certainly reinstall is always a final option, but unless it would take too much time (or it just doesn't want to work and I have little free time), I always try to fix the problem without reinstalling the game. In this way you can find out the source and reason of the problem, so you can prevent it or sort it out if it appears next time. :)
Mental harmony dispels the darkness.

balduran

This would take even more time than just reinstalling the game. It probably was a problem with the patches - when I installed the previous time, I forgot the SofA patch before installing ToB. I thought that ToB has all the patches in it, but I guess this isn't the case.
Blessed be the one who has nothing to say, and yet remains silent.

Too many chieftan, too little indian.

http://balduran.blackwyrmlair.net

-- Azure NPC Romance
-- BG2 Improvements
-- IWD Improvements

Quick Reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name:
Email:
Shortcuts: ALT+S post or ALT+P preview