Jump to content


Photo

Nasty NPC dlg bugzzzzzzzzzzzz


  • Please log in to reply
25 replies to this topic

#1 King Diamond

King Diamond

    Give Me Your Soul...Please

  • Modder
  • 1430 posts

Posted 29 January 2005 - 09:11 AM

So, guys, I'm really tired of that...

I have Monty & Xzar in my party and I'm delaying a little to Nashkell. And then we have a dumb joining dialog started in place when just a warning message from both of them should be.

A quick look through that matter revealed following: PATCH-313 replaced good dialogs/scripts for Mont/Xzar/Jah/Khal with a total rubbish (at least in parts that connected to Nashkell visiting parts)!!!

Example:
IF
	GlobalTimerExpired("Montaron","GLOBAL")
	Global("FindNashkell","GLOBAL",0)
	Global("Chapter","GLOBAL",2)
	InParty(Myself)
THEN
	RESPONSE #100
  ActionOverride(Myself,StartDialog("MONTAP",[PC]))

This part starts dialog MONTAP (party leaving dialog) instead of current default dialog (which is MONTJ) at the moment when Monty should ask about to be a little hurry. And - how nice - we have a crazy outplaced "I thought ye would eventually return this way. Need my services once again?....blah blah blah" with 2 options to select end absolutely screwed following events...

Even more... Xzar's script checks for the Chapter 1 (!!!) to start his Naskell messaging....

So, I see that all those dialogs should be fixed after nice 313 fix :P

As far as I'm not an advanced specialist in this area :) I've got 1 question for now:
who's messed all up? :D

(last update: 02-12-2008)
----------------------------------------------
SoS, v1.13
TDD, v1.12
TS-BP, v6.10
CtB, v1.11
RoT, v2.1
----------------------------------------------
BP Animations Scheme


#2 King Diamond

King Diamond

    Give Me Your Soul...Please

  • Modder
  • 1430 posts

Posted 29 January 2005 - 09:32 AM

I see that even an original BP dialogs and scripts are messed up.... :wacko:

Edited by King Diamond, 29 January 2005 - 09:36 AM.

(last update: 02-12-2008)
----------------------------------------------
SoS, v1.13
TDD, v1.12
TS-BP, v6.10
CtB, v1.11
RoT, v2.1
----------------------------------------------
BP Animations Scheme


#3 -Guest-

-Guest-
  • Guest

Posted 29 January 2005 - 09:47 AM

I see that even an original BP dialogs and scripts are messed up.... :wacko:

View Post


Nobody's perfect--or are you the first? :P

#4 King Diamond

King Diamond

    Give Me Your Soul...Please

  • Modder
  • 1430 posts

Posted 29 January 2005 - 12:09 PM

Ok, guys... Here it is some kind of 'fix' for Monty/Xzar :rolleyes:
So it'll be appretiated very much if somebody would check this my attempt and tell me if there's any hope at all.... :blush: never done this before... B)

(at least it seems to be working on early stages of the game)

(last update: 02-12-2008)
----------------------------------------------
SoS, v1.13
TDD, v1.12
TS-BP, v6.10
CtB, v1.11
RoT, v2.1
----------------------------------------------
BP Animations Scheme


#5 Sir BillyBob

Sir BillyBob
  • Modder
  • 5315 posts

Posted 29 January 2005 - 12:54 PM

I just downloaded it twice and I keep getting a corrupt file. Is it from the forum (god knows it is having problems) or did the zip get corrupt?

Tired of Bhaal? Try some classics mods instead:
Classic Adventures
Official Classic Adventures Website


#6 horred the plague

horred the plague

    Scourge of the Seven Seas

  • Modder
  • 1899 posts

Posted 29 January 2005 - 01:29 PM

I just downloaded it twice and I keep getting a corrupt file.  Is it from the forum (god knows it is having problems) or did the zip get corrupt?

View Post


I just d'loaded a clean version from here; who knows what happened before? :unsure:

Nice eye, King. In fact, bringing this to my attention helped me correct another small error in MONTAJ.

In the future, when weidu-ing dialogs for mass delivery, use the --text command.

(e.g. weidu XZAR-MONT/MONTAJ.DLG --text --out XZAR-MONT)

This will give straight text lines instead of (not necessarily connected) STRREF's in the .D file, after the SAY commands
as in:

