Jump to content

[BG2ToB] - StartDialogOverride() and StartDialog()


aVENGER_(RR)

Recommended Posts

According to my testing, action #137 StartDialog(S:DialogFile*,O:Target*) permanently sets the dialogue file of the targeted creature to the indicated value. On the other hand action #293 StartDialogOverride(S:DialogFile*,O:Target*) doesn't seem to do this. This can be easily confirmed by saving a game after using each action and then loading the respective saves with Near Infinity. Open the NPC in question and check his dialogue file designation in both cases and you'll easily spot the difference.

 

For clarity, if you use something like this in order to make a party member start a pre designated conversation with himself:

 

IF
Exists(LastSummonerOf(Myself))
Global("RR#SCRLT","LOCALS",0)
!StateCheck(LastSummonerOf(Myself),CD_STATE_NOTVALID)
THEN
RESPONSE #100
	SetGlobal("RR#SCRLT","LOCALS",1)
	ActionOverride(LastSummonerOf(Myself),StartDialog("RR#SCRL",Myself))
END

 

then the respective character will be stuck with RR#SCRL.DLG as his dialogue file forevermore. OTOH, using this:

 

IF
Exists(LastSummonerOf(Myself))
Global("RR#SCRLT","LOCALS",0)
!StateCheck(LastSummonerOf(Myself),CD_STATE_NOTVALID)
THEN
RESPONSE #100
	SetGlobal("RR#SCRLT","LOCALS",1)
	ActionOverride(LastSummonerOf(Myself),StartDialogOverride("RR#SCRL",Myself))
END

 

will not change the character's default dialogue file.

Link to comment

I must say that's very strange, as I did test whether or not StartDialog was permanent action and I'm sure it wasn't.

Checked now once again and indeed it's another resref...

 

I wonder then why Spellhold scripts (ar1514 & ar1515 in particular) have ~ActionOverride(Player1,StartDialogue("player1",Player1))~ in them, yet Player1 has their dialog resref empty.

Link to comment
StartDialogOverride takes an additional parameter indicating that this is a dialogue with an item. (at int3, should be only boolean)

I think the only effect is, that it uses the item name instead of the creature name.

 

So, function 293 has two signatures:

StartDialogOverride(S:DialogFile*,O:Target*)

StartDialogOverride(S:DialogFile*,O:Target*, I:ConverseAsItem)

 

If the 3rd param in the second signature is set to 1, the display name for the dialog is read from the ITM file, rather than a CRE file.

 

Correct?

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...