SAY ~And good riddance to yer bad rubbish.....<yada yada yo>~

instead of:

SAY #112912 /*~And good riddance.....~*/

The top will definitely install right, the bottom one may/may not (it works only if the other guy's STRREF #112912 matches yours precisely).

I'll post a fixed version shortly. ;)

#7 horred the plague

horred the plague

    Scourge of the Seven Seas

  • Modder
  • 1899 posts

Posted 29 January 2005 - 02:01 PM

Attached File  XZAR_MONT.txt   9.74K   22 downloads

I've also figured out how to correct the parting dialogs for npc's. Expect another package shortly (hopefully I can get this to seanas in time for patch #6).

Edited by horred the plague, 29 January 2005 - 02:21 PM.


#8 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 29 January 2005 - 04:17 PM

KD, are you running patch 5? I thought I fixed this already.

EDIT: Hmm, OK. Looks like that was my fault. Oops.

COPY_EXISTING ~MONTARON.BCS~ ~override/MONTARON.BCS~
REPLACE_TEXTUALLY ~MONTAJ~ ~MONTAP~

Edited by Ascension64, 29 January 2005 - 05:00 PM.

--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.

Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)

Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)


#9 King Diamond

King Diamond

    Give Me Your Soul...Please

  • Modder
  • 1430 posts

Posted 31 January 2005 - 01:38 AM

In the future, when weidu-ing dialogs for mass delivery, use the --text command.
(e.g. weidu XZAR-MONT/MONTAJ.DLG --text --out XZAR-MONT)


Will do... :)

(last update: 02-12-2008)
----------------------------------------------
SoS, v1.13
TDD, v1.12
TS-BP, v6.10
CtB, v1.11
RoT, v2.1
----------------------------------------------
BP Animations Scheme


#10 King Diamond

King Diamond

    Give Me Your Soul...Please

  • Modder
  • 1430 posts

Posted 31 January 2005 - 03:00 AM

One more thing...
IF ~InParty("Montaron")
Global("IWasKickedOut","LOCALS",0)
GlobalLT("ENDOFBG1","GLOBAL",2)
~ THEN BEGIN 6 // from:
  SAY ~You... <blah blah>~ /* #104175 */
  IF ~~ THEN DO ~ActionOverride("Montaron",ChangeAIScript("",DEFAULT))
ActionOverride("Montaron",SetGlobal("IWasKickedOut","LOCALS",1))
ActionOverride("Montaron",LeaveParty())
SetGlobal("IWasKickedOut","LOCALS",1)
LeaveParty()~ EXIT
END

After Xzar is kicked out (executed code above) you can't start a coversation with Montaron again. Only with Xzar.
Next code corrects this situation.


IF ~InParty("Montaron")
Global("IWasKickedOut","LOCALS",0)
GlobalLT("ENDOFBG1","GLOBAL",2)
~ THEN BEGIN 6 // from:
  SAY ~You... <blah blah>~ /* #104175 */
  IF ~~ THEN DO ~ActionOverride("Montaron",ChangeAIScript("",DEFAULT))
ActionOverride("Montaron",SetGlobal("IWasKickedOut","LOCALS",1))
ActionOverride("Montaron",LeaveParty())
ActionOverride("Montaron",SetDialogue("MontaP"))
SetGlobal("IWasKickedOut","LOCALS",1)
LeaveParty()~ EXIT
END


One small problem. When ActionOverride(..,LeaveParty()) is using IE doesn't switch a default NPC dialog according to .2da (to MONTAP in this example). So Montaron remains having MontaJ.dlg by default and he definitely has nothing to say you when you speak to him once again.
So ActionOverride("Montaron",SetDialogue("MontaP")) is NECESSARY.

--------

Another thing. As far as I can imagine nothing of dialogs nodes with False() condition is necessary 'coz they NEVER be executed. So let's save some strrefs amount!!!!!!!!!!! :w00t:

P.S> Btw, last LeaveParty() is not necessary as well 'coz NPS's already kicked out ;)

[EDIT]
P.S.S. And where's a happiness statements f.e. for Xzar in XZARJ dialogue (patch 6)? When he's in party XZARJ.dlg executes, so....?
"You are letting me go....." is necessary only in XZARP, not anywhere else....as well as "Well,..., perhaps you'd like to know a little more about me..." when StateCheck(Myself,STATE_CHARMED).

Edited by King Diamond, 31 January 2005 - 03:32 AM.

(last update: 02-12-2008)
----------------------------------------------
SoS, v1.13
TDD, v1.12
TS-BP, v6.10
CtB, v1.11
RoT, v2.1
----------------------------------------------
BP Animations Scheme


#11 King Diamond

King Diamond

    Give Me Your Soul...Please

  • Modder
  • 1430 posts

Posted 31 January 2005 - 03:35 AM

From Xzar.bcs

IF
  GlobalTimerExpired("Xzar","GLOBAL")
  Global("VisitNashkell","GLOBAL",2)
  Global("Chapter","GLOBAL",1)
  InParty(Myself)
THEN
  RESPONSE #100
    ActionOverride(Myself,StartDialogue("XZARJ",[PC]))
END

Global("Chapter","GLOBAL",1) - is a PROLOGUE. It must be
Global("Chapter","GLOBAL",2)


IF
  GlobalTimerExpired("Montaron","GLOBAL")
  Global("FindNashkell","GLOBAL",0)
  Global("Chapter","GLOBAL",2)
  InParty(Myself)
THEN
  RESPONSE #100
    ActionOverride(Myself,StartDialogue("MONTAP",[PC]))
END

Once again - WRONG dialog!
I think I've just post this in the 1st message :angry:

P.S> I suggest to everybody - DO NOT HURRY. Let's make everything smooth, checked and 100% bug free before posting it for public....

Edited by King Diamond, 31 January 2005 - 03:39 AM.

(last update: 02-12-2008)
----------------------------------------------
SoS, v1.13
TDD, v1.12
TS-BP, v6.10
CtB, v1.11
RoT, v2.1
----------------------------------------------
BP Animations Scheme


#12 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 31 January 2005 - 03:41 AM

OMG, I'm so confused! :mellow: :mellow: :mellow:
Maybe you should fix it and post it. B)

OK, seriously...sounds correct in all cases, but doesn't your Xzar.bcs look like the older version?? Also Chapter 2 is the Nashkel mines chapter, the prologue doesn't get a Chapter number. I know this because Montaron and Xzar definitely whine at the correct time.

Edited by Ascension64, 31 January 2005 - 04:04 AM.

--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.

Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)

Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)


#13 King Diamond

King Diamond

    Give Me Your Soul...Please

  • Modder
  • 1430 posts

Posted 31 January 2005 - 07:31 AM

Oki, guys. I started to look through all that stuff 'coz it's better to have everything fixed by one person, not to play to a broken phone.... :huh:
So I've made a new clean BP-BGT install with latest 6th patch :wacko: and going to check all bg1-NPCs step by step.

But when I've already found out how to manage dialogs and scripts I'm still have to learn much about another parts of the whole picture so I'll address you on some unknown or not very clear for me issues in this thread. I hope u'll help me....

1st one: just checked PDialog.2da. Looks good except 1 column - DREAM_SCRIPT_FILE. One word - a total mess... :blush:
I believe that that column have to contain either *** or a name of EXISTING .bcs.
But now it contains whatever someone wanted to place there: names of various NPC's dialogues (mostly JOIN) or just unexisting symbolic names (never existed not as BCSs but even as dialogues too). So I'm absolutely sure that that column must be cleared and sorted out 'coz I can't say if IE handles all that mess correctly (IMHO it's a possible source for those weird 'party-resting' bugs....)

But I'm not sure about the stage.... Can I just correct it as it is to be included in the BP patch? (last entry is for ACCALIA).
Once again - I have plain BP-BGT-NEJ install with only patch 6 applied after automatic installation.

[EDIT] LOL 3 entries for IDIOT01!!! :w00t: :D

Edited by King Diamond, 31 January 2005 - 07:50 AM.

(last update: 02-12-2008)
----------------------------------------------
SoS, v1.13
TDD, v1.12
TS-BP, v6.10
CtB, v1.11
RoT, v2.1
----------------------------------------------
BP Animations Scheme


#14 King Diamond

King Diamond

    Give Me Your Soul...Please

  • Modder
  • 1430 posts

Posted 31 January 2005 - 07:35 AM

OMG, I'm so confused! :mellow:  :mellow:  :mellow:
Maybe you should fix it and post it.  B)

OK, seriously...sounds correct in all cases, but doesn't your Xzar.bcs look like the older version??  Also Chapter 2 is the Nashkel mines chapter, the prologue doesn't get a Chapter number.  I know this because Montaron and Xzar definitely whine at the correct time.

View Post


Chapter 2 begins at the moment of an ambush. Just look into your journal :thumb:


[EDIT]
2nd question:
Isn't it necessary (or say - correct) to register an NPC in both Pdialog.2da and NPClevel.2da to make them respond/behave in a proper way? And what NPC's dialog will be used in game if that NPC hasn't been registered in PDIALOG? (how about J nad P dialogs?)
There're a lot of BG1 NPCs not in NPCLEVELS and partially not in PDIALOGS as well....

Edited by King Diamond, 31 January 2005 - 08:41 AM.

(last update: 02-12-2008)
----------------------------------------------
SoS, v1.13
TDD, v1.12
TS-BP, v6.10
CtB, v1.11
RoT, v2.1
----------------------------------------------
BP Animations Scheme


#15 horred the plague

horred the plague

    Scourge of the Seven Seas

  • Modder
  • 1899 posts

Posted 31 January 2005 - 08:44 AM

Don't worry too much about DREAM_SCRIPT entries, 98% are never used (perhaps 100%).

You'd have to look at the older D files to realize that I atually overwrote several of the False() blocks in the NPC dialogs. Save STRREF's? My new weidu versions will save roughly 12000-13000 STRREF's. No, I don't believe I missed any either. ;)

You have definite proof that in your example above, that montaron still used MONTAJ for a dialog file?I just opened my save's .gam file, and it's listed as MONTAP. And Xzar did the talking. I'll have to start a fresh game to know for sure (it would be nice to finish a game for a change :crying: )

If you take the parting dialogs out of the 'J" series, the only way to kick people out in single player mode is to oversize your party. The STATE_CHARMED statement should be in both XZAR (never in the party) and XZARJ dialogs. And I've actually seen False() statements trigger before--not sure why. It's something that's actually necessary in certain scripting blocks (a string of priority targetting blocks, for example) Again, not sure why.

Edited by horred the plague, 31 January 2005 - 08:44 AM.


#16 King Diamond

King Diamond

    Give Me Your Soul...Please

  • Modder
  • 1430 posts

Posted 31 January 2005 - 09:00 AM

You have definite proof that in your example above, that montaron still used MONTAJ for a dialog file?I just opened my save's .gam file, and it's listed as MONTAP. And Xzar did the talking. I'll have to start a fresh game to know for sure (it would be nice to finish a game for a change  :crying:  )


I didn't look into .sav - I just tried to talk to him after I kicked Xzar (and he took Monty with him). Mont didn't respond. But Xzar responded after I kicked them kicking Monty. So the only difference that Mont's scrip contained dialog overriding for Xzar, but Xzar's didn't. When I added that line everything started to work properly.


NPCLEVEL.2da
The last column in my current file is for 24 level. I'm absolutely sure that some time ago I saw it with up to 50 lvl columns. But unfortunately I deleted old patches (4,5) so I can't say at what point it's been reduced so heavily.... :o

PAtch installation:
[./override/PDIALOG.2DA] loaded, 8193 bytes
Not appending [DAR        DARP           DARJ          ***...] to [pdialog.2da] because it DOES contains [DAR]
It DEFINITELY doesn't contain any DAR.....so this is not working.

Edited by King Diamond, 31 January 2005 - 09:10 AM.

(last update: 02-12-2008)
----------------------------------------------
SoS, v1.13
TDD, v1.12
TS-BP, v6.10
CtB, v1.11
RoT, v2.1
----------------------------------------------
BP Animations Scheme


#17 King Diamond

King Diamond

    Give Me Your Soul...Please

  • Modder
  • 1430 posts

Posted 01 February 2005 - 02:43 AM

Example (P dialog):

ActionOverride("Jaheira",SetGlobal("IWasKickedOut","LOCALS",0))
ActionOverride("Jaheira",JoinParty())
SetGlobal("IWasKickedOut","LOCALS",0)
JoinParty()

Only THAT sequence of function calls is working: setting the local variable before JoinParty(). If you swap those 2 calls you'll have wrong dialog started when you kick anNPC NEXT time. It will be a dialog with reaction to Global("IWasKickedOut","LOCALS",1), not 0 as it should be, so the following code is WRONG:

ActionOverride("Jaheira",JoinParty())
ActionOverride("Jaheira",SetGlobal("IWasKickedOut","LOCALS",0))
SetGlobal("IWasKickedOut","LOCALS",0)
JoinParty()

or 

ActionOverride("Jaheira",SetGlobal("IWasKickedOut","LOCALS",0))
ActionOverride("Jaheira",JoinParty())
JoinParty()
SetGlobal("IWasKickedOut","LOCALS",0)

First one will produce wrong Jaheira's responding, 2nd one - Khalid's.

So, to check local variables in some dialog it's necessary to set them properly in that dialog's context.

It is strange, but

ActionOverride("Jaheira",SetGlobal("IWasKickedOut","LOCALS",1))
ActionOverride("Jaheira",LeaveParty())

sequence can be executed in any order and it works. So I think that only JoinParty() function somehow switches the context.

(last update: 02-12-2008)
----------------------------------------------
SoS, v1.13
TDD, v1.12
TS-BP, v6.10
CtB, v1.11
RoT, v2.1
----------------------------------------------
BP Animations Scheme


#18 horred the plague

horred the plague

    Scourge of the Seven Seas

  • Modder
  • 1899 posts

Posted 01 February 2005 - 06:00 AM

Example (P dialog):

ActionOverride("Jaheira",SetGlobal("IWasKickedOut","LOCALS",0))
ActionOverride("Jaheira",JoinParty())
SetGlobal("IWasKickedOut","LOCALS",0)
JoinParty()

Only THAT sequence of function calls is working: setting the local variable before JoinParty(). If you swap those 2 calls you'll have wrong dialog started when you kick anNPC NEXT time. It will be a dialog with reaction to Global("IWasKickedOut","LOCALS",1), not 0 as it should be, so the following code is WRONG:

ActionOverride("Jaheira",JoinParty())
ActionOverride("Jaheira",SetGlobal("IWasKickedOut","LOCALS",0))
SetGlobal("IWasKickedOut","LOCALS",0)
JoinParty()

or 

ActionOverride("Jaheira",SetGlobal("IWasKickedOut","LOCALS",0))
ActionOverride("Jaheira",JoinParty())
JoinParty()
SetGlobal("IWasKickedOut","LOCALS",0)

First one will produce wrong Jaheira's responding, 2nd one - Khalid's.

So, to check local variables in some dialog it's necessary to set them properly in that dialog's context.

It is strange, but

ActionOverride("Jaheira",SetGlobal("IWasKickedOut","LOCALS",1))
ActionOverride("Jaheira",LeaveParty())

sequence can be executed in any order and it works. So I think that only JoinParty() function somehow switches the context.

View Post


You should really open the baldur.gam file in your save game folders to verify all this. The problem may be caused from something else. The game normally switches properly on Leave and Join.

You're right, about no Dar present--not sure why. NeJ2 has him in there right; that much I can say. And NeJ1 is really not a concern for me anymore--it's way outdated.

#19 King Diamond

King Diamond

    Give Me Your Soul...Please

  • Modder
  • 1430 posts

Posted 01 February 2005 - 06:23 AM

You should really open the baldur.gam file in your save game folders to verify all this. The problem may be caused from something else. The game normally switches properly on Leave and Join.


How can I check local variables? NI shows only globals...

(last update: 02-12-2008)
----------------------------------------------
SoS, v1.13
TDD, v1.12
TS-BP, v6.10
CtB, v1.11
RoT, v2.1
----------------------------------------------
BP Animations Scheme


#20 horred the plague

horred the plague

    Scourge of the Seven Seas

  • Modder
  • 1899 posts

Posted 01 February 2005 - 06:34 AM

How can I check local variables? NI shows only globals...

View Post


Open up the character from the party member list.
Go down to the bottom line (CRE), and open this.
Go down to the bottom of this screen. You'll see a list of effects. In there should be one (or more) that say SetLocalVariable. Those be them... ;)

Edited by horred the plague, 01 February 2005 - 06:35 AM.